The /locales
directory contains translations for filters, groups, and tags.
-
For third-party filters, only
REQUIRED_LOCALES
should be 100% complete. -
For AdGuard filters, all locales are required, meaning they must be 100% translated.
It's essential to import strings from the service before exporting them, as some changes may be lost otherwise.
-
Install dependencies in the root directory:
yarn install
-
Download the Latest Translations:
To import strings from the service, navigate to the
translations
scripts directory and run the following command:cd scripts/translations ./download.sh
-
Validate Translations:
After downloading updated translations, go back to the root and validate them using the following command:
cd ../.. yarn validate:locales
It will validate the existence and correctness of certain locale files in
locales/
folder. -
Make Changes:
Edit translation strings in the
/locales
folder as needed. -
Validate Changes:
After making changes, validate them again using the following command:
yarn validate:locales
-
Upload Strings:
To export strings to the service, navigate to the
/translations
scripts directory and run the following command:./upload.sh
-
(optional) Validate builded platforms:
After compiling filters into platforms, validate their locales by schema using the following command:
yarn validate:platforms
It will validate the JSON schema of filter rules for different platforms in a project.