mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 22:25:20 +00:00
Add base localization infrastructure and externalize strings (#670)
* Add base localization infrastructure and externalize strings * Add Spanish localization scaffolding with translations * Add machine translations for expanded locales --------- Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
@@ -11,10 +11,22 @@ struct MeshPeerList: View {
|
||||
|
||||
@State private var orderedIDs: [String] = []
|
||||
|
||||
private enum Strings {
|
||||
static let noneNearby: LocalizedStringKey = "geohash_people.none_nearby"
|
||||
static let blockedTooltip = L10n.string(
|
||||
"geohash_people.tooltip.blocked",
|
||||
comment: "Tooltip shown next to a blocked peer indicator"
|
||||
)
|
||||
static let newMessagesTooltip = L10n.string(
|
||||
"mesh_peers.tooltip.new_messages",
|
||||
comment: "Tooltip for the unread messages indicator"
|
||||
)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
if viewModel.allPeers.isEmpty {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text("nobody around...")
|
||||
Text(Strings.noneNearby)
|
||||
.font(.bitchatSystem(size: 14, design: .monospaced))
|
||||
.foregroundColor(secondaryTextColor)
|
||||
.padding(.horizontal)
|
||||
@@ -87,7 +99,7 @@ struct MeshPeerList: View {
|
||||
Image(systemName: "nosign")
|
||||
.font(.bitchatSystem(size: 10))
|
||||
.foregroundColor(.red)
|
||||
.help("Blocked")
|
||||
.help(Strings.blockedTooltip)
|
||||
}
|
||||
|
||||
if !isMe {
|
||||
@@ -120,7 +132,7 @@ struct MeshPeerList: View {
|
||||
Image(systemName: "envelope.fill")
|
||||
.font(.bitchatSystem(size: 10))
|
||||
.foregroundColor(.orange)
|
||||
.help("New messages")
|
||||
.help(Strings.newMessagesTooltip)
|
||||
}
|
||||
|
||||
if !isMe {
|
||||
|
||||
Reference in New Issue
Block a user