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

Issue 399086: Mac language/locale cleanup... (Closed)

Created:
11 years, 1 month ago by TVL
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org, Miranda Callahan, Nico
Visibility:
Public.

Description

Mac language/locale cleanup - Effectively revert revision 28193 (http://codereview.chromium.org/258037), this makes Mac match the other platform for what at it's core is used for the chrome concept of locale. - For the ApplicationLanguage, the browser will end up with what Cocoa picks (same as before) - All other process types will honor the language they got on the command line when starting up. - When asked the apps language, have the same side effect as Windows and Linux has of pushing the language through to ICU also (so dates format right, etc.) - During browser startup, if someone passed a language, bail because Mac can't support that. TEST=The tips on the NTP and the dates on the history page are in the same language at the UI. BUG=26856 BUG=22727 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=32515

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 18

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -36 lines) Patch
M app/l10n_util.cc View 1 2 3 4 3 chunks +32 lines, -7 lines 0 comments Download
M app/l10n_util_mac.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M app/l10n_util_mac.mm View 1 2 3 4 1 chunk +48 lines, -5 lines 0 comments Download
M chrome/browser/browser_main_mac.mm View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/dom_ui/tips_handler.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/web_resource/web_resource_service.h View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/web_resource/web_resource_service.cc View 1 2 2 chunks +3 lines, -18 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
jungshik at Google
LGTM Thanks a lot for sorting this out !!! http://codereview.chromium.org/399086/diff/16/20 File chrome/browser/browser_main_mac.mm (right): http://codereview.chromium.org/399086/diff/16/20#newcode53 Line ...
11 years, 1 month ago (2009-11-18 23:42:35 UTC) #1
TVL
Ok, hopefully I'm not jinxing things, but this looks like it is passing on Mac, ...
11 years, 1 month ago (2009-11-19 01:42:01 UTC) #2
Mark Mentovai
11 years, 1 month ago (2009-11-19 01:58:21 UTC) #3
lg but...

http://codereview.chromium.org/399086/diff/33/2007
File app/l10n_util.cc (right):

http://codereview.chromium.org/399086/diff/33/2007#newcode489
Line 489: // Use any set override (Cocoa for the Browser), otherwise use the
command
remove "set"

un-capitalize Browser

http://codereview.chromium.org/399086/diff/33/2007#newcode497
Line 497: // The two above should handle all of the cases Chrome normally hits,
but
What if someday there are more (or less) than two above?  Just "the above" is
fine.

http://codereview.chromium.org/399086/diff/33/2007#newcode498
Line 498: // for some unittests, we need something to fall back too.
unit tests

http://codereview.chromium.org/399086/diff/33/2007#newcode504
Line 504: // on Mac.
Why not just call IsLocaleAvailable then?  Or CheckAndResolveLocale?

http://codereview.chromium.org/399086/diff/33/2006
File app/l10n_util_mac.mm (right):

http://codereview.chromium.org/399086/diff/33/2006#newcode15
Line 15: const std::string& Value() const { return value_; }
Name this value.

http://codereview.chromium.org/399086/diff/33/2006#newcode16
Line 16: void SetValue(const std::string override_value) { value_ =
override_value; }
Name this set_value.

http://codereview.chromium.org/399086/diff/33/2006#newcode18
Line 18: std::string value_;
DISALLOW_COPY_AND_ASSIGN(OverrideLocaleHolder);

http://codereview.chromium.org/399086/diff/33/2006#newcode21
Line 21: static base::LazyInstance<OverrideLocaleHolder>
You're in an anonymous namespace, you don't need to be static.

http://codereview.chromium.org/399086/diff/33/2006#newcode37
Line 37: // and language that can be set independently.  After talking with
Cole, the
Who is Cole?

http://codereview.chromium.org/399086/diff/33/2006#newcode38
Line 38: // best path from an experience pov is to map the Mac OS X language
into the
What is pov?

http://codereview.chromium.org/399086/diff/33/2006#newcode39
Line 39: // Chrome locale.  This way strings like "Yesterday", "Today" are in
the
"Yesterday" and "Today" ("and" instead of comma).

http://codereview.chromium.org/399086/diff/33/2006#newcode40
Line 40: // same language as raw dates "March 20, 1999" (strings vs ICU
formatted
raw dates like "March 20

http://codereview.chromium.org/399086/diff/33/2006#newcode41
Line 41: // data).  This also makes the Mac act like other Chrome platforms.
I don't know what "strings vs ICU formatted data" means.

http://codereview.chromium.org/399086/diff/33/2006#newcode41
Line 41: // data).  This also makes the Mac act like other Chrome platforms.
act -> acts

http://codereview.chromium.org/399086/diff/33/2006#newcode53
Line 53: locale_value = "en-US";
I'm unsure that this is cool.  Why is en-US right for an Aussie?

http://codereview.chromium.org/399086/diff/33/2009
File chrome/browser/browser_main_mac.mm (right):

http://codereview.chromium.org/399086/diff/33/2009#newcode11
Line 11: #include "app/app_switches.h"
Sort

http://codereview.chromium.org/399086/diff/33/2009#newcode44
Line 44: // The browser process only wants to support the language Cocoa says,
so force
Cocoa says?

http://codereview.chromium.org/399086/diff/33/2009#newcode45
Line 45: // the app locale to be overriden with what Cocoa says.
Cocoa says?

Powered by Google App Engine
This is Rietveld 408576698