/[thuban]/branches/WIP-pyshapelib-bramz/po/Makefile
ViewVC logotype

Annotation of /branches/WIP-pyshapelib-bramz/po/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2027 - (hide annotations)
Tue Dec 16 10:29:37 2003 UTC (21 years, 2 months ago) by bh
Original Path: trunk/thuban/po/Makefile
File size: 989 byte(s)
(mo): Make the output a bit nicer so that it prints
statistics about the translations. Add a comment how produce even
nicer statistics with sed.

1 bh 671
2     all:
3     @echo 'Usage:'
4     @echo ' make pot create thuban.pot'
5     @echo ' make update-po merge a new thuban.po with the *.po files'
6     @echo ' make mo create the mo files'
7    
8     MO_DIR = ../Resources/Locale
9     PO_DIR = po
10     DOMAIN = thuban
11    
12     LIST_POTFILES = grep -l "_(\"" ../Thuban/*.py ../Thuban/*/*.py
13    
14    
15     pot:
16     xgettext -k_ -o $(DOMAIN).pot `$(LIST_POTFILES)`
17    
18     update-po:
19     for po in *.po; do \
20     lingua=`basename $$po .po`; \
21     mv $$lingua.po $$lingua.old.po; \
22     if msgmerge -o $$lingua.po $$lingua.old.po $(DOMAIN).pot; then\
23     rm $$lingua.old.po; \
24     else \
25     rm -f $$lingua.po; \
26     mv $$lingua.old.po $$lingua.po; \
27     fi \
28     done
29    
30    
31     mo:
32     for po in *.po; do\
33     lingua=`basename $$po .po`; \
34     install -d $(MO_DIR)/$$lingua/LC_MESSAGES/ ; \
35 bh 2027 echo -n $$po": "; \
36     msgfmt --statistics \
37     -o $(MO_DIR)/$$lingua/LC_MESSAGES/$(DOMAIN).mo $$po ;\
38 bh 671 done
39    
40    
41 bh 2027 # A nicer way to format the statistics:
42     # make mo 2>&1 | sed -e 's/ \(messages\|translations\)//g' -e 's/\.$//'

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26