[accerciser] Stop using intltool
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accerciser] Stop using intltool
- Date: Sun, 13 Jan 2019 02:44:11 +0000 (UTC)
commit 3b37b7c359d6acfbe9e6beefb4667450e16a99f8
Author: Jeremy Bicha <jbicha debian org>
Date: Sat Jan 12 11:57:21 2019 -0500
Stop using intltool
Modern gettext is sufficient
https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration
Makefile.am | 42 ++++--------
accerciser.appdata.xml.in | 16 ++---
accerciser.desktop.in | 15 +++++
accerciser.desktop.in.in | 13 ----
configure.ac | 7 +-
macaroon/Makefile.am | 16 ++---
macaroon/configure.in | 7 +-
macaroon/macaroon.desktop.in | 12 ++++
macaroon/macaroon.desktop.in.in | 11 ---
...chema.xml.in => org.a11y.Accerciser.gschema.xml | 64 +++++++++---------
po/Makevars | 78 ++++++++++++++++++++++
po/POTFILES.in | 11 ++-
po/POTFILES.skip | 2 -
13 files changed, 173 insertions(+), 121 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index d1962fc..87d2f2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,48 +1,34 @@
SUBDIRS = doc help icons plugindata plugins po src pixmaps
-INTLTOOL = \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in
-
desktopdir = $(datadir)/applications
desktop_in_files=accerciser.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
-
-gsettings_files = \
- org.a11y.Accerciser.gschema.xml.in
-
-gsettings_SCHEMAS = $(gsettings_files:.xml.in=.xml)
-
-appdatadir = $(datadir)/appdata
-appdata_DATA = $(appdata_in_files:.xml.in=.xml)
-appdata_in_files = accerciser.appdata.xml.in
-@INTLTOOL_XML_RULE@
-
-%.gschema.xml: %.gschema.xml.in
- $(AM_V_GEN) $(INTLTOOL_MERGE) -x -u --no-translations $< $@
+$(desktop_DATA): $(desktop_in_files)
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+gsettings_SCHEMAS = org.a11y.Accerciser.gschema.xml
@GSETTINGS_RULES@
+appstream_in_files = accerciser.appdata.xml.in
+appstream_XML = $(appstream_in_files:.xml.in=.xml)
+$(appstream_XML): $(appstream_in_files)
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+@APPSTREAM_XML_RULES@
+
EXTRA_DIST = \
- $(appdata_in_files) \
+ $(appstream_in_files) \
$(desktop_in_files) \
$(desktop_DATA) \
pyreqs.py \
- $(INTLTOOL) \
- $(gsettings_files)
+ $(gsettings_SCHEMAS)
DISTCHECK_CONFIGURE_FLAGS = \
--disable-scrollkeeper \
--enable-pydoc
DISTCLEANFILES = \
- $(desktop_DATA) \
- intltool-extract \
- intltool-merge \
- intltool-update \
- $(gsettings_SCHEMAS)
+ $(desktop_DATA)
CLEANFILES = \
- $(appdata_DATA)
+ $(appstream_XML) \
+ $(desktop_DATA)
diff --git a/accerciser.appdata.xml.in b/accerciser.appdata.xml.in
index ffa3c74..19c1387 100644
--- a/accerciser.appdata.xml.in
+++ b/accerciser.appdata.xml.in
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Daniel Mustieles <daniel mustieles gmail com> -->
-<application>
+<component type="desktop-application">
<id type="desktop">accerciser.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
- <_name>Accerciser</_name>
- <_summary>Accessibility explorer for the GNOME desktop</_summary>
+ <name>Accerciser</name>
+ <summary>Accessibility explorer for the GNOME desktop</summary>
<description>
- <_p>
+ <p>
Accerciser is an interactive Python accessibility explorer for the GNOME desktop.
It uses AT-SPI to inspect and control widgets, allowing you to check if an application
is providing correct information to assistive technologies and automated test frameworks.
- </_p>
- <_p>
+ </p>
+ <p>
Accerciser has a simple plugin framework which you can use to create custom views of
accessibility information.
- </_p>
+ </p>
</description>
<url type="homepage">https://wiki.gnome.org/action/show/Apps/Accerciser</url>
<screenshots>
@@ -23,4 +23,4 @@
<updatecontact>daniel mustieles gmail com</updatecontact>
<project_group>GNOME</project_group>
<translation type="gettext">accerciser</translation>
-</application>
+</component>
diff --git a/accerciser.desktop.in b/accerciser.desktop.in
new file mode 100644
index 0000000..048b6d4
--- /dev/null
+++ b/accerciser.desktop.in
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Name=Accerciser
+Comment=Give your application an accessibility workout
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list
MUST also end with a semicolon!
+Keywords=accessibility;development;test;
+X-GNOME-FullName=Accerciser Accessibility Explorer
+Terminal=false
+Type=Application
+Exec=accerciser
+StartupNotify=true
+Categories=Development;GNOME;GTK;Accessibility;
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
+Icon=accerciser
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=accerciser
diff --git a/configure.ac b/configure.ac
index c3dcd64..f425b83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,18 +24,17 @@ PKG_CHECK_MODULES([PYGOBJECT], [pygobject-3.0 >= PYGOBJECT_REQUIRED])
PKG_CHECK_MODULES([ATSPI2], [atspi-2 >= ATSPI_REQUIRED])
dnl == i18n ==
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT([external])
GETTEXT_PACKAGE=accerciser
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package])
-AM_GLIB_GNU_GETTEXT
-dnl == intltool check ==
-IT_PROG_INTLTOOL([0.35.0])
+APPSTREAM_XML
dnl == generate makefiles ==
AC_OUTPUT([
Makefile
-accerciser.desktop.in
doc/Makefile
help/Makefile
icons/Makefile
diff --git a/macaroon/Makefile.am b/macaroon/Makefile.am
index b1e606b..ca8b412 100644
--- a/macaroon/Makefile.am
+++ b/macaroon/Makefile.am
@@ -1,26 +1,18 @@
SUBDIRS = bin macaroon po
-INTLTOOL = \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in
-
desktopdir = $(datadir)/applications
desktop_in_files=macaroon.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
+$(desktop_DATA): $(desktop_in_files)
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
EXTRA_DIST = \
$(desktop_in_files) \
$(desktop_DATA) \
pyreqs.py \
- TODO \
- $(INTLTOOL)
+ TODO
DISTCLEANFILES = \
- $(desktop_DATA) \
- intltool-extract \
- intltool-merge \
- intltool-update
+ $(desktop_DATA)
diff --git a/macaroon/configure.in b/macaroon/configure.in
index 1bba6b1..51de66b 100644
--- a/macaroon/configure.in
+++ b/macaroon/configure.in
@@ -17,18 +17,15 @@ PKG_CHECK_MODULES([PYGOBJECT], [pygobject-3.0 >= PYGOBJECT_REQUIRED])
PKG_CHECK_MODULES([ATSPI2], [atspi-2 >= ATSPI_REQUIRED])
dnl == i18n ==
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT([external])
GETTEXT_PACKAGE=macaroon
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package])
-AM_GLIB_GNU_GETTEXT
-
-dnl == intltool check ==
-IT_PROG_INTLTOOL([0.35.0])
dnl == generate makefiles ==
AC_OUTPUT([
Makefile
-macaroon.desktop.in
po/Makefile.in
bin/Makefile
bin/macaroon
diff --git a/macaroon/macaroon.desktop.in b/macaroon/macaroon.desktop.in
new file mode 100644
index 0000000..f751a84
--- /dev/null
+++ b/macaroon/macaroon.desktop.in
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=Macaroon
+GenericName=Global Macro Tool
+Comment=Globally define and use keyboard macros.
+X-GNOME-FullName=Macaroon Global Macro Tool
+Terminal=false
+Type=Application
+Exec=macaroon
+StartupNotify=false
+Categories=Application;Accessories;
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
+Icon=macaroon
diff --git a/org.a11y.Accerciser.gschema.xml.in b/org.a11y.Accerciser.gschema.xml
similarity index 51%
rename from org.a11y.Accerciser.gschema.xml.in
rename to org.a11y.Accerciser.gschema.xml
index 1fc2afc..0e846bd 100644
--- a/org.a11y.Accerciser.gschema.xml.in
+++ b/org.a11y.Accerciser.gschema.xml
@@ -3,43 +3,43 @@
<schema path="/org/a11y/accerciser/" id="org.a11y.Accerciser" gettext-domain="accerciser">
<key type="as" name="disabled-plugins">
<default>[]</default>
- <_summary>A list of plugins that are disabled by default</_summary>
- <_description>A list of plugins that are disabled by default.</_description>
+ <summary>A list of plugins that are disabled by default</summary>
+ <description>A list of plugins that are disabled by default.</description>
</key>
<key type="d" name="highlight-duration">
<default>0.5</default>
- <_summary>Highlight duration</_summary>
- <_description>The duration of the highlight box when selecting accessible nodes.</_description>
+ <summary>Highlight duration</summary>
+ <description>The duration of the highlight box when selecting accessible nodes.</description>
</key>
<key type="s" name="highlight-fill">
<default>"#ff00006f"</default>
- <_summary>Highlight fill color</_summary>
- <_description>The color and opacity of the highlight fill.</_description>
+ <summary>Highlight fill color</summary>
+ <description>The color and opacity of the highlight fill.</description>
</key>
<key type="s" name="highlight-border">
<default>"#ff0000ff"</default>
- <_summary>Highlight border color</_summary>
- <_description>The color and opacity of the highlight border.</_description>
+ <summary>Highlight border color</summary>
+ <description>The color and opacity of the highlight border.</description>
</key>
<key type="i" name="hpaned">
<default>250</default>
- <_summary>Horizontal split</_summary>
- <_description>Position of the horizontal split of the main window.</_description>
+ <summary>Horizontal split</summary>
+ <description>Position of the horizontal split of the main window.</description>
</key>
<key type="i" name="vpaned">
<default>350</default>
- <_summary>Vertical split</_summary>
- <_description>Position of the vertical split of the main window.</_description>
+ <summary>Vertical split</summary>
+ <description>Position of the vertical split of the main window.</description>
</key>
<key type="i" name="window-height">
<default>600</default>
- <_summary>Default window height</_summary>
- <_description>The window height value.</_description>
+ <summary>Default window height</summary>
+ <description>The window height value.</description>
</key>
<key type="i" name="window-width">
<default>800</default>
- <_summary>Default window width</_summary>
- <_description>The window width value.</_description>
+ <summary>Default window width</summary>
+ <description>The window width value.</description>
</key>
<child schema="org.a11y.Accerciser.pluginviews" name="pluginviews"/>
<child schema="org.a11y.Accerciser.newpluginviews" name="newpluginviews"/>
@@ -48,47 +48,47 @@
<schema path="/org/a11y/accerciser/pluginviews/" id="org.a11y.Accerciser.pluginviews"
gettext-domain="accerciser">
<key type="as" name="bottom-panel-layout">
<default>["IPython Console"]</default>
- <_summary>The layout for the bottom panel</_summary>
- <_description>The layout for the bottom panel pluginview.</_description>
+ <summary>The layout for the bottom panel</summary>
+ <description>The layout for the bottom panel pluginview.</description>
</key>
<key type="as" name="top-panel-layout">
<default>["Interface Viewer", "API Browser", "Event Monitor", "Script Recorder"]</default>
- <_summary>The layout for the top panel</_summary>
- <_description>The layout for the top panel pluginview.</_description>
+ <summary>The layout for the top panel</summary>
+ <description>The layout for the top panel pluginview.</description>
</key>
<key type="b" name="layout-single">
<default>false</default>
- <_summary>Single layout view</_summary>
- <_description>View plugins in a single layout.</_description>
+ <summary>Single layout view</summary>
+ <description>View plugins in a single layout.</description>
</key>
<key type="as" name="available-newviews">
<default>[]</default>
- <_summary>Available new pluginviews</_summary>
- <_description>This list contains all the new available pluginviews</_description>
+ <summary>Available new pluginviews</summary>
+ <description>This list contains all the new available pluginviews</description>
</key>
</schema>
<schema id="org.a11y.Accerciser.newpluginviews" gettext-domain="accerciser">
<key type="as" name="layout">
<default>[]</default>
- <_summary>The pluginview layout</_summary>
- <_description>The default plugin layout for the top panel.</_description>
+ <summary>The pluginview layout</summary>
+ <description>The default plugin layout for the top panel.</description>
</key>
<key type="i" name="height">
<default>480</default>
- <_summary>Window height</_summary>
- <_description>Window height value.</_description>
+ <summary>Window height</summary>
+ <description>Window height value.</description>
</key>
<key type="i" name="width">
<default>480</default>
- <_summary>Window width</_summary>
- <_description>Window width value.</_description>
+ <summary>Window width</summary>
+ <description>Window width value.</description>
</key>
</schema>
<schema id="org.a11y.Accerciser.hotkeys" gettext-domain="accerciser">
<key type="s" name="hotkey-combo">
<default>""</default>
- <_summary>Hotkey combination</_summary>
- <_description>Hotkey combination for related action.</_description>
+ <summary>Hotkey combination</summary>
+ <description>Hotkey combination for related action.</description>
</key>
</schema>
</schemalist>
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..e8b48b6
--- /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
+
+# 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 = The Accerciser Developers
+
+# 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 = https://gitlab.gnome.org/GNOME/gnome-klotski/issues
+
+# 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 = yes
+
+# 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 = no
+
+# 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 = no
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 126a173..9cc28cf 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,15 +1,14 @@
-[encoding: UTF-8]
accerciser.appdata.xml.in
-accerciser.desktop.in.in
-org.a11y.Accerciser.gschema.xml.in
+accerciser.desktop.in
+org.a11y.Accerciser.gschema.xml
plugins/api_view.py
plugins/console.py
-[type: gettext/glade]plugins/event_monitor.ui
+plugins/event_monitor.ui
plugins/event_monitor.py
-[type: gettext/glade]plugins/interface_view.ui
+plugins/interface_view.ui
plugins/interface_view.py
plugins/quick_select.py
-[type: gettext/glade]plugins/validate.ui
+plugins/validate.ui
plugins/validate.py
plugindata/validate/basic.py
src/lib/accerciser/accerciser.py
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 3b49203..7ecbcb6 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -9,5 +9,3 @@ macaroon/macaroon/playback/keypress_actions.py
macaroon/macaroon/playback/keypress_mimic.py
macaroon/macaroon/playback/sequence.py
macaroon/macaroon/playback/wait_actions.py
-# Workaround for https://bugs.launchpad.net/intltool/+bug/1117944
-sub/accerciser.desktop.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]