Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: chrome/tools/mac_helpers/infoplist_strings_util.mm

Issue 345057: EN, mf, DO YOU SPEAK IT? (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/tools/build/repack_locales.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/mac_helpers/infoplist_strings_util.mm
===================================================================
--- chrome/tools/mac_helpers/infoplist_strings_util.mm (revision 30834)
+++ chrome/tools/mac_helpers/infoplist_strings_util.mm (working copy)
@@ -266,12 +266,17 @@
exit(1);
}
+ // For Cocoa to find the locale at runtime, it needs to use '_' instead of
+ // '-' (http://crbug.com/20441). Also, 'en-US' should be represented
+ // simply as 'en' (http://crbug.com/19165, http://crbug.com/25578).
+ NSString* cur_lang_ns = [NSString stringWithUTF8String:cur_lang];
+ if ([cur_lang_ns isEqualToString:@"en-US"]) {
+ cur_lang_ns = @"en";
+ }
+ cur_lang_ns = [cur_lang_ns stringByReplacingOccurrencesOfString:@"-"
+ withString:@"_"];
// Make sure the lproj we write to exists
- NSString *lproj_name = [NSString stringWithFormat:@"%s.lproj", cur_lang];
- // For Cocoa to find the locale at runtime, it needs to use '_' instead of
- // '-'. (http://crbug.com/20441)
- lproj_name = [lproj_name stringByReplacingOccurrencesOfString:@"-"
- withString:@"_"];
+ NSString *lproj_name = [NSString stringWithFormat:@"%@.lproj", cur_lang_ns];
NSString *output_path =
[[NSString stringWithUTF8String:output_dir]
stringByAppendingPathComponent:lproj_name];
« no previous file with comments | « chrome/tools/build/repack_locales.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698