#166 Updated translation scripts
Opened a month ago by copperi. Modified a month ago
fedora-web/ copperi/websites pot_handling  into  master

@@ -0,0 +1,2 @@ 

+ #!/usr/bin/env bash

+ pybabel compile -d translations 

\ No newline at end of file

@@ -1,7 +1,39 @@ 

  #!/usr/bin/env bash

- #pybabel extract -F ../babel.cfg -o getfedora.org.pot . ../partials/

- pybabel extract -F ../../babel.cfg -o getfedora.org.pot ../../partials ../../getfedora.org/site ../../getfedora.org/partials

+ CONFIGFILE=babel.cfg

+ COMMAND=(pybabel extract -F babel.cfg -o getfedora.org.pot partials getfedora.org/site getfedora.org/partials)

+ # Command needs to be run from the directory containing babel.cfg for the proper output format

+ if test -f "$CONFIGFILE"; then

+     # Run the command given above

+     "${COMMAND[@]}"

+ else

+     # if running with "podman run " move to the directory containing babel.cfg

+     if test -f "../$CONFIGFILE"; then

+         cd ..

+         "${COMMAND[@]}"

+     # if running from the scripts directory move to the directory containing babel.cfg

+     elif test -f "../../$CONFIGFILE"; then

+         cd ../..

+         "${COMMAND[@]}"

+     # script is called from some other location than the supported ones.

+     else

+         echo

+         echo "  SCRIPT EXECUTION FAILED!"

+         echo

+         echo "  No $CONFIGFILE found."

+         echo

+         echo "    This script should be run from the directory containing $CONFIGFILE by running"

+         echo "    ./getfedora.org/scripts/translations-source.sh"

+         echo "    Alternatively it can be run from the scripts directory by running"

+         echo "    ./translations-source.sh"

+         echo

+         echo

+         exit 1

+     fi

+ fi

  echo

  echo

+ echo 'Note: Instructions below has not been tested due to missing access rights'

  echo 'If you have write access to https://pagure.io/fedora-web/translations, you may now run:'

- echo './scripts/push-pot.sh'

+ echo '.getfedora.org/scripts/push-pot.sh'

+ echo 

+ 

@@ -0,0 +1,3 @@ 

+ #!/usr/bin/env bash

+ pybabel update -i ../getfedora.org.pot -d translations

+ 

Updated scripts to align with the translation-flow.adoc instructions.

This is a pretty big change and I'm not familiar enough to sign off on it myself. I will point out that you have a file named combile instead of compile. That should definitely be corrected.

@jibecfed @codeblock @misc between the three of you, can you review these changes?

1 new commit added

  • renamed translations-combile-local.sh to translations-compile-local.sh
a month ago

@bcotton Thanks for correction, names changed in relevant locations.