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

Issue 1410023007: Skip missing translations when generating JSON resources. (Closed)

Created:
5 years, 1 month ago by Sergey Ulanov
Modified:
4 years, 10 months ago
Reviewers:
Nico, Jamie
CC:
grit-developer_googlegroups.com
Base URL:
https://chromium.googlesource.com/external/grit-i18n.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Skip missing translations when generating JSON resources. It doesn't make sense to replace missing translations with english strings because Chrome can do this automatically when getting resources. BUG=369572

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -5 lines) Patch
M grit/clique.py View 3 chunks +9 lines, -3 lines 4 comments Download
M grit/format/chrome_messages_json.py View 1 chunk +12 lines, -2 lines 2 comments Download
M grit/format/chrome_messages_json_unittest.py View 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Sergey Ulanov
5 years, 1 month ago (2015-10-26 22:02:48 UTC) #2
Jamie
LGTM unless you implement the optional suggestion, in which case I'll take another look. https://codereview.chromium.org/1410023007/diff/1/grit/clique.py ...
5 years, 1 month ago (2015-10-27 19:25:13 UTC) #3
Sergey Ulanov
4 years, 10 months ago (2016-02-06 01:03:18 UTC) #4
Addressed comments in https://codereview.chromium.org/1676793002

https://codereview.chromium.org/1410023007/diff/1/grit/clique.py
File grit/clique.py (right):

https://codereview.chromium.org/1410023007/diff/1/grit/clique.py#newcode369
grit/clique.py:369: fallback_to_english=False, none_if_no_match=False):
On 2015/10/27 19:25:13, Jamie wrote:
> Optional: AFAICT, the final three parameters to this function are mutually
> exclusive, with no documented behaviour if more than one is set to true.
Perhaps
> it would be better to replace them with an enum?

The existing two flags are specified as booleans in the input grd files.
Reverted the change in this file

https://codereview.chromium.org/1410023007/diff/1/grit/clique.py#newcode405
grit/clique.py:405: # get a list of all messages that are missing translations.
On 2015/10/27 19:25:13, Jamie wrote:
> This comment is a bit misleading now that there's another fallback option. I
> suggest rephrasing it so that it isn't specific to pseudotranslations and
moving
> it to just above the AddMissingTranslation call.

Done.

https://codereview.chromium.org/1410023007/diff/1/grit/format/chrome_messages...
File grit/format/chrome_messages_json.py (right):

https://codereview.chromium.org/1410023007/diff/1/grit/format/chrome_messages...
grit/format/chrome_messages_json.py:38: if translation == None:
On 2015/10/27 19:25:13, Jamie wrote:
> Prefer "translation is not None"
>
(https://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=True/...)

Done.

Powered by Google App Engine
This is Rietveld 408576698