diff --git a/translations/Dockerfile-iOSNotes b/translations/Dockerfile-iOSNotes new file mode 100644 index 0000000..fecedb3 --- /dev/null +++ b/translations/Dockerfile-iOSNotes @@ -0,0 +1,5 @@ +FROM ghcr.io/nextcloud/continuous-integration-translations:latest + +MAINTAINER Tobias Kaminsky + +ADD handleiOSNotesTranslations.sh /handleTranslations.sh diff --git a/translations/config.json b/translations/config.json index 9b043b9..f288ab5 100644 --- a/translations/config.json +++ b/translations/config.json @@ -215,6 +215,12 @@ "" ] }, + { + "name": "iosnotes", + "arguments": [ + "" + ] + }, { "name": "desktop", "arguments": [ diff --git a/translations/handleiOSNotesTranslations.sh b/translations/handleiOSNotesTranslations.sh new file mode 100755 index 0000000..3b72232 --- /dev/null +++ b/translations/handleiOSNotesTranslations.sh @@ -0,0 +1,53 @@ +#!/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:nextcloud/notes-ios /app +git checkout -b develop origin/develop + +# remove all translations (they are added afterwards anyways but allows to remove languages via transifex) +rm -r Source/*.lproj/Localizable.strings +rm -r Source/*.lproj/Main_iPhone.strings +rm -r Source/*.lproj/Categories.strings +rm -r Source/Settings.bundle/*.lproj/Root.strings +rm -r Source/Screens/Settings/*.lproj/Settings.strings + +git checkout -- Source/en.lproj/Localizable.strings +git checkout -- Source/en.lproj/Main_iPhone.strings +git checkout -- Source/en.lproj/Categories.strings +git checkout -- Source/Settings.bundle/en.lproj/Root.strings +git checkout -- Source/Screens/Settings/en.lproj/Settings.strings + + +# push sources +tx push -s + +# pull translations +tx pull -f -a --minimum-perc=25 + + +# use de_DE instead of de +rm -rf Source/de.lproj/Localizable.strings +rm -rf Source/de.lproj/Main_iPhone.strings +rm -rf Source/de.lproj/Categories.strings +rm -rf Source/Settings.bundle/de.lproj/Root.strings +rm -rf Source/Screens/Settings/de.lproj/Settings.strings + +mv Source/de_DE.lproj/Localizable.strings Source/de.lproj/Localizable.strings +mv Source/de_DE.lproj/Main_iPhone.strings Source/de.lproj/Main_iPhone.strings +mv Source/de_DE.lproj/Categories.strings Source/de.lproj/Categories.strings +mv Source/Settings.bundle/de_DE.lproj/Root.strings Source/Settings.bundle/de.lproj/Root.strings +mv Source/Screens/Settings/de_DE.lproj/Settings.strings Source/Screens/Settings/de.lproj/Settings.strings + +# create git commit and push it +git add . +git commit -am "[tx-robot] updated from transifex" || true +git push origin develop +echo "done"