diff --git a/ci-scripts b/ci-scripts index a2bc803..b6b23f1 160000 --- a/ci-scripts +++ b/ci-scripts @@ -1 +1 @@ -Subproject commit a2bc803e3f3026b5ecf6536628c83cdaa16b9b0e +Subproject commit b6b23f10b638af109c16fec0b98a03064dd0523f diff --git a/scripts/transifex-fetch-translations.sh b/scripts/transifex-fetch-translations.sh index da5f3fd..2e4e55f 100755 --- a/scripts/transifex-fetch-translations.sh +++ b/scripts/transifex-fetch-translations.sh @@ -3,7 +3,7 @@ # Pull translations from transifex # Forcibly pull all translations becase git clone in a fresh repo causes the local files to # be more recent then translations on transifex, therefore the translastion is skipped -tx pull --force +tx pull --force --all # Commit any changes # git diff @@ -11,39 +11,19 @@ tx pull --force git config user.email "hakan@gurkensalat.com" git config user.name "Hakan Tandogan" -git add scripts/transifex-fetch-translations.sh -git commit -m "Updated message translation fetching script" scripts/transifex-fetch-translations.sh +# git add scripts/transifex-fetch-translations.sh +# git commit -m "Updated message translation fetching script" scripts/transifex-fetch-translations.sh # Loop over all translations for translation in $(find locale -name \*.po) do - # Set sane defaults for attribution - git config user.email "transifex-daemon@gurkensalat.com" - git config user.name "Transifex Daemon" - - # Try hard to attribute git commits to translators - LAST_TRANSLATOR=$(grep Last-Translator: ${translation} | head -n 1) - if [ $? == 0 ] - then - LAST_TRANSLATOR=$(echo ${LAST_TRANSLATOR} | sed -e 's/\"Last-Translator: //') - LAST_TRANSLATOR=$(echo ${LAST_TRANSLATOR} | sed -e 's/\\n\"//') - USER_EMAIL=$(echo ${LAST_TRANSLATOR} | sed -e 's/.*$//') - USER_NAME=$(echo ${LAST_TRANSLATOR} | sed -e 's/ <.*>//') - - if [ ! "${USER_NAME}" == "FULL NAME" ] - then - git config user.email "${USER_EMAIL}" - git config user.name "${USER_NAME}" - fi - fi - - # git config --list - - git add ${translation} - git commit -m "Translated ${translation} on transifex.com" ${translation} - + $(dirname $0)/../ci-scripts/transifex-commit-translations.pl ${translation} done +# Reset my own git config after shell run +git config user.email "hakan@gurkensalat.com" +git config user.name "Hakan Tandogan" + # Keep Jenkins happy so it won't mark the build as failed for no reason :-( true