Skip to content

Commit 48b6357

Browse files
committed
Mac: fallback to en-US.pak on missing locale.pak
1 parent 8a1724f commit 48b6357

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/shell_main_delegate.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,12 @@ void ShellMainDelegate::InitializeResourceBundle(const std::string& pref_locale)
190190
if (!GetResourcesPakFilePath(pak_file))
191191
LOG(FATAL) << "nw.pak file not found.";
192192
std::string locale = l10n_util::GetApplicationLocale(pref_locale);
193-
if (!GetLocalePakFilePath(locale, locale_file))
194-
LOG(FATAL) << locale << ".pak file not found.";
193+
if (!GetLocalePakFilePath(locale, locale_file)) {
194+
LOG(WARNING) << locale << ".pak file not found.";
195+
locale = "en-US";
196+
if (!GetLocalePakFilePath(locale, locale_file))
197+
LOG(ERROR) << locale << ".pak file not found.";
198+
}
195199
ui::ResourceBundle::InitSharedInstanceWithPakPath2(pak_file, locale_file);
196200
#else
197201
FilePath pak_dir;

0 commit comments

Comments
 (0)