From e8ec2df23798d1d1b76c716ca0ef6130a3b0c901 Mon Sep 17 00:00:00 2001 From: Kaede Akino Date: Sat, 3 Oct 2026 14:36:40 +0800 Subject: [PATCH] fix(keychain): refine key actions and encrypted-key passphrase controls --- Frameworks/Resources/Localizable.xcstrings | 8 ++-- .../TermindPresentation/KeyExportForm.swift | 1 + Scripts/check-zh-localization.sh | 3 ++ .../FeatureModels/MobileKeyEditorModel.swift | 6 ++- .../Keychain/MobileCredentialsView.swift | 4 +- TFI/Features/Keychain/MobileKeyEditor.swift | 12 +++-- .../Keychain/MobileKeyExportDetailView.swift | 6 ++- TFITests/MobileKeyExportRenderingTests.swift | 2 + TFITests/MobileKeyExportTests.swift | 46 +++++++++++++++++-- TFM/Features/Keychain/KeychainPageView.swift | 24 ++++++---- 10 files changed, 85 insertions(+), 27 deletions(-) diff --git a/Frameworks/Resources/Localizable.xcstrings b/Frameworks/Resources/Localizable.xcstrings index a1d32391..10540bc2 100644 --- a/Frameworks/Resources/Localizable.xcstrings +++ b/Frameworks/Resources/Localizable.xcstrings @@ -32244,13 +32244,13 @@ "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "类型:%@" + "value" : "类型 %@" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "類型:%@" + "value" : "類型 %@" } } } @@ -32267,13 +32267,13 @@ "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "类型未知" + "value" : "类型 未知" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "類型未知" + "value" : "類型 未知" } } } diff --git a/Frameworks/TermindPresentation/KeyExportForm.swift b/Frameworks/TermindPresentation/KeyExportForm.swift index 405df5d0..f0513c62 100644 --- a/Frameworks/TermindPresentation/KeyExportForm.swift +++ b/Frameworks/TermindPresentation/KeyExportForm.swift @@ -63,6 +63,7 @@ public struct KeyExportForm: View { if model.needsExportPassphrase { Section { RevealableSecretField(AppStrings.Keychain.passphrase, text: $model.exportPassphrase) + .multilineTextAlignment(.leading) Toggle(AppStrings.Keychain.savePassphrase.swiftUIKey, isOn: $model.saveExportPassphrase) if let error = model.passphraseError { Text(error).font(.caption).foregroundStyle(.red) } } footer: { diff --git a/Scripts/check-zh-localization.sh b/Scripts/check-zh-localization.sh index 1abde55b..ef844333 100755 --- a/Scripts/check-zh-localization.sh +++ b/Scripts/check-zh-localization.sh @@ -64,6 +64,9 @@ for language in zh-Hans zh-Hant; do ] | .[] | select( + # Key-card type subtitles intentionally separate the label and value. + (if $entry.key == "Type %@" then sub("^(?