summaryrefslogtreecommitdiffstats
path: root/chrome/tools/mac_helpers
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 14:42:19 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 14:42:19 +0000
commite2260edd7101ad9748831e1414db1289dd911009 (patch)
treeaad166db112052be232ad53c9c9bdb8ae9b7f6b3 /chrome/tools/mac_helpers
parentc710a5649efa1c8d33f4c2ecc52d7e9300a37fe2 (diff)
downloadchromium_src-e2260edd7101ad9748831e1414db1289dd911009.zip
chromium_src-e2260edd7101ad9748831e1414db1289dd911009.tar.gz
chromium_src-e2260edd7101ad9748831e1414db1289dd911009.tar.bz2
EN, mf, DO YOU SPEAK IT?
No more symbolic links in the .app. Except for the ones that codesign adds. The en_US.lproj directory should not exist, there should be only en.lproj. Formerly, there was a symbolic link from en.lproj to en_US.lproj. BUG=25578, 19165 TEST= - find C.app -name en_US.lproj should return nothing. - find C.app -name en.lproj should show en.lproj in C.app, C F.framework, and C H.app. - find C.app -type l should return nothing, however, on a signed build, it will still show symbolic links for CodeResources. - Say "What" again. Say "What" again. I dare you. I double-dare you. - With English or U.S. English as the top or only choices in the International (10.5) or Language & Text (10.6) system preference pane's Language tab, the localized language should be English. - In this configuration, the Accept-Language header field should be "en-US,en;q=0.8". See http://whatsmyuseragent.com/ and look for HTTP_ACCEPT_LANGUAGE. Review URL: http://codereview.chromium.org/345057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/mac_helpers')
-rw-r--r--chrome/tools/mac_helpers/infoplist_strings_util.mm15
1 files changed, 10 insertions, 5 deletions
diff --git a/chrome/tools/mac_helpers/infoplist_strings_util.mm b/chrome/tools/mac_helpers/infoplist_strings_util.mm
index d5249bf..474e587 100644
--- a/chrome/tools/mac_helpers/infoplist_strings_util.mm
+++ b/chrome/tools/mac_helpers/infoplist_strings_util.mm
@@ -266,12 +266,17 @@ int main(int argc, char* const argv[]) {
exit(1);
}
- // 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:@"_"];
+ // '-' (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:@"%@.lproj", cur_lang_ns];
NSString *output_path =
[[NSString stringWithUTF8String:output_dir]
stringByAppendingPathComponent:lproj_name];