Commits

Nick Pellow committed 9b6f112

NONE: some work at using english to display the language, instead of the user's locale

  • Participants
  • Parent commits e0b0a5a
  • Branches correct-language

Comments (0)

Files changed (3)

File JIRAConnect/JMCClasses/Base/JMC.m

     [info setObject:[device systemVersion] forKey:@"systemVersion"];
     [info setObject:[device model] forKey:@"model"];
 
-    NSLocale *locale = [NSLocale currentLocale];
-    NSString *language = [locale displayNameForKey:NSLocaleLanguageCode
-                                             value:[locale localeIdentifier]]; 
+//    NSLocale *locale = [NSLocale currentLocale];
+//    NSString *language = [locale displayNameForKey:NSLocaleLanguageCode
+//                                             value:[locale localeIdentifier]]; 
+//
+//    if (language) [info setObject:language forKey:@"language"];
+//    
+    NSLocale *english = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
 
-    if (language) [info setObject:language forKey:@"language"];
+    NSString *dLanguage = [[NSLocale preferredLanguages] objectAtIndex:0];
+    NSString *deviceLanguage = [english displayNameForKey:NSLocaleIdentifier value:dLanguage];
+    if (deviceLanguage) [info setObject:deviceLanguage forKey:@"language"];
+    [english release];
+    
     
     // app application data
     NSString* bundleVersion = [appMetaData objectForKey:@"CFBundleVersion"];

File JIRAConnect/JMCClasses/Core/queue/JMCRequestQueue.m

 {
     @synchronized (_flushLock) {
         NSMutableDictionary *items = [self getQueueList];
-
         for (NSString *itemId in [items allKeys]) {
             JMCQueueItem *item = [self getItem:itemId];
-
+            
             // Get metadata and check if empty
             NSDictionary *metadata = [self metaDataFor:itemId];
             if (!metadata) {
             JMCSentStatus sentStatus = [[metadata valueForKey:KEY_SENT_STATUS] intValue];
             if (sentStatus == JMCSentStatusInProgress)
             {
-                JMCDLog(@"Resetting request to retry from in-progress %@",itemId)
+                JMCDLog(@"Resetting request to retry from in-progress %@", itemId)
                 [self updateItem:itemId sentStatus:JMCSentStatusRetry bumpNumAttemptsBy:0];
             }
         }

File samples/AngryNerds/AngryNerds2/Classes/AngryNerdsAppDelegate.m

                                     dataSource:viewController];
 
     
-//    [[JMC sharedInstance] configureJiraConnect:@"http://localhost:2990/jira"
-//                              projectKey:@"NERDS"
-//                                  apiKey:@"b84bcd12-1e02-47e9-8954-7e1671b42b55"
-//                                location:YES
-//                              dataSource:viewController];
+    [[JMC sharedInstance] configureJiraConnect:@"http://localhost:2990/jira"
+                              projectKey:@"NERDS"
+                                  apiKey:@"b84bcd12-1e02-47e9-8954-7e1671b42b55"
+                                location:YES
+                              dataSource:viewController];
 
 
     // extra options may be configured directly on the options property of the JMC instance.