From 04287d0a248acbe95cfe1e92a80d28bdaa97d23c Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 12 Feb 2018 14:18:23 +0100 Subject: [PATCH] Combine ExternalApp and App l10n script Signed-off-by: Morris Jobke --- translations/Dockerfile-ExternalApp | 5 - translations/config.json | 101 +++++++++--------- translations/handleAppTranslations.sh | 12 +-- translations/handleExternalAppTranslations.sh | 43 -------- 4 files changed, 54 insertions(+), 107 deletions(-) delete mode 100644 translations/Dockerfile-ExternalApp delete mode 100755 translations/handleExternalAppTranslations.sh diff --git a/translations/Dockerfile-ExternalApp b/translations/Dockerfile-ExternalApp deleted file mode 100644 index 941fc812..00000000 --- a/translations/Dockerfile-ExternalApp +++ /dev/null @@ -1,5 +0,0 @@ -FROM nextcloudci/translations:translations-9 - -MAINTAINER Morris Jobke - -ADD handleExternalAppTranslations.sh /handleTranslations.sh diff --git a/translations/config.json b/translations/config.json index 5bebe7ba..c6820fc0 100644 --- a/translations/config.json +++ b/translations/config.json @@ -9,52 +9,54 @@ { "name": "app", "arguments": [ - "activity", - "announcementcenter", - "bruteforcesettings", - "calendar", - "caniupdate", - "circles", - "cms_pico", - "contacts", - "dashboard", - "deck", - "end_to_end_encryption", - "external", - "files_accesscontrol", - "files_automatedtagging", - "files_downloadactivity", - "files_filter", - "files_texteditor", - "firstrunwizard", - "gallery", - "groupfolders", - "guests", - "impersonate", - "limit_login_to_ip", - "logreader", - "maps", - "news", - "nextant", - "nextcloud_announcements", - "notes", - "notifications", - "ocsms", - "passman", - "password_policy", - "polls", - "quota_warning", - "ransomware_protection", - "richdocuments", - "serverinfo", - "spreed", - "survey_client", - "tasks", - "twofactor_sms", - "twofactor_totp", - "twofactor_u2f", - "user_saml", - "weather" + "nextcloud activity", + "nextcloud announcementcenter", + "nextcloud bruteforcesettings", + "nextcloud calendar", + "nextcloud caniupdate", + "nextcloud circles", + "nextcloud cms_pico", + "nextcloud contacts", + "nextcloud dashboard", + "nextcloud deck", + "nextcloud end_to_end_encryption", + "nextcloud external", + "nextcloud files_accesscontrol", + "nextcloud files_automatedtagging", + "nextcloud files_downloadactivity", + "nextcloud files_filter", + "nextcloud files_texteditor", + "nextcloud firstrunwizard", + "nextcloud gallery", + "nextcloud groupfolders", + "nextcloud guests", + "nextcloud impersonate", + "nextcloud limit_login_to_ip", + "nextcloud logreader", + "nextcloud maps", + "nextcloud news", + "nextcloud nextant", + "nextcloud nextcloud_announcements", + "nextcloud notes", + "nextcloud notifications", + "nextcloud ocsms", + "nextcloud passman", + "nextcloud password_policy", + "nextcloud polls", + "nextcloud quota_warning", + "nextcloud ransomware_protection", + "nextcloud richdocuments", + "nextcloud serverinfo", + "nextcloud spreed", + "nextcloud survey_client", + "nextcloud tasks", + "nextcloud twofactor_sms", + "nextcloud twofactor_totp", + "nextcloud twofactor_u2f", + "nextcloud user_saml", + "nextcloud weather", + "janis91 ocr", + "juliushaertl apporder" ] }, { @@ -63,13 +65,6 @@ "socialsharing" ] }, - { - "name": "externalapp", - "arguments": [ - "janis91 ocr", - "juliushaertl apporder" - ] - }, { "name": "ios", "arguments": [ diff --git a/translations/handleAppTranslations.sh b/translations/handleAppTranslations.sh index f6e15e0c..e2145178 100755 --- a/translations/handleAppTranslations.sh +++ b/translations/handleAppTranslations.sh @@ -9,13 +9,13 @@ gpg --allow-secret-key-import --import /gpg/nextcloud-bot.asc gpg --list-keys # fetch git repo -git clone git@github.com:nextcloud/$1 /app +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 $1 read +perl ./l10n.pl $2 read versions='stable11 stable12 stable13 master' @@ -33,14 +33,14 @@ do git checkout $version # ignore build folder for groupfolders and logreader - if [ "$1" == "groupfolders" -o "$1" == "logreader" ] ; then + if [ "$2" == "groupfolders" -o "$2" == "logreader" ] ; then rm -rf ../build fi - perl ./l10n.pl $1 read > /dev/null + perl ./l10n.pl $2 read > /dev/null # ignore build folder for groupfolders and logreader - if [ "$1" == "groupfolders" -o "$1" == "logreader" ] ; then + if [ "$2" == "groupfolders" -o "$2" == "logreader" ] ; then git checkout -- ../build fi @@ -90,7 +90,7 @@ do cd l10n # build JS/JSON based on translations - perl ./l10n.pl $1 write + perl ./l10n.pl $2 write cd .. diff --git a/translations/handleExternalAppTranslations.sh b/translations/handleExternalAppTranslations.sh deleted file mode 100755 index 34653ee6..00000000 --- a/translations/handleExternalAppTranslations.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# verbose and exit on error -set -xe - -# import GPG keys -gpg --import /gpg/nextcloud-bot.public.asc -gpg --allow-secret-key-import --import /gpg/nextcloud-bot.asc -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 - -# push sources -tx push -s - -# pull translations - force pull because a fresh clone has newer time stamps -tx pull -f -a --minimum-perc=75 - -# build JS/JSON based on translations -perl ./l10n.pl $2 write - -rm l10n.pl -rm l10nParseAppInfo.php -cd .. - -if [ -d tests ]; then - # remove tests/ - rm -rf tests - git checkout -- tests/ -fi - -# create git commit and push it -git add l10n/*.js l10n/*.json -git commit -am "[tx-robot] updated from transifex" || true -git push origin master -echo "done"