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
This commit is contained in:
Akihiro Motoki
2015-10-06 22:42:13 +09:00
parent c9bbf6f6d6
commit f46fc999ed

View File

@@ -35,7 +35,7 @@ rm doc/$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 doc/$DOCNAME/source/locale/*.pot | \
msgcat --sort-by-file doc/$DOCNAME/source/locale/*.pot | \
awk '$0 !~ /^\# [a-z0-9]+$/' > doc/$DOCNAME/source/$DOCNAME.pot
rm doc/$DOCNAME/source/locale/*.pot
rm -rf doc/$DOCNAME/source/locale/.doctrees/