Cleanup localization. (#630)

This commit is contained in:
Max Goedjen
2025-08-24 15:50:36 -07:00
committed by GitHub
parent 3d3d123484
commit b3bea27f40
3 changed files with 230 additions and 248 deletions

View File

@@ -38,7 +38,7 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
Text(.createSecretRequireAuthenticationTitle)
case .biometryCurrent:
Image(systemName: "lock.trianglebadge.exclamationmark.fill")
Text("Current Biometrics")
Text(.createSecretRequireAuthenticationBiometricCurrentTitle)
case .unknown:
EmptyView()
}
@@ -53,7 +53,7 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
case .presenceRequired:
Text(.createSecretRequireAuthenticationDescription)
case .biometryCurrent:
Text("Require authentication with current set of biometrics.")
Text(.createSecretRequireAuthenticationBiometricCurrentDescription)
case .unknown:
EmptyView()
}
@@ -61,7 +61,7 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
.font(.subheadline)
.foregroundStyle(.secondary)
if authenticationRequirement == .biometryCurrent {
Text("If you change your biometric settings in _any way_, including adding a new fingerprint, this key will no longer be accessible.")
Text(.createSecretBiometryCurrentWarning)
.padding(.horizontal, 10)
.padding(.vertical, 3)
.background(.red.opacity(0.5), in: RoundedRectangle(cornerRadius: 5))
@@ -72,7 +72,7 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
if advanced {
Section {
VStack {
Picker("Key Type", selection: $keyType) {
Picker(.createSecretKeyTypeLabel, selection: $keyType) {
ForEach(store.supportedKeyTypes, id: \.self) { option in
Text(String(describing: option))
.tag(option)
@@ -81,8 +81,8 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
}
}
VStack(alignment: .leading) {
TextField("Key Attribution", text: $keyAttribution, prompt: Text("test@example.com"))
Text("This shows at the end of your public key.")
TextField(.createSecretKeyAttributionLabel, text: $keyAttribution, prompt: Text(verbatim: "test@example.com"))
Text(.createSecretKeyAttributionDescription)
.font(.subheadline)
.foregroundStyle(.secondary)
}
@@ -90,7 +90,7 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
}
}
HStack {
Toggle("Advanced", isOn: $advanced)
Toggle(.createSecretAdvancedLabel, isOn: $advanced)
.toggleStyle(.button)
Spacer()
Button(.createSecretCancelButton, role: .cancel) {

View File

@@ -24,18 +24,18 @@ struct EditSecretView<StoreType: SecretStoreModifiable>: View {
Section {
TextField(String(localized: .createSecretNameLabel), text: $name, prompt: Text(.createSecretNamePlaceholder))
VStack(alignment: .leading) {
TextField("Key Attribution", text: $publicKeyAttribution, prompt: Text("test@example.com"))
Text("This shows at the end of your public key.")
TextField(.createSecretKeyAttributionLabel, text: $publicKeyAttribution, prompt: Text(verbatim: "test@example.com"))
Text(.createSecretKeyAttributionDescription)
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
}
HStack {
Button(.renameRenameButton, action: rename)
Button(.editSaveButton, action: rename)
.disabled(name.isEmpty)
.keyboardShortcut(.return)
Button(.renameCancelButton) {
Button(.editCancelButton) {
dismissalBlock(false)
}.keyboardShortcut(.cancelAction)
}