mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 17:45:19 +00:00
Fix Localizations (#684)
* Update all `NSLocalizedString` with `L10n.string` + combine with `L10n.format` * Handle Localizations + Swift Package
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user