mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-31 04:52:05 +00:00
Create GitHub section in About
Leave README and CHANGELOG untranslated.
This commit is contained in:
parent
bd14b9e617
commit
ffb273ce23
@ -33,14 +33,15 @@ class AboutViewController: UITableViewController, TableModelHost {
|
||||
let model: TableModel<SectionType, RowType> = {
|
||||
let model: TableModel<SectionType, RowType> = TableModel()
|
||||
model.add(.info)
|
||||
model.add(.moreInfo)
|
||||
model.add(.github)
|
||||
model.add(.web)
|
||||
model.add(.share)
|
||||
model.setHeader("", for: .info)
|
||||
model.setHeader("GitHub", for: .github)
|
||||
model.setHeader(L10n.About.Sections.Web.header, for: .web)
|
||||
model.setHeader(L10n.About.Sections.Share.header, for: .share)
|
||||
model.set([.version], in: .info)
|
||||
model.set([.seeChangelog, .seeCredits], in: .moreInfo)
|
||||
model.set([.version, .credits], in: .info)
|
||||
model.set([.readme, .changelog], in: .github)
|
||||
model.set([.website, .faq, .disclaimer, .privacyPolicy], in: .web)
|
||||
model.set([.shareTwitter, .shareGeneric], in: .share)
|
||||
return model
|
||||
@ -95,7 +96,7 @@ extension AboutViewController {
|
||||
enum SectionType: Int {
|
||||
case info
|
||||
|
||||
case moreInfo
|
||||
case github
|
||||
|
||||
case web
|
||||
|
||||
@ -105,9 +106,11 @@ extension AboutViewController {
|
||||
enum RowType: Int {
|
||||
case version
|
||||
|
||||
case seeChangelog
|
||||
case credits
|
||||
|
||||
case seeCredits
|
||||
case readme
|
||||
|
||||
case changelog
|
||||
|
||||
case website
|
||||
|
||||
@ -153,12 +156,15 @@ extension AboutViewController {
|
||||
cell.leftText = L10n.Version.title
|
||||
cell.rightText = Utils.versionString()
|
||||
|
||||
case .seeChangelog:
|
||||
cell.leftText = L10n.About.Cells.Changelog.caption
|
||||
|
||||
case .seeCredits:
|
||||
case .credits:
|
||||
cell.leftText = L10n.About.Cells.Credits.caption
|
||||
|
||||
case .readme:
|
||||
cell.leftText = "README"
|
||||
|
||||
case .changelog:
|
||||
cell.leftText = "CHANGELOG"
|
||||
|
||||
case .website:
|
||||
cell.leftText = L10n.About.Cells.Website.caption
|
||||
|
||||
@ -185,12 +191,15 @@ extension AboutViewController {
|
||||
case .version:
|
||||
showVersion()
|
||||
|
||||
case .seeChangelog:
|
||||
case .credits:
|
||||
openCredits()
|
||||
|
||||
case .readme:
|
||||
visit(AppConstants.URLs.readme)
|
||||
|
||||
case .changelog:
|
||||
visit(AppConstants.URLs.changelog)
|
||||
|
||||
case .seeCredits:
|
||||
openCredits()
|
||||
|
||||
case .website:
|
||||
visit(AppConstants.URLs.website)
|
||||
|
||||
|
@ -246,7 +246,6 @@
|
||||
"about.title" = "Über";
|
||||
"about.sections.web.header" = "Web";
|
||||
"about.sections.share.header" = "Teilen";
|
||||
"about.cells.changelog.caption" = "Changelog";
|
||||
"about.cells.credits.caption" = "Credits";
|
||||
"about.cells.website.caption" = "Homepage";
|
||||
"about.cells.faq.caption" = "FAQ";
|
||||
|
@ -244,7 +244,6 @@
|
||||
"about.title" = "About";
|
||||
"about.sections.web.header" = "Web";
|
||||
"about.sections.share.header" = "Share";
|
||||
"about.cells.changelog.caption" = "Changelog";
|
||||
"about.cells.credits.caption" = "Credits";
|
||||
"about.cells.website.caption" = "Home page";
|
||||
"about.cells.faq.caption" = "FAQ";
|
||||
|
@ -246,7 +246,6 @@
|
||||
"about.title" = "Informazioni su";
|
||||
"about.sections.web.header" = "Web";
|
||||
"about.sections.share.header" = "Condividi";
|
||||
"about.cells.changelog.caption" = "Changelog";
|
||||
"about.cells.credits.caption" = "Credits";
|
||||
"about.cells.website.caption" = "Home page";
|
||||
"about.cells.faq.caption" = "FAQ";
|
||||
|
@ -250,7 +250,6 @@
|
||||
"about.title" = "Sobre";
|
||||
"about.sections.web.header" = "Web";
|
||||
"about.sections.share.header" = "Compartilhar";
|
||||
"about.cells.changelog.caption" = "Changelog";
|
||||
"about.cells.credits.caption" = "Créditos";
|
||||
"about.cells.website.caption" = "Home page";
|
||||
"about.cells.faq.caption" = "FAQ";
|
||||
|
@ -171,6 +171,8 @@ public class AppConstants {
|
||||
|
||||
public static let privacyPolicy = website.appendingPathComponent("privacy")
|
||||
|
||||
public static let readme = Repos.ios.appendingPathComponent("blob/master/README.md")
|
||||
|
||||
public static let changelog = Repos.ios.appendingPathComponent("blob/master/CHANGELOG.md")
|
||||
|
||||
public static let subreddit = URL(string: "https://www.reddit.com/r/passepartout")!
|
||||
|
Loading…
Reference in New Issue
Block a user