Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Brave is not localized - macOS #15193

Closed
LaurenWags opened this issue Sep 12, 2018 · 4 comments
Closed

Brave is not localized - macOS #15193

LaurenWags opened this issue Sep 12, 2018 · 4 comments
Labels
bug fixed-with-brave-core This issue will automatically resolved with the replacement of Muon with Brave Core. OS/macOS

Comments

@LaurenWags
Copy link
Member

LaurenWags commented Sep 12, 2018

Description

If your system language = French and you install Brave, Brave should be displayed in French. Currently, it is being displayed in English.

Steps to Reproduce

  1. Open System Preferences > Language and Region.
  2. Set Preferred Language = French (move to the top of the list).
  3. Set Region = France.
  4. Reboot your machine.
  5. Install Brave (clean profile).

Actual result:
Brave is in English
capture d ecran 2018-09-12 a 15 31 10

Expected result:
Brave should be localized (display in French)

Reproduces how often:
Easily

Brave Version

about:brave info:
0.23.107

Reproducible on current live release:
Yes

Additional Information

Does not reproduce on Win/Linux.

@kjozwiak
Copy link
Member

@davidtemkin I believe you mentioned we can close this off and tag it as fixed-with-brave-core? CCing @bsclifton.

@bsclifton bsclifton added the fixed-with-brave-core This issue will automatically resolved with the replacement of Muon with Brave Core. label Sep 17, 2018
@bsclifton
Copy link
Member

I think we can kick this to the next milestone, just in case

I looked into this for about 1 hour and found that it's always defaulting to "" which gets defaulted to en-US. I believe the problem might be in GN when the bundle (which is used for locale lookup) is specified

You can check this out in src/ui/base/l10n/l10n_util_mac.mm:

void OverrideLocaleWithCocoaLocale() {
  // NSBundle really should only be called on the main thread.
  DCHECK([NSThread isMainThread]);

  // Chrome really only has one concept of locale, but Mac OS X has locale and
  // language that can be set independently.  After talking with Chrome UX folks
  // (Cole), the best path from an experience point of view is to map the Mac OS
  // X language into the Chrome locale.  This way strings like "Yesterday" and
  // "Today" are in the same language as raw dates like "March 20, 1999" (Chrome
  // strings resources vs ICU generated strings).  This also makes the Mac acts
  // like other Chrome platforms.
  NSArray* languageList = [base::mac::OuterBundle() preferredLocalizations];
  NSString* firstLocale = [languageList objectAtIndex:0];

@bsclifton bsclifton added this to the 0.23.x Release 7 milestone Sep 17, 2018
@davidtemkin
Copy link

@bsclifton may still need to push to brave core regardless

@bsclifton bsclifton removed this from the 0.23.x Release 7 milestone Sep 18, 2018
@bsclifton
Copy link
Member

This is going to take at least an hour to narrow down further- I think it would be best to close this out (as it's already fixed with brave-core)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed-with-brave-core This issue will automatically resolved with the replacement of Muon with Brave Core. OS/macOS
Projects
None yet
Development

No branches or pull requests

4 participants