From 59eb74a5085f625bf9de235fa12d212ddbd8db97 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Jan 29 2020 12:55:53 +0000 Subject: [PATCH 1/3] use dedicated repository instead zanata --- diff --git a/sites/getfedora.org/scripts/pull-translations.sh b/sites/getfedora.org/scripts/pull-translations.sh index e8a86c6..d46dfde 100755 --- a/sites/getfedora.org/scripts/pull-translations.sh +++ b/sites/getfedora.org/scripts/pull-translations.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash -zanata pull --transdir translations -for file in translations/*.po; do - mkdir -p $(echo $file | sed 's/\.po//')/LC_MESSAGES - mv $file $(echo $file | sed 's/\.po//')/LC_MESSAGES/messages.po -done +TRANS_TMP=$(mktemp -d) + +git clone ssh://git@pagure.io/fedora-web/translations.git "$TRANS_TMP" +mkdir -p translations/ +cp -R "$TRANS_TMP"/getfedora.org-redesign/* translations/ +rm -rf "$TRANS_TMP" + pybabel compile -d translations diff --git a/sites/getfedora.org/scripts/push-pot.sh b/sites/getfedora.org/scripts/push-pot.sh new file mode 100644 index 0000000..957602d --- /dev/null +++ b/sites/getfedora.org/scripts/push-pot.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +TRANS_TMP=$(mktemp -d) + +git clone ssh://git@pagure.io/fedora-web/translations.git "$TRANS_TMP" + +cp getfedora.org.pot "$TRANS_TMP"/getfedora.org-redesign/ + +pushd "$TRANS_TMP" + +git add *.pot +git commit -m "update pot file for getfedora.org-redesign" +git push + +popd + +rm -rf "$TRANS_TMP" From ed89bac9c1c4a8a4fb9acc2091886ce2da9832a8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Jan 29 2020 12:55:54 +0000 Subject: [PATCH 2/3] make it executable --- diff --git a/sites/getfedora.org/scripts/push-pot.sh b/sites/getfedora.org/scripts/push-pot.sh old mode 100644 new mode 100755 From 932647c105d516eab3cf6346db290ce59f5cec1c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Jan 29 2020 12:55:54 +0000 Subject: [PATCH 3/3] remove zanata references --- diff --git a/Dockerfile b/Dockerfile index e9a4236..599d2a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,7 @@ RUN dnf -y install \ python-dateutil \ python-dogpile-cache \ python-requests \ - python-fedfind \ - python-zanata-client && \ + python-fedfind && \ dnf clean all ENV FLASK_APP main.py diff --git a/README.md b/README.md index fda5c29..7ed3329 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,13 @@ -# websites +# Websites This repository is the home of getfedora.org, and hopefully eventually the other Fedora Project websites. +### Contributing + Documentation for getting started with using it can be found here: https://docs.fedoraproject.org/en-US/websites/ + +Translations are handled by the Fedora [localization team](https://fedoraproject.org/wiki/L10N) on [Fedora Weblate](https://translate.stg.fedoraproject.org/projects/fedora-websites/). + +[![Translation status](https://translate.stg.fedoraproject.org/widgets/fedora-websites/-/287x66-white.png)](https://translate.stg.fedoraproject.org/engage/fedora-websites/?utm_source=widget) diff --git a/sites/getfedora.org/scripts/translations-source.sh b/sites/getfedora.org/scripts/translations-source.sh index 40c12dd..4cbbe26 100755 --- a/sites/getfedora.org/scripts/translations-source.sh +++ b/sites/getfedora.org/scripts/translations-source.sh @@ -2,5 +2,5 @@ pybabel extract -F ../babel.cfg -o getfedora.org.pot . ../partials/ echo echo -echo 'If you have a valid ~/.config/zanata.ini, you may now run:' -echo ' zanata push getfedora.org.pot' +echo 'If you have write access to https://pagure.io/fedora-web/translations, you may now run:' +echo './scripts/push-pot.sh'