From 2fa8cee85cd93daa1e2c3950ed6f6729df10fb1e Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Tue, 6 Oct 2015 22:41:23 +0900 Subject: [PATCH] Output strings in POT files in the order of file locaiton Keeping the order of strings same as in the original source document helps translators find the sources and they can translate by checking rendered contents :-) Note that Zanata keeps the order of strings in uploaded POT files. Change-Id: I3ecd0516047050b94e8eba902620a4f40dc8fd36 Closes-Bug: #1503266 --- tools/generatepot-rst.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generatepot-rst.sh b/tools/generatepot-rst.sh index e3184842..28888629 100755 --- a/tools/generatepot-rst.sh +++ b/tools/generatepot-rst.sh @@ -35,7 +35,7 @@ rm $DOCNAME/source/locale/common.pot # Take care of deleting all temporary files so that git add # doc/$DOCNAME/source/locale will only add the single pot file. # Remove UUIDs, those are not necessary and change too often -msgcat --sort-output $DOCNAME/source/locale/*.pot | \ +msgcat --sort-by-file $DOCNAME/source/locale/*.pot | \ awk '$0 !~ /^\# [a-z0-9]+$/' > $DOCNAME/source/$DOCNAME.pot rm $DOCNAME/source/locale/*.pot rm -rf $DOCNAME/source/locale/.doctrees/