Make menu items localizable (#394)

This commit is contained in:
J-rg 2023-01-26 06:40:33 +01:00 committed by GitHub
parent ed17a50234
commit 0f412ab309
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 52 additions and 4 deletions

View file

@ -179,18 +179,18 @@ struct IceCubesApp: App {
@CommandsBuilder @CommandsBuilder
private var appMenu: some Commands { private var appMenu: some Commands {
CommandGroup(replacing: .newItem) { CommandGroup(replacing: .newItem) {
Button("New post") { Button("menu.new-post") {
sidebarRouterPath.presentedSheet = .newStatusEditor(visibility: userPreferences.postVisibility) sidebarRouterPath.presentedSheet = .newStatusEditor(visibility: userPreferences.postVisibility)
} }
} }
CommandGroup(replacing: .textFormatting) { CommandGroup(replacing: .textFormatting) {
Menu("Font") { Menu("menu.font") {
Button("Bigger") { Button("menu.font.bigger") {
if userPreferences.fontSizeScale < 1.5 { if userPreferences.fontSizeScale < 1.5 {
userPreferences.fontSizeScale += 0.1 userPreferences.fontSizeScale += 0.1
} }
} }
Button("Smaller") { Button("menu.font.smaller") {
if userPreferences.fontSizeScale > 0.5 { if userPreferences.fontSizeScale > 0.5 {
userPreferences.fontSizeScale -= 0.1 userPreferences.fontSizeScale -= 0.1
} }

View file

@ -44,6 +44,12 @@
"instance.suggestions" = "Vorschläge"; "instance.suggestions" = "Vorschläge";
"instance.url" = "Instanz-URL"; "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 // MARK: Settings
"settings.account.add" = "Account hinzufügen"; "settings.account.add" = "Account hinzufügen";
"settings.app.icon" = "App-Icon"; "settings.app.icon" = "App-Icon";

View file

@ -44,6 +44,12 @@
"instance.suggestions" = "Suggestions"; "instance.suggestions" = "Suggestions";
"instance.url" = "Instance URL"; "instance.url" = "Instance URL";
// MARK: Menu
"menu.new-post" = "New post";
"menu.font" = "Font";
"menu.font.bigger" = "Bigger";
"menu.font.smaller" = "Smaller";
// MARK: Settings // MARK: Settings
"settings.account.add" = "Add account"; "settings.account.add" = "Add account";
"settings.app.icon" = "App Icon"; "settings.app.icon" = "App Icon";

View file

@ -44,6 +44,12 @@
"instance.suggestions" = "Sugerencias"; "instance.suggestions" = "Sugerencias";
"instance.url" = "URL de la instancia"; "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 // MARK: Settings
"settings.account.add" = "Añadir cuenta"; "settings.account.add" = "Añadir cuenta";
"settings.app.icon" = "Icono de la app"; "settings.app.icon" = "Icono de la app";

View file

@ -44,6 +44,12 @@
"instance.suggestions" = "Suggerimenti"; "instance.suggestions" = "Suggerimenti";
"instance.url" = "URL dell'istanza"; "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 // MARK: Settings
"settings.account.add" = "Aggiungi un account"; "settings.account.add" = "Aggiungi un account";
"settings.app.icon" = "Icona dell'applicazione"; "settings.app.icon" = "Icona dell'applicazione";

View file

@ -44,6 +44,12 @@
"instance.suggestions" = "こちらかも?"; "instance.suggestions" = "こちらかも?";
"instance.url" = "インスタンスのURL"; "instance.url" = "インスタンスのURL";
// MARK: Menu
"menu.new-post" = "New post";
"menu.font" = "Font";
"menu.font.bigger" = "Bigger";
"menu.font.smaller" = "Smaller";
// MARK: Settings // MARK: Settings
"settings.account.add" = "アカウントの追加"; "settings.account.add" = "アカウントの追加";
"settings.app.icon" = "アプリアイコン"; "settings.app.icon" = "アプリアイコン";

View file

@ -44,6 +44,12 @@
"instance.suggestions" = "Suggesties"; "instance.suggestions" = "Suggesties";
"instance.url" = "Instantie-URL"; "instance.url" = "Instantie-URL";
// MARK: Menu
"menu.new-post" = "New post";
"menu.font" = "Font";
"menu.font.bigger" = "Bigger";
"menu.font.smaller" = "Smaller";
// MARK: Settings // MARK: Settings
"settings.account.add" = "Account toevoegen"; "settings.account.add" = "Account toevoegen";
"settings.app.icon" = "Appicoon"; "settings.app.icon" = "Appicoon";

View file

@ -44,6 +44,12 @@
"instance.suggestions" = "Öneriler"; "instance.suggestions" = "Öneriler";
"instance.url" = "Oluşum URL'si"; "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 // MARK: Settings
"settings.account.add" = "Hesap Ekle"; "settings.account.add" = "Hesap Ekle";
"settings.app.icon" = "Uygulama İkonu"; "settings.app.icon" = "Uygulama İkonu";

View file

@ -44,6 +44,12 @@
"instance.suggestions" = "推荐"; "instance.suggestions" = "推荐";
"instance.url" = "服务器 URL"; "instance.url" = "服务器 URL";
// MARK: Menu
"menu.new-post" = "New post";
"menu.font" = "Font";
"menu.font.bigger" = "Bigger";
"menu.font.smaller" = "Smaller";
// MARK: Settings // MARK: Settings
"settings.account.add" = "添加账户"; "settings.account.add" = "添加账户";
"settings.app.icon" = "应用图标"; "settings.app.icon" = "应用图标";