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
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
}

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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" = "アプリアイコン";

View file

@ -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";

View file

@ -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";

View file

@ -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" = "应用图标";