* Add check for empty translation strings. * Test * Update mmjstools * Resolve conflicts * Revert translation test. * Also use fake dir * Also use fake dir * Add translation checks to precommit hook. Remove from Makefile. Add to circleci. * Fix script to keep it consistent. * Keep consistent
14 lines
493 B
Bash
Executable file
14 lines
493 B
Bash
Executable file
#!/bin/sh
|
|
|
|
mkdir -p tmp
|
|
cp assets/base/i18n/en.json tmp/en.json
|
|
mkdir -p tmp/fake-webapp-dir/i18n/
|
|
echo '{}' > tmp/fake-webapp-dir/i18n/en.json
|
|
|
|
npm run mmjstool -- i18n extract-mobile --webapp-dir tmp/fake-webapp-dir --mobile-dir .
|
|
diff tmp/en.json assets/base/i18n/en.json
|
|
# Address weblate behavior which does not remove whole translation item when translation string is set to empty
|
|
npm run mmjstool -- i18n clean-empty --webapp-dir tmp/fake-webapp-dir --mobile-dir . --check
|
|
|
|
rm -rf tmp
|
|
|