From 45ec990384c8d18249cc60254cfcb86f97aa33b3 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Date: Sun, 22 Jan 2023 11:16:48 +0100 Subject: [PATCH 1/6] Added missing translation on spanish. Replacing hardcoded text with localization key (non spanish translations still missing). (#259) Co-authored-by: Roberto Pastor --- IceCubesApp/App/Tabs/Settings/SettingsTab.swift | 2 +- .../Resources/Localization/de.lproj/Localizable.strings | 1 + .../Resources/Localization/en.lproj/Localizable.strings | 1 + .../Resources/Localization/es.lproj/Localizable.strings | 4 +++- .../Resources/Localization/it.lproj/Localizable.strings | 1 + .../Resources/Localization/nl.lproj/Localizable.strings | 1 + .../Resources/Localization/zh-Hans.lproj/Localizable.strings | 1 + 7 files changed, 9 insertions(+), 2 deletions(-) diff --git a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift index 2eddf51e..948cbceb 100644 --- a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift +++ b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift @@ -137,7 +137,7 @@ struct SettingsTabs: View { if let reviewURL = URL(string: "https://apps.apple.com/app/id\(AppInfo.appStoreAppId)?action=write-review") { Link(destination: reviewURL) { - Label("Rate Ice Cubes", systemImage: "link") + Label("settings.rate", systemImage: "link") } .tint(theme.labelColor) } diff --git a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings index e6f1b8d1..6a3a2655 100644 --- a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings @@ -96,6 +96,7 @@ "settings.support.two.title" = "☕️ Schönes Trinkgeld"; "settings.timeline.add" = "Lokale Timeline hinzufügen"; "settings.title" = "Einstellungen"; +"settings.rate" = "Rate Ice Cubes"; // MARK: Tabs "tab.explore" = "Entdecken"; diff --git a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings index 2d78f59f..65ea19e1 100644 --- a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings @@ -96,6 +96,7 @@ "settings.support.two.title" = "☕️ Nice Tip"; "settings.timeline.add" = "Add a local timeline"; "settings.title" = "Settings"; +"settings.rate" = "Rate Ice Cubes"; // MARK: Tabs "tab.explore" = "Explore"; diff --git a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings index 2c40bc7c..22631fab 100644 --- a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings @@ -49,7 +49,7 @@ "settings.app.icon" = "Icono de la app"; "settings.app.icon.navigation-title" = "Iconos"; "settings.app.source" = "Código fuente (Enlace a GitHub)"; -"settings.app.support" = "Apoya a esta app"; +"settings.app.support" = "Apoya a Ice Cubes"; "settings.display.avatar.position" = "Posición del avatar"; "settings.display.avatar.shape" = "Forma del avatar"; "settings.display.navigation-title" = "Ajustes de apariencia"; @@ -96,6 +96,7 @@ "settings.support.two.title" = "☕️ Buena propina"; "settings.timeline.add" = "Añadir cronología local"; "settings.title" = "Ajustes"; +"settings.rate" = "Valora Ice Cubes"; // MARK: Tabs "tab.explore" = "Explorar"; @@ -159,6 +160,7 @@ "account.post.pinned" = "Publicación fijada"; "account.posts" = "Publicaciones"; "account.relation.follows-you" = "Te sigue"; +"account.joined" = "Se unió el"; // MARK: Package: Conversations "conversations.action.delete" = "Borrar"; diff --git a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings index 98923faf..fa4a2f13 100644 --- a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings @@ -96,6 +96,7 @@ "settings.support.two.title" = "☕️ Contributo carino"; "settings.timeline.add" = "Aggiungi una timeline locale"; "settings.title" = "Impostazioni"; +"settings.rate" = "Rate Ice Cubes"; // MARK: Tabs "tab.explore" = "Esplora"; diff --git a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings index d0b807ed..1125fba8 100644 --- a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings @@ -160,6 +160,7 @@ "account.posts" = "Posts"; "account.relation.follows-you" = "Volgt jou"; "account.joined" = "Lid geworden"; +"settings.rate" = "Rate Ice Cubes"; // MARK: Package: Conversations "conversations.action.delete" = "Verwijderen"; diff --git a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings index 362f1535..d5f9669b 100644 --- a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings @@ -96,6 +96,7 @@ "settings.support.two.title" = "☕️ 很不错的捐赠"; "settings.timeline.add" = "添加一个本地时间线"; "settings.title" = "设置"; +"settings.rate" = "Rate Ice Cubes"; // MARK: Tabs "tab.explore" = "探索"; From a37d0590260c30b175239117cb770bec7436e250 Mon Sep 17 00:00:00 2001 From: orenro Date: Sun, 22 Jan 2023 19:17:27 +0900 Subject: [PATCH 2/6] Display statuses with appropriate alignment for right-to-left languages (#256) --- .../Sources/DesignSystem/Views/EmojiText.swift | 11 ++++++++++- .../Status/Sources/Status/Row/StatusRowView.swift | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Packages/DesignSystem/Sources/DesignSystem/Views/EmojiText.swift b/Packages/DesignSystem/Sources/DesignSystem/Views/EmojiText.swift index 65b75f6f..2d494da0 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Views/EmojiText.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Views/EmojiText.swift @@ -7,11 +7,13 @@ import SwiftUI public struct EmojiTextApp: View { private let markdown: HTMLString private let emojis: [any CustomEmoji] + private let language: String? private let append: (() -> Text)? - public init(_ markdown: HTMLString, emojis: [Emoji], append: (() -> Text)? = nil) { + public init(_ markdown: HTMLString, emojis: [Emoji], language: String? = nil, append: (() -> Text)? = nil) { self.markdown = markdown self.emojis = emojis.map { RemoteEmoji(shortcode: $0.shortcode, url: $0.url) } + self.language = language self.append = append } @@ -23,8 +25,15 @@ public struct EmojiTextApp: View { } } else if emojis.isEmpty { Text(markdown.asSafeMarkdownAttributedString) + .environment(\.layoutDirection, isRTL() ? .rightToLeft : .leftToRight) } else { EmojiText(markdown: markdown.asMarkdown, emojis: emojis) + .environment(\.layoutDirection, isRTL() ? .rightToLeft : .leftToRight) } } + + private func isRTL() -> Bool { + // Arabic, Hebrew, Persian, Urdu, Kurdish, Azeri, Dhivehi + return ["ar", "he", "fa", "ur", "ku", "az", "dv"].contains(self.language) + } } diff --git a/Packages/Status/Sources/Status/Row/StatusRowView.swift b/Packages/Status/Sources/Status/Row/StatusRowView.swift index 0fb7e6b5..98dc1253 100644 --- a/Packages/Status/Sources/Status/Row/StatusRowView.swift +++ b/Packages/Status/Sources/Status/Row/StatusRowView.swift @@ -215,7 +215,7 @@ public struct StatusRowView: View { private func makeStatusContentView(status: AnyStatus) -> some View { Group { if !status.spoilerText.asRawText.isEmpty { - EmojiTextApp(status.spoilerText, emojis: status.emojis) + EmojiTextApp(status.spoilerText, emojis: status.emojis, language: status.language) .font(.scaledBody) Button { withAnimation { @@ -230,7 +230,7 @@ public struct StatusRowView: View { if !viewModel.displaySpoiler { HStack { - EmojiTextApp(status.content, emojis: status.emojis) + EmojiTextApp(status.content, emojis: status.emojis, language: status.language) .font(.scaledBody) .environment(\.openURL, OpenURLAction { url in routerPath.handleStatus(status: status, url: url) From 1c679186b02a552611c9bff3dc91dbc2ff242e16 Mon Sep 17 00:00:00 2001 From: Sean Goldin Date: Sun, 22 Jan 2023 04:28:23 -0600 Subject: [PATCH 3/6] Only ask for draft when text entered by user (#251) --- .../Status/Editor/StatusEditorView.swift | 2 +- .../Status/Editor/StatusEditorViewModel.swift | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Packages/Status/Sources/Status/Editor/StatusEditorView.swift b/Packages/Status/Sources/Status/Editor/StatusEditorView.swift index 31ef9b84..efe72c27 100644 --- a/Packages/Status/Sources/Status/Editor/StatusEditorView.swift +++ b/Packages/Status/Sources/Status/Editor/StatusEditorView.swift @@ -125,7 +125,7 @@ public struct StatusEditorView: View { } ToolbarItem(placement: .navigationBarLeading) { Button { - if !viewModel.statusText.string.isEmpty && !viewModel.mode.isInShareExtension { + if viewModel.shouldDisplayDismissWarning { isDismissAlertPresented = true } else { dismiss() diff --git a/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift b/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift index f253ac82..98623f43 100644 --- a/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift +++ b/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift @@ -60,6 +60,16 @@ public class StatusEditorViewModel: ObservableObject { showPoll || !selectedMedias.isEmpty } + var shouldDisplayDismissWarning: Bool { + var modifiedStatusText = statusText.string.trimmingCharacters(in: .whitespaces) + + if let mentionString, modifiedStatusText.hasPrefix(mentionString) { + modifiedStatusText = String(modifiedStatusText.dropFirst(mentionString.count)) + } + + return !modifiedStatusText.isEmpty && !mode.isInShareExtension + } + @Published var visibility: Models.Visibility = .pub @Published var mentionsSuggestions: [Account] = [] @@ -68,9 +78,10 @@ public class StatusEditorViewModel: ObservableObject { private var currentSuggestionRange: NSRange? private var embeddedStatusURL: URL? { - return URL(string: embeddedStatus?.reblog?.url ?? embeddedStatus?.url ?? "") + URL(string: embeddedStatus?.reblog?.url ?? embeddedStatus?.url ?? "") } + private var mentionString: String? private var uploadTask: Task? init(mode: Mode) { @@ -171,6 +182,10 @@ public class StatusEditorViewModel: ObservableObject { visibility = status.visibility statusText = .init(string: mentionString) selectedRange = .init(location: mentionString.utf16.count, length: 0) + + if !mentionString.isEmpty { + self.mentionString = mentionString.trimmingCharacters(in: .whitespaces) + } case let .mention(account, visibility): statusText = .init(string: "@\(account.acct) ") self.visibility = visibility From d9eef1c8e4eb378b8361b5638891b82ff1b39563 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler Date: Sun, 22 Jan 2023 15:46:22 +0100 Subject: [PATCH 4/6] Improve English localization (#271) --- .../Resources/Localization/en.lproj/Localizable.strings | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings index 65ea19e1..c57a2756 100644 --- a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings @@ -8,7 +8,7 @@ "alert.button.ok" = "Ok"; "alert.error" = "Error!"; -"placeholder.loading.long" = "Loading, loading, loading ...."; +"placeholder.loading.long" = "Loading, loading, loading ..."; "placeholder.loading.short" = "Loading ..."; "see-more" = "See more"; @@ -68,12 +68,12 @@ "settings.general.browser.system" = "System Browser"; "settings.general.display" = "Display Settings"; "settings.general.instance" = "Instance Information"; -"settings.general.push-notifications" = "Push notification"; +"settings.general.push-notifications" = "Push Notification"; "settings.general.remote-timelines" = "Remote Local Timelines"; "settings.push.boosts" = "Boosts"; "settings.push.favorites" = "Favorites"; "settings.push.follows" = "Follows"; -"settings.push.main-toggle" = "Push notifications"; +"settings.push.main-toggle" = "Push Notifications"; "settings.push.main-toggle.description" = "Receive push notifications on new activities"; "settings.push.mentions" = "Mentions"; "settings.push.navigation-title" = "Push Notifications"; From baa67ae7188ce480466fbcb75567e50b60fd582c Mon Sep 17 00:00:00 2001 From: Markus Hardt Date: Sun, 22 Jan 2023 15:47:27 +0100 Subject: [PATCH 5/6] Add German translation (#264) Co-authored-by: Markus Hardt --- IceCubesApp/Resources/Localization/de.lproj/Localizable.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings index 6a3a2655..f9ca3f8d 100644 --- a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings @@ -96,7 +96,7 @@ "settings.support.two.title" = "☕️ Schönes Trinkgeld"; "settings.timeline.add" = "Lokale Timeline hinzufügen"; "settings.title" = "Einstellungen"; -"settings.rate" = "Rate Ice Cubes"; +"settings.rate" = "Bewerte Ice Cubes"; // MARK: Tabs "tab.explore" = "Entdecken"; From 97f8dfd74dd5a011b68f34d9c556231c47f2beaa Mon Sep 17 00:00:00 2001 From: Sean Goldin Date: Sun, 22 Jan 2023 08:47:44 -0600 Subject: [PATCH 6/6] Add localisation plurals (#239) * Add localisation plurals * Add more languages to plurals * Remove unused localised keys * Update per #225 --- IceCubesApp.xcodeproj/project.pbxproj | 34 +++++++++++++++++++ .../Plurals/de.lproj/Localizable.stringsdict | 22 ++++++++++++ .../Plurals/en.lproj/Localizable.stringsdict | 22 ++++++++++++ .../Plurals/es.lproj/Localizable.stringsdict | 22 ++++++++++++ .../Plurals/it.lproj/Localizable.stringsdict | 22 ++++++++++++ .../Plurals/nl.lproj/Localizable.stringsdict | 22 ++++++++++++ .../zh-Hans.lproj/Localizable.stringsdict | 22 ++++++++++++ .../Localization/de.lproj/Localizable.strings | 1 - .../Localization/en.lproj/Localizable.strings | 1 - .../Localization/es.lproj/Localizable.strings | 1 - .../Localization/it.lproj/Localizable.strings | 1 - .../Localization/nl.lproj/Localizable.strings | 3 +- .../zh-Hans.lproj/Localizable.strings | 1 - .../Sources/Timeline/TimelineViewModel.swift | 2 +- 14 files changed, 168 insertions(+), 8 deletions(-) create mode 100644 IceCubesApp/Resources/Localization/Plurals/de.lproj/Localizable.stringsdict create mode 100644 IceCubesApp/Resources/Localization/Plurals/en.lproj/Localizable.stringsdict create mode 100644 IceCubesApp/Resources/Localization/Plurals/es.lproj/Localizable.stringsdict create mode 100644 IceCubesApp/Resources/Localization/Plurals/it.lproj/Localizable.stringsdict create mode 100644 IceCubesApp/Resources/Localization/Plurals/nl.lproj/Localizable.stringsdict create mode 100644 IceCubesApp/Resources/Localization/Plurals/zh-Hans.lproj/Localizable.stringsdict diff --git a/IceCubesApp.xcodeproj/project.pbxproj b/IceCubesApp.xcodeproj/project.pbxproj index f0283b48..10a55e96 100644 --- a/IceCubesApp.xcodeproj/project.pbxproj +++ b/IceCubesApp.xcodeproj/project.pbxproj @@ -8,6 +8,9 @@ /* Begin PBXBuildFile section */ 639CDF9C296AC82F00C35E58 /* SafariRouteur.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639CDF9B296AC82F00C35E58 /* SafariRouteur.swift */; }; + 7429BCE2297C55D00069A946 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 7429BCE4297C55D00069A946 /* Localizable.stringsdict */; }; + 7429BCE5297C5A750069A946 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 7429BCE4297C55D00069A946 /* Localizable.stringsdict */; }; + 7429BCE6297C5A750069A946 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 7429BCE4297C55D00069A946 /* Localizable.stringsdict */; }; 9F24EEB829360C330042359D /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9F24EEB729360C330042359D /* Preview Assets.xcassets */; }; 9F295540292B6C3400E0E81B /* Timeline in Frameworks */ = {isa = PBXBuildFile; productRef = 9F29553F292B6C3400E0E81B /* Timeline */; }; 9F2A540729699698009B2D7C /* SupportAppView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2A540629699698009B2D7C /* SupportAppView.swift */; }; @@ -103,6 +106,12 @@ /* Begin PBXFileReference section */ 639CDF9B296AC82F00C35E58 /* SafariRouteur.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariRouteur.swift; sourceTree = ""; }; + 7429BCE3297C55D00069A946 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; + 7429BCE7297C5D010069A946 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = nl; path = nl.lproj/Localizable.stringsdict; sourceTree = ""; }; + 7429BCE8297C5D020069A946 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = de; path = de.lproj/Localizable.stringsdict; sourceTree = ""; }; + 7429BCE9297C5D030069A946 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = es; path = es.lproj/Localizable.stringsdict; sourceTree = ""; }; + 7429BCEB297D65380069A946 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.stringsdict"; sourceTree = ""; }; + 7429BCEC297D65390069A946 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = it; path = it.lproj/Localizable.stringsdict; sourceTree = ""; }; 9606B7A1297AD2BB00C1FB75 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; 9F24EEB729360C330042359D /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 9F29553D292B67B600E0E81B /* Network */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Network; path = Packages/Network; sourceTree = ""; }; @@ -214,6 +223,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 7429BCEA297C64CF0069A946 /* Plurals */ = { + isa = PBXGroup; + children = ( + 7429BCE4297C55D00069A946 /* Localizable.stringsdict */, + ); + path = Plurals; + sourceTree = ""; + }; 9F2A5417296AB631009B2D7C /* IceCubesNotifications */ = { isa = PBXGroup; children = ( @@ -356,6 +373,7 @@ E9B576C029743F2A00BCE646 /* Localization */ = { isa = PBXGroup; children = ( + 7429BCEA297C64CF0069A946 /* Plurals */, E9B576C529743F4C00BCE646 /* Localizable.strings */, ); path = Localization; @@ -503,6 +521,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 7429BCE5297C5A750069A946 /* Localizable.stringsdict in Resources */, 9F8CA5982979B63D00481E8E /* Localizable.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -513,6 +532,7 @@ files = ( 9FAD858E29743F7400496AB1 /* (null) in Resources */, 9F8CA5972979B61100481E8E /* Localizable.strings in Resources */, + 7429BCE6297C5A750069A946 /* Localizable.stringsdict in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -523,6 +543,7 @@ 9F2A542C296B1177009B2D7C /* glass.caf in Resources */, E9B576C329743F4C00BCE646 /* Localizable.strings in Resources */, 9FD34823293D06E800DB0EE9 /* Assets.xcassets in Resources */, + 7429BCE2297C55D00069A946 /* Localizable.stringsdict in Resources */, 9F24EEB829360C330042359D /* Preview Assets.xcassets in Resources */, 9FAD85832971BF7200496AB1 /* Secret.plist in Resources */, 9F2A542E296B1CC0009B2D7C /* glass.wav in Resources */, @@ -593,6 +614,19 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + 7429BCE4297C55D00069A946 /* Localizable.stringsdict */ = { + isa = PBXVariantGroup; + children = ( + 7429BCE3297C55D00069A946 /* en */, + 7429BCE7297C5D010069A946 /* nl */, + 7429BCE8297C5D020069A946 /* de */, + 7429BCE9297C5D030069A946 /* es */, + 7429BCEB297D65380069A946 /* zh-Hans */, + 7429BCEC297D65390069A946 /* it */, + ); + name = Localizable.stringsdict; + sourceTree = ""; + }; E9B576C529743F4C00BCE646 /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( diff --git a/IceCubesApp/Resources/Localization/Plurals/de.lproj/Localizable.stringsdict b/IceCubesApp/Resources/Localization/Plurals/de.lproj/Localizable.stringsdict new file mode 100644 index 00000000..92ebeeb3 --- /dev/null +++ b/IceCubesApp/Resources/Localization/Plurals/de.lproj/Localizable.stringsdict @@ -0,0 +1,22 @@ + + + + + timeline-new-posts %lld + + NSStringLocalizedFormatKey + %#@timelineNewPosts@ + timelineNewPosts + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + lld + one + ein neuer Post + other + %lld neue Posts + + + + diff --git a/IceCubesApp/Resources/Localization/Plurals/en.lproj/Localizable.stringsdict b/IceCubesApp/Resources/Localization/Plurals/en.lproj/Localizable.stringsdict new file mode 100644 index 00000000..c9bc21f2 --- /dev/null +++ b/IceCubesApp/Resources/Localization/Plurals/en.lproj/Localizable.stringsdict @@ -0,0 +1,22 @@ + + + + + timeline-new-posts %lld + + NSStringLocalizedFormatKey + %#@timelineNewPosts@ + timelineNewPosts + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + lld + one + %lld new post + other + %lld new posts + + + + diff --git a/IceCubesApp/Resources/Localization/Plurals/es.lproj/Localizable.stringsdict b/IceCubesApp/Resources/Localization/Plurals/es.lproj/Localizable.stringsdict new file mode 100644 index 00000000..096a41d7 --- /dev/null +++ b/IceCubesApp/Resources/Localization/Plurals/es.lproj/Localizable.stringsdict @@ -0,0 +1,22 @@ + + + + + timeline-new-posts %lld + + NSStringLocalizedFormatKey + %#@timelineNewPosts@ + timelineNewPosts + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + lld + one + %lld new post + other + %lld nuevas publicaciones + + + + diff --git a/IceCubesApp/Resources/Localization/Plurals/it.lproj/Localizable.stringsdict b/IceCubesApp/Resources/Localization/Plurals/it.lproj/Localizable.stringsdict new file mode 100644 index 00000000..80652626 --- /dev/null +++ b/IceCubesApp/Resources/Localization/Plurals/it.lproj/Localizable.stringsdict @@ -0,0 +1,22 @@ + + + + + timeline-new-posts %lld + + NSStringLocalizedFormatKey + %#@timelineNewPosts@ + timelineNewPosts + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + lld + one + %lld new post + other + %lld nuovi messaggi + + + + diff --git a/IceCubesApp/Resources/Localization/Plurals/nl.lproj/Localizable.stringsdict b/IceCubesApp/Resources/Localization/Plurals/nl.lproj/Localizable.stringsdict new file mode 100644 index 00000000..d78d007d --- /dev/null +++ b/IceCubesApp/Resources/Localization/Plurals/nl.lproj/Localizable.stringsdict @@ -0,0 +1,22 @@ + + + + + timeline-new-posts %lld + + NSStringLocalizedFormatKey + %#@timelineNewPosts@ + timelineNewPosts + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + lld + one + %lld new post + other + %lld nieuwe posts + + + + diff --git a/IceCubesApp/Resources/Localization/Plurals/zh-Hans.lproj/Localizable.stringsdict b/IceCubesApp/Resources/Localization/Plurals/zh-Hans.lproj/Localizable.stringsdict new file mode 100644 index 00000000..e7f32d11 --- /dev/null +++ b/IceCubesApp/Resources/Localization/Plurals/zh-Hans.lproj/Localizable.stringsdict @@ -0,0 +1,22 @@ + + + + + timeline-new-posts %lld + + NSStringLocalizedFormatKey + %#@timelineNewPosts@ + timelineNewPosts + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + lld + one + %lld new post + other + %lld 个新嘟文 + + + + diff --git a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings index f9ca3f8d..6ef41278 100644 --- a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings @@ -237,7 +237,6 @@ "notifications.tab.mentions" = "Erwähnungen"; // MARK: Package: Timeline -"timeline.n-new-posts %lld" = "%lld neue Posts"; "timeline.federated" = "Föderiert"; "timeline.home" = "Startseite"; "timeline.local" = "Lokal"; diff --git a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings index c57a2756..743df558 100644 --- a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings @@ -237,7 +237,6 @@ "notifications.tab.mentions" = "Mentions"; // MARK: Package: Timeline -"timeline.n-new-posts %lld" = "%lld new posts"; "timeline.federated" = "Federated"; "timeline.home" = "Home"; "timeline.local" = "Local"; diff --git a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings index 22631fab..25501a47 100644 --- a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings @@ -237,7 +237,6 @@ "notifications.tab.mentions" = "Menciones"; // MARK: Package: Timeline -"timeline.n-new-posts %lld" = "%lld nuevas publicaciones"; "timeline.federated" = "Federado"; "timeline.home" = "Inicio"; "timeline.local" = "Local"; diff --git a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings index fa4a2f13..ab604a1a 100644 --- a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings @@ -237,7 +237,6 @@ "notifications.tab.mentions" = "Menzioni"; // MARK: Package: Timeline -"timeline.n-new-posts %lld" = "%lld nuovi messaggi"; "timeline.federated" = "Federazione"; "timeline.home" = "Home"; "timeline.local" = "Locale"; diff --git a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings index 1125fba8..ab5b9d6d 100644 --- a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings @@ -237,9 +237,8 @@ "notifications.tab.mentions" = "Vermeldingen"; // MARK: Package: Timeline -"timeline.n-new-posts %lld" = "%lld nieuwe posts"; "timeline.federated" = "Gefedereerd"; -"timeline.home" = "Thuis"; +"timeline.home" = "Startpagina"; "timeline.local" = "Lokaal"; "timeline.n-recent-from-n-participants %lld %lld" = "%lld recente posts van %lld deelnemers"; "timeline.trending" = "Trending"; diff --git a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings index d5f9669b..4feaa16b 100644 --- a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings @@ -237,7 +237,6 @@ "notifications.tab.mentions" = "提及"; // MARK: Package: Timeline -"timeline.n-new-posts %lld" = "%lld 个新嘟文"; "timeline.federated" = "跨站"; "timeline.home" = "主页"; "timeline.local" = "本地"; diff --git a/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift b/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift index 3390346c..4b53094d 100644 --- a/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift +++ b/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift @@ -49,7 +49,7 @@ class TimelineViewModel: ObservableObject, StatusesFetcher { var pendingStatusesButtonTitle: LocalizedStringKey { switch pendingStatusesState { case .stream, .refresh: - return "timeline.n-new-posts \(pendingStatuses.count)" + return "timeline-new-posts \(pendingStatuses.count)" } }