Mercurial > p > roundup > code
diff locale/GNUmakefile @ 7052:4b6a6b794dfa
Fix errors in po files.
Trying to get translation files in shape for translationproject.org.
Not sure it wil happen but this checkin fixes errors in .po files found
by msgfmt -cv.
Recreated template and merged into .po files.
Also adds potest to makefile targets and improves diff target.
Fixes:
Project-Id-Version changed to 2.3.0. I can't find doc on what this
is supposed to be. I assume it is to match the .po file to the
release since there are other fields for recording the last
update to the translations.
Language header, is often blank. Added Language-Team value where missing.
Plural-Forms header for a couple of languages per:
https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
Japanese still has an issue. There are plural forms defined in the
file, but according to the above, there should only be one form.
I don't know Japanese, so am not qualified to remove the plural
forms or change the Plural-Forms header to the expected:
nplurals=1; plural=0;
So I have left it with: nplurals=2; plural=0;\n"
Which will always choose the first plural form (index 0).
Added Last-Translator, Language and Content-Transfer-Encoding for
en.po.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 20 Nov 2022 11:29:31 -0500 |
| parents | 01216187a167 |
| children | b222658a3504 |
line wrap: on
line diff
--- a/locale/GNUmakefile Tue Nov 15 22:49:36 2022 -0500 +++ b/locale/GNUmakefile Sun Nov 20 11:29:31 2022 -0500 @@ -25,6 +25,7 @@ @echo "$(MAKE) dist - same as above" @echo "$(MAKE) template - update message template from sources" @echo "$(MAKE) diff - see template differences in vi" + @echo "$(MAKE) potest - check .po files for errors" @echo "$(MAKE) pytest - create locale files to run pytest" @echo "$(MAKE) locale.po - update message file from template" @echo "$(MAKE) locale.mo - compile individual message file" @@ -66,7 +67,13 @@ # helps to check template file before check in diff: - hg diff roundup.pot|grep -v '^[-+]#'| vi -Rv - + hg cat roundup.pot | diff -u -I '^\#: \.\./roundup.*$$' \ + -I '^#:\s*:[0-9]*.*$$' \ + - roundup.pot || exit 0 +potest: + for file in $(PO_FILES); do \ + ${MSGFMT} -cv $$file; \ + done %.po: $(TEMPLATE) ${MSGMERGE} -U --suffix=.bak $@ $<
