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:
jack
2025-09-24 15:12:42 +02:00
committed by GitHub
co-authored by jack
parent de906cb97c
commit f5caa1751a
58 changed files with 4482 additions and 276 deletions
+15 -3
View File
@@ -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 {