diff --git po Makefile am po Makefile am index 0c2b46c a361ac8 100644

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff --git a/po/Makefile.am b/po/Makefile.am
index 0c2b46c..a361ac8 100644
--- a/po/Makefile.am
+++ b/po/Makefile.am
@@ -1,4 +1,4 @@
-PACKAGE = echoicebox
+PACKAGE = @PACKAGE@
POFILES = $(wildcard *.po)
MOFILES = $(patsubst %.po,%.mo,$(POFILES))
@@ -8,13 +8,26 @@ localedir=$(datadir)/locale
MSGFMT = msgfmt
+update-po:
+ rm -f $(PACKAGE).pot
+ xgettext -k_ -d $(PACKAGE) \
+ --foreign-user \
+ --package-name="$(PACKAGE)" --package-version="@VERSION@" \
+ --msgid-bugs-address="@PACKAGE_BUGREPORT@" \
+ -f POTFILES -D $(top_srcdir) -o $(PACKAGE).pot
+ for cat in "" $(POFILES); do \
+ if test -z "$$cat"; then continue; fi; \
+ msgmerge -o tmp-$$cat $$cat $(PACKAGE).pot && \
+ mv -f tmp-$$cat $$cat; \
+ done
+
all: $(MOFILES)
%.mo: %.po
@echo "$(MSGFMT) -o $@ $<"; $(MSGFMT) -o t-$@ $< && mv t-$@ $@
install-data-hook: $(MOFILES)
- for cat in "" $(MOFILES); do \
+ @for cat in "" $(MOFILES); do \
if test -z "$$cat"; then continue; fi; \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.mo$$//'`; \