Skip to content

Commit 217a4a2

Browse files
authored
Merge pull request #206 from analogcode/dev
Localize About screen
2 parents e1f21e9 + aa866d8 commit 217a4a2

5 files changed

Lines changed: 133 additions & 19 deletions

File tree

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,35 +49,37 @@ Images can be local (asset name without `http`) or remote (full URL).
4949

5050
### Customizing Text and Translation
5151

52-
All user-facing strings are managed through `Localizable.xcstrings` (the String Catalog). Open it in Xcode to change the default English text or add new languages — no code changes required.
52+
All user-facing strings are managed through `Localizable.xcstrings` (the String Catalog). Open it in Xcode to change the default English text or add new languages. No code changes required.
5353

5454
## Dependencies
5555

56-
- [FRadioPlayer](https://github.com/fethica/FRadioPlayer) streaming and metadata
57-
- [LNPopupController](https://github.com/LeoNatan/LNPopupController) now playing popup bar
58-
- [NVActivityIndicatorView](https://github.com/ninjaprox/NVActivityIndicatorView) loading indicators
59-
- [MarqueeLabel](https://github.com/cbpowell/MarqueeLabel) scrolling text labels
56+
- [FRadioPlayer](https://github.com/fethica/FRadioPlayer) --streaming and metadata
57+
- [LNPopupController](https://github.com/LeoNatan/LNPopupController) --now playing popup bar
58+
- [NVActivityIndicatorView](https://github.com/ninjaprox/NVActivityIndicatorView) --loading indicators
59+
- [MarqueeLabel](https://github.com/cbpowell/MarqueeLabel) --scrolling text labels
6060

6161
All managed via Swift Package Manager.
6262

6363
## Contributing
6464

65-
Contributions are welcome. Please branch off [`dev`](https://github.com/analogcode/Swift-Radio-Pro/tree/dev) and open a pull request do not commit directly to `master`.
65+
Contributions are welcome. Please branch off [`dev`](https://github.com/analogcode/Swift-Radio-Pro/tree/dev) and open a pull request --do not commit directly to `master`.
6666

6767
## Single Station Version
6868

69-
Looking for a simpler, single-station version of this app? We offer a ready-to-go codebase for **$50** — no extra fees.
69+
Looking for a simpler, single-station version? It skips the station list and launches straight into the player.
7070

71-
PayPal [fethica@me.com](mailto:fethica@me.com) or use [PayPal.Me](https://www.paypal.me/fethicaEH), and we will send the code within 24 hours with setup instructions. All funds support the project.
71+
[![Buy on Payhip](https://img.shields.io/badge/Buy-Single%20Station-blue)](https://payhip.com/b/x15QB)
72+
73+
All proceeds go directly toward maintaining and improving Swift Radio.
7274

7375
For custom work or more advanced needs, reach out to [Fethi](mailto:contact@fethica.com).
7476

75-
**Built something with Swift Radio?** We'd love to see it drop us a line at [contact@fethica.com](mailto:contact@fethica.com).
77+
**Built something with Swift Radio?** We'd love to see it --drop us a line at [contact@fethica.com](mailto:contact@fethica.com).
7678

7779
## Credits
7880

79-
- [Fethi](https://fethica.com) co-organizer and lead developer
80-
- [Matthew Fecher](http://matthewfecher.com) creator, [AudioKit Pro](https://audiokitpro.com)
81+
- [Fethi](https://fethica.com) --co-organizer and lead developer
82+
- [Matthew Fecher](http://matthewfecher.com) --creator, [AudioKit Pro](https://audiokitpro.com)
8183
- [All contributors](https://github.com/analogcode/Swift-Radio-Pro/graphs/contributors)
8284

8385
## License

SwiftRadio/Config/Config.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,25 @@ struct Config {
6161
struct About {
6262
static let sections: [InfoSection] = [
6363
InfoSection(title: Content.About.Sections.features, items: [
64-
.features()
64+
.features(title: Content.About.Items.features)
6565
]),
6666
InfoSection(title: Content.About.Sections.contact, items: [
67-
.email(address: Config.email),
67+
.email(title: Content.About.Items.email, address: Config.email),
6868
.link(title: Content.About.feedback.0, subtitle: Content.About.feedback.1, url: Config.feedbackURL)
6969
]),
7070
InfoSection(title: Content.About.Sections.support, items: [
71-
.rateApp(appID: "YOUR_APP_ID"),
72-
.share(text: Content.About.shareText)
71+
.rateApp(title: Content.About.Items.rateApp, appID: "YOUR_APP_ID"),
72+
.share(title: Content.About.Items.shareApp, text: Content.About.shareText)
7373
]),
7474
InfoSection(title: Content.About.Sections.credits, items: [
75-
.libraries(),
76-
.credits(owner: "analogcode", repo: "Swift-Radio-Pro")
75+
.libraries(title: Content.About.Items.libraries),
76+
.credits(title: Content.About.Items.contributors, subtitle: Content.About.Items.specialThanks, owner: "analogcode", repo: "Swift-Radio-Pro")
7777
]),
7878
InfoSection(title: Content.About.Sections.legal, items: [
7979
.link(title: Content.About.license.0, subtitle: Content.About.license.1, url: Config.licenseURL)
8080
]),
8181
InfoSection(title: Content.About.Sections.version, items: [
82-
.version()
82+
.version(title: Content.About.Items.appVersion)
8383
])
8484
]
8585
}

SwiftRadio/Config/Content.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,22 @@ struct Content {
2727
static let version = String(localized: "about.sections.version")
2828
}
2929

30+
static let copyright = String(localized: "about.copyright")
31+
3032
static let feedback = (String(localized: "about.feedback.title"), String(localized: "about.feedback.message"))
3133
static let shareText = String(localized: "about.shareText")
3234
static let license = (String(localized: "about.license.title"), String(localized: "about.license.detail"))
35+
36+
struct Items {
37+
static let features = String(localized: "about.items.features")
38+
static let email = String(localized: "about.items.email")
39+
static let rateApp = String(localized: "about.items.rateApp")
40+
static let shareApp = String(localized: "about.items.shareApp")
41+
static let libraries = String(localized: "about.items.libraries")
42+
static let contributors = String(localized: "about.items.contributors")
43+
static let specialThanks = String(localized: "about.items.specialThanks")
44+
static let appVersion = String(localized: "about.items.appVersion")
45+
}
3346
}
3447

3548
struct Contributors {

SwiftRadio/Localizable.xcstrings

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@
2323
}
2424
}
2525
},
26+
"about.copyright" : {
27+
"extractionState" : "manual",
28+
"localizations" : {
29+
"en" : {
30+
"stringUnit" : {
31+
"state" : "translated",
32+
"value" : "Copyright"
33+
}
34+
}
35+
}
36+
},
2637
"about.footerAuthors" : {
2738
"extractionState" : "manual",
2839
"localizations" : {
@@ -45,6 +56,94 @@
4556
}
4657
}
4758
},
59+
"about.items.appVersion" : {
60+
"extractionState" : "manual",
61+
"localizations" : {
62+
"en" : {
63+
"stringUnit" : {
64+
"state" : "translated",
65+
"value" : "App Version"
66+
}
67+
}
68+
}
69+
},
70+
"about.items.contributors" : {
71+
"extractionState" : "manual",
72+
"localizations" : {
73+
"en" : {
74+
"stringUnit" : {
75+
"state" : "translated",
76+
"value" : "Contributors"
77+
}
78+
}
79+
}
80+
},
81+
"about.items.email" : {
82+
"extractionState" : "manual",
83+
"localizations" : {
84+
"en" : {
85+
"stringUnit" : {
86+
"state" : "translated",
87+
"value" : "Email"
88+
}
89+
}
90+
}
91+
},
92+
"about.items.features" : {
93+
"extractionState" : "manual",
94+
"localizations" : {
95+
"en" : {
96+
"stringUnit" : {
97+
"state" : "translated",
98+
"value" : "Features"
99+
}
100+
}
101+
}
102+
},
103+
"about.items.libraries" : {
104+
"extractionState" : "manual",
105+
"localizations" : {
106+
"en" : {
107+
"stringUnit" : {
108+
"state" : "translated",
109+
"value" : "Open Source Libraries"
110+
}
111+
}
112+
}
113+
},
114+
"about.items.rateApp" : {
115+
"extractionState" : "manual",
116+
"localizations" : {
117+
"en" : {
118+
"stringUnit" : {
119+
"state" : "translated",
120+
"value" : "Rate the App"
121+
}
122+
}
123+
}
124+
},
125+
"about.items.shareApp" : {
126+
"extractionState" : "manual",
127+
"localizations" : {
128+
"en" : {
129+
"stringUnit" : {
130+
"state" : "translated",
131+
"value" : "Share the App"
132+
}
133+
}
134+
}
135+
},
136+
"about.items.specialThanks" : {
137+
"extractionState" : "manual",
138+
"localizations" : {
139+
"en" : {
140+
"stringUnit" : {
141+
"state" : "translated",
142+
"value" : "Special Thanks"
143+
}
144+
}
145+
}
146+
},
48147
"about.headerText" : {
49148
"extractionState" : "manual",
50149
"localizations" : {

SwiftRadio/ViewControllers/AboutViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class AboutViewController: UITableViewController {
186186
footerLabel.text =
187187
"""
188188
\(Content.About.footerAuthors)
189-
Copyright © \(Calendar.current.component(.year, from: Date())) \(Content.About.footerCopyright)
189+
\(Content.About.copyright) © \(Calendar.current.component(.year, from: Date())) \(Content.About.footerCopyright)
190190
"""
191191

192192
stackView.addArrangedSubview(logoImageView)

0 commit comments

Comments
 (0)