From 0f412ab309b56b7b177a00b85c44cbd8b8ddc551 Mon Sep 17 00:00:00 2001 From: J-rg <4042863+J-rg@users.noreply.github.com> Date: Thu, 26 Jan 2023 06:40:33 +0100 Subject: [PATCH] Make menu items localizable (#394) --- IceCubesApp/App/IceCubesApp.swift | 8 ++++---- .../Resources/Localization/de.lproj/Localizable.strings | 6 ++++++ .../Resources/Localization/en.lproj/Localizable.strings | 6 ++++++ .../Resources/Localization/es.lproj/Localizable.strings | 6 ++++++ .../Resources/Localization/it.lproj/Localizable.strings | 6 ++++++ .../Resources/Localization/ja.lproj/Localizable.strings | 6 ++++++ .../Resources/Localization/nl.lproj/Localizable.strings | 6 ++++++ .../Resources/Localization/tr.lproj/Localizable.strings | 6 ++++++ .../Localization/zh-Hans.lproj/Localizable.strings | 6 ++++++ 9 files changed, 52 insertions(+), 4 deletions(-) diff --git a/IceCubesApp/App/IceCubesApp.swift b/IceCubesApp/App/IceCubesApp.swift index 72c1557a..67d23a1c 100644 --- a/IceCubesApp/App/IceCubesApp.swift +++ b/IceCubesApp/App/IceCubesApp.swift @@ -179,18 +179,18 @@ struct IceCubesApp: App { @CommandsBuilder private var appMenu: some Commands { CommandGroup(replacing: .newItem) { - Button("New post") { + Button("menu.new-post") { sidebarRouterPath.presentedSheet = .newStatusEditor(visibility: userPreferences.postVisibility) } } CommandGroup(replacing: .textFormatting) { - Menu("Font") { - Button("Bigger") { + Menu("menu.font") { + Button("menu.font.bigger") { if userPreferences.fontSizeScale < 1.5 { userPreferences.fontSizeScale += 0.1 } } - Button("Smaller") { + Button("menu.font.smaller") { if userPreferences.fontSizeScale > 0.5 { userPreferences.fontSizeScale -= 0.1 } diff --git a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings index dbe75fa9..779d7c47 100644 --- a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings @@ -44,6 +44,12 @@ "instance.suggestions" = "Vorschläge"; "instance.url" = "Instanz-URL"; +// MARK: Menu +"menu.new-post" = "Neuer Post"; +"menu.font" = "Schrift"; +"menu.font.bigger" = "Größer"; +"menu.font.smaller" = "Kleiner"; + // MARK: Settings "settings.account.add" = "Account hinzufügen"; "settings.app.icon" = "App-Icon"; diff --git a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings index e6560f37..20b3c23c 100644 --- a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings @@ -44,6 +44,12 @@ "instance.suggestions" = "Suggestions"; "instance.url" = "Instance URL"; +// MARK: Menu +"menu.new-post" = "New post"; +"menu.font" = "Font"; +"menu.font.bigger" = "Bigger"; +"menu.font.smaller" = "Smaller"; + // MARK: Settings "settings.account.add" = "Add account"; "settings.app.icon" = "App Icon"; diff --git a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings index a250536d..3d7789c4 100644 --- a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings @@ -44,6 +44,12 @@ "instance.suggestions" = "Sugerencias"; "instance.url" = "URL de la instancia"; +// MARK: Menu +"menu.new-post" = "New post"; +"menu.font" = "Font"; +"menu.font.bigger" = "Bigger"; +"menu.font.smaller" = "Smaller"; + // MARK: Settings "settings.account.add" = "Añadir cuenta"; "settings.app.icon" = "Icono de la app"; diff --git a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings index 8094b027..f237ecc5 100644 --- a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings @@ -44,6 +44,12 @@ "instance.suggestions" = "Suggerimenti"; "instance.url" = "URL dell'istanza"; +// MARK: Menu +"menu.new-post" = "New post"; +"menu.font" = "Font"; +"menu.font.bigger" = "Bigger"; +"menu.font.smaller" = "Smaller"; + // MARK: Settings "settings.account.add" = "Aggiungi un account"; "settings.app.icon" = "Icona dell'applicazione"; diff --git a/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings index cd5ec415..197d09ee 100644 --- a/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings @@ -44,6 +44,12 @@ "instance.suggestions" = "こちらかも?"; "instance.url" = "インスタンスのURL"; +// MARK: Menu +"menu.new-post" = "New post"; +"menu.font" = "Font"; +"menu.font.bigger" = "Bigger"; +"menu.font.smaller" = "Smaller"; + // MARK: Settings "settings.account.add" = "アカウントの追加"; "settings.app.icon" = "アプリアイコン"; diff --git a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings index aa2cff0c..fc974aee 100644 --- a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings @@ -44,6 +44,12 @@ "instance.suggestions" = "Suggesties"; "instance.url" = "Instantie-URL"; +// MARK: Menu +"menu.new-post" = "New post"; +"menu.font" = "Font"; +"menu.font.bigger" = "Bigger"; +"menu.font.smaller" = "Smaller"; + // MARK: Settings "settings.account.add" = "Account toevoegen"; "settings.app.icon" = "Appicoon"; diff --git a/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings index 638ca926..71d9fdab 100644 --- a/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings @@ -44,6 +44,12 @@ "instance.suggestions" = "Öneriler"; "instance.url" = "Oluşum URL'si"; +// MARK: Menu +"menu.new-post" = "New post"; +"menu.font" = "Font"; +"menu.font.bigger" = "Bigger"; +"menu.font.smaller" = "Smaller"; + // MARK: Settings "settings.account.add" = "Hesap Ekle"; "settings.app.icon" = "Uygulama İkonu"; diff --git a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings index 8241f1e3..c4637c4f 100644 --- a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings @@ -44,6 +44,12 @@ "instance.suggestions" = "推荐"; "instance.url" = "服务器 URL"; +// MARK: Menu +"menu.new-post" = "New post"; +"menu.font" = "Font"; +"menu.font.bigger" = "Bigger"; +"menu.font.smaller" = "Smaller"; + // MARK: Settings "settings.account.add" = "添加账户"; "settings.app.icon" = "应用图标";