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
+50 -5
View File
@@ -115,15 +115,60 @@ enum EncryptionStatus: Equatable {
var description: String {
switch self {
case .none:
return "Encryption failed"
return L10n.string(
"encryption.status.failed",
comment: "Status text when encryption failed"
)
case .noHandshake:
return "Not encrypted"
return L10n.string(
"encryption.status.not_encrypted",
comment: "Status text when no encryption handshake happened"
)
case .noiseHandshaking:
return "Establishing encryption..."
return L10n.string(
"encryption.status.establishing",
comment: "Status text when encryption is being established"
)
case .noiseSecured:
return "Encrypted"
return L10n.string(
"encryption.status.secured",
comment: "Status text when encryption is secured but not verified"
)
case .noiseVerified:
return "Encrypted & Verified"
return L10n.string(
"encryption.status.verified",
comment: "Status text when encryption is verified"
)
}
}
var accessibilityDescription: String {
switch self {
case .none:
return L10n.string(
"encryption.accessibility.failed",
comment: "Accessibility text when encryption failed"
)
case .noHandshake:
return L10n.string(
"encryption.accessibility.not_encrypted",
comment: "Accessibility text when encryption is not established"
)
case .noiseHandshaking:
return L10n.string(
"encryption.accessibility.establishing",
comment: "Accessibility text when encryption is being established"
)
case .noiseSecured:
return L10n.string(
"encryption.accessibility.secured",
comment: "Accessibility text when encryption is secured"
)
case .noiseVerified:
return L10n.string(
"encryption.accessibility.verified",
comment: "Accessibility text when encryption is verified"
)
}
}
}