widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #03654
Re: [Merge] lp:~widelands-dev/widelands/synchronize_translations into lp:widelands
Review: Needs Fixing
Diff comments:
> === modified file 'utils/merge_and_push_translations.sh'
> --- utils/merge_and_push_translations.sh 2014-12-08 18:54:19 +0000
> +++ utils/merge_and_push_translations.sh 2015-02-13 19:49:57 +0000
> @@ -1,9 +1,9 @@
> #!/bin/bash
>
> -## This script will fix translations in the translation branch
> -## and then push the fix to the translations branch on Launchpad.
> -## Afterwards, the translations branch will be merged into trunk,
> -## the catalogs be updated and the result pushed to trunk on Launchpad.
> +## This script will pull new translations from Transifex into local trunk
> +## and fix the line breaks.
> +## Afterwards, the catalogs will be updated and the result pushed to
> +## trunk on Launchpad.
>
> set -e # Exit as soon as any line in the bash script fails.
>
> @@ -19,31 +19,28 @@
> exit;
> fi
>
> -# Make sure we have the needed branches.
> +# Make sure we have a local trunk branch.
> if [ ! -d "../trunk" ]; then
This script no longer needs to change directory. Also, the information we are most interested in is if this branch pushes and pulls using trunk: I suggest checking that
bzr config parent_location
is
bzr+ssh://bazaar.launchpad.net/~widelands-dev/widelands/trunk/
> echo "Please branch lp:widelands into ../trunk";
> exit;
> fi
>
> -if [ ! -d "../translations" ]; then
> - echo "Please branch lp:~widelands-dev/widelands/translations into ../translations";
> - exit;
> -fi
> -
> set -x # Print all commands.
>
> -# Fix LF in translation branch.
> -pushd ../translations && bzr pull
> +# Pull translations from Transifex into local trunk and add new translation files
> +pushd ../trunk && bzr pull
> +tx pull -a
> +bzr add po/*/*.po
Add || true. I think add does return an error code when there is nothing to add.
> +bzr commit -m "Merged translations."
> +
> +# Fix line breaks.
> utils/remove_lf_in_translations.py
I wonder if this can still happen. I hope that transifex already fixes them.
> bzr commit -m "Fixed LF in translations." || true
> -bzr push lp:~widelands-dev/widelands/translations
> -
> -# Merge translations.
> -pushd ../trunk && bzr pull
> -bzr merge lp:~widelands-dev/widelands/translations
> -bzr commit -m "Merged translations."
>
> # Update catalogues.
> utils/buildcat.py
> bzr commit -m "Updated catalogues."
I think we can probably merge all steps into a single commit.
> bzr push lp:widelands
> +
> +# Push catalogues to Transifex
> +tx push -s
>
--
https://code.launchpad.net/~widelands-dev/widelands/synchronize_translations/+merge/249698
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/synchronize_translations.
References