Skip to content

Commit

Permalink
EZP-26834: Synchronize translations in ezplatform-i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Bastien committed Jan 17, 2017
1 parent aadea35 commit a68dde6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bin/synchronize-translations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env sh
# This script should be used to synchronize ezplatform-i18n repository
# Translations must be up-to-date in all packages
echo 'Translation synchronization';

echo '# Clean corresponding ezplatform-i18n folder';
rm ./vendor/ezsystems/ezplatform-i18n/platform-ui-bundle/*.xlf
rm ./vendor/ezsystems/ezplatform-i18n/ezpublish-kernel/*.xlf
rm ./vendor/ezsystems/ezplatform-i18n/repository-forms/*.xlf

echo '# Mirror the translation files';
cp ./vendor/ezsystems/platform-ui-bundle/Resources/translations/*.xlf ./vendor/ezsystems/ezplatform-i18n/platform-ui-bundle
cp ./vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Resources/translations/*.xlf ./vendor/ezsystems/ezplatform-i18n/ezpublish-kernel
cp ./vendor/ezsystems/repository-forms/bundle/Resources/translations/*.xlf ./vendor/ezsystems/ezplatform-i18n/repository-forms

echo '# Rename file to fit to crowdin format';
rename 's/\.en\./\./g' ./vendor/ezsystems/ezplatform-i18n/platform-ui-bundle/*
rename 's/\.en\./\./g' ./vendor/ezsystems/ezplatform-i18n/ezpublish-kernel/*
rename 's/\.en\./\./g' ./vendor/ezsystems/ezplatform-i18n/repository-forms/*

echo 'Translation synchronization done !';
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"willdurand/js-translation-bundle": "^2.6"
},
"require-dev": {
"ezsystems/ezplatform-i18n": "^1.0@dev",
"behat/behat": "~3.0",
"behat/symfony2-extension": "~2.0",
"behat/mink-extension": "*",
Expand Down

0 comments on commit a68dde6

Please sign in to comment.