Commit Graph
75 Commits
Author SHA1 Message Date
Mihai PLESA 5e3fab6f71 fixed transifex python code style issue (#7709) 2021-01-26 23:27:25 +00:00
mkarolin c98adee8ec Apply our FP when using chromium XTB files.
Always use FP from our GRD(P) files when pulling localized strings from
Chromium XTB files.
2020-12-12 11:29:05 -05:00
Mihai PLESA d48a5bb3c8 various fixes for issues reported by sonar 2020-12-07 14:53:59 +00:00
mkarolin 8534015ec9 Fixes transifex script bug.
Fixes incorrect calculation of `rel` attribute value which resulted in
duplication of noreferrer noopener value in the attribute.
2020-12-04 10:45:37 -05:00
mkarolin 89836196eb Fixes error formatting in Transifex script. 2020-12-03 17:24:30 -05:00
Brian R. Bondy 55ceacb194 Fix l10n scripts for ethereum-remote-client 2020-11-30 14:22:09 -05:00
Emerick Rogul 7c7ab92b84 Add extension_path argument to push/pull scripts for local extension path 2020-11-23 17:14:02 -05:00
Emerick Rogul 312194cc0e Add l10n support for Greaselion scripts 2020-11-23 11:33:41 -05:00
mkarolin 37981ecdb5 Added b1 and b2 as acceptable tags to Transifex script. 2020-11-06 18:39:52 -05:00
mkarolin 502b572121 Fixes bad formatting in transifex.py.
Fixes brave/brave-browser#11972
2020-10-02 12:35:46 -04:00
mkarolin 9793213305 Modified Transifex and Chromium strings rebase scripts.
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.
2020-10-01 20:14:40 -04:00
Simon Hong 279728357e Use Brave sync chain instead of Brave Account 2020-08-04 10:30:32 +09:00
Brian R. Bondy db0e526ee1 Fix fingerprints for changed meaning and desc attributes too 2020-07-22 15:05:49 -04:00
Brian R. Bondy 246ab2a9b1 Be more lenient with localized strings from Transifex 2020-07-21 13:37:40 -04:00
Brian R. Bondy b2d970a76f Replace localizer double escaping
This is a common mistake that some but not all localizers make
since Transifex displays our source string files double escaped
2020-07-07 16:47:57 -04:00
Brian R. Bondy 11d3f306ce Avoid trying to remove a node twice 2020-07-07 16:47:57 -04:00
mkarolin 656c90b45d Fixes formatting in transifex script.
Fixes brave/brave-browser#10578
2020-07-06 17:28:24 -04:00
Brian R. Bondy e73a59851b Remove dupe ids if they occur
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
2020-07-06 16:34:48 -04:00
Brian R. Bondy 31b1416605 Recombine override files into xtb files in py 2020-07-03 15:26:23 -04:00
Brian R. Bondy b3a42e1bc8 No more need to check for missing Chromium strings
This commit also includes code to update old FPs before the branding replacement to new FPs
2020-07-03 15:26:23 -04:00
Brian R. Bondy ab1a1852e0 Pull from Local xtbs when possible
...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
2020-07-03 15:26:23 -04:00
mkarolin bc83a8e7af Added handling of sr-Latn to transifex script.
Transifex doesn't have sr-Latn, instead it uses sr-BA@latin.
Added string replacements to switch those two for upload and download.
2020-06-08 21:24:29 -04:00
mkarolin c314b9d6eb Removed accidentally committed debug code.
Fixes brave/brave-browser#9462

Accidental commit in PR #5350
2020-04-25 01:34:58 -04:00
mkarolin c52a577c5e Fixes Transifex script.
Fixes get_fingerprint_for_xtb in situations when message_tag.text ends
up being None.
2020-04-24 17:10:19 -04:00
mkarolin 17c75bddbe Fixed Android strings path in Transifex script. 2020-01-29 07:43:57 -05:00
SergeyZhukovsky 97e711e8f5 Correct translations with placeholders on Android 2020-01-13 16:54:40 -05:00
mkarolin 1e593b5f32 Fix android_chrome_strings XTBs
Fixes brave/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
2019-12-13 17:09:42 -05:00
mkarolin 0523f4a57b Fixes transifex script error.
Fixes brave/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.
2019-12-12 15:56:14 -05:00
Jocelyn Liu d79d5ee0d8 Skip translateable="false" messages in grd files 2019-12-03 11:28:28 +08:00
mkarolin 52913ee270 Updated transifex script to fetch iw Hebrew XTBs.
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.
2019-11-27 15:57:50 -05:00
mkarolin 87ec94c1e1 Fixes an assertion in transifext script.
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.
2019-11-27 15:57:50 -05:00
mkarolin 8949c38e94 Updated grdp exclusions in transifex.py.
Fixes brave/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
2019-11-18 11:18:21 -05:00
Brian R. Bondy 2864ec0ede Add l10n support for ethereum-remote-client 2019-08-23 11:59:48 -04:00
Max Karolinskiy 571e90dde1 Modified Transifex script to strip ph children.
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 '&lt;a href="$1"...' would not. This is needed so
that multiple replacement placeholders aren't generated by the resource
data pack loader.
2019-08-01 19:10:49 -04:00
Max Karolinskiy 5d67e4934a Updated transifex script.
- 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
2019-07-10 20:48:06 -04:00
Max Karolinskiy 8114d82b30 Revert "Merge pull request #2088 from brave/revert-c74-with-deps"
Reland C74 on master.

This reverts commit f6cfa13c73, reversing
changes made to 6143676339.
2019-04-01 17:46:01 -04:00
Brian Clifton 66e6c951d4 Revert Chromium 74
(originally implemented with https://github.com/brave/brave-core/pull/2013)

Fixes https://github.com/brave/brave-browser/issues/3898
2019-03-26 18:35:47 -07:00
Max Karolinskiy 73a27cff45 Fix to transifex.py for brave_extension messages. 2019-03-19 16:10:05 -04:00
Brian R. Bondy f91282a0cb brave-core fixes to build brave_extension 2019-02-21 17:33:00 -05:00
Brian R. Bondy 0e1ce21cfb Fix Python lint
Auditors: @jasonrsadler
2019-01-17 18:56:05 -05:00
Brian R. Bondy 94bfc959de Remove Transifex localizers power to mess up l10n in Brave 2019-01-17 16:05:56 -05:00
Brian R. Bondy 0208b6fe58 Fix fingerprint calculation to consider meaning attribute 2019-01-16 22:18:27 -05:00
Brian R. Bondy 514ea42be3 Fix for missing strings with the same ID such as titlecase 2019-01-16 22:17:39 -05:00
Brian R. Bondy ac532dae57 Update localization after order 2018-11-27 10:07:06 -05:00
Brian R. Bondy fb09e64844 Upload string descriptions to Transifex
Fix https://github.com/brave/brave-browser/issues/2077
2018-11-13 15:03:20 -05:00
Brian R. Bondy 905114c58a Format python files to PEP8 2018-11-13 13:05:29 -05:00
Brian R. Bondy 5e89cddaac Copy rewards l10n files when there are changes
Fix https://github.com/brave/brave-browser/issues/2108
2018-11-12 16:16:09 -05:00
Brian R. Bondy 151b0d54be Fix strings with <ph> elements in them 2018-11-06 12:22:03 -05:00
Brian R. Bondy bbd63fb3fb Fix Transifex mapping for brave_components_strings 2018-10-31 16:40:00 -04:00
petemill 962ee35fae fix transifex python syntax 2018-10-29 15:57:35 -07:00