]> khamidou — GitHub mirrors - electron.git/commitdiff
Override application locale with system default locale.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 29 May 2014 07:21:15 +0000 (15:21 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 29 May 2014 07:21:15 +0000 (15:21 +0800)
atom/browser/atom_browser_client.cc
atom/browser/atom_browser_client.h

index c70b6812ef9e1deda511d6b503c182d103afd6e6..74b38d6b3090d5d328a7fc2b5cb6a2d1c0c2bc06 100644 (file)
@@ -13,6 +13,7 @@
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/site_instance.h"
 #include "content/public/browser/web_contents.h"
+#include "ui/base/l10n/l10n_util.h"
 #include "webkit/common/webpreferences.h"
 
 namespace atom {
@@ -88,6 +89,10 @@ bool AtomBrowserClient::ShouldSwapProcessesForNavigation(
   return true;
 }
 
+std::string AtomBrowserClient::GetApplicationLocale() {
+  return l10n_util::GetApplicationLocale("");
+}
+
 void AtomBrowserClient::AppendExtraCommandLineSwitches(
     CommandLine* command_line,
     int child_process_id) {
index 89360fa9542f8ae07f5695cd83e25f4de4203ca5..8111af4727ab94c9d484e7dd5a24f225d03af664 100644 (file)
@@ -25,6 +25,7 @@ class AtomBrowserClient : public brightray::BrowserClient {
       content::SiteInstance* site_instance,
       const GURL& current_url,
       const GURL& new_url) OVERRIDE;
+  virtual std::string GetApplicationLocale() OVERRIDE;
   virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
                                               int child_process_id) OVERRIDE;