Reverts to existing localization strategy

Existing `strings` tables removed. `tableName`s replaced with `comment`s.
This commit is contained in:
Stuart Breckenridge
2022-12-21 19:45:39 +08:00
parent 46be5a8768
commit 65dfa91ee1
30 changed files with 185 additions and 389 deletions

View File

@@ -13,21 +13,21 @@ struct AboutView: View, LoadableAboutData {
var body: some View {
List {
Section(header: aboutHeaderView) {}
Section(header: Text("PRIMARY_CONTRIBUTORS", tableName: "Settings")) {
Section(header: Text("Primary Contributors", comment: "About: Primary Contributors section header")) {
ForEach(0..<about.PrimaryContributors.count, id: \.self) { i in
contributorView(about.PrimaryContributors[i])
}
}
Section(header: Text("ADDITIONAL_CONTRIBUTORS", tableName: "Settings")) {
Section(header: Text("Additional Contributors", comment: "About: Additional Contributors section header")) {
ForEach(0..<about.AdditionalContributors.count, id: \.self) { i in
contributorView(about.AdditionalContributors[i])
}
}
Section(header: Text("THANKS", tableName: "Settings"), footer: thanks, content: {})
Section(header: Text("Thanks", comment: "About: Thanks section header"), footer: thanks, content: {})
Section(footer: copyright, content: {})
}
.listStyle(.insetGrouped)
.navigationTitle(Text("ABOUT", tableName: "Settings"))
.navigationTitle(Text("About", comment: "Navigation title: About"))
.navigationBarTitleDisplayMode(.inline)
}
@@ -46,7 +46,7 @@ struct AboutView: View, LoadableAboutData {
.foregroundColor(.secondary)
.font(.callout)
Text("BYLINE", tableName: "Settings")
Text("By Brent Simmons and the Ranchero Software team.", comment: "NetNewsWire byline.")
.font(.subheadline)
Text("[netnewswire.com](https://netnewswire.com)")

View File

@@ -16,9 +16,9 @@ public enum HelpSheet: CustomStringConvertible, CaseIterable {
public var description: String {
switch self {
case .help:
return NSLocalizedString("NETNEWSWIRE_HELP", tableName: "Settings", comment: "NetNewsWire Help")
return String(localized: "NetNewsWire Help", comment: "Button: opens NetNewsWire Help page")
case .website:
return NSLocalizedString("NETNEWSWIRE_WEBSITE", tableName: "Settings", comment: "NetNewsWire Website")
return String(localized: "NetNewsWire Website", comment: "Button: opens NetNewsWire website")
}
}