Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NT-1529] Add PLN Currency Selection #1298

Merged
merged 7 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Reference: https://docs.codecov.io/docs/codecovyml-reference
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
1 change: 1 addition & 0 deletions Kickstarter-iOS/Locales/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"Currency_MXN" = "$ Mexican Peso (MXN)";
"Currency_NOK" = "kr Norwegian Krone (NOK)";
"Currency_NZD" = "$ New Zealand Dollar (NZD)";
"Currency_PLN" = "zł Polish Złoty (PLN)";
"Currency_SEK" = "kr Swedish Krona (SEK)";
"Currency_SGD" = "$ Singapore Dollar (SGD)";
"Currency_USD" = "$ US Dollar (USD)";
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
Expand Up @@ -148,6 +148,7 @@
"Currency_MXN" = "$ Mexikanischer Peso (MXN)";
"Currency_NOK" = "kr Norwegische Krone (NOK)";
"Currency_NZD" = "$ Neuseeland-Dollar (NZD)";
"Currency_PLN" = "zł Polish Złoty (PLN)";
"Currency_SEK" = "kr Schwedische Krone (SEK)";
"Currency_SGD" = "$ Singapur-Dollar (SGD)";
"Currency_USD" = "$ US-Dollar (USD)";
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
Expand Up @@ -148,6 +148,7 @@
"Currency_MXN" = "$ Peso mexicano (MXN)";
"Currency_NOK" = "kr Corona noruega (NOK)";
"Currency_NZD" = "$ Dólar de Nueva Zelanda (NZD)";
"Currency_PLN" = "zł Polish Złoty (PLN)";
"Currency_SEK" = "kr Corona sueca (SEK)";
"Currency_SGD" = "$ Dólar de Singapur (SGD)";
"Currency_USD" = "$ Dólar estadounidense (USD)";
Expand Down
3 changes: 2 additions & 1 deletion Kickstarter-iOS/Locales/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@
"Currency_EUR" = "Euro – € (EUR)";
"Currency_GBP" = "Livre sterling – £ (GBP)";
"Currency_HKD" = "Dollar de Hong Kong – $ (HKD)";
"Currency_JPY" = "Yen – ¥ (JPY)";
"Currency_JPY" = "Yen japonais – ¥ (JPY)";
"Currency_MXN" = "Pesos mexicain – $ (MXN)";
"Currency_NOK" = "Couronne norvégienne – kr (NOK)";
"Currency_NZD" = "Dollar néo-zélandais – $ (NZD)";
"Currency_PLN" = "Złoty polonais – zł (PLN)";
"Currency_SEK" = "Couronne suédoise – kr (SEK)";
"Currency_SGD" = "Dollar singapourien – $ (SGD)";
"Currency_USD" = "Dollar américain – $ (USD)";
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
Expand Up @@ -148,6 +148,7 @@
"Currency_MXN" = "$ メキシコペソ (MXN)";
"Currency_NOK" = "kr ノルウェークローネ (NOK)";
"Currency_NZD" = "$ ニュージーランドドル (NZD)";
"Currency_PLN" = "zł Polish Złoty (PLN)";
"Currency_SEK" = "kr スウェーデンクローナ (SEK)";
"Currency_SGD" = "$ シンガポールドル (SGD)";
"Currency_USD" = "$ 米ドル (USD)";
Expand Down
3 changes: 3 additions & 0 deletions Library/Currency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public enum Currency: String, Encodable, CaseIterable, Equatable {
case MXN
case NOK
case NZD
case PLN
case SEK
case SGD
case USD
Expand Down Expand Up @@ -41,6 +42,8 @@ public enum Currency: String, Encodable, CaseIterable, Equatable {
return Strings.Currency_NOK()
case .NZD:
return Strings.Currency_NZD()
case .PLN:
return Strings.Currency_PLN()
case .SEK:
return Strings.Currency_SEK()
case .SGD:
Expand Down
19 changes: 18 additions & 1 deletion Library/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,7 @@ Haz clic para volver a intentarlo."
- **en**: "¥ Japanese Yen (JPY)"
- **de**: "¥ Yen (JPY)"
- **es**: "¥ Yen (JPY)"
- **fr**: "Yen – ¥ (JPY)"
- **fr**: "Yen japonais – ¥ (JPY)"
- **ja**: "¥ 円 (JPY)"
*/
public static func Currency_JPY() -> String {
Expand Down Expand Up @@ -2318,6 +2318,23 @@ Haz clic para volver a intentarlo."
substitutions: [:]
)
}
/**
"zł Polish Złoty (PLN)"

- **en**: "zł Polish Złoty (PLN)"
- **de**: "zł Polish Złoty (PLN)"
- **es**: "zł Polish Złoty (PLN)"
- **fr**: "Złoty polonais – zł (PLN)"
- **ja**: "zł Polish Złoty (PLN)"
*/
public static func Currency_PLN() -> String {
return localizedString(
key: "Currency_PLN",
defaultValue: "zł Polish Złoty (PLN)",
count: nil,
substitutions: [:]
)
}
/**
"kr Swedish Krona (SEK)"

Expand Down
6 changes: 4 additions & 2 deletions Library/ViewModels/SelectCurrencyViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@ internal final class SelectCurrencyViewModelTests: TestCase {
func testCurrenciesOrderedBySelected() {
XCTAssertEqual(
currencies(orderedBySelected: .USD),
[.USD, .EUR, .AUD, .CAD, .CHF, .DKK, .GBP, .HKD, .JPY, .MXN, .NOK, .NZD, .SEK, .SGD]
[.USD, .EUR, .AUD, .CAD, .CHF, .DKK, .GBP, .HKD, .JPY, .MXN, .NOK, .NZD, .PLN, .SEK, .SGD]
)

XCTAssertEqual(
currencies(orderedBySelected: .SEK),
[.SEK, .EUR, .AUD, .CAD, .CHF, .DKK, .GBP, .HKD, .JPY, .MXN, .NOK, .NZD, .SGD, .USD]
[.SEK, .EUR, .AUD, .CAD, .CHF, .DKK, .GBP, .HKD, .JPY, .MXN, .NOK, .NZD, .PLN, .SGD, .USD]
)
}

Expand All @@ -208,6 +208,7 @@ internal final class SelectCurrencyViewModelTests: TestCase {
SelectedCurrencyData(currency: .MXN, selected: false),
SelectedCurrencyData(currency: .NOK, selected: false),
SelectedCurrencyData(currency: .NZD, selected: false),
SelectedCurrencyData(currency: .PLN, selected: false),
SelectedCurrencyData(currency: .SEK, selected: true),
SelectedCurrencyData(currency: .SGD, selected: false),
SelectedCurrencyData(currency: .USD, selected: false)
Expand All @@ -228,6 +229,7 @@ internal final class SelectCurrencyViewModelTests: TestCase {
SelectedCurrencyData(currency: .MXN, selected: false),
SelectedCurrencyData(currency: .NOK, selected: false),
SelectedCurrencyData(currency: .NZD, selected: false),
SelectedCurrencyData(currency: .PLN, selected: false),
SelectedCurrencyData(currency: .SEK, selected: false),
SelectedCurrencyData(currency: .SGD, selected: false),
SelectedCurrencyData(currency: .USD, selected: false)
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.
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.
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.