Fix translations

Add missing keys, remove duplicate keys, avoid exception on missing
calendar categories.
This commit is contained in:
Francis Lachapelle
2018-10-18 15:32:08 -04:00
parent 48f2677aad
commit 04555b1e14
5 changed files with 28 additions and 28 deletions
+7 -1
View File
@@ -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]];