Skip to content

Commit

Permalink
[NT-708] A11y statement (#1040)
Browse files Browse the repository at this point in the history
* new a11y statement cell

* new snapshots

* spacing

* a11y statement copy

* accessibility copy

* help type tests
  • Loading branch information
cdolm92 committed Jan 21, 2020
1 parent 5d5a701 commit 274f43d
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Kickstarter-iOS/DataSources/HelpDataSourceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ final class HelpDataSourceTests: XCTestCase {

XCTAssertEqual(2, self.dataSource.numberOfSections(in: self.tableView))
XCTAssertEqual(2, self.dataSource.tableView(self.tableView, numberOfRowsInSection: 0))
XCTAssertEqual(3, self.dataSource.tableView(self.tableView, numberOfRowsInSection: 1))
XCTAssertEqual(4, self.dataSource.tableView(self.tableView, numberOfRowsInSection: 1))
}

func testCellTypeForIndexPath_validIndexPath() {
Expand Down
1 change: 1 addition & 0 deletions Kickstarter-iOS/Locales/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"A_successfully_funded_project_will_collect_your_pledge_in_its_native_currency" = "A successfully funded project will collect your pledge in its native currency. The amounts shown are approximate.";
"A_weekly_roundup_of_the_best_and_brightest" = "A weekly roundup of the best and brightest projects on Kickstarter, handpicked by our team.";
"About_reward_amount" = "About %{reward_amount}";
"Accessibility_statement" = "Accessibility Statement";
"Account" = "Account";
"Add" = "Add";
"Add_attachments" = "Add attachments…";
Expand Down
1 change: 1 addition & 0 deletions Kickstarter-iOS/Locales/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"A_successfully_funded_project_will_collect_your_pledge_in_its_native_currency" = "Nach erfolgreicher Finanzierung des Projekts wird dein Finanzierungsbeitrag in der Währung des Erstellungslandes abgebucht. Bis dahin können nur ungefähre Beträge angezeigt werden.";
"A_weekly_roundup_of_the_best_and_brightest" = "Eine wöchentliche Zusammenfassung der besten und cleversten Projekte auf Kickstarter, handverlesen von unserem Team.";
"About_reward_amount" = "Ungefähr %{reward_amount}";
"Accessibility_statement" = "Accessibility Statement";
"Account" = "Konto";
"Add" = "Hinzufügen";
"Add_attachments" = "Anhänge hinzufügen ...";
Expand Down
1 change: 1 addition & 0 deletions Kickstarter-iOS/Locales/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"A_successfully_funded_project_will_collect_your_pledge_in_its_native_currency" = "Un proyecto financiado con éxito cobrará tu contribución en su moneda nativa. Los importes mostrados son aproximados.";
"A_weekly_roundup_of_the_best_and_brightest" = "Un resumen semanal de los mejores y más brillantes proyectos de Kickstarter, seleccionados por nuestro equipo.";
"About_reward_amount" = "Aprox. %{reward_amount}";
"Accessibility_statement" = "Accessibility Statement";
"Account" = "Cuenta";
"Add" = "Añadir";
"Add_attachments" = "Agregar anexos …";
Expand Down
1 change: 1 addition & 0 deletions Kickstarter-iOS/Locales/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"A_successfully_funded_project_will_collect_your_pledge_in_its_native_currency" = "Si ce projet est intégralement financé, votre engagement sera débité dans la devise du projet. Les montants affichés ici sont approximatifs.";
"A_weekly_roundup_of_the_best_and_brightest" = "Un tour d'horizon hebdomadaire des meilleurs projets Kickstarter, triés sur le volet par nos soins.";
"About_reward_amount" = "Environ %{reward_amount}";
"Accessibility_statement" = "Accessibility Statement";
"Account" = "Votre compte";
"Add" = "Ajouter";
"Add_attachments" = "Ajouter des pièces jointes...";
Expand Down
1 change: 1 addition & 0 deletions Kickstarter-iOS/Locales/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"A_successfully_funded_project_will_collect_your_pledge_in_its_native_currency" = "プロジェクトのファンディングが成功した際には、プレッジ額はプロジェクトをローンチした国の通貨で集められます。表示されている金額はおおよその換算額ですのでご注意ください。";
"A_weekly_roundup_of_the_best_and_brightest" = "Kickstarter スタッフがセレクトした今週のおすすめプロジェクト総まとめ。";
"About_reward_amount" = "約 %{reward_amount} ";
"Accessibility_statement" = "Accessibility Statement";
"Account" = "アカウント";
"Add" = "追加";
"Add_attachments" = "添付ファイルを追加...";
Expand Down
9 changes: 8 additions & 1 deletion Library/HelpType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public enum HelpType: SettingsCellTypeProtocol, CaseIterable {
case privacy
case cookie
case trust
case accessibility

public var accessibilityTraits: UIAccessibilityTraits {
switch self {
Expand All @@ -34,6 +35,8 @@ public enum HelpType: SettingsCellTypeProtocol, CaseIterable {
return Strings.profile_settings_about_cookie()
case .trust:
return ""
case .accessibility:
return Strings.Accessibility_statement()
}
}

Expand Down Expand Up @@ -66,6 +69,8 @@ public enum HelpType: SettingsCellTypeProtocol, CaseIterable {
return "Terms"
case .trust:
return "Trust & Safety"
case .accessibility:
return "Accessibility Statement"
}
}

Expand All @@ -85,6 +90,8 @@ public enum HelpType: SettingsCellTypeProtocol, CaseIterable {
return baseUrl.appendingPathComponent("terms-of-use")
case .trust:
return baseUrl.appendingPathComponent("trust")
case .accessibility:
return baseUrl.appendingPathComponent("accessibility")
}
}
}
Expand All @@ -93,7 +100,7 @@ extension HelpType: Equatable {}
public func == (lhs: HelpType, rhs: HelpType) -> Bool {
switch (lhs, rhs) {
case (.contact, .contact), (.cookie, .cookie), (.helpCenter, .helpCenter), (.howItWorks, .howItWorks),
(.privacy, .privacy), (.terms, .terms), (.trust, .trust):
(.privacy, .privacy), (.terms, .terms), (.trust, .trust), (.accessibility, .accessibility):
return true
default:
return false
Expand Down
1 change: 1 addition & 0 deletions Library/HelpTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ final class HelpTypeTests: XCTestCase {
XCTAssertEqual(HelpType.privacy.accessibilityTraits, UIAccessibilityTraits.link)
XCTAssertEqual(HelpType.cookie.accessibilityTraits, UIAccessibilityTraits.link)
XCTAssertEqual(HelpType.trust.accessibilityTraits, UIAccessibilityTraits.link)
XCTAssertEqual(HelpType.accessibility.accessibilityTraits, UIAccessibilityTraits.link)
}
}
2 changes: 1 addition & 1 deletion Library/SettingsCellType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public enum HelpSectionType: Int {
case .help:
return [.helpCenter, .contact]
case .privacy:
return [.terms, .privacy, .cookie]
return [.terms, .privacy, .cookie, .accessibility]
}
}
}
17 changes: 17 additions & 0 deletions Library/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@ public enum Strings {
substitutions: ["reward_amount": reward_amount]
)
}
/**
"Accessibility Statement"

- **en**: "Accessibility Statement"
- **de**: "Accessibility Statement"
- **es**: "Accessibility Statement"
- **fr**: "Accessibility Statement"
- **ja**: "Accessibility Statement"
*/
public static func Accessibility_statement() -> String {
return localizedString(
key: "Accessibility_statement",
defaultValue: "Accessibility Statement",
count: nil,
substitutions: [:]
)
}
/**
"Account"

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 274f43d

Please sign in to comment.