diff --git a/translations/Dockerfile-App b/translations/Dockerfile-App index c844efeb..dd5591f5 100644 --- a/translations/Dockerfile-App +++ b/translations/Dockerfile-App @@ -1,4 +1,4 @@ -FROM nextcloudci/translations:translations-9 +FROM nextcloudci/translations:translations-17 MAINTAINER Morris Jobke diff --git a/translations/config.json b/translations/config.json index c6820fc0..0681a943 100644 --- a/translations/config.json +++ b/translations/config.json @@ -27,6 +27,7 @@ "nextcloud files_filter", "nextcloud files_texteditor", "nextcloud firstrunwizard", + "nextcloud fulltextsearch", "nextcloud gallery", "nextcloud groupfolders", "nextcloud guests", @@ -35,7 +36,6 @@ "nextcloud logreader", "nextcloud maps", "nextcloud news", - "nextcloud nextant", "nextcloud nextcloud_announcements", "nextcloud notes", "nextcloud notifications", diff --git a/translations/handleAppTranslations.sh b/translations/handleAppTranslations.sh index e2145178..e8e270bd 100755 --- a/translations/handleAppTranslations.sh +++ b/translations/handleAppTranslations.sh @@ -11,13 +11,11 @@ gpg --list-keys # fetch git repo git clone git@github.com:$1/$2 /app -# build PO file -cd l10n -wget https://raw.githubusercontent.com/nextcloud/docker-ci/master/translations/l10n.pl -wget https://raw.githubusercontent.com/nextcloud/server/master/build/l10nParseAppInfo.php -perl ./l10n.pl $2 read +# TODO ship this inside the docker container +wget https://github.com/nextcloud/travis_ci/raw/master/translationtool/translationtool.phar +# TODO use build/l10nParseAppInfo.php to fetch app names for l10n -versions='stable11 stable12 stable13 master' +versions='stable12 stable13 master' # build POT files for all versions mkdir stable-templates @@ -34,33 +32,31 @@ do # ignore build folder for groupfolders and logreader if [ "$2" == "groupfolders" -o "$2" == "logreader" ] ; then - rm -rf ../build + rm -rf build fi - perl ./l10n.pl $2 read > /dev/null + php5 translationtool.phar create-pot-files # ignore build folder for groupfolders and logreader if [ "$2" == "groupfolders" -o "$2" == "logreader" ] ; then - git checkout -- ../build + git checkout -- build fi - cd templates + cd translationfiles/templates/ for file in $(ls) do - mv $file ../stable-templates/$version.$file + mv $file ../../stable-templates/$version.$file done - cd .. + cd ../.. done # merge POT files into one for file in $(ls stable-templates/master.*) do name=$(echo $file | cut -b 25- ) - msgcat --use-first stable-templates/*.$name > templates/$name + msgcat --use-first stable-templates/*.$name > translationfiles/templates/$name done -rm l10nParseAppInfo.php - # remove intermediate POT files rm -rf stable-templates @@ -70,12 +66,7 @@ tx push -s # pull translations - force pull because a fresh clone has newer time stamps tx pull -f -a --minimum-perc=25 -# delete removed l10n files that are used for language detection (they will be recreated during the write) -rm -f *.js *.json - -cd .. - -backportVersions='master stable13 stable12 stable11' +backportVersions='master stable13 stable12' for version in $backportVersions do # skip if the branch doesn't exist @@ -87,12 +78,11 @@ do fi git checkout $version - cd l10n + # delete removed l10n files that are used for language detection (they will be recreated during the write) + rm -f l10n/*.js l10n/*.json # build JS/JSON based on translations - perl ./l10n.pl $2 write - - cd .. + php5 translationtool.phar convert-po-files if [ -d tests ]; then # remove tests/ @@ -107,5 +97,3 @@ do echo "done with $version" done - -rm l10n/l10n.pl