mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-26 11:05: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:
@@ -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"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user