comparison 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
comparison
equal deleted inserted replaced
7051:519cc743bf5a 7052:4b6a6b794dfa
23 help: 23 help:
24 @echo "$(MAKE) - build MO files. Run this before sdist" 24 @echo "$(MAKE) - build MO files. Run this before sdist"
25 @echo "$(MAKE) dist - same as above" 25 @echo "$(MAKE) dist - same as above"
26 @echo "$(MAKE) template - update message template from sources" 26 @echo "$(MAKE) template - update message template from sources"
27 @echo "$(MAKE) diff - see template differences in vi" 27 @echo "$(MAKE) diff - see template differences in vi"
28 @echo "$(MAKE) potest - check .po files for errors"
28 @echo "$(MAKE) pytest - create locale files to run pytest" 29 @echo "$(MAKE) pytest - create locale files to run pytest"
29 @echo "$(MAKE) locale.po - update message file from template" 30 @echo "$(MAKE) locale.po - update message file from template"
30 @echo "$(MAKE) locale.mo - compile individual message file" 31 @echo "$(MAKE) locale.mo - compile individual message file"
31 @echo "$(MAKE) help - this text" 32 @echo "$(MAKE) help - this text"
32 33
64 cp $$file locale/$$lang/LC_MESSAGES/roundup.mo; \ 65 cp $$file locale/$$lang/LC_MESSAGES/roundup.mo; \
65 done 66 done
66 67
67 # helps to check template file before check in 68 # helps to check template file before check in
68 diff: 69 diff:
69 hg diff roundup.pot|grep -v '^[-+]#'| vi -Rv - 70 hg cat roundup.pot | diff -u -I '^\#: \.\./roundup.*$$' \
71 -I '^#:\s*:[0-9]*.*$$' \
72 - roundup.pot || exit 0
73 potest:
74 for file in $(PO_FILES); do \
75 ${MSGFMT} -cv $$file; \
76 done
70 77
71 %.po: $(TEMPLATE) 78 %.po: $(TEMPLATE)
72 ${MSGMERGE} -U --suffix=.bak $@ $< 79 ${MSGMERGE} -U --suffix=.bak $@ $<
73 80
74 %.mo: %.po 81 %.mo: %.po

Roundup Issue Tracker: http://roundup-tracker.org/