Replace source section with web section

This commit is contained in:
Davide De Rosa 2018-10-30 20:44:18 +01:00
parent 0706d552be
commit 88124f5588
3 changed files with 11 additions and 37 deletions

View File

@ -32,15 +32,14 @@ class AboutViewController: UITableViewController, TableModelHost {
let model: TableModel<SectionType, RowType> = { let model: TableModel<SectionType, RowType> = {
let model: TableModel<SectionType, RowType> = TableModel() let model: TableModel<SectionType, RowType> = TableModel()
model.add(.info) model.add(.info)
model.add(.source) model.add(.web)
model.add(.share) model.add(.share)
model.add(.feedback) model.add(.feedback)
model.setHeader(L10n.About.Sections.Info.header, for: .info) model.setHeader(L10n.About.Sections.Web.header, for: .web)
model.setHeader(L10n.About.Sections.Source.header, for: .source)
model.setHeader(L10n.About.Sections.Share.header, for: .share) model.setHeader(L10n.About.Sections.Share.header, for: .share)
model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback) model.setHeader(L10n.About.Sections.Feedback.header, for: .feedback)
model.set([.version, .website, .disclaimer, .privacyPolicy], in: .info) model.set([.version], in: .info)
model.set([.sourcePassepartout, .sourceTunnelKit], in: .source) model.set([.website, .disclaimer, .privacyPolicy], in: .web)
model.set([.shareTwitter, .shareGeneric], in: .share) model.set([.shareTwitter, .shareGeneric], in: .share)
model.set([.joinCommunity, .writeReview], in: .feedback) model.set([.joinCommunity, .writeReview], in: .feedback)
return model return model
@ -116,7 +115,7 @@ extension AboutViewController {
enum SectionType: Int { enum SectionType: Int {
case info case info
case source case web
case share case share
@ -132,10 +131,6 @@ extension AboutViewController {
case privacyPolicy case privacyPolicy
case sourcePassepartout
case sourceTunnelKit
case shareTwitter case shareTwitter
case shareGeneric case shareGeneric
@ -184,16 +179,6 @@ extension AboutViewController {
cell.leftText = L10n.About.Cells.PrivacyPolicy.caption cell.leftText = L10n.About.Cells.PrivacyPolicy.caption
return cell return cell
case .sourcePassepartout:
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
cell.leftText = GroupConstants.App.name
return cell
case .sourceTunnelKit:
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
cell.leftText = GroupConstants.App.tunnelKitName
return cell
case .shareTwitter: case .shareTwitter:
let cell = Cells.setting.dequeue(from: tableView, for: indexPath) let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
cell.leftText = L10n.About.Cells.ShareTwitter.caption cell.leftText = L10n.About.Cells.ShareTwitter.caption
@ -230,12 +215,6 @@ extension AboutViewController {
case .privacyPolicy: case .privacyPolicy:
visitPrivacyPolicy() visitPrivacyPolicy()
case .sourcePassepartout:
visitRepository(AppConstants.Repos.passepartout)
case .sourceTunnelKit:
visitRepository(AppConstants.Repos.tunnelKit)
case .shareTwitter: case .shareTwitter:
tweetAboutApp() tweetAboutApp()

View File

@ -185,11 +185,10 @@
"issue_reporter.email.description" = "description of the issue:"; "issue_reporter.email.description" = "description of the issue:";
"about.title" = "About"; "about.title" = "About";
"about.sections.info.header" = "General"; "about.sections.web.header" = "Web";
"about.sections.source.header" = "Source code";
"about.sections.share.header" = "Share"; "about.sections.share.header" = "Share";
"about.sections.feedback.header" = "Feedback"; "about.sections.feedback.header" = "Feedback";
"about.cells.website.caption" = "Visit website"; "about.cells.website.caption" = "Home page";
"about.cells.disclaimer.caption" = "Disclaimer"; "about.cells.disclaimer.caption" = "Disclaimer";
"about.cells.privacy_policy.caption" = "Privacy policy"; "about.cells.privacy_policy.caption" = "Privacy policy";
"about.cells.share_twitter.caption" = "Tweet about it!"; "about.cells.share_twitter.caption" = "Tweet about it!";

View File

@ -37,7 +37,7 @@ internal enum L10n {
internal static let caption = L10n.tr("Localizable", "about.cells.share_twitter.caption") internal static let caption = L10n.tr("Localizable", "about.cells.share_twitter.caption")
} }
internal enum Website { internal enum Website {
/// Visit website /// Home page
internal static let caption = L10n.tr("Localizable", "about.cells.website.caption") internal static let caption = L10n.tr("Localizable", "about.cells.website.caption")
} }
internal enum WriteReview { internal enum WriteReview {
@ -50,17 +50,13 @@ internal enum L10n {
/// Feedback /// Feedback
internal static let header = L10n.tr("Localizable", "about.sections.feedback.header") internal static let header = L10n.tr("Localizable", "about.sections.feedback.header")
} }
internal enum Info {
/// General
internal static let header = L10n.tr("Localizable", "about.sections.info.header")
}
internal enum Share { internal enum Share {
/// Share /// Share
internal static let header = L10n.tr("Localizable", "about.sections.share.header") internal static let header = L10n.tr("Localizable", "about.sections.share.header")
} }
internal enum Source { internal enum Web {
/// Source code /// Web
internal static let header = L10n.tr("Localizable", "about.sections.source.header") internal static let header = L10n.tr("Localizable", "about.sections.web.header")
} }
} }
} }