Skip to content

Latest commit

 

History

History
69 lines (42 loc) · 1.78 KB

README.md

File metadata and controls

69 lines (42 loc) · 1.78 KB

Localization of Filters

The /locales directory contains translations for filters, groups, and tags.

Requirements

  1. For third-party filters, only REQUIRED_LOCALES should be 100% complete.

  2. For AdGuard filters, all locales are required, meaning they must be 100% translated.

Integration with Translation Service

It's essential to import strings from the service before exporting them, as some changes may be lost otherwise.

  1. Install dependencies in the root directory:

    yarn install
  2. 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
  3. 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.

  4. Make Changes:

    Edit translation strings in the /locales folder as needed.

  5. Validate Changes:

    After making changes, validate them again using the following command:

    yarn validate:locales
  6. Upload Strings:

    To export strings to the service, navigate to the /translations scripts directory and run the following command:

    ./upload.sh
  7. (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.