Skip to content

Handle crowdin sync in adblockplusui

Background / User story

Background

As you can see from the current comment buildtools are deprecated and seems like ABPUI team needs to implement/maintain Crowdin sync script.

In order to have something more reliable and minimize maintenance effort a preference towards ready integration options provided by Crowdin were given priority. As the Crowdin's Gitlab integration, keeps automatically pushing changes each time there is a new string(unless we switch our development workflow), that will let source strings being available to the Crowdin community before being available in XTM, also that makes the integration process less flexible, ex. harder to maintain separate enhacement scripts, like removing descriptions, or empty files generated by Crowdin. For that reason, seems like the best option will be to use Crowdin's CLI tool, which let you push changes anytime you want and be somehow a middle ground solution, between custom Crowdin API integration and fully automated Gitlab Integration.

What to change

Hints for testers

In order to test the Script, project_identifier needs to be switched to this-is-very-much-a-test-proje, afterwards test can be done using commands bellow:

CROWDIN_API_KEY="1111" npm run $ crowdin.download-translations
CROWDIN_API_KEY="1111" npm run $ crowdin.upload-strings
CROWDIN_API_KEY="1111" npm run $ crowdin.upload-translations

Note: Use actual this-is-very-much-a-test-proje Crowdin project key instead of "1111".

Also Crowdin CLI needs to be installed.

Hints for translators

Moving to using Crowdin CLI, will allow us manage translation files we would like to upload to the Crowdin and those we wish only handle in XTM.

Also new CLI does reorder the file differently from deprecated phython script, that means that during the first synchronization there will be a lot of changes shown in the MR.

Integration notes

None.

Further information

see -> https://gitlab.com/eyeo/adblockplus/abpui/adblockplusui/issues/686

Edited by Thomas Greiner
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information