Skip to content

Commit

Permalink
po/Makefile: Fix generation of messages.po
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
stweil authored and Anthony Liguori committed Jul 23, 2013
1 parent 00134a6 commit 1fa4492
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion po/Makefile
Expand Up @@ -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 $@
Expand Down

0 comments on commit 1fa4492

Please sign in to comment.