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

Issue 4871895371481088: Convert region code to uppercase when generating translation file URL on Safari (Closed)

Created:
April 10, 2014, 7:40 a.m. by Sebastian Noack
Modified:
April 12, 2014, 8:32 a.m.
Reviewers:
Wladimir Palant
Visibility:
Public.

Description

Apparently navigator.language, which we rely on to generate the path for the translation file, is always lowercase on Safari. However Chrome translation files use upper case for the region code. Hence the translations pt_PT, pt_BR, zh_CN, zh_TW and en_GB are currently never used on Safari.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed comments #

Total comments: 4

Patch Set 3 : Added comment regarding dropping the remaining components #

Total comments: 2

Patch Set 4 : Corrected wrong assumptions in comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -9 lines) Patch
M safari/ext/common.js View 1 2 3 1 chunk +10 lines, -9 lines 0 comments Download

Messages

Total messages: 10
Sebastian Noack
April 10, 2014, 7:46 a.m. (2014-04-10 07:46:16 UTC) #1
Wladimir Palant
http://codereview.adblockplus.org/4871895371481088/diff/5629499534213120/safari/ext/common.js File safari/ext/common.js (right): http://codereview.adblockplus.org/4871895371481088/diff/5629499534213120/safari/ext/common.js#newcode90 safari/ext/common.js:90: var region = match[2]; It seems that you are ...
April 10, 2014, 8:05 a.m. (2014-04-10 08:05:33 UTC) #2
Sebastian Noack
http://codereview.adblockplus.org/4871895371481088/diff/5629499534213120/safari/ext/common.js File safari/ext/common.js (right): http://codereview.adblockplus.org/4871895371481088/diff/5629499534213120/safari/ext/common.js#newcode90 safari/ext/common.js:90: var region = match[2]; On 2014/04/10 08:05:34, Wladimir Palant ...
April 10, 2014, 8:55 a.m. (2014-04-10 08:55:52 UTC) #3
Wladimir Palant
LGTM with the remaining comment addressed. http://codereview.adblockplus.org/4871895371481088/diff/5724160613416960/safari/ext/common.js File safari/ext/common.js (right): http://codereview.adblockplus.org/4871895371481088/diff/5724160613416960/safari/ext/common.js#newcode87 safari/ext/common.js:87: var [language, region] ...
April 10, 2014, 9:18 a.m. (2014-04-10 09:18:48 UTC) #4
Sebastian Noack
http://codereview.adblockplus.org/4871895371481088/diff/5724160613416960/safari/ext/common.js File safari/ext/common.js (right): http://codereview.adblockplus.org/4871895371481088/diff/5724160613416960/safari/ext/common.js#newcode87 safari/ext/common.js:87: var [language, region] = navigator.language.split("-"); On 2014/04/10 09:18:48, Wladimir ...
April 10, 2014, 9:55 a.m. (2014-04-10 09:55:22 UTC) #5
Wladimir Palant
http://codereview.adblockplus.org/4871895371481088/diff/5724160613416960/safari/ext/common.js File safari/ext/common.js (right): http://codereview.adblockplus.org/4871895371481088/diff/5724160613416960/safari/ext/common.js#newcode87 safari/ext/common.js:87: var [language, region] = navigator.language.split("-"); On 2014/04/10 09:55:22, Sebastian ...
April 10, 2014, 10:02 a.m. (2014-04-10 10:02:09 UTC) #6
Sebastian Noack
http://codereview.adblockplus.org/4871895371481088/diff/5724160613416960/safari/ext/common.js File safari/ext/common.js (right): http://codereview.adblockplus.org/4871895371481088/diff/5724160613416960/safari/ext/common.js#newcode87 safari/ext/common.js:87: var [language, region] = navigator.language.split("-"); On 2014/04/10 10:02:09, Wladimir ...
April 10, 2014, 10:12 a.m. (2014-04-10 10:12:24 UTC) #7
Wladimir Palant
LGTM with the nit addressed. http://codereview.adblockplus.org/4871895371481088/diff/5657382461898752/safari/ext/common.js File safari/ext/common.js (right): http://codereview.adblockplus.org/4871895371481088/diff/5657382461898752/safari/ext/common.js#newcode89 safari/ext/common.js:89: // after the second ...
April 10, 2014, 10:17 a.m. (2014-04-10 10:17:47 UTC) #8
Sebastian Noack
http://codereview.adblockplus.org/4871895371481088/diff/5657382461898752/safari/ext/common.js File safari/ext/common.js (right): http://codereview.adblockplus.org/4871895371481088/diff/5657382461898752/safari/ext/common.js#newcode89 safari/ext/common.js:89: // after the second dash will be dropped, but ...
April 10, 2014, 10:33 a.m. (2014-04-10 10:33:27 UTC) #9
Wladimir Palant
April 10, 2014, 11:19 a.m. (2014-04-10 11:19:25 UTC) #10
Still LGTM (really wasn't necessary to submit this for review once again).

Powered by Google App Engine
This is Rietveld