Localization work

This commit is contained in:
Stuart Breckenridge
2022-12-30 21:53:07 +08:00
parent d457b2dd53
commit 2bca08195e
54 changed files with 1172 additions and 350 deletions

View File

@@ -72,14 +72,14 @@ struct AccountInspectorView: View {
TextField(text: Binding(
get: { account.name ?? account.defaultName },
set: { account.name = $0 }),
prompt: Text(account.defaultName)) {
Text("Name", comment: "Textfield for the user to enter account name.")
prompt: Text(verbatim: account.defaultName)) {
Text("textfield.placeholder.name", comment: "Name")
}
Toggle(isOn: Binding(get: {
account.isActive
}, set: { account.isActive = $0 })) {
Text("Active", comment: "Toggle denoting if the account is active.")
Text("toggle.account.active", comment: "Active")
}
}
}
@@ -91,7 +91,7 @@ struct AccountInspectorView: View {
} label: {
HStack {
Spacer()
Text("Credentials", comment: "Button title")
Text("button.title.credentials", comment: "Credentials")
Spacer()
}
}
@@ -105,26 +105,26 @@ struct AccountInspectorView: View {
} label: {
HStack {
Spacer()
Text("Remove Account", comment: "Button title")
Text("button.title.remove-account", comment: "Remove Account")
Spacer()
}
}
.alert(Text("Are you sure you want to remove “\(account.nameForDisplay)”?", comment: "Alert title: confirm account removal"), isPresented: $showRemoveAccountAlert) {
.alert(Text("alert.title.remove-account.\(account.nameForDisplay)", comment: "Are you sure you want to remove “%@“?"), isPresented: $showRemoveAccountAlert) {
Button(role: .destructive) {
AccountManager.shared.deleteAccount(account)
dismiss()
} label: {
Text("Remove Account", comment: "Button title")
Text("button.title.remove-account", comment: "Remove Account")
}
Button(role: .cancel) {
//
} label: {
Text("Cancel", comment: "Button title")
Text("button.title.cancel", comment: "Cancel")
}
} message: {
Text("This action cannot be undone.", comment: "Alert message: remove account confirmation")
Text("alert.message.cannot-undo-action", comment: "This action cannot be undone.")
}
}
}
@@ -132,7 +132,7 @@ struct AccountInspectorView: View {
var cloudKitLimitations: some View {
HStack {
Spacer()
Text("[iCloud Syncing Limitations & Solutions](https://netnewswire.com/help/iCloud)", comment: "Link to the NetNewsWire iCloud syncing limitations and soltutions website.")
Text("link.markdown.icloud-limitations", comment: "Link to the NetNewsWire iCloud syncing limitations and soltutions website.")
Spacer()
}
}

View File

@@ -26,24 +26,24 @@ struct ExtensionInspectorView: View {
Button(role: .destructive) {
showDeactivateConfirmation = true
} label: {
Text("Deactivate Extension", comment: "Button title")
Text("button.title.deactivate-extension", comment: "Deactivate Extension")
}
.alert(Text("Are you sure you want to deactivate “\(extensionPoint?.title ?? "")?", comment: "Alert title: confirm deactivate extension") , isPresented: $showDeactivateConfirmation) {
.alert(Text("alert.title.deactivate-extension.\(extensionPoint?.title ?? "")", comment: "Are you sure you want to deactivate “%@“?"), isPresented: $showDeactivateConfirmation) {
Button(role: .destructive) {
ExtensionPointManager.shared.deactivateExtensionPoint(extensionPoint!.extensionPointID)
dismiss()
} label: {
Text("Deactivate Extension", comment: "Button title")
Text("button.title.deactivate-extension", comment: "Deactivate Extension")
}
Button(role: .cancel) {
//
} label: {
Text("Cancel", comment: "Button title")
Text("button.title.cancel", comment: "Cancel")
}
} message: {
Text("This action cannot be undone.", comment: "Alert message: remove account confirmation")
Text("alert.message.cannot-undo-action", comment: "This action cannot be undone.")
}
Spacer()
}

View File

@@ -29,19 +29,19 @@ struct WebFeedInspectorView: View {
prompt: nil)
Toggle(isOn: Binding(get: { webFeed.isNotifyAboutNewArticles ?? false }, set: { webFeed.isNotifyAboutNewArticles = $0 })) {
Text("Notify About New Articles", comment: "Toggle denoting whether the user has enabled new article notifications for this feed.")
Text("toggle.title.notify-about-new-articles", comment: "New Article Notifications")
}
if webFeed.isFeedProvider == false {
Toggle(isOn: Binding(
get: { webFeed.isArticleExtractorAlwaysOn ?? false },
set: { webFeed.isArticleExtractorAlwaysOn = $0 })) {
Text("Always Show Reader View", comment: "Toggle denoting whether the user has enabled Reader view for this feed.")
Text("toggle.title.always-show-reader-view", comment: "Always Show Reader View")
}
}
}
Section(header: Text("Home Page", comment: "Home Page section header in the Feed inspector.")) {
Section(header: Text("label.text.home-page", comment: "Home Page")) {
HStack {
Text(webFeed.homePageURL?.decodedURLString ?? "")
Spacer()
@@ -54,7 +54,7 @@ struct WebFeedInspectorView: View {
}
}
Section(header: Text("Feed URL", comment: "Feed URL section header in the Feed inspector.")) {
Section(header: Text("label.text.feed-url", comment: "Feed URL")) {
Text(webFeed.url.description)
}
}