mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 03:50:08 +02:00
🌐 Localization fixes
- Adds a fallback for missing keys - Make type column resizable on domains - Localized "Open with" text in context menu - Updated some Dutch translations
This commit is contained in:
@ -32,13 +32,22 @@ struct Localization {
|
||||
|
||||
extension String {
|
||||
var localized: String {
|
||||
if #available(macOS 13, *) {
|
||||
return NSLocalizedString(
|
||||
self, tableName: nil, bundle: Localization.bundle, value: "", comment: ""
|
||||
).replacingOccurrences(of: "Preferences", with: "Settings")
|
||||
let string = NSLocalizedString(self, tableName: nil, bundle: Localization.bundle, value: "", comment: "")
|
||||
|
||||
// Fallback to English translation if the localized value is equal to the key (should not happen)
|
||||
if string == self {
|
||||
guard let path = Localization.bundle.path(forResource: "en", ofType: "lproj"),
|
||||
let bundle = Bundle(path: path)
|
||||
else { return self }
|
||||
return NSLocalizedString(self, bundle: bundle, comment: "")
|
||||
}
|
||||
|
||||
return NSLocalizedString(self, tableName: nil, bundle: Localization.bundle, value: "", comment: "")
|
||||
// Ensure that on more recent versions of macOS, "Preferences" is replaced with "Settings"
|
||||
if #available(macOS 13, *) {
|
||||
return string.replacingOccurrences(of: "Preferences", with: "Settings")
|
||||
}
|
||||
|
||||
return string
|
||||
}
|
||||
|
||||
var localizedForSwiftUI: LocalizedStringKey {
|
||||
|
@ -973,7 +973,7 @@ Gw
|
||||
</tableCellView>
|
||||
</prototypeCellViews>
|
||||
</tableColumn>
|
||||
<tableColumn identifier="KIND" width="36" minWidth="36" maxWidth="36" id="7EV-ZL-92u">
|
||||
<tableColumn identifier="KIND" width="50" minWidth="50" maxWidth="120" id="7EV-ZL-92u">
|
||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Kind">
|
||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
@ -987,11 +987,11 @@ Gw
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView identifier="domainListKindCell" wantsLayer="YES" id="AhT-xR-16a" customClass="DomainListKindCell" customModule="PHP_Monitor" customModuleProvider="target">
|
||||
<rect key="frame" x="403" y="0.0" width="36" height="54"/>
|
||||
<rect key="frame" x="403" y="0.0" width="48" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="sYR-vb-OW1">
|
||||
<rect key="frame" x="9" y="18" width="18" height="18"/>
|
||||
<rect key="frame" x="15" y="18" width="18" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="18" id="XcB-uw-szU"/>
|
||||
<constraint firstAttribute="height" constant="18" id="bGN-Vh-Sh0"/>
|
||||
@ -1024,7 +1024,7 @@ Gw
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView identifier="domainListTypeCell" wantsLayer="YES" id="ntU-Rl-ciP" customClass="DomainListTypeCell" customModule="PHP_Monitor" customModuleProvider="target">
|
||||
<rect key="frame" x="456" y="0.0" width="97" height="54"/>
|
||||
<rect key="frame" x="468" y="0.0" width="97" height="54"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ljl-8B-key">
|
||||
|
@ -25,7 +25,7 @@ class DomainListTypeCell: NSTableCellView, DomainListCellProtocol {
|
||||
}
|
||||
|
||||
// PHP version
|
||||
labelPhpVersion.stringValue = site.preferredPhpVersion == "???" ? "Any PHP" : "PHP \(site.preferredPhpVersion)"
|
||||
labelPhpVersion.stringValue = site.preferredPhpVersion == "???" ? "PHP" : "PHP \(site.preferredPhpVersion)"
|
||||
}
|
||||
|
||||
func populateCell(with proxy: ValetProxy) {
|
||||
|
@ -75,7 +75,7 @@ extension DomainListVC {
|
||||
|
||||
for editor in applications {
|
||||
let editorMenuItem = EditorMenuItem(
|
||||
title: "Open with \(editor.name)",
|
||||
title: "domain_list.open_in".localized(editor.name),
|
||||
action: #selector(self.openWithEditor(sender:)),
|
||||
keyEquivalent: ""
|
||||
)
|
||||
|
@ -94,6 +94,7 @@
|
||||
"phpman.buttons.install" = "Installieren";
|
||||
"phpman.buttons.update" = "Aktualisieren";
|
||||
"phpman.buttons.repair" = "Reparieren";
|
||||
"phpman.version.prerelease" = "Pre-release";
|
||||
|
||||
"phpman.title" = "PHP-Versionen Manager";
|
||||
"phpman.description" = "Mit dem **PHP-Versionen Manager** können Sie verschiedene PHP-Versionen über Homebrew installieren, aktualisieren und löschen, ohne die Befehle im Terminal selbst ausführen zu müssen.";
|
||||
@ -267,6 +268,7 @@ Möglicherweise werden Sie während des Deinstallationsvorgangs nach Ihrem Passw
|
||||
"domain_list.unlink" = "Ordner-Link aufheben";
|
||||
"domain_list.secure" = "Domain sichern";
|
||||
"domain_list.unsecure" = "Domain nicht mehr sichern";
|
||||
"domain_list.open_in" = "Mit %@ öffnen";
|
||||
"domain_list.open_in_finder" = "In Finder öffnen";
|
||||
"domain_list.open_in_browser" = "Im Browser öffnen";
|
||||
"domain_list.open_in_terminal" = "Im Terminal öffnen";
|
||||
|
@ -282,6 +282,7 @@ You may be asked for your password during the uninstallation process if file per
|
||||
"domain_list.unlink" = "Unlink Directory";
|
||||
"domain_list.secure" = "Secure Domain";
|
||||
"domain_list.unsecure" = "Unsecure Domain";
|
||||
"domain_list.open_in" = "Open with %@";
|
||||
"domain_list.open_in_finder" = "Open in Finder";
|
||||
"domain_list.open_in_browser" = "Open in Browser";
|
||||
"domain_list.open_in_terminal" = "Open in Terminal";
|
||||
@ -382,7 +383,7 @@ This has no effect on other terminals, only for the particular terminal session
|
||||
|
||||
"prefs.php_doctor_suggestions_title" = "Always show suggestions";
|
||||
"prefs.php_doctor_suggestions_desc" = "If you uncheck this item, no PHP Doctor suggestions will appear in PHP Monitor's menu. Keep in mind that PHP Doctor will not appear if there are no recommendations.";
|
||||
|
||||
|
||||
"prefs.shortcut_set" = "Set global shortcut";
|
||||
"prefs.shortcut_listening" = "<listening for keypress>";
|
||||
"prefs.shortcut_clear" = "Clear";
|
||||
|
@ -1,6 +1,6 @@
|
||||
// MENU ITEMS (MI)
|
||||
|
||||
"mi_busy" = "PHP Monitor is bezig...";
|
||||
"mi_busy" = "PHP Monitor is even bezig...";
|
||||
|
||||
"mi_unsure" = "We zijn niet zeker welke versie van PHP er actief is.";
|
||||
"mi_php_version" = "Globale versie: PHP";
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
"mi_configuration" = "PHP configuratie";
|
||||
"mi_limits" = "Configureer limieten";
|
||||
"mi_memory_limit" = "Geheugen limiet";
|
||||
"mi_memory_limit" = "Geheugenlimiet";
|
||||
"mi_post_max_size" = "Max POST";
|
||||
"mi_upload_max_filesize" = "Max Upload";
|
||||
"mi_manual_actions" = "Manuele Acties";
|
||||
@ -49,7 +49,7 @@
|
||||
"mi_phpmon_config" = "Vind PHP Monitor folder (.config/phpmon)";
|
||||
"mi_global_composer" = "Vind globale Composer folder (.composer)";
|
||||
"mi_phpinfo" = "Toon huidige configuratie (phpinfo)";
|
||||
"mi_update_global_composer" = "Update globale Composer packages...";
|
||||
"mi_update_global_composer" = "Globale Composer update...";
|
||||
"mi_detected_extensions" = "Gedetecteerde extensies";
|
||||
"mi_no_extensions_detected" = "Geen extra extensies gedetecteerd.";
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
"mi_view_recommendations" = "Bekijk aanbevelingen...";
|
||||
|
||||
"mi_valet" = "Laravel Valet";
|
||||
"mi_domain_list" = "Open domeinenlijst...";
|
||||
"mi_domain_list" = "Open Domeinen...";
|
||||
|
||||
"mi_preferences" = "Voorkeuren...";
|
||||
"mi_donate" = "Doneer...";
|
||||
@ -91,10 +91,11 @@
|
||||
"phpman.version.has_update" = "Versie %@ geïnstalleerd, %@ beschikbaar.";
|
||||
"phpman.version.installed" = "Versie %@ is momenteel geïnstalleerd.";
|
||||
"phpman.version.available_for_installation" = "Deze versie kan worden geïnstalleerd.";
|
||||
"phpman.buttons.uninstall" = "Deïnstalleren";
|
||||
"phpman.buttons.uninstall" = "Verwijderen";
|
||||
"phpman.buttons.install" = "Installeren";
|
||||
"phpman.buttons.update" = "Bijwerken";
|
||||
"phpman.buttons.repair" = "Herstellen";
|
||||
"phpman.version.prerelease" = "Pre-release";
|
||||
|
||||
"phpman.title" = "PHP Versiebeheerder";
|
||||
"phpman.description" = "**PHP Versiebeheerder** stelt je in staat om verschillende PHP-versies te installeren, upgraden en verwijderen via Homebrew, zonder dat je de commando's zelf in de terminal hoeft uit te voeren.";
|
||||
@ -216,8 +217,8 @@ Tijdens het verwijderingsproces kan je worden gevraagd om je wachtwoord indien d
|
||||
|
||||
"selection.title" = "Wat voor soort domein wil je instellen?";
|
||||
"selection.description" = "Koppelingen (links) worden gebruikt om projecten rechtstreeks te gebruiken. Als je een Laravel, Symfony, WordPress, etc. map met code hebt, wil je een koppeling maken en de map kiezen waar je code zich bevindt.\n\nAls je een proxy nodig hebt, kun je bijvoorbeeld een container doorsturen naar een bepaalde domeinnaam. Dit kan handig zijn in combinatie met Docker, bijvoorbeeld.";
|
||||
"selection.create_link" = "Maak een link";
|
||||
"selection.create_proxy" = "Maak een proxy";
|
||||
"selection.create_link" = "Link aanmaken";
|
||||
"selection.create_proxy" = "Proxy aanmaken";
|
||||
"selection.cancel" = "Annuleren";
|
||||
|
||||
// ADD PROXY TO DOMAINS LIST
|
||||
@ -268,6 +269,7 @@ Tijdens het verwijderingsproces kan je worden gevraagd om je wachtwoord indien d
|
||||
"domain_list.unlink" = "Link verwijderen";
|
||||
"domain_list.secure" = "Domein beveiligen";
|
||||
"domain_list.unsecure" = "Domein niet beveiligen";
|
||||
"domain_list.open_in" = "Openen met %@";
|
||||
"domain_list.open_in_finder" = "Openen in Finder";
|
||||
"domain_list.open_in_browser" = "Openen in browser";
|
||||
"domain_list.open_in_terminal" = "Openen in Terminal";
|
||||
|
@ -94,6 +94,7 @@
|
||||
"phpman.buttons.install" = "Instalar";
|
||||
"phpman.buttons.update" = "Atualizar";
|
||||
"phpman.buttons.repair" = "Reparar";
|
||||
"phpman.version.prerelease" = "Pre-release";
|
||||
|
||||
"phpman.title" = "PHP Version Manager";
|
||||
"phpman.description" = "**PHP Version Manager** permite instalar, atualizar e excluir diferentes versões do PHP via Homebrew sem precisar executar manualmente os comandos no seu terminal.";
|
||||
@ -267,6 +268,7 @@ Poderá ser-lhe solicitada a sua palavra-passe durante o processo de desinstala
|
||||
"domain_list.unlink" = "Desvincular diretoria";
|
||||
"domain_list.secure" = "Domínio seguro";
|
||||
"domain_list.unsecure" = "Domínio não seguro";
|
||||
"domain_list.open_in" = "Abrir no %@";
|
||||
"domain_list.open_in_finder" = "Abrir no Finder";
|
||||
"domain_list.open_in_browser" = "Abrir no navegador";
|
||||
"domain_list.open_in_terminal" = "Abrir no terminal";
|
||||
|
@ -94,6 +94,7 @@
|
||||
"phpman.buttons.install" = "Cài đặt";
|
||||
"phpman.buttons.update" = "Cập nhật";
|
||||
"phpman.buttons.repair" = "Sửa chữa";
|
||||
"phpman.version.prerelease" = "Pre-release";
|
||||
|
||||
"phpman.title" = "Quản lý Phiên bản PHP";
|
||||
"phpman.description" = "**Quản lý Phiên bản PHP** cho phép bạn cài đặt, nâng cấp và xóa các phiên bản PHP khác nhau thông qua Homebrew mà không cần phải chạy các lệnh trong terminal.";
|
||||
@ -261,6 +262,7 @@ Bạn có thể được yêu cầu nhập mật khẩu của mình trong quá t
|
||||
"domain_list.unlink" = "Hủy liên kết Thư mục";
|
||||
"domain_list.secure" = "Bảo mật Tên miền";
|
||||
"domain_list.unsecure" = "Không bảo mật Tên miền";
|
||||
"domain_list.open_in" = "Mở trong %@";
|
||||
"domain_list.open_in_finder" = "Mở trong Finder";
|
||||
"domain_list.open_in_browser" = "Mở trong Trình duyệt";
|
||||
"domain_list.open_in_terminal" = "Mở trong Terminal";
|
||||
|
Reference in New Issue
Block a user