Fix Localizations (#684)

* Update all `NSLocalizedString` with `L10n.string`

+ combine with `L10n.format`

* Handle Localizations + Swift Package
This commit is contained in:
Islam
2025-09-26 11:09:10 +02:00
committed by GitHub
parent 9abfab3248
commit d01538a2ea
10 changed files with 52 additions and 44 deletions
+5 -5
View File
@@ -54,7 +54,7 @@ struct LocationChannelsSheet: View {
}
static func subtitlePrefix(geohash: String, coverage: String) -> String {
L10n.format(
L10n.string(
"location_channels.subtitle_prefix",
comment: "Subtitle prefix showing geohash and coverage",
geohash,
@@ -64,7 +64,7 @@ struct LocationChannelsSheet: View {
static func subtitle(prefix: String, name: String?) -> String {
guard let name, !name.isEmpty else { return prefix }
return L10n.format(
return L10n.string(
"location_channels.subtitle_with_name",
comment: "Subtitle combining prefix and resolved location name",
prefix,
@@ -73,11 +73,11 @@ struct LocationChannelsSheet: View {
}
private static func rowTitle(label: String, count: Int) -> String {
let format = NSLocalizedString(
L10n.string(
"location_channels.row_title",
comment: "List row title with participant count"
comment: "List row title with participant count",
label, count
)
return NSString.localizedStringWithFormat(format as NSString, label, count) as String
}
}