summaryrefslogtreecommitdiffstats
path: root/po
diff options
context:
space:
mode:
authorStefan Weil2013-07-05 22:55:43 +0200
committerAnthony Liguori2013-07-23 22:45:23 +0200
commit1fa449231832d0fb7f20a3d7ecd06190ce906529 (patch)
tree4952c3f5092e172871a8815cdd9ed595e5124fc6 /po
parentpo/Makefile: Fix *.mo generation for out-of-tree builds (regression) (diff)
downloadqemu-1fa449231832d0fb7f20a3d7ecd06190ce906529.tar.gz
qemu-1fa449231832d0fb7f20a3d7ecd06190ce906529.tar.xz
qemu-1fa449231832d0fb7f20a3d7ecd06190ce906529.zip
po/Makefile: Fix generation of messages.po
* Tell xgettext that we use UTF-8 encoding (this is currently optional). * Set charset=UTF-8 in messages.po. This avoids warnings from msgmerge: warning: Charset "CHARSET" is not a portable encoding name. * Use filename relative to root directory (ui/gtk.c instead of ../ui/gtk.c or $(SRC_PATH)/ui/gtk.c) for comments in *.po files. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'po')
-rw-r--r--po/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/po/Makefile b/po/Makefile
index 0e345b004e..a6ab4825fa 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -36,7 +36,11 @@ install: $(OBJS)
@msgfmt -o $@ $<
$(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c
- @xgettext -o $@ --foreign-user --package-name=QEMU --package-version=$(VERSION) --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C $<
+ @cd $(SRC_PATH) && \
+ (xgettext -o - --from-code=UTF-8 --foreign-user \
+ --package-name=QEMU --package-version=$(VERSION) \
+ --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C ui/gtk.c | \
+ sed -e s/CHARSET/UTF-8/) >$@
$(PO_PATH)/%.po: $(PO_PATH)/messages.po
@msgmerge $@ $< > $@.bak && mv $@.bak $@