[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 134/142] meson: convert po/
From: |
Paolo Bonzini |
Subject: |
[PATCH 134/142] meson: convert po/ |
Date: |
Tue, 28 Jan 2020 18:53:34 +0100 |
From: Marc-André Lureau <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
---
Makefile | 3 --
meson.build | 4 +++
po/LINGUAS | 7 +++++
po/Makefile | 52 -----------------------------------
po/POTFILES | 1 +
po/meson.build | 5 ++++
po/messages.po | 74 --------------------------------------------------
7 files changed, 17 insertions(+), 129 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 24bacf6e3a..112bae68b2 100644
--- a/Makefile
+++ b/Makefile
@@ -222,9 +222,6 @@ endif
endif
install: all install-localstatedir
-ifdef CONFIG_GTK
- $(MAKE) -C po $@
-endif
# Add a dependency on the generated files, so that they are always
# rebuilt before other object files
diff --git a/meson.build b/meson.build
index 2d042017bf..6083897fc7 100644
--- a/meson.build
+++ b/meson.build
@@ -1089,3 +1089,7 @@ if host_machine.system() == 'windows'
build_always_stale: true,
command: nsis_cmd + ['@INPUT@'])
endif
+
+if 'CONFIG_GTK' in config_host
+ subdir('po')
+endif
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000000..054930d8d6
--- /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 c041f4c858..0000000000
--- 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=address@hidden -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 0000000000..d34d5ed9aa
--- /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 0000000000..b99d8e2f22
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,5 @@
+i18n = import('i18n')
+
+i18n.gettext(meson.project_name(),
+ args: '--msgid-bugs-address=address@hidden',
+ preset: 'glib')
diff --git a/po/messages.po b/po/messages.po
deleted file mode 100644
index 065bd459a0..0000000000
--- 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: address@hidden\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 <address@hidden>\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 ""
--
2.21.0
- [PATCH 124/142] meson: generate version.texi, (continued)
- [PATCH 124/142] meson: generate version.texi, Paolo Bonzini, 2020/01/28
- [PATCH 126/142] meson: add NSIS building, Paolo Bonzini, 2020/01/28
- [PATCH 125/142] meson: build texi doc, Paolo Bonzini, 2020/01/28
- [PATCH 127/142] meson: install some scripts, Paolo Bonzini, 2020/01/28
- [PATCH 128/142] meson: install edk2, Paolo Bonzini, 2020/01/28
- [PATCH 130/142] meson: install edk2 json descriptors, Paolo Bonzini, 2020/01/28
- [PATCH 129/142] meson: install blobs, Paolo Bonzini, 2020/01/28
- [PATCH 132/142] meson: install desktop file, Paolo Bonzini, 2020/01/28
- [PATCH 131/142] meson: install icons, Paolo Bonzini, 2020/01/28
- [PATCH 133/142] meson: convert pc-bios/keymaps/Makefile, Paolo Bonzini, 2020/01/28
- [PATCH 134/142] meson: convert po/,
Paolo Bonzini <=
- [PATCH 137/142] meson: convert pc-bios/optionrom, Paolo Bonzini, 2020/01/28
- [PATCH 136/142] meson: convert pc-bios/s390-ccw, Paolo Bonzini, 2020/01/28
- [PATCH 135/142] meson: replace mostly useless pc-bios/Makefile, Paolo Bonzini, 2020/01/28
- [PATCH 138/142] rules.mak: drop unneeded macros, Paolo Bonzini, 2020/01/28
- [PATCH 139/142] meson: convert check-block, Paolo Bonzini, 2020/01/28
- [PATCH 140/142] meson: convert check-decodetree, Paolo Bonzini, 2020/01/28
- [PATCH 142/142] meson: convert check-qapi-schema, Paolo Bonzini, 2020/01/28
- [PATCH 141/142] meson: convert tests/fp and check-softfloat, Paolo Bonzini, 2020/01/28