diff --git a/phpmon/Common/Extensions/StringExtension.swift b/phpmon/Common/Extensions/StringExtension.swift index cc7afb5..1cf0061 100644 --- a/phpmon/Common/Extensions/StringExtension.swift +++ b/phpmon/Common/Extensions/StringExtension.swift @@ -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 { diff --git a/phpmon/Domain/App/Base.lproj/Main.storyboard b/phpmon/Domain/App/Base.lproj/Main.storyboard index a2302ba..16495fd 100644 --- a/phpmon/Domain/App/Base.lproj/Main.storyboard +++ b/phpmon/Domain/App/Base.lproj/Main.storyboard @@ -973,7 +973,7 @@ Gw - + @@ -987,11 +987,11 @@ Gw - + - + @@ -1024,7 +1024,7 @@ Gw - + diff --git a/phpmon/Modules/Domain List/UI/Cells/DomainListTypeCell.swift b/phpmon/Modules/Domain List/UI/Cells/DomainListTypeCell.swift index 1208b81..91ca279 100644 --- a/phpmon/Modules/Domain List/UI/Cells/DomainListTypeCell.swift +++ b/phpmon/Modules/Domain List/UI/Cells/DomainListTypeCell.swift @@ -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) { diff --git a/phpmon/Modules/Domain List/UI/DomainListVC+ContextMenu.swift b/phpmon/Modules/Domain List/UI/DomainListVC+ContextMenu.swift index f806890..dbcccb2 100644 --- a/phpmon/Modules/Domain List/UI/DomainListVC+ContextMenu.swift +++ b/phpmon/Modules/Domain List/UI/DomainListVC+ContextMenu.swift @@ -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: "" ) diff --git a/phpmon/de.lproj/Localizable.strings b/phpmon/de.lproj/Localizable.strings index 2669952..1817b30 100644 --- a/phpmon/de.lproj/Localizable.strings +++ b/phpmon/de.lproj/Localizable.strings @@ -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"; diff --git a/phpmon/en.lproj/Localizable.strings b/phpmon/en.lproj/Localizable.strings index 5a3f415..4c885ce 100644 --- a/phpmon/en.lproj/Localizable.strings +++ b/phpmon/en.lproj/Localizable.strings @@ -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" = ""; "prefs.shortcut_clear" = "Clear"; diff --git a/phpmon/nl.lproj/Localizable.strings b/phpmon/nl.lproj/Localizable.strings index b60e500..a6f8c47 100644 --- a/phpmon/nl.lproj/Localizable.strings +++ b/phpmon/nl.lproj/Localizable.strings @@ -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"; diff --git a/phpmon/pt-PT.lproj/Localizable.strings b/phpmon/pt-PT.lproj/Localizable.strings index 4d92433..9005bbe 100644 --- a/phpmon/pt-PT.lproj/Localizable.strings +++ b/phpmon/pt-PT.lproj/Localizable.strings @@ -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"; diff --git a/phpmon/vi.lproj/Localizable.strings b/phpmon/vi.lproj/Localizable.strings index f09ab7c..ab2daf9 100644 --- a/phpmon/vi.lproj/Localizable.strings +++ b/phpmon/vi.lproj/Localizable.strings @@ -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";