diff options
author | Wu Xiaotian <[email protected]> | 2019-12-26 10:28:44 +0800 |
---|---|---|
committer | ZenWalker <[email protected]> | 2020-01-05 14:02:20 +0100 |
commit | 81dabea49de06f0cca6cdd620bc8b18c7dbf961f (patch) | |
tree | cb6227d61a91fe7ce4ab1a05cb59cb1c792364c9 | |
parent | 5e8a0c59e6d2031096db0e592c737774d02f4aeb (diff) | |
download | mate-sensors-applet-81dabea49de06f0cca6cdd620bc8b18c7dbf961f.tar.bz2 mate-sensors-applet-81dabea49de06f0cca6cdd620bc8b18c7dbf961f.tar.xz |
migrate from intltools to gettext
-rw-r--r-- | Makefile.am | 14 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | org.mate.applets.SensorsApplet.mate-panel-applet.desktop.in.in | 11 | ||||
-rw-r--r-- | org.mate.applets.SensorsApplet.mate-panel-applet.in.in | 10 | ||||
-rw-r--r-- | po/Makevars | 78 | ||||
-rw-r--r-- | po/POTFILES.in | 6 |
6 files changed, 101 insertions, 23 deletions
diff --git a/Makefile.am b/Makefile.am index 91fe2ee..6b9b329 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,15 +3,16 @@ SUBDIRS = sensors-applet lib plugins pixmaps po help ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} appletdir = $(datadir)/mate-panel/applets -applet_in_files = org.mate.applets.SensorsApplet.mate-panel-applet.in -applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet) +applet_in_files = org.mate.applets.SensorsApplet.mate-panel-applet.desktop.in +applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel-applet) $(applet_in_files): $(applet_in_files).in Makefile $(AM_V_GEN)sed \ -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ $< > $@ -%.mate-panel-applet: %.mate-panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache +$(applet_DATA): $(applet_in_files) Makefile + $(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@ uidir = $(datadir)/mate-sensors-applet/ui ui_DATA = SensorsApplet.xml @@ -25,7 +26,6 @@ org.mate.panel.applet.SensorsAppletFactory.service: $(service_in_files) -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ $< > $@ -@INTLTOOL_XML_NOMERGE_RULE@ gsettingsschema_in_files = \ org.mate.sensors-applet.gschema.xml.in \ org.mate.sensors-applet.sensor.gschema.xml.in @@ -34,7 +34,7 @@ gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml) @GSETTINGS_RULES@ CLEANFILES = $(applet_DATA) \ - $(applet_DATA).in \ + $(applet_in_files) \ $(service_DATA) \ $(gsettings_SCHEMAS) \ *.gschema.valid @@ -48,9 +48,7 @@ EXTRA_DIST = $(ui_DATA) \ $(gsettingsschema_in_files) \ autogen.sh -DISTCLEANFILES = intltool-extract \ - intltool-merge \ - intltool-update +DISTCLEANFILES = MSACLEANFILES = aclocal.m4 \ compile \ diff --git a/configure.ac b/configure.ac index 5db062c..b604ae7 100644 --- a/configure.ac +++ b/configure.ac @@ -18,12 +18,13 @@ AC_HEADER_STDC AC_PROG_LIBTOOL # =========== take care of some localization ========= # +AM_GNU_GETTEXT_VERSION([0.19.8]) +AM_GNU_GETTEXT([external]) + AH_TEMPLATE([GETTEXT_PACKAGE], [Package name for gettext]) GETTEXT_PACKAGE=mate-sensors-applet AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE") AC_SUBST(GETTEXT_PACKAGE) -AM_GLIB_GNU_GETTEXT -IT_PROG_INTLTOOL([0.50.1]) # ========== export compiler / linker options ======== # AC_SUBST(CFLAGS) diff --git a/org.mate.applets.SensorsApplet.mate-panel-applet.desktop.in.in b/org.mate.applets.SensorsApplet.mate-panel-applet.desktop.in.in new file mode 100644 index 0000000..d02964a --- /dev/null +++ b/org.mate.applets.SensorsApplet.mate-panel-applet.desktop.in.in @@ -0,0 +1,11 @@ +[Applet Factory] +Id=SensorsAppletFactory +Location=@LIBEXECDIR@/mate-sensors-applet +Name=Sensors Applet Factory +Description=Sensors Applet Factory + +[SensorsApplet] +Name=Hardware Sensors Monitor +Description=Displays temperature, fan speed and voltage sensor readings +# Translators: Do NOT translate or transliterate this text (this is an icon file name)! +Icon=mate-sensors-applet diff --git a/org.mate.applets.SensorsApplet.mate-panel-applet.in.in b/org.mate.applets.SensorsApplet.mate-panel-applet.in.in deleted file mode 100644 index b231b4f..0000000 --- a/org.mate.applets.SensorsApplet.mate-panel-applet.in.in +++ /dev/null @@ -1,10 +0,0 @@ -[Applet Factory] -Id=SensorsAppletFactory -Location=@LIBEXECDIR@/mate-sensors-applet -_Name=Sensors Applet Factory -_Description=Sensors Applet Factory - -[SensorsApplet] -_Name=Hardware Sensors Monitor -_Description=Displays temperature, fan speed and voltage sensor readings -Icon=mate-sensors-applet diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..8d493dc --- /dev/null +++ b/po/Makevars @@ -0,0 +1,78 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments=Translators: + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = MATE Desktop Environment team + +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = no + +# These options get passed to msgmerge. +# Useful options are in particular: +# --previous to keep previous msgids of translated messages, +# --quiet to reduce the verbosity. +MSGMERGE_OPTIONS = + +# These options get passed to msginit. +# If you want to disable line wrapping when writing PO files, add +# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and +# MSGINIT_OPTIONS. +MSGINIT_OPTIONS = + +# This tells whether or not to regenerate a PO file when $(DOMAIN).pot +# has changed. Possible values are "yes" and "no". Set this to no if +# the POT file is checked in the repository and the version control +# program ignores timestamps. +PO_DEPENDS_ON_POT = yes + +# This tells whether or not to forcibly update $(DOMAIN).pot and +# regenerate PO files on "make dist". Possible values are "yes" and +# "no". Set this to no if the POT file and PO files are maintained +# externally. +DIST_DEPENDS_ON_UPDATE_PO = yes diff --git a/po/POTFILES.in b/po/POTFILES.in index 53f60d3..3524695 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,6 +1,6 @@ -[type: gettext/ini]org.mate.applets.SensorsApplet.mate-panel-applet.in.in -[type: gettext/gsettings]org.mate.sensors-applet.gschema.xml.in -[type: gettext/gsettings]org.mate.sensors-applet.sensor.gschema.xml.in +org.mate.applets.SensorsApplet.mate-panel-applet.desktop.in.in +org.mate.sensors-applet.gschema.xml.in +org.mate.sensors-applet.sensor.gschema.xml.in plugins/pmu-sys/pmu-sys-plugin.c plugins/i2c-sys/i2c-sys-plugin.c plugins/i8k/i8k-plugin.c |