[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 142/143] meson: convert po/
From: |
Paolo Bonzini |
Subject: |
[PATCH 142/143] meson: convert po/ |
Date: |
Thu, 6 Aug 2020 21:16:18 +0200 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
Makefile | 5 +---
configure | 2 +-
meson.build | 3 +++
po/LINGUAS | 7 ++++++
po/Makefile | 52 -----------------------------------------
po/POTFILES | 1 +
po/meson.build | 5 ++++
po/messages.po | 74 ----------------------------------------------------------
8 files changed, 18 insertions(+), 131 deletions(-)
create mode 100644 po/LINGUAS
delete mode 100644 po/Makefile
create mode 100644 po/POTFILES
create mode 100644 po/meson.build
delete mode 100644 po/messages.po
diff --git a/Makefile b/Makefile
index bab1021..a0867c5 100644
--- a/Makefile
+++ b/Makefile
@@ -201,7 +201,7 @@ distclean: clean
rm -f config-host.mak config-host.h*
rm -f tests/tcg/config-*.mak
rm -f config-all-disas.mak config.status
- rm -f po/*.mo tests/qemu-iotests/common.env
+ rm -f tests/qemu-iotests/common.env
rm -f roms/seabios/config.mak roms/vgabios/config.mak
rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
rm -f config.log
@@ -297,9 +297,6 @@ endif
mkdir -p "$(DESTDIR)$(qemu_desktopdir)"
$(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \
"$(DESTDIR)$(qemu_desktopdir)/qemu.desktop"
-ifdef CONFIG_GTK
- $(MAKE) -C po $@
-endif
$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
set -e; for x in $(KEYMAPS); do \
$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x
"$(DESTDIR)$(qemu_datadir)/keymaps"; \
diff --git a/configure b/configure
index cd1ab0c..5ad0f4c 100755
--- a/configure
+++ b/configure
@@ -8081,7 +8081,7 @@ DIRS="$DIRS docs docs/interop fsdev scsi"
DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
DIRS="$DIRS roms/seabios"
LINKS="Makefile"
-LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
+LINKS="$LINKS tests/tcg/lm32/Makefile"
LINKS="$LINKS tests/tcg/Makefile.target"
LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
diff --git a/meson.build b/meson.build
index 913f22d..e9fd237 100644
--- a/meson.build
+++ b/meson.build
@@ -1091,6 +1091,9 @@ subdir('tools')
subdir('pc-bios')
subdir('tests')
subdir('docs')
+if 'CONFIG_GTK' in config_host
+ subdir('po')
+endif
if build_docs
makeinfo = find_program('makeinfo', required: build_docs)
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..054930d
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,7 @@
+bg
+de_DE
+fr_FR
+hu
+it
+tr
+zh_CN
diff --git a/po/Makefile b/po/Makefile
deleted file mode 100644
index c041f4c..0000000
--- a/po/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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.
-
-# Set SRC_PATH for in-tree builds without configuration.
-SRC_PATH=..
-
-# The default target must come before any include statements.
-all:
-
-.PHONY: all build clean install update
-
-%.mo: %.po
- $(call quiet-command, msgfmt -o $@ $<,"GEN","$@")
-
--include ../config-host.mak
-include $(SRC_PATH)/rules.mak
-
-PO_PATH=$(SRC_PATH)/po
-
-VERSION=$(shell cat $(SRC_PATH)/VERSION)
-SRCS=$(filter-out $(PO_PATH)/messages.po,$(wildcard $(PO_PATH)/*.po))
-OBJS=$(patsubst $(PO_PATH)/%.po,%.mo,$(SRCS))
-
-vpath %.po $(PO_PATH)
-
-all:
- @echo "Use 'make update' to update translation files or use 'make
build'"
- @echo "or 'make install' to build and install the translation files."
-
-update: $(SRCS)
-
-build: $(OBJS)
-
-clean:
- rm -f $(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
-
-$(PO_PATH)/messages.po: $(SRC_PATH)/ui/gtk.c
- $(call quiet-command, ( cd $(SRC_PATH) && \
- xgettext -o - --from-code=UTF-8 --foreign-user --no-location \
- --package-name=QEMU --package-version=$(VERSION) \
- --msgid-bugs-address=qemu-devel@nongnu.org -k_ -C ui/gtk.c | \
- sed -e s/CHARSET/UTF-8/) >$@,"GEN","$@")
-
-$(PO_PATH)/%.po: $(PO_PATH)/messages.po
- $(call quiet-command, msgmerge -q $@ $< > $@.bak && mv $@.bak
$@,"GEN","$@")
diff --git a/po/POTFILES b/po/POTFILES
new file mode 100644
index 0000000..d34d5ed
--- /dev/null
+++ b/po/POTFILES
@@ -0,0 +1 @@
+ui/gtk.c
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..b99d8e2
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,5 @@
+i18n = import('i18n')
+
+i18n.gettext(meson.project_name(),
+ args: '--msgid-bugs-address=qemu-devel@nongnu.org',
+ preset: 'glib')
diff --git a/po/messages.po b/po/messages.po
deleted file mode 100644
index 065bd45..0000000
--- a/po/messages.po
+++ /dev/null
@@ -1,74 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# This file is put in the public domain.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: QEMU 2.12.91\n"
-"Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n"
-"POT-Creation-Date: 2018-07-18 07:56+0200\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=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid " - Press Ctrl+Alt+G to release grab"
-msgstr ""
-
-msgid " [Paused]"
-msgstr ""
-
-msgid "_Pause"
-msgstr ""
-
-msgid "_Reset"
-msgstr ""
-
-msgid "Power _Down"
-msgstr ""
-
-msgid "_Quit"
-msgstr ""
-
-msgid "_Fullscreen"
-msgstr ""
-
-msgid "_Copy"
-msgstr ""
-
-msgid "Zoom _In"
-msgstr ""
-
-msgid "Zoom _Out"
-msgstr ""
-
-msgid "Best _Fit"
-msgstr ""
-
-msgid "Zoom To _Fit"
-msgstr ""
-
-msgid "Grab On _Hover"
-msgstr ""
-
-msgid "_Grab Input"
-msgstr ""
-
-msgid "Show _Tabs"
-msgstr ""
-
-msgid "Detach Tab"
-msgstr ""
-
-msgid "Show Menubar"
-msgstr ""
-
-msgid "_Machine"
-msgstr ""
-
-msgid "_View"
-msgstr ""
--
1.8.3.1
- [PATCH 132/143] rules.mak: remove version.o, (continued)
- [PATCH 132/143] rules.mak: remove version.o, Paolo Bonzini, 2020/08/06
- [PATCH 133/143] remove Makefile.target, Paolo Bonzini, 2020/08/06
- [PATCH 135/143] meson: build texi doc, Paolo Bonzini, 2020/08/06
- [PATCH 136/143] meson: convert check-block, Paolo Bonzini, 2020/08/06
- [PATCH 138/143] meson: replace create-config with meson configure_file, Paolo Bonzini, 2020/08/06
- [PATCH 140/143] meson: move SDL and SDL-image detection to meson, Paolo Bonzini, 2020/08/06
- [PATCH 139/143] meson: convert sample plugins, Paolo Bonzini, 2020/08/06
- [PATCH 134/143] meson: sphinx-build, Paolo Bonzini, 2020/08/06
- [PATCH 141/143] meson: convert VNC and dependent libraries to meson, Paolo Bonzini, 2020/08/06
- [PATCH 137/143] rules.mak: drop unneeded macros, Paolo Bonzini, 2020/08/06
- [PATCH 142/143] meson: convert po/,
Paolo Bonzini <=
- [PATCH 143/143] meson: update build-system documentation, Paolo Bonzini, 2020/08/06
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Cornelia Huck, 2020/08/07
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Paolo Bonzini, 2020/08/07
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Cornelia Huck, 2020/08/07
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Cornelia Huck, 2020/08/07
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Paolo Bonzini, 2020/08/07
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Cornelia Huck, 2020/08/10
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Cornelia Huck, 2020/08/10
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Paolo Bonzini, 2020/08/10
- Re: [DRAFT PATCH 000/143] Meson integration for 5.2, Cornelia Huck, 2020/08/10