gtk: add translation support (v5)

This includes a de_DE translation from Kevin Wolf and an it translation from
Paolo Bonzini.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1361367806-4599-8-git-send-email-aliguori@us.ibm.com
This commit is contained in:
Anthony Liguori 2013-02-20 07:43:24 -06:00
parent c61584833c
commit 834574ea89
7 changed files with 202 additions and 8 deletions

46
po/Makefile Normal file
View file

@ -0,0 +1,46 @@
# This makefile is very special as it's meant to build as part of the build
# process and also within the source tree to update the translation files.
VERSION=$(shell cat ../VERSION)
TRANSLATIONS=de_DE it
SRCS=$(addsuffix .po, $(TRANSLATIONS))
OBJS=$(addsuffix .mo, $(TRANSLATIONS))
SRC_PATH=..
-include ../config-host.mak
vpath %.po $(SRC_PATH)/po
all:
@echo Use 'make update' to update translation files
@echo or us 'make build' or 'make install' to build and install
@echo the translation files
update: $(SRCS)
build: $(OBJS)
clean:
$(RM) $(OBJS)
install: $(OBJS)
for obj in $(OBJS); do \
base=`basename $$obj .mo`; \
$(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES; \
$(INSTALL) -m644 $$obj $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES/qemu.mo; \
done
%.mo:
@msgfmt -o $@ $(SRC_PATH)/po/`basename $@ .mo`.po
messages.po: $(SRC_PATH)/ui/gtk.c
@xgettext -o $@ --foreign-user --package-name=QEMU --package-version=1.0.50 --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C $<
de_DE.po: messages.po $(SRC_PATH)/ui/gtk.c
@msgmerge $@ $< > $@.bak && mv $@.bak $@
it.po: messages.po $(SRC_PATH)/ui/gtk.c
@msgmerge $@ $< > $@.bak && mv $@.bak $@
.PHONY: $(SRCS) clean all

45
po/de_DE.po Normal file
View file

@ -0,0 +1,45 @@
# German translation for QEMU.
# This file is put in the public domain.
# Kevin Wolf <kwolf@redhat.com>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: QEMU 1.4.50\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
"POT-Creation-Date: 2013-02-08 09:21-0600\n"
"PO-Revision-Date: 2012-02-28 16:00+0100\n"
"Last-Translator: Kevin Wolf <kwolf@redhat.com>\n"
"Language-Team: Deutsch <de@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
#: ../ui/gtk.c:990
msgid "_File"
msgstr "_Datei"
#: ../ui/gtk.c:1000
msgid "_View"
msgstr "_Ansicht"
#: ../ui/gtk.c:1002
msgid "_Full Screen"
msgstr "Voll_bild"
#: ../ui/gtk.c:1029
msgid "Zoom To _Fit"
msgstr "Auf _Fenstergröße skalieren"
#: ../ui/gtk.c:1035
msgid "Grab On _Hover"
msgstr "Tastatur _automatisch einfangen"
#: ../ui/gtk.c:1038
msgid "_Grab Input"
msgstr "_Eingabegeräte einfangen"
#: ../ui/gtk.c:1064
msgid "Show _Tabs"
msgstr "_Tableiste anzeigen"

45
po/it.po Normal file
View file

@ -0,0 +1,45 @@
# Italian translation for QEMU.
# This file is put in the public domain.
# Paolo Bonzini <pbonzini@redhat.com>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: QEMU 1.4.50\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
"POT-Creation-Date: 2013-02-08 09:21-0600\n"
"PO-Revision-Date: 2012-02-27 08:23+0100\n"
"Last-Translator: Paolo Bonzini <pbonzini@redhat.com>\n"
"Language-Team: Italian <it@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: ../ui/gtk.c:990
msgid "_File"
msgstr "_File"
#: ../ui/gtk.c:1000
msgid "_View"
msgstr "_Visualizza"
#: ../ui/gtk.c:1002
msgid "_Full Screen"
msgstr "_Schermo intero"
#: ../ui/gtk.c:1029
msgid "Zoom To _Fit"
msgstr "Adatta alla _finestra"
#: ../ui/gtk.c:1035
msgid "Grab On _Hover"
msgstr "Cattura _automatica input"
#: ../ui/gtk.c:1038
msgid "_Grab Input"
msgstr "_Cattura input"
#: ../ui/gtk.c:1064
msgid "Show _Tabs"
msgstr "Mostra _tab"

45
po/messages.po Normal file
View file

@ -0,0 +1,45 @@
# SOME DESCRIPTIVE TITLE.
# This file is put in the public domain.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: QEMU 1.4.50\n"
"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
"POT-Creation-Date: 2013-02-08 09:21-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../ui/gtk.c:990
msgid "_File"
msgstr ""
#: ../ui/gtk.c:1000
msgid "_View"
msgstr ""
#: ../ui/gtk.c:1002
msgid "_Full Screen"
msgstr ""
#: ../ui/gtk.c:1029
msgid "Zoom To _Fit"
msgstr ""
#: ../ui/gtk.c:1035
msgid "Grab On _Hover"
msgstr ""
#: ../ui/gtk.c:1038
msgid "_Grab Input"
msgstr ""
#: ../ui/gtk.c:1064
msgid "Show _Tabs"
msgstr ""