Update README, force translations downloading, set shell script permissions [MAILPOET-849]

This commit is contained in:
Alexey Stoletniy
2017-03-13 19:34:17 +03:00
parent 5321a136e7
commit 1cd7c5e876
3 changed files with 15 additions and 1 deletions

View File

@ -16,3 +16,4 @@ WP_TEST_MAILER_SMTP_LOGIN=""
WP_TEST_MAILER_SMTP_PASSWORD=""
WP_SVN_USERNAME=""
WP_SVN_PASSWORD=""
WP_TRANSIFEX_API_TOKEN=""

View File

@ -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:

2
tasks/pack_translations.sh Normal file → Executable file
View File

@ -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