From 0c51acf67a5d5971487449e04da8d94a55157d87 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Feb 19 2020 20:18:12 +0000 Subject: [PATCH 1/4] we are not using Zanata anymore --- diff --git a/tools/l10N_update.sh b/tools/l10N_update.sh index 3ac2cbd..a87afa3 100755 --- a/tools/l10N_update.sh +++ b/tools/l10N_update.sh @@ -38,8 +38,8 @@ EXAMPLES: $ $0 -p (3) 1. Update all but let you git add and push to tranlation repository. - 2. Pull POs + LINGUAS, generate pot of spins.fedoraproject.org website. Let you test localy. - 3. Pull POs + LINGUAS, generate pot and push it to tranlation repository. That's what you were looking for. + 2. Update POs POT and LINGUAS of spins.fedoraproject.org website. Let you test localy. + 3. Update all and commit changes in 3 different commits. That's what you were looking for. EOF } @@ -97,11 +97,20 @@ do echo "- Updating $i POT" cd $i make pot - - # POT should be uploaded - if [ ! -z $POT_PUSH ] - then - make pushpot + insertion_number=`git diff --numstat po/*.pot 2>&1 | awk '{print $1}'` # record the number of insertion, + #if no new string found at least the build time could change (i.e. check if > 1) + let "$((++insertion_number))" # cause in case the file is exactly the same, prevent no git diff output + if [ $insertion_number -gt 2 ] + then # POT should be uploaded + NEED_COMMIT=1 # don't commit if any POT modified! + if [ ! -z $ADD ] + then + git add po/*.pot + if [ ! -z $POT_PUSH ] && [ ! -z $COMMIT ] + then + make pushpot + fi + fi echo "POT updated" fi From 0536d6fbb8b2ffeea0c172c716da73111a41016e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Feb 19 2020 20:18:12 +0000 Subject: [PATCH 2/4] simplify the l10n generation --- diff --git a/tools/l10N_update.sh b/tools/l10N_update.sh index a87afa3..3ac2cbd 100755 --- a/tools/l10N_update.sh +++ b/tools/l10N_update.sh @@ -38,8 +38,8 @@ EXAMPLES: $ $0 -p (3) 1. Update all but let you git add and push to tranlation repository. - 2. Update POs POT and LINGUAS of spins.fedoraproject.org website. Let you test localy. - 3. Update all and commit changes in 3 different commits. That's what you were looking for. + 2. Pull POs + LINGUAS, generate pot of spins.fedoraproject.org website. Let you test localy. + 3. Pull POs + LINGUAS, generate pot and push it to tranlation repository. That's what you were looking for. EOF } @@ -97,20 +97,11 @@ do echo "- Updating $i POT" cd $i make pot - insertion_number=`git diff --numstat po/*.pot 2>&1 | awk '{print $1}'` # record the number of insertion, - #if no new string found at least the build time could change (i.e. check if > 1) - let "$((++insertion_number))" # cause in case the file is exactly the same, prevent no git diff output - if [ $insertion_number -gt 2 ] - then # POT should be uploaded - NEED_COMMIT=1 # don't commit if any POT modified! - if [ ! -z $ADD ] - then - git add po/*.pot - if [ ! -z $POT_PUSH ] && [ ! -z $COMMIT ] - then - make pushpot - fi - fi + + # POT should be uploaded + if [ ! -z $POT_PUSH ] + then + make pushpot echo "POT updated" fi From 6f40bd34f5b3719206df9bd8fce8650a45e5772a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Feb 19 2020 20:18:12 +0000 Subject: [PATCH 3/4] update the list of websites --- diff --git a/Makefile.in b/Makefile.in index ff0de2e..7d4f518 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52,6 +52,7 @@ msgmerge: $(wildcard po/*.po) pushpot: git clone ssh://git@pagure.io/fedora-web/translations.git $(TRANS_TMP) cp $(POT_FILE) $(TRANS_TMP)/$(TRANS_FOLDER)/ + touch $(TRANS_TMP)/$(TRANS_FOLDER)/LINGUAS cd $(TRANS_TMP) && git add *.pot cd $(TRANS_TMP) && git commit -m "update pot file for $(TRANS_FOLDER)" cd $(TRANS_TMP) && git push diff --git a/tools/l10N_update.sh b/tools/l10N_update.sh index 3ac2cbd..d2cb119 100755 --- a/tools/l10N_update.sh +++ b/tools/l10N_update.sh @@ -4,11 +4,21 @@ # and then fill the LINGUAS file # This represent the relative path to the website. -site=( ../boot.fedoraproject.org +site=( ../alt.fedoraproject.org + ../arm.fedoraproject.org + ../boot.fedoraproject.org + # ../budget.fedoraproject.org no l10n support ../fedoracommunity.org - ../fedorahosted.org - ../fedoraproject.org - ../fudcon.fedoraproject.org + # ../fedorahosted.org retired website + # ../fedorapeople.org no l10n support + # ../fedoraproject.org retired website + # ../flocktofedora.org no l10n support + # ../fudcon.fedoraproject.org retired website + # ../getfedora.org retired website, see pagure.io/fedora-web/websites + ../iot.fedoraproject.org + # ../mirrors.fedoraproject.org retired website + ../labs.fedoraproject.org + # ../serverbeach1.fedoraproject.org retired website ../spins.fedoraproject.org ../start.fedoraproject.org )