remove unused string from .strings files

This commit is contained in:
Satindar Dhillon 2023-01-19 19:00:14 -08:00
parent 3af4308202
commit adf0604c7a
10 changed files with 8 additions and 29 deletions

View file

@ -298,7 +298,7 @@ public struct ShareExtensionView: View {
Button(
action: {},
label: {
Button("Dismiss", role: .cancel, action: {})
Button(LocalText.dismissButton, role: .cancel, action: {})
}
)
Button(action: {

View file

@ -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()

View file

@ -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) {}
}
}
}

View file

@ -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 }
}
}
}

View file

@ -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)

View file

@ -45,7 +45,7 @@ public struct FeaturePrimer: View {
Button(action: {
dismiss()
}, label: { Text("Dismiss") })
}, label: { Text(LocalText.dismissButton) })
.buttonStyle(PlainButtonStyle())
}.padding()
}

View file

@ -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")

View file

@ -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";

View file

@ -1,2 +1 @@
"signInScreenHeadline" = "Empiece a guardar y compartir sus ideas.";
"googleSignInButton" = "Continuar con Google";

View file

@ -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";