Skip to content

Commit

Permalink
Merge pull request #153 from ezsystems/EZP-26834-ezplatform-i18n-sync…
Browse files Browse the repository at this point in the history
…hronization

EZP-26834: Synchronize translations in ezplatform-i18n
  • Loading branch information
nicolas-bastien committed Jan 17, 2017
2 parents 0ac32a3 + a68dde6 commit 5231cbe
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
@@ -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
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 5231cbe

Please sign in to comment.