After editing quick-lint-js' source code, build the quick-lint-js-i18n
CMake
target. (This is built for you if you build the main quick-lint-js
executable,
any tests or benchmarks, or any plugin.) This will update po/messages.pot and
also quick-lint-js/i18n/translation-table-generated.cpp,
quick-lint-js/i18n/translation-table-generated.h, and
quick-lint-js/i18n/translation-table-test-generated.h. Be sure to commit changes
to the updated files.
Update the po/*.po files by running the tools/update-translator-sources
script.
You'll need to install the following third-party dependencies:
After editing a translation file (*.po), update the generated C++ source files
by building the quick-lint-js-i18n
CMake
target. This will change quick-lint-js/i18n/translation-table-generated.cpp and
quick-lint-js/i18n/translation-table-test-generated.h. Be sure to commit changes
to the updated files.
To add a translation for a new language, run
tools/create-translation --locale=fr_FR
(changing the locale as appropriate).
This script creates a file in the po directory for your language. See
documentation for GNU gettext msginit for details.
Then, list the .po file in the QLJS_TRANSLATION_FILES
list in
src/CMakeLists.txt.