Changed the rebase script to automatically fix <a> links with
target="_blank" to also have rel="noopener noreferrer".
Modified transifex script to:
* Fix <a> links when pulling translations from local Chromium .xtb
files.
* Validate embedded HTML tags in strings against an allow list
when uploading .grd(p) files to transifex.
* Do the same when downloading strings from Transifex.
* Completely strip all content from <ph> tags in .xtb files like
Chromium does when pulling from Transifex.
Because of the replacements we do, like Google -> Brave, and Chrome -> Brave, it's possible to have dupe strings. This ensures that dupes don't show up
...instead of using Transifex
These string slugs are no longer pushed nor pulled from Transifex:
brave_strings
components_brave_strings
components_strings
generated_resources
android_chrome_strings
Fixesbrave/brave-browser#7378
- Updated transifex.py with the missing mapping of
android_chrome_strings which is needed to upload existing
translations to Transifex.
- Deleted existing XTB files under brave, pushed to Transifex
so that the existing translations were uploaded.
- Ran npm run delete_string_translations for strings containing
incorrect translations of private -> incognito. The corrected
translations will be ordered separately.
- Pulled translations from Transifex which resulted in the changes in
XTBs in this commit.
- Lint fixes in transifex.py
Fixesbrave/brave-browser#7310
Accounts for translateable=false attribute in the original strings
in chromium_strings.grd that's been dropped in the corresponding
brave_strings.grd.
In Android .grd files Hebrew lang attribute is 'iw' whereas other .grd
files use 'he'. Updated the script to replace 'iw' to 'he' when fetching
the files from Transifex.
The script asserts that every message starts with IDS_. Messages in
print_media_strings.grdp start with PRINT_PREVIEW_MEDIA_. Added the
prefix to the assertion.
Fixesbrave/brave-browser#6907
There is no need to exclude os_settings_strings.grdp and
xr_consent_ui_strings.grdp.
media_router_resources.grdp has been removed upstream.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/edcf55b10dfe41c3ffa18bfbca8f07e62532ef74
commit edcf55b10dfe41c3ffa18bfbca8f07e62532ef74
Author: Takumi Fujimoto <takumif@chromium.org>
Date: Tue Jul 9 16:36:20 2019 +0000
Delete Media Router WebUI dialog resource files
Delete JS/HTML/CSS files for chrome://media-router and its tests.
We do not remove files related to chrome://media-router-internals
because that is still in use.
Bug: 900246
In each .xtb file we create, strip all children from <ph> tags and
remove innter text if it start with $ (so that $1 text would be removed,
but something like '<a href="$1"...' would not. This is needed so
that multiple replacement placeholders aren't generated by the resource
data pack loader.
- FP.FingerPrint now does utf-8 encoding internally and expects an
unencoded string.
- Added 2 grdp files to ignore list for upload:
* os_settings_strings.grdp
* xr_consent_ui_strings.grdp
Chromium change for FP.FingerPrint:
commit e85b8eb18c9431ada0bac5ef578a4ff36eb73093
Author: Raul Tambre <raul@tambre.ee>
Date: Mon Apr 29 20:49:55 2019 +0000
//tools/grit/grit/extern: Improve Python 3 support
The scripts still work with Python 2.
There are no intended behaviour changes.
Bug: 941669