From 9597bc16fd8ed85e3a4ad61f62b4edbcdce51bf5 Mon Sep 17 00:00:00 2001 From: Kai Azim Date: Thu, 29 Aug 2024 20:50:01 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Update=20localisation=20support?= =?UTF-8?q?=20+=20bug=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/Localizable.xcstrings | 202 +++++++++++------- .../CustomActionConfigurationView.swift | 2 +- .../Settings/Keybindings/KeybindingItem.swift | 24 +-- Loop/Luminare/Theming/IconConfiguration.swift | 3 +- 4 files changed, 135 insertions(+), 96 deletions(-) diff --git a/Loop/Localizable.xcstrings b/Loop/Localizable.xcstrings index 8ab40da9..2443e8b1 100644 --- a/Loop/Localizable.xcstrings +++ b/Loop/Localizable.xcstrings @@ -4270,9 +4270,11 @@ } } } + }, + "Grow" : { + }, "Halves" : { - "extractionState" : "stale", "localizations" : { "ar" : { "stringUnit" : { @@ -4623,7 +4625,6 @@ } }, "Horizontal Thirds" : { - "extractionState" : "stale", "localizations" : { "ar" : { "stringUnit" : { @@ -4763,77 +4764,6 @@ } } }, - "Icon contributor" : { - "extractionState" : "stale", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "translated", - "value" : "مساهم الأيقونة" - } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "App Icon Mitwirkende" - } - }, - "en-GB" : { - "stringUnit" : { - "state" : "translated", - "value" : "Icon contributor" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Contribuidor de iconos" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Contributore icone" - } - }, - "ko" : { - "stringUnit" : { - "state" : "translated", - "value" : "아이콘 기여자" - } - }, - "nl-BE" : { - "stringUnit" : { - "state" : "translated", - "value" : "Icoon bijdrager" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "translated", - "value" : "Contribuidor de Ícone" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Автор иконки" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "图标贡献者" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "圖標貢獻者" - } - } - } - }, "Icon Name: Black" : { "extractionState" : "extracted_with_value", "localizations" : { @@ -10422,7 +10352,6 @@ } }, "More" : { - "extractionState" : "stale", "localizations" : { "ar" : { "stringUnit" : { @@ -10491,6 +10420,9 @@ } } } + }, + "Move" : { + }, "Move cursor with window" : { "localizations" : { @@ -12707,6 +12639,12 @@ "No updates available message 27" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -12778,6 +12716,12 @@ "No updates available message 28" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -12849,6 +12793,12 @@ "No updates available message 29" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -12920,6 +12870,12 @@ "No updates available message 30" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -12991,6 +12947,12 @@ "No updates available message 31" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13062,6 +13024,12 @@ "No updates available message 32" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13133,6 +13101,12 @@ "No updates available message 33" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13204,6 +13178,12 @@ "No updates available message 34" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13275,6 +13255,12 @@ "No updates available message 35" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13346,6 +13332,12 @@ "No updates available message 36" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13417,6 +13409,12 @@ "No updates available message 37" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13488,6 +13486,12 @@ "No updates available message 38" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13559,6 +13563,12 @@ "No updates available message 39" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13707,6 +13717,12 @@ "No updates available message 41" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13778,6 +13794,12 @@ "No updates available message 42" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13849,6 +13871,12 @@ "No updates available message 43" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -13920,6 +13948,12 @@ "No updates available message 44" : { "extractionState" : "extracted_with_value", "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -14054,6 +14088,12 @@ }, "Nothing to cycle through" : { "localizations" : { + "ar" : { + "stringUnit" : { + "state" : "translated", + "value" : "-" + } + }, "de" : { "stringUnit" : { "state" : "translated", @@ -14779,7 +14819,6 @@ } }, "Position" : { - "extractionState" : "stale", "localizations" : { "ar" : { "stringUnit" : { @@ -15264,7 +15303,6 @@ } }, "Quarters" : { - "extractionState" : "stale", "localizations" : { "ar" : { "stringUnit" : { @@ -16380,7 +16418,6 @@ } }, "Screen Switching" : { - "extractionState" : "stale", "localizations" : { "ar" : { "stringUnit" : { @@ -16451,7 +16488,6 @@ } }, "Search for a window action" : { - "comment" : "Default placeholder", "extractionState" : "extracted_with_value", "localizations" : { "en" : { @@ -17021,6 +17057,9 @@ } } } + }, + "Shrink" : { + }, "Simple" : { "localizations" : { @@ -17093,7 +17132,6 @@ } }, "Size" : { - "extractionState" : "stale", "localizations" : { "ar" : { "stringUnit" : { @@ -17162,6 +17200,9 @@ } } } + }, + "Size Adjustment" : { + }, "Size increment" : { "localizations" : { @@ -18844,7 +18885,6 @@ } }, "Vertical Thirds" : { - "extractionState" : "stale", "localizations" : { "ar" : { "stringUnit" : { @@ -23204,7 +23244,7 @@ "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Вы использовали Loop %11d раз!" + "value" : "Вы использовали Loop %lld раз!" } }, "zh-Hans" : { diff --git a/Loop/Luminare/Settings/Keybindings/CustomActionConfigurationView.swift b/Loop/Luminare/Settings/Keybindings/CustomActionConfigurationView.swift index 0c161b3c..d67e947c 100644 --- a/Loop/Luminare/Settings/Keybindings/CustomActionConfigurationView.swift +++ b/Loop/Luminare/Settings/Keybindings/CustomActionConfigurationView.swift @@ -16,7 +16,7 @@ struct CustomActionConfigurationView: View { @State private var action: WindowAction @State private var currentTab: Tab = .position - private enum Tab: String, CaseIterable { + private enum Tab: LocalizedStringKey, CaseIterable { case position = "Position", size = "Size" var image: Image { diff --git a/Loop/Luminare/Settings/Keybindings/KeybindingItem.swift b/Loop/Luminare/Settings/Keybindings/KeybindingItem.swift index 0dc686e6..959932d9 100644 --- a/Loop/Luminare/Settings/Keybindings/KeybindingItem.swift +++ b/Loop/Luminare/Settings/Keybindings/KeybindingItem.swift @@ -31,23 +31,23 @@ struct KeybindingItemView: View { @State private var isPresented = false let sections: [PickerSection] = [ - .init("General", WindowDirection.general), - .init("Halves", WindowDirection.halves), - .init("Quarters", WindowDirection.quarters), - .init("Horizontal Thirds", WindowDirection.horizontalThirds), - .init("Vertical Thirds", WindowDirection.verticalThirds), - .init("Screen Switching", WindowDirection.screenSwitching), - .init("Size Adjustment", WindowDirection.sizeAdjustment), - .init("Shrink", WindowDirection.shrink), - .init("Grow", WindowDirection.grow), - .init("Move", WindowDirection.move) + .init(.init(localized: "General"), WindowDirection.general), + .init(.init(localized: "Halves"), WindowDirection.halves), + .init(.init(localized: "Quarters"), WindowDirection.quarters), + .init(.init(localized: "Horizontal Thirds"), WindowDirection.horizontalThirds), + .init(.init(localized: "Vertical Thirds"), WindowDirection.verticalThirds), + .init(.init(localized: "Screen Switching"), WindowDirection.screenSwitching), + .init(.init(localized: "Size Adjustment"), WindowDirection.sizeAdjustment), + .init(.init(localized: "Shrink"), WindowDirection.shrink), + .init(.init(localized: "Grow"), WindowDirection.grow), + .init(.init(localized: "Move"), WindowDirection.move) ] var moreSection: PickerSection { if cycleIndex != nil { // If this is a cycling keybind - .init("More", [WindowDirection.custom]) + .init(.init(localized: "More"), [WindowDirection.custom]) } else { - .init("More", [WindowDirection.custom, WindowDirection.cycle]) + .init(.init(localized: "More"), [WindowDirection.custom, WindowDirection.cycle]) } } diff --git a/Loop/Luminare/Theming/IconConfiguration.swift b/Loop/Luminare/Theming/IconConfiguration.swift index dcfbdd34..517d0beb 100644 --- a/Loop/Luminare/Theming/IconConfiguration.swift +++ b/Loop/Luminare/Theming/IconConfiguration.swift @@ -81,7 +81,6 @@ class IconConfigurationModel: ObservableObject { return shuffledTexts.popLast() ?? lockedMessages[0] // Fallback string } - private func handleNotificationChange() { if notificationWhenIconUnlocked { AppDelegate.sendNotification( @@ -177,7 +176,7 @@ struct IconVew: View { Text(nextUnlockCount == icon.unlockTime ? .init(localized: "Loops left to unlock new icon", defaultValue: "\(loopsLeft) Loops left") : - .init(localized: "App icon is locked", defaultValue: "Locked") + .init(localized: "App icon is locked", defaultValue: "Locked") ) .font(.caption) .foregroundColor(.secondary)