From 04555b1e14625a315b99ed5c569b1604f9fdb3ed Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 18 Oct 2018 15:32:08 -0400 Subject: [PATCH] Fix translations Add missing keys, remove duplicate keys, avoid exception on missing calendar categories. --- .../Icelandic.lproj/Localizable.strings | 8 ++---- .../Lithuanian.lproj/Localizable.strings | 11 ++++---- .../Macedonian.lproj/Localizable.strings | 27 +++++++++---------- UI/PreferencesUI/UIxPreferences.m | 8 +++++- .../Welsh.lproj/Localizable.strings | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/UI/PreferencesUI/Icelandic.lproj/Localizable.strings b/UI/PreferencesUI/Icelandic.lproj/Localizable.strings index 519be022d..c8f300b48 100644 --- a/UI/PreferencesUI/Icelandic.lproj/Localizable.strings +++ b/UI/PreferencesUI/Icelandic.lproj/Localizable.strings @@ -48,12 +48,8 @@ "shortDateFmt_7" = "%m/%d/%y"; "shortDateFmt_8" = "%m/%e/%y"; "shortDateFmt_9" = "%y.%m.%d"; -"shortDateFmt_10" = "%y.%m.%d"; -"shortDateFmt_11" = "%y.%m.%d"; -"shortDateFmt_12" = "%Y.%m.%d"; -"shortDateFmt_13" = "%Y.%m.%d"; -"shortDateFmt_14" = "%Y.%m.%d"; -"shortDateFmt_15" = ""; +"shortDateFmt_10" = "%Y.%m.%d"; +"shortDateFmt_11" = ""; "longDateFmt_0" = "%A, %B %d, %Y"; "longDateFmt_1" = "%B %d, %Y"; diff --git a/UI/PreferencesUI/Lithuanian.lproj/Localizable.strings b/UI/PreferencesUI/Lithuanian.lproj/Localizable.strings index e23473a2b..36f331b14 100644 --- a/UI/PreferencesUI/Lithuanian.lproj/Localizable.strings +++ b/UI/PreferencesUI/Lithuanian.lproj/Localizable.strings @@ -63,12 +63,11 @@ "shortDateFmt_7" = "%m/%d/%y"; "shortDateFmt_8" = "%m/%e/%y"; "shortDateFmt_9" = "%y/%m/%d"; -"shortDateFmt_10" = "%y/%m/%d"; -"shortDateFmt_11" = "%y.%m.%d"; -"shortDateFmt_12" = "%Y-%m-%d"; -"shortDateFmt_13" = "%Y/%m/%d"; -"shortDateFmt_14" = "%Y.%m.%d"; -"shortDateFmt_15" = ""; +"shortDateFmt_10" = "%y.%m.%d"; +"shortDateFmt_11" = "%Y-%m-%d"; +"shortDateFmt_12" = "%Y/%m/%d"; +"shortDateFmt_13" = "%Y.%m.%d"; +"shortDateFmt_14" = ""; "longDateFmt_0" = "%A, %B %d, %Y"; "longDateFmt_1" = "%B %d, %Y"; diff --git a/UI/PreferencesUI/Macedonian.lproj/Localizable.strings b/UI/PreferencesUI/Macedonian.lproj/Localizable.strings index 5d7bf865f..23925b06f 100644 --- a/UI/PreferencesUI/Macedonian.lproj/Localizable.strings +++ b/UI/PreferencesUI/Macedonian.lproj/Localizable.strings @@ -70,20 +70,19 @@ "Default Module" = "Стандарден модул"; "Save" = "Сними"; "shortDateFmt_0" = "%d-%b-%y"; -"shortDateFmt_1" = "%d-%b-%y"; -"shortDateFmt_2" = "%d/%m/%y"; -"shortDateFmt_3" = "%e/%m/%y"; -"shortDateFmt_4" = "%d-%m-%Y"; -"shortDateFmt_5" = "%d/%m/%Y"; -"shortDateFmt_6" = "%m-%d-%y"; -"shortDateFmt_7" = "%m/%d/%y"; -"shortDateFmt_8" = "%m/%e/%y"; -"shortDateFmt_9" = "%y-%m-%d"; -"shortDateFmt_10" = "%y/%m/%d"; -"shortDateFmt_11" = "%y.%m.%d"; -"shortDateFmt_12" = "%Y-%m-%d"; -"shortDateFmt_13" = "%Y/%m/%d"; -"shortDateFmt_14" = "%Y.%m.%d"; +"shortDateFmt_1" = "%d/%m/%y"; +"shortDateFmt_2" = "%e/%m/%y"; +"shortDateFmt_3" = "%d-%m-%Y"; +"shortDateFmt_4" = "%d/%m/%Y"; +"shortDateFmt_5" = "%m-%d-%y"; +"shortDateFmt_6" = "%m/%d/%y"; +"shortDateFmt_7" = "%m/%e/%y"; +"shortDateFmt_8" = "%y-%m-%d"; +"shortDateFmt_9" = "%y/%m/%d"; +"shortDateFmt_10" = "%y.%m.%d"; +"shortDateFmt_11" = "%Y-%m-%d"; +"shortDateFmt_12" = "%Y/%m/%d"; +"shortDateFmt_13" = "%Y.%m.%d"; "shortDateFmt_15" = ""; "longDateFmt_0" = "%A, %B %d, %Y"; diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 639b78432..22ed57917 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -1223,8 +1223,14 @@ static NSArray *reminderValues = nil; labels = [[self labelForKey: @"calendar_category_labels"] componentsSeparatedByString: @","]; colors = [[[SOGoSystemDefaults sharedSystemDefaults] calendarCategoriesColors] allValues]; + + if ([colors count] > [labels count]) + { + [self errorWithFormat: @"Incomplete calendar_category_labels for translation %@", [[user userDefaults] language]]; + } + defaultCategoriesColors = [NSMutableDictionary dictionary]; - for (i = 0; i < [colors count]; i++) + for (i = 0; i < [colors count] && i < [labels count]; i++) { [defaultCategoriesColors setObject: [colors objectAtIndex: i] forKey: [labels objectAtIndex: i]]; diff --git a/UI/PreferencesUI/Welsh.lproj/Localizable.strings b/UI/PreferencesUI/Welsh.lproj/Localizable.strings index 0f5ea3c1f..74d4054fe 100644 --- a/UI/PreferencesUI/Welsh.lproj/Localizable.strings +++ b/UI/PreferencesUI/Welsh.lproj/Localizable.strings @@ -221,7 +221,7 @@ "Add Contact Category" = "Ychwanegu Categori Cysylltiadau"; "Remove Contact Category" = "Dileu Categori Cysylltiadau"; "category_none" = "Dim"; -"calendar_category_labels" = "Amrywiol,Anrhegion,Busnes,Canlyniadau,Cleientiaid,Cwsmer,Cyflenwyr,Cystadleuaeth,Dilyn lan,Ffefrynnau,Galwadau,Gwyliau,Cyfarfod,Gwyliau Cyhoeddus,Pen-blwydd,Personol,Prosiectau,Statws,Syniadau,Teithio"; +"calendar_category_labels" = "Pen-blwydd,Pen-blwydd,Busnes,Galwadau,Cleientiaid,Cystadleuaeth,Cwsmer,Ffefrynnau,Dilyniant,Anrhegion,Gwyliau,Syniadau,Cyfarfod,Materion,Amrywiol,Personol,Prosiectau,Gwyliau cyhoeddus,Statws,Cyflenwyr,Teithio,Gwyliau"; /* Default module */ "Calendar" = "Calendr";