Cleanup months and weeks translations

Removed the translations of months and weeks from the Scheduler bundle
since they were already translated in Locale files.
 - The a3_<month> strings were removed (replaced by
   NSShortMonthNameArray)
- The months strings were removed (replaced by NSMonthNameArray)
- The weeks strings were removed (replaced by NSWeekDayNameArray)

Moved the a2_<weekday> strings to the Common bundle and added a new
method [UIxComponent commonLabelForKey:].
This commit is contained in:
Francis Lachapelle
2012-09-21 21:48:39 -04:00
parent fa0db25b16
commit 0181ec606d
46 changed files with 267 additions and 1073 deletions
+22 -1
View File
@@ -24,6 +24,7 @@
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSNull.h>
#import <Foundation/NSString.h>
#import <Foundation/NSUserDefaults.h> /* for locale strings */
#import <NGObjWeb/WOResourceManager.h>
@@ -210,9 +211,11 @@
- (NSString *) _stringsForFramework: (NSString *) framework
{
NSString *language, *frameworkName;
NSMutableDictionary* strings;
SOGoUserDefaults *ud;
id table;
// When no framework is specified, we load the strings from UI/Common
frameworkName = [NSString stringWithFormat: @"%@.SOGo",
(framework ? framework : [self frameworkName])];
ud = [[context activeUser] userDefaults];
@@ -225,8 +228,26 @@
inFramework: frameworkName
languages: [NSArray arrayWithObject: language]];
strings = [NSMutableDictionary dictionaryWithDictionary: table];
if (!framework)
{
// Add strings from Locale
NSDictionary *moreStrings;
// Month names
moreStrings = [NSDictionary dictionaryWithObjects: [locale objectForKey: NSMonthNameArray]
forKeys: [UIxComponent monthLabelKeys]];
[strings addEntriesFromDictionary: moreStrings];
// Short month names
moreStrings = [NSDictionary dictionaryWithObjects: [locale objectForKey: NSShortMonthNameArray]
forKeys: [UIxComponent abbrMonthLabelKeys]];
[strings addEntriesFromDictionary: moreStrings];
}
/* table is not really an NSDictionary but a hackish variation thereof */
return [[NSDictionary dictionaryWithDictionary: table] jsonRepresentation];
return [strings jsonRepresentation];
}
- (NSString *) commonLocalizableStrings