Index: chrome/browser/web_applications/web_app_mac.mm |
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm |
index aaa84468fc4000a01a92bcbb37aec064e106ef7b..abb9cfa5d9aca32e30075eb000fc6970a2ed5b24 100644 |
--- a/chrome/browser/web_applications/web_app_mac.mm |
+++ b/chrome/browser/web_applications/web_app_mac.mm |
@@ -897,9 +897,13 @@ bool WebAppShortcutCreator::UpdatePlist(const base::FilePath& app_path) const { |
bool WebAppShortcutCreator::UpdateDisplayName( |
const base::FilePath& app_path) const { |
- // OSX searches for the best language in the order of preferred languages. |
- // Since we only have one localization directory, it will choose this one. |
- base::FilePath localized_dir = GetResourcesPath(app_path).Append("en.lproj"); |
+ // Localization is used to display the app name (rather than the bundle |
+ // filename). OSX searches for the best language in the order of preferred |
+ // languages, but one of them must be found otherwise it will default to |
+ // the filename. |
+ NSString* language = [[NSLocale preferredLanguages] objectAtIndex:0]; |
tapted
2015/05/14 07:53:14
should it use l10n_util::NormalizeLocale(l10n_util
jackhou1
2015/05/15 00:41:08
With the app shim, we don't actually care what lan
|
+ base::FilePath localized_dir = GetResourcesPath(app_path).Append( |
+ base::SysNSStringToUTF8(language) + ".lproj"); |
if (!base::CreateDirectory(localized_dir)) |
return false; |