Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 9843129: Always use the system language for the UI (Closed)

Created:
March 22, 2013, 2:59 p.m. by Felix Dahlke
Modified:
Nov. 12, 2013, 9:59 a.m.
Reviewers:
Oleksandr
CC:
Wladimir Palant
Visibility:
Public.

Description

This change makes the UI language always equal to the system language, it'll default to English if the translation is missing. While I was at it, I also made ABP initially select a subscription based on the system language, assuming we want this to behave like ABP.

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -23 lines) Patch
M Shared/PluginClientBase.cpp View 1 chunk +5 lines, -20 lines 3 comments Download
M Shared/PluginUserSettings.cpp View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 4
Felix Dahlke
March 22, 2013, 3:07 p.m. (2013-03-22 15:07:49 UTC) #1
Oleksandr
http://codereview.adblockplus.org/9843129/diff/1/Shared/PluginClientBase.cpp File Shared/PluginClientBase.cpp (right): http://codereview.adblockplus.org/9843129/diff/1/Shared/PluginClientBase.cpp#newcode101 Shared/PluginClientBase.cpp:101: settings->SetString(SETTING_LANGUAGE, browserLanguage); What if we don't have the browser's ...
March 22, 2013, 4:04 p.m. (2013-03-22 16:04:14 UTC) #2
Felix Dahlke
http://codereview.adblockplus.org/9843129/diff/1/Shared/PluginClientBase.cpp File Shared/PluginClientBase.cpp (right): http://codereview.adblockplus.org/9843129/diff/1/Shared/PluginClientBase.cpp#newcode101 Shared/PluginClientBase.cpp:101: settings->SetString(SETTING_LANGUAGE, browserLanguage); On 2013/03/22 16:04:14, Oleksandr wrote: > What ...
March 22, 2013, 4:09 p.m. (2013-03-22 16:09:18 UTC) #3
Oleksandr
March 22, 2013, 4:15 p.m. (2013-03-22 16:15:28 UTC) #4
LGTM

http://codereview.adblockplus.org/9843129/diff/1/Shared/PluginClientBase.cpp
File Shared/PluginClientBase.cpp (right):

http://codereview.adblockplus.org/9843129/diff/1/Shared/PluginClientBase.cpp#...
Shared/PluginClientBase.cpp:101: settings->SetString(SETTING_LANGUAGE,
browserLanguage);
On 2013/03/22 16:09:18, Felix H. Dahlke wrote:
> On 2013/03/22 16:04:14, Oleksandr wrote:
> > What if we don't have the browser's version in the dictionary? The value in
> the
> > setting's file would be a bit misleading imho. Maybe we should still default
> to
> > "en" more gracefuly?
> 
> Hehe, I've wondered quite a bit about this actually. I thought it's better to
> put the actual language into the settings file, but since that's an illegal
> value as far as the settings are concerned, it may really be misleading. The
> question is: is the result of dic->IsLanguageSupported() actually related to
> what _filters_ we offer? I thought not.

It isn't related, but it's not like we can have one that is related :) I guess
at some point of time we can implement IsLanguageFilterSupported or something
like that. Probably not important right now.

> > Also, what if the user changes the browser language after
> > we have initially set it. Shall we change as well?
> 
> No, I don't think so. We select a subscription based on the user's language,
> from then on he's on his own. That's how the other extensions do it if I'm not
> mistaken.

LGTM then

Powered by Google App Engine
This is Rietveld