From 0f7f16d6cbf63461821dc5ffec83692e947f9e31 Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Thu, 4 Jan 2024 18:06:20 -0800 Subject: [PATCH] Empty. --- Sources/Secretive/Localizable.xcstrings | 72 ++++++++++++++++---- Sources/Secretive/Views/EmptyStoreView.swift | 16 ++--- 2 files changed, 68 insertions(+), 20 deletions(-) diff --git a/Sources/Secretive/Localizable.xcstrings b/Sources/Secretive/Localizable.xcstrings index 050fd42..d37d0e8 100644 --- a/Sources/Secretive/Localizable.xcstrings +++ b/Sources/Secretive/Localizable.xcstrings @@ -69,9 +69,6 @@ } } } - }, - "Create a new one by clicking here." : { - }, "create_secret_cancel_button" : { "localizations" : { @@ -241,6 +238,66 @@ } } }, + "empty_store_modifiable_click_here_description" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Create a new one by clicking here." + } + } + } + }, + "empty_store_modifiable_click_here_title" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No Secrets" + } + } + } + }, + "empty_store_modifiable_title" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No Secrets" + } + } + } + }, + "empty_store_nonmodifiable_description" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Use your Smart Card's management tool to create a secret." + } + } + } + }, + "empty_store_nonmodifiable_supported_key_types" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Secretive supports EC256, EC384, RSA1024, and RSA2048 keys." + } + } + } + }, + "empty_store_nonmodifiable_title" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No Secrets" + } + } + } + }, "Help" : { }, @@ -263,9 +320,6 @@ }, "New Secret" : { - }, - "No Secrets" : { - }, "no_secure_storage_description" : { "localizations" : { @@ -378,9 +432,6 @@ }, "Secretive %@" : { - }, - "Secretive supports EC256, EC384, RSA1024, and RSA2048 keys." : { - }, "Setup Secretive" : { @@ -539,9 +590,6 @@ }, "Update" : { - }, - "Use your Smart Card's management tool to create a secret." : { - } }, "version" : "1.0" diff --git a/Sources/Secretive/Views/EmptyStoreView.swift b/Sources/Secretive/Views/EmptyStoreView.swift index 5bd48c1..6a88c2b 100644 --- a/Sources/Secretive/Views/EmptyStoreView.swift +++ b/Sources/Secretive/Views/EmptyStoreView.swift @@ -9,11 +9,11 @@ struct EmptyStoreView: View { var body: some View { if store is AnySecretStoreModifiable { NavigationLink(destination: EmptyStoreModifiableView(), tag: Constants.emptyStoreModifiableTag, selection: $activeSecret) { - Text("No Secrets") + Text("empty_store_modifiable_title") } } else { NavigationLink(destination: EmptyStoreImmutableView(), tag: Constants.emptyStoreTag, selection: $activeSecret) { - Text("No Secrets") + Text("empty_store_nonmodifiable_title") } } } @@ -23,7 +23,7 @@ extension EmptyStoreView { enum Constants { static let emptyStoreModifiableTag: AnyHashable = "emptyStoreModifiableTag" - static let emptyStoreTag: AnyHashable = "emptyStoreModifiableTag" + static let emptyStoreTag: AnyHashable = "emptyStoreTag" } } @@ -32,9 +32,9 @@ struct EmptyStoreImmutableView: View { var body: some View { VStack { - Text("No Secrets").bold() - Text("Use your Smart Card's management tool to create a secret.") - Text("Secretive supports EC256, EC384, RSA1024, and RSA2048 keys.") + Text("empty_store_nonmodifiable_title").bold() + Text("empty_store_nonmodifiable_description") + Text("empty_store_nonmodifiable_supported_key_types") }.frame(maxWidth: .infinity, maxHeight: .infinity) } @@ -63,8 +63,8 @@ struct EmptyStoreModifiableView: View { path.addLine(to: CGPoint(x: g.size.width - 3, y: 0)) }.fill() }.frame(height: (windowGeometry.size.height/2) - 20).padding() - Text("No Secrets").bold() - Text("Create a new one by clicking here.") + Text("empty_store_modifiable_click_here_title").bold() + Text("empty_store_modifiable_click_here_description") Spacer() }.frame(maxWidth: .infinity, maxHeight: .infinity) }