mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
apply local text on for text (other than generic list)
This commit is contained in:
parent
c486167969
commit
1cbaa87101
14 changed files with 48 additions and 48 deletions
|
|
@ -20,7 +20,7 @@ import Views
|
|||
storedFontSize = max(storedFontSize - 2, 10)
|
||||
NSNotification.readerSettingsChanged()
|
||||
},
|
||||
label: { Text("Decrease Font Size")
|
||||
label: { Text(LocalText.keyboardCommandDecreaseFont)
|
||||
}
|
||||
)
|
||||
.keyboardShortcut("-")
|
||||
|
|
@ -30,7 +30,7 @@ import Views
|
|||
storedFontSize = min(storedFontSize + 2, 28)
|
||||
NSNotification.readerSettingsChanged()
|
||||
},
|
||||
label: { Text("Increase Font Size") }
|
||||
label: { Text(LocalText.keyboardCommandIncreaseFont) }
|
||||
)
|
||||
.keyboardShortcut("+")
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ import Views
|
|||
storedMaxWidthPercentage = min(storedMaxWidthPercentage + 10, 100)
|
||||
NSNotification.readerSettingsChanged()
|
||||
},
|
||||
label: { Text("Decrease Margin")
|
||||
label: { Text(LocalText.keyboardCommandDecreaseMargin)
|
||||
}
|
||||
)
|
||||
.keyboardShortcut("[")
|
||||
|
|
@ -53,7 +53,7 @@ import Views
|
|||
storedMaxWidthPercentage = max(storedMaxWidthPercentage - 10, 40)
|
||||
NSNotification.readerSettingsChanged()
|
||||
},
|
||||
label: { Text("Increase Margin")
|
||||
label: { Text(LocalText.keyboardCommandIncreaseMargin)
|
||||
}
|
||||
)
|
||||
.keyboardShortcut("]")
|
||||
|
|
@ -67,7 +67,7 @@ import Views
|
|||
storedLineSpacing = max(storedLineSpacing - 25, 100)
|
||||
NSNotification.readerSettingsChanged()
|
||||
},
|
||||
label: { Text("Decrease Line Spacing") }
|
||||
label: { Text(LocalText.keyboardCommandDecreaseLineSpacing) }
|
||||
)
|
||||
.keyboardShortcut("k")
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ import Views
|
|||
storedLineSpacing = min(storedLineSpacing + 25, 300)
|
||||
NSNotification.readerSettingsChanged()
|
||||
},
|
||||
label: { Text("Increase Line Spacing") }
|
||||
label: { Text(LocalText.keyboardCommandIncreaseLineSpacing) }
|
||||
)
|
||||
.keyboardShortcut("l")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ struct DebugMenuView: View {
|
|||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Text("Debug Menu")
|
||||
Text(LocalText.menuDebugTitle)
|
||||
.font(.appTitle)
|
||||
Form {
|
||||
Text("API Environment:")
|
||||
Picker(selection: $selectedEnvironment, label: Text("API Environment:")) {
|
||||
Text(LocalText.menuDebugApiEnv)
|
||||
Picker(selection: $selectedEnvironment, label: Text(LocalText.menuDebugApiEnv)) {
|
||||
ForEach(appEnvironments, id: \.self) {
|
||||
Text($0.rawValue)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public struct PrimaryContentView: View {
|
|||
PrimaryContentCategory.feed.destinationView
|
||||
|
||||
// Third column is the detail view
|
||||
Text("Select a link from the feed")
|
||||
Text(LocalText.navigationSelectLink)
|
||||
}
|
||||
.accentColor(.appGrayTextContrast)
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ struct PrimaryContentSidebar: View {
|
|||
#selector(NSSplitViewController.toggleSidebar(_:)), with: nil
|
||||
)
|
||||
},
|
||||
label: { Label("Toggle sidebar", systemImage: "sidebar.left") }
|
||||
label: { Label(LocalText.navigationSelectSidebarToggle, systemImage: "sidebar.left") }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ struct SubscriptionsView: View {
|
|||
.task { await viewModel.loadSubscriptions(dataService: dataService) }
|
||||
} else if viewModel.hasNetworkError {
|
||||
VStack {
|
||||
Text("Sorry, we were unable to retrieve your subscriptions.").multilineTextAlignment(.center)
|
||||
Text(LocalText.subscriptionsErrorRetrieving).multilineTextAlignment(.center)
|
||||
Button(
|
||||
action: { Task { await viewModel.loadSubscriptions(dataService: dataService) } },
|
||||
label: { Text("Retry") }
|
||||
|
|
@ -67,7 +67,7 @@ struct SubscriptionsView: View {
|
|||
} else if viewModel.subscriptions.isEmpty {
|
||||
VStack(alignment: .center) {
|
||||
Spacer()
|
||||
Text("You have no current subscriptions.")
|
||||
Text(LocalText.subscriptionsNone)
|
||||
Spacer()
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@
|
|||
var body: some View {
|
||||
Group {
|
||||
Form {
|
||||
Section("Audio Settings") {
|
||||
Toggle("Enable audio prefetch", isOn: $audioController.preloadEnabled)
|
||||
Section(LocalText.texttospeechSettingsAudio) {
|
||||
Toggle(LocalText.texttospeechSettingsEnablePrefetch, isOn: $audioController.preloadEnabled)
|
||||
}
|
||||
NavigationLink(destination: TextToSpeechLanguageView().navigationTitle("Default Language")) {
|
||||
Text("Default Language")
|
||||
NavigationLink(destination: TextToSpeechLanguageView().navigationTitle(LocalText.texttospeechLanguageDefault)) {
|
||||
Text(LocalText.texttospeechLanguageDefault)
|
||||
}
|
||||
innerBody
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
if FeatureFlag.enableUltraRealisticVoices, language.key == "en" {
|
||||
if viewModel.waitingForRealisticVoices {
|
||||
HStack {
|
||||
Text("Signing up for beta")
|
||||
Text(LocalText.texttospeechBetaSignupInProcess)
|
||||
Spacer()
|
||||
ProgressView()
|
||||
}
|
||||
|
|
@ -35,13 +35,13 @@
|
|||
}
|
||||
|
||||
if !viewModel.waitingForRealisticVoices, !audioController.ultraRealisticFeatureKey.isEmpty {
|
||||
Text("You are in the ultra realistic voices beta. During the beta you can listen to 10,000 words of audio per day.")
|
||||
Text(LocalText.texttospeechBetaRealisticVoiceLimit)
|
||||
.multilineTextAlignment(.leading)
|
||||
} else if audioController.ultraRealisticFeatureRequested {
|
||||
Text("Your request to join the ultra realistic voices demo has been received. You will be informed by email when a spot is available.")
|
||||
Text(LocalText.texttospeechBetaRequestReceived)
|
||||
.multilineTextAlignment(.leading)
|
||||
} else {
|
||||
Text("Ultra realistic voices are currently in limited beta. Enabling the feature will add you to the beta queue.")
|
||||
Text(LocalText.texttospeechBetaWaitlist)
|
||||
.multilineTextAlignment(.leading)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ struct CreateProfileView: View {
|
|||
VStack(alignment: .leading, spacing: 6) {
|
||||
HStack {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("Username")
|
||||
Text(LocalText.registrationUsername)
|
||||
.font(.appFootnote)
|
||||
.foregroundColor(.appGrayText)
|
||||
TextField("", text: $viewModel.potentialUsername)
|
||||
|
|
@ -173,7 +173,7 @@ struct CreateProfileView: View {
|
|||
.animation(.default, value: 0.35)
|
||||
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("Bio (optional)")
|
||||
Text(LocalText.registrationBio)
|
||||
.font(.appFootnote)
|
||||
.foregroundColor(.appGrayText)
|
||||
TextEditor(text: $bio)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ struct EmailLoginFormView: View {
|
|||
Button(
|
||||
action: { viewModel.emailAuthState = .signUp },
|
||||
label: {
|
||||
Text("Don't have an account?")
|
||||
Text(Localtext.registrationNoAccount)
|
||||
.foregroundColor(.appGrayTextContrast)
|
||||
.underline()
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ struct EmailLoginFormView: View {
|
|||
openURL(url)
|
||||
},
|
||||
label: {
|
||||
Text("Forgot your password?")
|
||||
Text(LocalText.registrationForgotPassword)
|
||||
.foregroundColor(.appGrayTextContrast)
|
||||
.underline()
|
||||
}
|
||||
|
|
@ -175,7 +175,7 @@ struct EmailPendingVerificationView: View {
|
|||
)
|
||||
}
|
||||
},
|
||||
label: { Text("Check Status") }
|
||||
label: { Text(LocalText.registrationStatusCheck) }
|
||||
)
|
||||
.buttonStyle(SolidCapsuleButtonStyle(color: .appDeepBackground, width: 300))
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ struct EmailPendingVerificationView: View {
|
|||
Button(
|
||||
action: { viewModel.emailAuthState = .signUp },
|
||||
label: {
|
||||
Text("Use a different email?")
|
||||
Text(LocalText.registrationUseDifferentEmail)
|
||||
.foregroundColor(.appGrayTextContrast)
|
||||
.underline()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ struct EmailSignupFormView: View {
|
|||
|
||||
// Full Name
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("Full Name")
|
||||
Text(LocalText.registrationFullName)
|
||||
.font(.appFootnote)
|
||||
.foregroundColor(.appGrayText)
|
||||
TextField("", text: $name)
|
||||
|
|
@ -142,7 +142,7 @@ struct EmailSignupFormView: View {
|
|||
VStack(alignment: .leading, spacing: 6) {
|
||||
HStack {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("Username")
|
||||
Text(LocalText.registrationUsername)
|
||||
.font(.appFootnote)
|
||||
.foregroundColor(.appGrayText)
|
||||
TextField("", text: $viewModel.potentialUsername)
|
||||
|
|
@ -194,7 +194,7 @@ struct EmailSignupFormView: View {
|
|||
Button(
|
||||
action: { viewModel.emailAuthState = .signIn },
|
||||
label: {
|
||||
Text("Already have an account?")
|
||||
Text(LocalText.registrationAlreadyHaveAccount)
|
||||
.foregroundColor(.appGrayTextContrast)
|
||||
.underline()
|
||||
}
|
||||
|
|
@ -221,7 +221,7 @@ struct EmailSignupFormView: View {
|
|||
Spacer()
|
||||
}
|
||||
}
|
||||
.navigationTitle(focusedField == nil ? "Sign Up" : "")
|
||||
.navigationTitle(focusedField == nil ? LocalText.registrationViewSignUpHeadline : "")
|
||||
.task {
|
||||
viewModel.configureUsernameValidation(dataService: dataService)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@ struct NewAppleSignupView: View {
|
|||
|
||||
var body: some View {
|
||||
VStack(spacing: 28) {
|
||||
Text("Welcome to Omnivore!")
|
||||
Text(LocalText.registrationWelcome)
|
||||
.font(.appTitle)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
VStack(alignment: .center, spacing: 12) {
|
||||
Text("Your username is:")
|
||||
Text(LocalText.registrationUsernameAssignedPrefix)
|
||||
.font(.appBody)
|
||||
.foregroundColor(.appGrayText)
|
||||
Text("@\(userProfile.username)")
|
||||
|
|
@ -54,7 +54,7 @@ struct NewAppleSignupView: View {
|
|||
|
||||
Button(
|
||||
action: showProfileEditView,
|
||||
label: { Text("Change Username") }
|
||||
label: { Text(LocalText.registrationChangeUsername) }
|
||||
)
|
||||
.buttonStyle(SolidCapsuleButtonStyle(color: .appDeepBackground, width: 300))
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ struct RecommendToView: View {
|
|||
var noteView: some View {
|
||||
VStack {
|
||||
HStack {
|
||||
Text("To:")
|
||||
Text(LocalText.recommendationToPrefix)
|
||||
.font(.appCaption)
|
||||
.foregroundColor(.appGrayText)
|
||||
Text(InternalRecommendationGroup.readable(list: viewModel.selectedGroups))
|
||||
|
|
@ -131,7 +131,7 @@ struct RecommendToView: View {
|
|||
.background(RoundedRectangle(cornerRadius: 8).fill(Color.systemBackground))
|
||||
)
|
||||
.overlay(
|
||||
Text("Add a note (optional)")
|
||||
Text(LocalText.recommendationAddNote)
|
||||
.allowsHitTesting(false)
|
||||
.opacity(viewModel.note.isEmpty ? 0.4 : 0.0)
|
||||
.font(.appBody)
|
||||
|
|
@ -199,7 +199,7 @@ struct RecommendToView: View {
|
|||
}
|
||||
.alert(isPresented: $viewModel.showError) {
|
||||
Alert(
|
||||
title: Text("Error recommending this page"),
|
||||
title: Text(LocalText.recommendationError),
|
||||
dismissButton: .cancel(Text("Ok")) {
|
||||
viewModel.showError = false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -369,19 +369,19 @@ struct WebReaderContainerView: View {
|
|||
Button(action: {
|
||||
UIPasteboard.general.string = item.unwrappedPageURLString
|
||||
showInSnackbar("Link Copied")
|
||||
}, label: { Text("Copy Link") })
|
||||
}, label: { Text(LocalText.readerCopyLink) })
|
||||
Button(action: {
|
||||
if let linkToOpen = linkToOpen {
|
||||
viewModel.saveLink(dataService: dataService, url: linkToOpen)
|
||||
}
|
||||
}, label: { Text("Save to Omnivore") })
|
||||
}, label: { Text(LocalText.readerSave) })
|
||||
}
|
||||
#if os(iOS)
|
||||
.fullScreenCover(item: $safariWebLink) {
|
||||
SafariView(url: $0.url)
|
||||
}
|
||||
#endif
|
||||
.alert(errorAlertMessage ?? "An error occurred", isPresented: $showErrorAlertMessage) {
|
||||
.alert(errorAlertMessage ?? LocalText.readerError, isPresented: $showErrorAlertMessage) {
|
||||
Button("Ok", role: .cancel, action: {
|
||||
errorAlertMessage = nil
|
||||
showErrorAlertMessage = false
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ struct WelcomeView: View {
|
|||
|
||||
var headlineText: some View {
|
||||
Group {
|
||||
Text("Read-it-later for serious readers.")
|
||||
Text(LocalText.welcomeTitle)
|
||||
}
|
||||
.font(.appLargeTitle)
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ struct WelcomeView: View {
|
|||
},
|
||||
label: {
|
||||
HStack(spacing: 4) {
|
||||
Text("Learn more")
|
||||
Text(LocalText.welcomeLearnMore)
|
||||
Image(systemName: "arrow.right")
|
||||
}
|
||||
.font(.appTitleThree)
|
||||
|
|
@ -70,10 +70,10 @@ struct WelcomeView: View {
|
|||
|
||||
var footerView: some View {
|
||||
Group {
|
||||
Text("By signing up, you agree to Omnivore’s\n")
|
||||
+ Text("Terms of Service").underline()
|
||||
+ Text(" and ")
|
||||
+ Text(LocalText.privacyPolicyGeneric).underline()
|
||||
Text(LocalText.welcomeSignupAgreement)
|
||||
+ Text(LocalText.welcomeTitleTermsOfService).underline()
|
||||
+ Text(LocalText.welcomeTitleAndJoiner)
|
||||
+ Text(LocalText.privacyPolicyGeneric).underline()
|
||||
}
|
||||
.font(.appSubheadline)
|
||||
.confirmationDialog("", isPresented: $showTermsLinks, titleVisibility: .hidden) {
|
||||
|
|
@ -163,7 +163,7 @@ struct WelcomeView: View {
|
|||
let emailButton = Button(
|
||||
action: { showEmailLoginModal = true },
|
||||
label: {
|
||||
Text("Continue with Email")
|
||||
Text(LocalText.welcomeTitleEmailContinue)
|
||||
.font(.appHeadline)
|
||||
.foregroundColor(.appGrayTextContrast)
|
||||
.underline()
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public struct HighlightAnnotationSheet: View {
|
|||
Spacer()
|
||||
}
|
||||
.padding()
|
||||
.alert(errorAlertMessage ?? "An error occurred", isPresented: $showErrorAlertMessage) {
|
||||
.alert(errorAlertMessage ?? LocalText.readerError, isPresented: $showErrorAlertMessage) {
|
||||
Button("Ok", role: .cancel, action: {
|
||||
errorAlertMessage = nil
|
||||
showErrorAlertMessage = false
|
||||
|
|
|
|||
Loading…
Reference in a new issue