diff --git a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift index 25f62116c..c20993172 100644 --- a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift +++ b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift @@ -298,7 +298,7 @@ public struct ShareExtensionView: View { Button( action: {}, label: { - Button("Dismiss", role: .cancel, action: {}) + Button(LocalText.dismissButton, role: .cancel, action: {}) } ) Button(action: { diff --git a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedPlayer.swift b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedPlayer.swift index 1a8e7fa09..1fde8a399 100644 --- a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedPlayer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedPlayer.swift @@ -88,7 +88,7 @@ Button(action: { showVoiceSheet = true }, label: { Label("Change Voice", systemImage: "person.wave.2") }) Button(action: { viewArticle() }, label: { Label("View Article", systemImage: "book") }) Button(action: { audioController.stop() }, label: { Label("Stop", systemImage: "xmark.circle") }) - Button(action: { dismiss() }, label: { Label("Dismiss", systemImage: "arrow.down.to.line") }) + Button(action: { dismiss() }, label: { Label(LocalText.dismissButton, systemImage: "arrow.down.to.line") }) } label: { ZStack { Circle() @@ -348,7 +348,7 @@ .tint(.appGrayTextContrast) .alert("There was an error playing back your audio.", isPresented: $audioController.playbackError) { - Button("Dismiss", role: .none) {} + Button(LocalText.dismissButton, role: .none) {} } } else { EmptyView() diff --git a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift index 9eb1082eb..a41eb61df 100644 --- a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift @@ -170,7 +170,7 @@ } }.alert("There was an error playing back your audio.", isPresented: $audioController.playbackError) { - Button("Dismiss", role: .none) {} + Button(LocalText.dismissButton, role: .none) {} } } } diff --git a/apple/OmnivoreKit/Sources/App/Views/WelcomeView.swift b/apple/OmnivoreKit/Sources/App/Views/WelcomeView.swift index 2d0b69c40..bc366d2be 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WelcomeView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WelcomeView.swift @@ -247,7 +247,7 @@ struct WelcomeView: View { Button("View Details") { openURL(URL(string: "https://support.apple.com/en-us/HT210426")!) } - Button("Dismiss") { self.authenticator.showAppleRevokeTokenAlert = false } + Button(LocalText.dismissButton) { self.authenticator.showAppleRevokeTokenAlert = false } } } } diff --git a/apple/OmnivoreKit/Sources/Views/CommunityModal.swift b/apple/OmnivoreKit/Sources/Views/CommunityModal.swift index 71f904ad4..9198a93c7 100644 --- a/apple/OmnivoreKit/Sources/Views/CommunityModal.swift +++ b/apple/OmnivoreKit/Sources/Views/CommunityModal.swift @@ -115,7 +115,7 @@ public struct CommunityModal: View { Button(action: { dismiss() - }, label: { Text("Dismiss") }) + }, label: { Text(LocalText.dismissButton) }) .buttonStyle(PlainButtonStyle()) .padding(.bottom, 16) .frame(alignment: .bottom) diff --git a/apple/OmnivoreKit/Sources/Views/FeaturePrimer.swift b/apple/OmnivoreKit/Sources/Views/FeaturePrimer.swift index c5575f4c1..fe91e170c 100644 --- a/apple/OmnivoreKit/Sources/Views/FeaturePrimer.swift +++ b/apple/OmnivoreKit/Sources/Views/FeaturePrimer.swift @@ -45,7 +45,7 @@ public struct FeaturePrimer: View { Button(action: { dismiss() - }, label: { Text("Dismiss") }) + }, label: { Text(LocalText.dismissButton) }) .buttonStyle(PlainButtonStyle()) }.padding() } diff --git a/apple/OmnivoreKit/Sources/Views/LocalText.swift b/apple/OmnivoreKit/Sources/Views/LocalText.swift index 87af4a557..9b383c964 100644 --- a/apple/OmnivoreKit/Sources/Views/LocalText.swift +++ b/apple/OmnivoreKit/Sources/Views/LocalText.swift @@ -5,21 +5,15 @@ public enum LocalText { NSLocalizedString(key, bundle: .module, comment: comment ?? "no comment provided by developer") } - public static let signInScreenHeadline = localText(key: "signInScreenHeadline") public static let googleAuthButton = localText(key: "googleAuthButton") - public static let registrationViewSignInHeadline = localText(key: "registrationViewSignInHeadline") - public static let registrationViewSignUpHeadline = localText(key: "registrationViewSignUpHeadline") - public static let registrationViewHeadline = localText(key: "registrationViewHeadline") public static let networkError = localText(key: "error.network") + public static let registrationViewSignUpHeadline = localText(key: "registrationViewSignUpHeadline") public static let genericError = localText(key: "error.generic") public static let invalidCredsLoginError = localText(key: "loginError.invalidCreds") public static let saveArticleSavedState = localText(key: "saveArticleSavedState") public static let saveArticleProcessingState = localText(key: "saveArticleProcessingState") public static let extensionAppUnauthorized = localText(key: "extensionAppUnauthorized") public static let dismissButton = localText(key: "dismissButton") - public static let usernameValidationErrorInvalid = localText(key: "username.validation.error.invalidPattern") - public static let usernameValidationErrorTooShort = localText(key: "username.validation.error.tooshort") - public static let usernameValidationErrorTooLong = localText(key: "username.validation.error.toolong") public static let labelsGeneric = localText(key: "labels.generic") public static let emailsGeneric = localText(key: "emails.generic") diff --git a/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings b/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings index 4b2c8930c..3ddd00f25 100644 --- a/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings +++ b/apple/OmnivoreKit/Sources/Views/Resources/en.lproj/Localizable.strings @@ -1,16 +1,9 @@ -"signInScreenHeadline" = "Save and share the best of the web."; "googleAuthButton" = "Continue with Google"; -"registrationViewSignInHeadline" = "Login"; "registrationViewSignUpHeadline" = "Sign Up"; -"registrationViewHeadline" = "Welcome"; -"username.validation.error.invalidPattern" = "Username can only contain letters, numbers, and underscores in the middle."; -"username.validation.error.tooshort" = "Username should contain at least three characters."; -"username.validation.error.toolong" = "Username cannot be longer than fifteen characters."; "error.network" = "We are having trouble connecting to the internet."; "error.generic" = "Something went wrong, please try again."; "extensionAppUnauthorized" = "Please login to Omnivore from the app before saving your first link."; "loginError.invalidCreds" = "The login credentials provided are invalid."; -"saveArticleSavingState" = "Saving..."; "saveArticleSavedState" = "Saved to Omnivore"; "saveArticleProcessingState" = "Saved to Omnivore"; "dismissButton" = "Dismiss"; diff --git a/apple/OmnivoreKit/Sources/Views/Resources/es.lproj/Localizable.strings b/apple/OmnivoreKit/Sources/Views/Resources/es.lproj/Localizable.strings index 77cfe3fef..211e0e6ca 100644 --- a/apple/OmnivoreKit/Sources/Views/Resources/es.lproj/Localizable.strings +++ b/apple/OmnivoreKit/Sources/Views/Resources/es.lproj/Localizable.strings @@ -1,2 +1 @@ -"signInScreenHeadline" = "Empiece a guardar y compartir sus ideas."; "googleSignInButton" = "Continuar con Google"; diff --git a/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings b/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings index cdcd4168c..34d1d45e3 100644 --- a/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings +++ b/apple/OmnivoreKit/Sources/Views/Resources/zh-Hans.lproj/Localizable.strings @@ -1,16 +1,9 @@ -"signInScreenHeadline" = "Save and share the best of the web."; "googleAuthButton" = "Continue with Google"; -"registrationViewSignInHeadline" = "Login"; "registrationViewSignUpHeadline" = "Sign Up"; -"registrationViewHeadline" = "Welcome"; -"username.validation.error.invalidPattern" = "Username can only contain letters, numbers, and underscores in the middle."; -"username.validation.error.tooshort" = "Username should contain at least three characters."; -"username.validation.error.toolong" = "Username cannot be longer than fifteen characters."; "error.network" = "We are having trouble connecting to the internet."; "error.generic" = "Something went wrong, please try again."; "extensionAppUnauthorized" = "Please login to Omnivore from the app before saving your first link."; "loginError.invalidCreds" = "The login credentials provided are invalid."; -"saveArticleSavingState" = "Saving..."; "saveArticleSavedState" = "Saved to Omnivore"; "saveArticleProcessingState" = "Saved to Omnivore"; "dismissButton" = "Dismiss";