diff --git a/.env.sample b/.env.sample index 5006a97bcd..8aadc87daf 100644 --- a/.env.sample +++ b/.env.sample @@ -16,3 +16,4 @@ WP_TEST_MAILER_SMTP_LOGIN="" WP_TEST_MAILER_SMTP_PASSWORD="" WP_SVN_USERNAME="" WP_SVN_PASSWORD="" +WP_TRANSIFEX_API_TOKEN="" \ No newline at end of file diff --git a/README.md b/README.md index fa67966383..1a3b4206cc 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,19 @@ _n() You can use Twig i18n functions in Handlebars, just load your template from a Twig view. +# Build + +To build a plugin , run `./build.sh`. + +Some build process steps are described below (their dependencies etc.). + +## packtranslations step + +This step imports translations from Transifex and generates MO files. It requires: +* `tx` client: https://docs.transifex.com/client/installing-the-client +* `msgfmt` command (from Gettext package) +Finally , a `WP_TRANSIFEX_API_TOKEN` environment variable should be initialized with a valid key. + # Publish Before you run a publishing command, you need to: diff --git a/tasks/pack_translations.sh b/tasks/pack_translations.sh old mode 100644 new mode 100755 index c3636bb4b4..975f3a59f8 --- a/tasks/pack_translations.sh +++ b/tasks/pack_translations.sh @@ -10,7 +10,7 @@ if [ ! -f ~/.transifexrc ]; then fi echo "Getting translations from Transifex..." -tx pull -a +tx pull -a -f echo "Generating MO files..." for file in `find ./lang/ -name "*.po"` ; do