diff --git a/Clocker.xcodeproj/project.pbxproj b/Clocker.xcodeproj/project.pbxproj index 3103a21..aae3012 100755 --- a/Clocker.xcodeproj/project.pbxproj +++ b/Clocker.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 9A2000D11BFBD472002BFDE8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9A2000CF1BFBD472002BFDE8 /* Localizable.strings */; settings = {ASSET_TAGS = (); }; }; 9A4379251BEC223900F4E27F /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379211BEC223900F4E27F /* Security.framework */; settings = {ASSET_TAGS = (); }; }; 9A4379261BEC223900F4E27F /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379221BEC223900F4E27F /* SystemConfiguration.framework */; settings = {ASSET_TAGS = (); }; }; 9A4379271BEC223900F4E27F /* Fabric.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379231BEC223900F4E27F /* Fabric.framework */; settings = {ASSET_TAGS = (); }; }; @@ -35,6 +36,12 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 9A2000CC1BFBD3D7002BFDE8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Clocker/Base.lproj/MainMenu.xib; sourceTree = ""; }; + 9A2000CD1BFBD3D7002BFDE8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/Panel.xib; sourceTree = ""; }; + 9A2000CE1BFBD3D7002BFDE8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PreferencesWindow.xib; sourceTree = ""; }; + 9A2000D01BFBD472002BFDE8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Clocker/en.lproj/Localizable.strings; sourceTree = ""; }; + 9A2000D21BFBD47C002BFDE8 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = Clocker/fr.lproj/Localizable.strings; sourceTree = ""; }; + 9A2000D41BFBEE45002BFDE8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/PreferencesWindow.strings; sourceTree = ""; }; 9A4379211BEC223900F4E27F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Security.framework; sourceTree = ""; }; 9A4379221BEC223900F4E27F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SystemConfiguration.framework; sourceTree = ""; }; 9A4379231BEC223900F4E27F /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = ""; }; @@ -67,9 +74,6 @@ 9A8605D11BEC155B00A810A4 /* Status@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Status@2x.png"; path = "Clocker/Status@2x.png"; sourceTree = ""; }; 9A8605D21BEC155B00A810A4 /* StatusHighlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = StatusHighlighted.png; path = Clocker/StatusHighlighted.png; sourceTree = ""; }; 9A8605D31BEC155B00A810A4 /* StatusHighlighted@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "StatusHighlighted@2x.png"; path = "Clocker/StatusHighlighted@2x.png"; sourceTree = ""; }; - 9A8605DE1BEC15C400A810A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = Clocker/en.lproj/MainMenu.xib; sourceTree = ""; }; - 9ABA38AD1BFAD7F80073EA4D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Panel.xib; sourceTree = ""; }; - 9ABA38B01BFAD83F0073EA4D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/PreferencesWindow.xib; sourceTree = ""; }; 9ABA38B31BFAD8520073EA4D /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = fr.lproj/Panel.xib; sourceTree = ""; }; 9ABA38B41BFAD8520073EA4D /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = fr.lproj/PreferencesWindow.xib; sourceTree = ""; }; DD4F7C0413C30F9F00825C6E /* Clocker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Clocker.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -97,6 +101,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 9A2000C61BFBCEF6002BFDE8 /* Localization Strings */ = { + isa = PBXGroup; + children = ( + 9A2000CF1BFBD472002BFDE8 /* Localizable.strings */, + ); + name = "Localization Strings"; + sourceTree = ""; + }; 9A8605E01BEC15F400A810A4 /* XIB */ = { isa = PBXGroup; children = ( @@ -171,6 +183,7 @@ children = ( 9A5B1A8D1BECDFB700A77C68 /* Clocker.entitlements */, 9A43792D1BEC256200F4E27F /* Media.xcassets */, + 9A2000C61BFBCEF6002BFDE8 /* Localization Strings */, 9A8605E01BEC15F400A810A4 /* XIB */, 9A8605E11BEC160700A810A4 /* Images */, 9A8605E41BEC164C00A810A4 /* Main */, @@ -253,6 +266,7 @@ knownRegions = ( en, fr, + Base, ); mainGroup = DD4F7BF913C30F9F00825C6E; productRefGroup = DD4F7C0513C30F9F00825C6E /* Products */; @@ -274,6 +288,7 @@ 9A8605D91BEC155B00A810A4 /* Status.png in Resources */, 9ABA38AC1BFAD7F80073EA4D /* Panel.xib in Resources */, 9A43792E1BEC256200F4E27F /* Media.xcassets in Resources */, + 9A2000D11BFBD472002BFDE8 /* Localizable.strings in Resources */, 9A8605DC1BEC155B00A810A4 /* StatusHighlighted@2x.png in Resources */, 9A8605DA1BEC155B00A810A4 /* Status@2x.png in Resources */, 9A8605DB1BEC155B00A810A4 /* StatusHighlighted.png in Resources */, @@ -319,10 +334,19 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ + 9A2000CF1BFBD472002BFDE8 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 9A2000D01BFBD472002BFDE8 /* en */, + 9A2000D21BFBD47C002BFDE8 /* fr */, + ); + name = Localizable.strings; + sourceTree = ""; + }; 9A8605DD1BEC15C400A810A4 /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( - 9A8605DE1BEC15C400A810A4 /* en */, + 9A2000CC1BFBD3D7002BFDE8 /* Base */, ); name = MainMenu.xib; sourceTree = ""; @@ -330,8 +354,8 @@ 9ABA38AE1BFAD7F80073EA4D /* Panel.xib */ = { isa = PBXVariantGroup; children = ( - 9ABA38AD1BFAD7F80073EA4D /* en */, 9ABA38B31BFAD8520073EA4D /* fr */, + 9A2000CD1BFBD3D7002BFDE8 /* Base */, ); name = Panel.xib; path = Clocker; @@ -340,8 +364,9 @@ 9ABA38B11BFAD83F0073EA4D /* PreferencesWindow.xib */ = { isa = PBXVariantGroup; children = ( - 9ABA38B01BFAD83F0073EA4D /* en */, 9ABA38B41BFAD8520073EA4D /* fr */, + 9A2000CE1BFBD3D7002BFDE8 /* Base */, + 9A2000D41BFBEE45002BFDE8 /* en */, ); name = PreferencesWindow.xib; path = Clocker; diff --git a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 19c8d70..fe2b454 100644 --- a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -2,22 +2,4 @@ - - - - - - diff --git a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme index c9cf815..5038ff4 100644 --- a/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme +++ b/Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/Clocker.xcscheme @@ -52,7 +52,7 @@ debugServiceExtension = "internal" allowLocationSimulation = "YES" showNonLocalizedStrings = "YES" - language = "fr"> + language = "en"> - - - - - - + diff --git a/Clocker/PanelController.m b/Clocker/PanelController.m index 4aaadd6..d53e58b 100755 --- a/Clocker/PanelController.m +++ b/Clocker/PanelController.m @@ -297,7 +297,7 @@ NSNumber *is24HourFormatSelected = [[NSUserDefaults standardUserDefaults] objectForKey:@"is24HourFormatSelected"]; - is24HourFormatSelected.boolValue ? [dateFormatter setDateFormat:@"HH:mm"] : [dateFormatter setTimeStyle:NSDateFormatterShortStyle]; + is24HourFormatSelected.boolValue ? [dateFormatter setDateFormat:@"HH:mm"] : [dateFormatter setDateFormat:@"hh:mm a"]; dateFormatter.timeZone = [NSTimeZone timeZoneWithName:timezoneName]; //In the format 22:10 @@ -321,14 +321,13 @@ - (NSString *)compareSystemDate:(NSString *)systemDate toTimezoneDate:(NSString *)date { NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = @"MM/dd/yyyy"; - formatter.dateFormat = @"dd/MM/yyyy"; + formatter.dateFormat = [NSDateFormatter dateFormatFromTemplate:@"MM/dd/yyyy" options:0 locale:[NSLocale currentLocale]]; NSDate *localDate = [formatter dateFromString:systemDate]; NSDate *timezoneDate = [formatter dateFromString:date]; if (localDate == nil || timezoneDate == nil) { -// [[Crashlytics sharedInstance] crash]; + [[Crashlytics sharedInstance] crash]; [CrashlyticsKit setUserEmail:systemDate]; [CrashlyticsKit setUserIdentifier:date]; NSLog(@"One of the dates is nil"); @@ -342,15 +341,15 @@ NSInteger timezoneDay = [calendar component:units fromDate:timezoneDate]; if (systemDay == timezoneDay) { - return @"Today"; + return NSLocalizedString(@"Today", @"Today");; } else if (systemDay > timezoneDay) { - return @"Yesterday"; + return NSLocalizedString(@"Yesterday", @"Yesterday"); } else { - return @"Tomorrow"; + return NSLocalizedString(@"Tomorrow", @"Tomorrow");; } } diff --git a/Clocker/PreferencesWindowController.m b/Clocker/PreferencesWindowController.m index 4059ab5..0122797 100644 --- a/Clocker/PreferencesWindowController.m +++ b/Clocker/PreferencesWindowController.m @@ -177,7 +177,7 @@ static PreferencesWindowController *sharedPreferences = nil; if (self.selectedTimeZones.count > 9) { - self.messageLabel.stringValue = @"Maximum 10 timezones allowed!"; + self.messageLabel.stringValue = NSLocalizedString(@"MaximumTimezoneMessage", nil); [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(clearLabel) userInfo:nil repeats:NO]; return; } @@ -194,7 +194,7 @@ static PreferencesWindowController *sharedPreferences = nil; } else if ([name isEqualToString:self.timeZoneArray[self.availableTimezoneTableView.selectedRow]]) { - self.messageLabel.stringValue = @"Timezone has already been selected!"; + self.messageLabel.stringValue = NSLocalizedString(@"DuplicateTimezoneMessage", nil); [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(clearLabel) userInfo:nil repeats:NO]; return; } diff --git a/Clocker/en.lproj/Localizable.strings b/Clocker/en.lproj/Localizable.strings new file mode 100644 index 0000000..e85e253 --- /dev/null +++ b/Clocker/en.lproj/Localizable.strings @@ -0,0 +1,16 @@ +/* + Localizable.strings + Clocker + + Created by Abhishek Banthia on 11/17/15. + +*/ + +"Yesterday" = "Yesterday"; +"Today" = "Today"; +"Tomorrow" = "Tomorrow"; +"SpreadTheWordTitle" = "Spread the word, maybe"; +"SpreadTheWordMessage" = "Clocker is completely open source. If it helped you in any way, please leave a kind of opinion on the App Store!"; +"Cancel" = "Cancel"; +"MaximumTimezoneMessage" = "Maximum 10 timezones allowed!"; +"DuplicateTimezoneMessage" = "Timezone has already been selected!"; \ No newline at end of file diff --git a/Clocker/en.lproj/PreferencesWindow.strings b/Clocker/en.lproj/PreferencesWindow.strings new file mode 100644 index 0000000..cab1236 --- /dev/null +++ b/Clocker/en.lproj/PreferencesWindow.strings @@ -0,0 +1,69 @@ + +/* Class = "NSSearchFieldCell"; placeholderString = "Enter Timezone Name"; ObjectID = "2DC-BS-vbb"; */ +"2DC-BS-vbb.placeholderString" = "Enter Timezone Name"; + +/* Class = "NSSearchField"; ibShadowedToolTip = "Search a timezone"; ObjectID = "5jL-eb-qdB"; */ +"5jL-eb-qdB.ibShadowedToolTip" = "Search a timezone"; + +/* Class = "NSTableColumn"; headerCell.title = "Selected Timezone(s)"; ObjectID = "CJN-Eu-3s5"; */ +"CJN-Eu-3s5.headerCell.title" = "Selected Timezone(s)"; + +/* Class = "NSButtonCell"; title = "Use a 24-hour clock"; ObjectID = "Fro-eC-cMC"; */ +"Fro-eC-cMC.title" = "Use a 24-hour clock"; + +/* Class = "NSButton"; ibShadowedToolTip = "Clocker will start on each system launch"; ObjectID = "GDz-2Z-uX5"; */ +"GDz-2Z-uX5.ibShadowedToolTip" = "Clocker will start on each system launch"; + +/* Class = "NSTableColumn"; headerCell.title = "Abbreviation"; ObjectID = "Iuq-hc-Ma0"; */ +"Iuq-hc-Ma0.headerCell.title" = "Abbreviation"; + +/* Class = "NSButton"; ibShadowedToolTip = "Add a timezone"; ObjectID = "KlN-dU-s3o"; */ +"KlN-dU-s3o.ibShadowedToolTip" = "Add a timezone"; + +/* Class = "NSButton"; ibShadowedToolTip = "Show time using a 24-hour format"; ObjectID = "N47-gw-Pay"; */ +"N47-gw-Pay.ibShadowedToolTip" = "Show time using a 24-hour format"; + +/* Class = "NSButtonCell"; title = "Close"; ObjectID = "ODT-4D-sWu"; */ +"ODT-4D-sWu.title" = "Close"; + +/* Class = "NSButton"; ibShadowedToolTip = "Show only the City instead of Continent/City format"; ObjectID = "P0l-kc-VxU"; */ +"P0l-kc-VxU.ibShadowedToolTip" = "Show only the City instead of Continent/City format"; + +/* Class = "NSTableColumn"; headerCell.title = "Timezone Name"; ObjectID = "TEh-P6-jcT"; */ +"TEh-P6-jcT.headerCell.title" = "Timezone Name"; + +/* Class = "NSButton"; ibShadowedToolTip = "Close Panel"; ObjectID = "Ueh-Ln-TC8"; */ +"Ueh-Ln-TC8.ibShadowedToolTip" = "Close Panel"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "Vu3-3D-aDG"; */ +"Vu3-3D-aDG.title" = "Text Cell"; + +/* Class = "NSWindow"; title = "Window"; ObjectID = "Z6I-Ny-aGx"; */ +"Z6I-Ny-aGx.title" = "Window"; + +/* Class = "NSButtonCell"; title = "Report Bug!"; ObjectID = "ZVb-7Q-E7k"; */ +"ZVb-7Q-E7k.title" = "Report Bug!"; + +/* Class = "NSButtonCell"; title = "Start Clocker on system startup"; ObjectID = "h45-jZ-cPY"; */ +"h45-jZ-cPY.title" = "Start Clocker on system startup"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "iJJ-UY-Q3g"; */ +"iJJ-UY-Q3g.title" = "Text Cell"; + +/* Class = "NSButtonCell"; title = "Show only City/Region name"; ObjectID = "jaB-eA-S6N"; */ +"jaB-eA-S6N.title" = "Show only City/Region name"; + +/* Class = "NSButtonCell"; title = "Add"; ObjectID = "kZe-ua-0p9"; */ +"kZe-ua-0p9.title" = "Add"; + +/* Class = "NSTextFieldCell"; placeholderString = "Open Source Message"; ObjectID = "l7j-wK-zcu"; */ +"l7j-wK-zcu.placeholderString" = "Open Source Message"; + +/* Class = "NSButton"; ibShadowedToolTip = "Say Hello!"; ObjectID = "psn-eC-m9g"; */ +"psn-eC-m9g.ibShadowedToolTip" = "Say Hello!"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "pwL-7P-icB"; */ +"pwL-7P-icB.title" = "Text Cell"; + +/* Class = "NSTextFieldCell"; title = "Label"; ObjectID = "ysU-zz-gJh"; */ +"ysU-zz-gJh.title" = "Label"; diff --git a/Clocker/fr.lproj/Localizable.strings b/Clocker/fr.lproj/Localizable.strings new file mode 100644 index 0000000..71962c3 --- /dev/null +++ b/Clocker/fr.lproj/Localizable.strings @@ -0,0 +1,17 @@ +/* + Localizable.strings + Clocker + + Created by Abhishek Banthia on 11/17/15. + +*/ + + +"Yesterday" = "Hier"; +"Today" = "Aujourd'hui"; +"Tomorrow" = "Demain"; +"SpreadTheWordTitle" = "Passez le mot"; +"SpreadTheWordMessage" = "Clocker est complètement open source . Si cela vous a aidé de quelque façon , s'il vous plaît laisser un avis de genre sur l'App Store !"; +"Cancel" = "Annuler"; +"MaximumTimezoneMessage" = "Maximum 10 fuseaux horaires autorisés!"; +"DuplicateTimezoneMessage" = "Fuseau horaire a déjà été sélectionnée!"; \ No newline at end of file diff --git a/Clocker/fr.lproj/PreferencesWindow.xib b/Clocker/fr.lproj/PreferencesWindow.xib index 193f93e..cf4e93f 100644 --- a/Clocker/fr.lproj/PreferencesWindow.xib +++ b/Clocker/fr.lproj/PreferencesWindow.xib @@ -232,7 +232,7 @@ - + @@ -245,7 +245,7 @@ - + @@ -293,13 +293,13 @@