Skip to content

Commit

Permalink
Finnish language support (card-io#77)
Browse files Browse the repository at this point in the history
* Add localization for finnish

- Created fi.strings file with correct localizations

* Add finnishLoc file to project

- Add comment about finnish as a supported language
  • Loading branch information
JussiSuojanen authored and braebot committed Sep 23, 2016
1 parent 57ca65b commit 1ad9e24
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CardIO_Public_API/CardIOPaymentViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/// E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB".
///
/// These localizations are currently included:
/// ar,da,de,en,en_AU,en_GB,es,es_MX,fr,he,is,it,ja,ko,ms,nb,nl,pl,pt,pt_BR,ru,sv,th,tr,zh-Hans,zh-Hant,zh-Hant_TW.
/// ar,da,de,en,en_AU,en_GB,es,es_MX,fi,fr,he,is,it,ja,ko,ms,nb,nl,pl,pt,pt_BR,ru,sv,th,tr,zh-Hans,zh-Hant,zh-Hant_TW.
@property(nonatomic, copy, readwrite) NSString *languageOrLocale;

/// @see keepStatusBarStyleForCardIO
Expand Down
2 changes: 1 addition & 1 deletion CardIO_Public_API/CardIOView.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/// E.g., specifying "en" on a device set to "English" and "United Kingdom" will result in "en_GB".
///
/// These localizations are currently included:
/// ar,da,de,en,en_AU,en_GB,es,es_MX,fr,he,is,it,ja,ko,ms,nb,nl,pl,pt,pt_BR,ru,sv,th,tr,zh-Hans,zh-Hant,zh-Hant_TW.
/// ar,da,de,en,en_AU,en_GB,es,es_MX,fi,fr,he,is,it,ja,ko,ms,nb,nl,pl,pt,pt_BR,ru,sv,th,tr,zh-Hans,zh-Hant,zh-Hant_TW.
@property(nonatomic, copy, readwrite) NSString *languageOrLocale;

/// Alter the card guide (bracket) color. Opaque colors recommended.
Expand Down
2 changes: 1 addition & 1 deletion Classes/CardIOLocalizer.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (NSString *)filterOutCommonErrors:(NSString *)value {
#if CARDIO_DEBUG

+ (NSArray *)allLanguages {
return @[@"ar", @"da", @"de", @"en", @"en_AU", @"en_GB", @"es", @"es_MX", @"fr", @"he", @"is", @"it", @"ja", @"ko", @"ms", @"nb", @"nl", @"pl", @"pt", @"pt_BR", @"ru", @"sv", @"th", @"tr", @"zh-Hans", @"zh-Hant", @"zh-Hant_TW"];
return @[@"ar", @"da", @"de", @"en", @"en_AU", @"en_GB", @"es", @"es_MX", @"fi", @"fr", @"he", @"is", @"it", @"ja", @"ko", @"ms", @"nb", @"nl", @"pl", @"pt", @"pt_BR", @"ru", @"sv", @"th", @"tr", @"zh-Hans", @"zh-Hant", @"zh-Hant_TW"];
}

+ (NSError *)selfTestErrorWithMessage:(NSString *)errorMessage {
Expand Down
2 changes: 1 addition & 1 deletion Classes/RootViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ - (void)updateLanguageDisplay {
}

- (IBAction)languageChangeAction:(id)sender {
NSArray *choices = @[@"ar", @"da", @"de", @"en", @"en_AU", @"en_GB", @"es", @"es_MX", @"fr", @"he", @"is", @"it", @"ja", @"ko", @"ms", @"nb", @"nl", @"pl", @"pt", @"pt_BR", @"ru", @"sv", @"th", @"tr", @"zh-Hans", @"zh-Hant", @"zh-Hant_TW"];
NSArray *choices = @[@"ar", @"da", @"de", @"en", @"en_AU", @"en_GB", @"es", @"es_MX", @"fi", @"fr", @"he", @"is", @"it", @"ja", @"ko", @"ms", @"nb", @"nl", @"pl", @"pt", @"pt_BR", @"ru", @"sv", @"th", @"tr", @"zh-Hans", @"zh-Hant", @"zh-Hant_TW"];

iccChoicesSelectViewController *vc = [[iccChoicesSelectViewController alloc] initWithTitle:@"Language" choices:choices currentSelection:self.language completion:^(NSString *selection) {
if (selection) {
Expand Down
36 changes: 36 additions & 0 deletions assets/strings/fi.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"activate_flash" = "Salama päälle.";
"camera" = "Kamera";
"cancel" = "Peruuta";
"card_info" = "Kortin tiedot";
"card_io_logo" = "card.io";
"deactivate_flash" = "Salama pois päältä.";
"done" = "Valmis";
"entry_card_number" = "Kortin numero";
"entry_cvv" = "CVV";
"entry_expires" = "Voimassaoloaika";
"entry_number" = "Numero";
"entry_title" = "Kortti";
"entry_postal_code" = "Postinumero";
"entry_cardholder_name" = "Kortinhaltijan nimi";
"expires_placeholder" = "KK/VV";
"manual_entry" = "Syötä käsin";
"ok" = "OK";
"paypal_logo" = "PayPal";
"scan_guide" = "Aseta kortti tähän.\nSe skannautuu automaattisesti.";

"cardtype_americanexpress" = "American Express";
"cardtype_cartaaura" = "Carta Aura";
"cardtype_carteaurore" = "Carte Aurore";
"cardtype_cartaprepagatapaypal" = "Carta Prepagata PayPal";
"cardtype_cartebleue" = "Carte Bancaire";
"cardtype_cofinoga" = "Cofinoga";
"cardtype_delta" = "Delta";
"cardtype_discover" = "Discover";
"cardtype_electron" = "Electron";
"cardtype_jcb" = "JCB";
"cardtype_maestro" = "Maestro";
"cardtype_mastercard" = "MasterCard";
"cardtype_postepay" = "Postepay";
"cardtype_4etoiles" = "4 étoiles";
"cardtype_tarjetaaurora" = "Tarjeta Aurora";
"cardtype_visa" = "Visa";
4 changes: 4 additions & 0 deletions icc.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
A553B70D1BE32273006DF551 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E9618E319C8EBCB0023CDBB /* MobileCoreServices.framework */; };
A553B7161BE322A1006DF551 /* CardIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92263D701B83ACBB003FE678 /* CardIO.framework */; };
A553B7171BE322A1006DF551 /* CardIO.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 92263D701B83ACBB003FE678 /* CardIO.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
F4A16EC21D8846EA001DC8BE /* fi.strings in Resources */ = {isa = PBXBuildFile; fileRef = F4A16EC11D8846EA001DC8BE /* fi.strings */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -847,6 +848,7 @@
D1EA4591156B1A560091C829 /* image_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = image_util.h; sourceTree = "<group>"; };
D1F66D66146456880001F15F /* CardIOTransitionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardIOTransitionView.h; sourceTree = "<group>"; };
D1F66D67146456880001F15F /* CardIOTransitionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CardIOTransitionView.m; sourceTree = "<group>"; };
F4A16EC11D8846EA001DC8BE /* fi.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fi.strings; path = assets/strings/fi.strings; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -1864,6 +1866,7 @@
3E0133EE198ADC7D009E579A /* en.strings */,
3E0133EF198ADC7D009E579A /* es_MX.strings */,
3E0133F0198ADC7D009E579A /* es.strings */,
F4A16EC11D8846EA001DC8BE /* fi.strings */,
3E0133F1198ADC7D009E579A /* fr.strings */,
3E0133F2198ADC7D009E579A /* he.strings */,
3E4F946419DE10020077712A /* is.strings */,
Expand Down Expand Up @@ -2263,6 +2266,7 @@
A553B6F51BE32273006DF551 /* yak_icon~ipad.png in Resources */,
A553B6F61BE32273006DF551 /* card_io_logo_black.png in Resources */,
A553B6F71BE32273006DF551 /* RootViewController~ipad.xib in Resources */,
F4A16EC21D8846EA001DC8BE /* fi.strings in Resources */,
A553B6F81BE32273006DF551 /* [email protected] in Resources */,
A553B6F91BE32273006DF551 /* Default.png in Resources */,
A553B6FA1BE32273006DF551 /* [email protected] in Resources */,
Expand Down

0 comments on commit 1ad9e24

Please sign in to comment.