Skip to content

Commit

Permalink
Merge pull request #4232 from brave/maxk-fix-android-xtbs
Browse files Browse the repository at this point in the history
Fix android_chrome_strings XTBs
  • Loading branch information
mkarolin authored Dec 14, 2019
2 parents cb220f1 + 1e593b5 commit f7395e6
Show file tree
Hide file tree
Showing 53 changed files with 54,354 additions and 55,232 deletions.
2,109 changes: 1,046 additions & 1,063 deletions android/java/strings/translations/android_chrome_strings_am.xtb

Large diffs are not rendered by default.

2,109 changes: 1,046 additions & 1,063 deletions android/java/strings/translations/android_chrome_strings_ar.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_bg.xtb

Large diffs are not rendered by default.

2,111 changes: 1,047 additions & 1,064 deletions android/java/strings/translations/android_chrome_strings_bn.xtb

Large diffs are not rendered by default.

2,109 changes: 1,046 additions & 1,063 deletions android/java/strings/translations/android_chrome_strings_ca.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_cs.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_da.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_de.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_el.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_en-GB.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_es-419.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_es.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_et.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_fa.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_fi.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_fil.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_fr.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_gu.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_hi.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_hr.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_hu.xtb

Large diffs are not rendered by default.

2,109 changes: 1,046 additions & 1,063 deletions android/java/strings/translations/android_chrome_strings_id.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_it.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_iw.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_ja.xtb

Large diffs are not rendered by default.

2,109 changes: 1,046 additions & 1,063 deletions android/java/strings/translations/android_chrome_strings_kn.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_ko.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_lt.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_lv.xtb

Large diffs are not rendered by default.

2,105 changes: 1,044 additions & 1,061 deletions android/java/strings/translations/android_chrome_strings_ml.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_mr.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_ms.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_nl.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_no.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_pl.xtb

Large diffs are not rendered by default.

2,109 changes: 1,046 additions & 1,063 deletions android/java/strings/translations/android_chrome_strings_pt-BR.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_pt-PT.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_ro.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_ru.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_sk.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_sl.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_sr.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_sv.xtb

Large diffs are not rendered by default.

2,105 changes: 1,044 additions & 1,061 deletions android/java/strings/translations/android_chrome_strings_sw.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_ta.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_te.xtb

Large diffs are not rendered by default.

2,105 changes: 1,044 additions & 1,061 deletions android/java/strings/translations/android_chrome_strings_th.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_tr.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_uk.xtb

Large diffs are not rendered by default.

2,107 changes: 1,045 additions & 1,062 deletions android/java/strings/translations/android_chrome_strings_vi.xtb

Large diffs are not rendered by default.

2,109 changes: 1,046 additions & 1,063 deletions android/java/strings/translations/android_chrome_strings_zh-CN.xtb

Large diffs are not rendered by default.

2,109 changes: 1,046 additions & 1,063 deletions android/java/strings/translations/android_chrome_strings_zh-TW.xtb

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion script/lib/transifex.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def get_fingerprint_for_xtb(message_tag):
# To avoid negative ids we strip the high-order bit
return str(fp & 0x7fffffffffffffffL)


def is_translateable_string(grd_file_path, message_tag):
if message_tag.get('translateable') != 'false':
return True
Expand All @@ -284,6 +285,7 @@ def is_translateable_string(grd_file_path, message_tag):
return True
return False


def get_grd_strings(grd_file_path):
"""Obtains a tubple of (name, value, FP) for each string in a GRD file"""
strings = []
Expand Down Expand Up @@ -387,6 +389,7 @@ def get_xtb_files(grd_file_path):

def get_original_grd(src_root, grd_file_path):
"""Obtains the Chromium GRD file for a specified Brave GRD file."""
# TODO: consider passing this mapping into the script from l10nUtil.js
grd_file_name = os.path.basename(grd_file_path)
if grd_file_name == 'components_brave_strings.grd':
return os.path.join(src_root, 'components',
Expand All @@ -396,6 +399,9 @@ def get_original_grd(src_root, grd_file_path):
elif grd_file_name == 'generated_resources.grd':
return os.path.join(src_root, 'chrome', 'app',
'generated_resources.grd')
elif grd_file_name == 'android_chrome_strings.grd':
return os.path.join(src_root, 'chrome', 'android', 'java', 'strings',
'android_chrome_strings.grd')


def check_for_chromium_upgrade_extra_langs(src_root, grd_file_path):
Expand Down Expand Up @@ -515,7 +521,7 @@ def upload_missing_translations_to_transifex(source_string_path, lang_code,
chromium_grd_strings, xtb_strings,
chromium_xtb_strings):
"""For each chromium translation that we don't know about, upload it."""
lang_code = lang_code.replace('-', '_')
lang_code = lang_code.replace('-', '_').replace('iw', 'he')
for idx, (string_name, string_value,
string_fp, desc) in enumerate(grd_strings):
string_fp = str(string_fp)
Expand Down

0 comments on commit f7395e6

Please sign in to comment.