build: Say good-bye to intltool

intltool is unmaintained nowadays while upstream gettext gained
support for formats like GSettings schemas and .desktop files,
and offers a mechanism to teach it about other XML formats not
yet supported out of the box which we can use for the rest.
So there's nothing stopping us, just make the switch ...

https://bugzilla.gnome.org/show_bug.cgi?id=769074
This commit is contained in:
Florian Müllner 2016-07-21 22:42:19 +02:00
parent 522d46a525
commit 795e7d4b59
13 changed files with 173 additions and 113 deletions

4
.gitignore vendored
View File

@ -16,7 +16,6 @@ config.log
config.status
config
configure
data/50-gnome-shell-*.xml
data/org.gnome.Shell.desktop
data/org.gnome.Shell.desktop.in
data/gnome-shell-extension-prefs.desktop
@ -26,8 +25,6 @@ data/gschemas.compiled
data/perf-background.xml
data/org.gnome.shell.gschema.xml
data/org.gnome.shell.gschema.valid
data/org.gnome.shell.evolution.calendar.gschema.xml
data/org.gnome.shell.evolution.calendar.gschema.valid
data/org.gnome.Shell.PortalHelper.desktop
data/org.gnome.Shell.PortalHelper.service
data/theme/.sass-cache
@ -74,7 +71,6 @@ src/*-marshal.[ch]
src/Makefile
src/Makefile.in
src/calendar-server/evolution-calendar.desktop
src/calendar-server/evolution-calendar.desktop.in
src/calendar-server/org.gnome.Shell.CalendarServer.service
src/gnome-shell
src/gnome-shell-calendar-server

View File

@ -24,13 +24,14 @@ LT_PREREQ([2.2.6])
LT_INIT([disable-static])
# i18n
IT_PROG_INTLTOOL([0.40])
GETTEXT_PACKAGE=gnome-shell
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
AM_GNU_GETTEXT_VERSION([0.19.6])
AM_GNU_GETTEXT([external])
PKG_PROG_PKG_CONFIG([0.22])
AC_PATH_PROG([XSLTPROC], [xsltproc])
@ -254,7 +255,6 @@ AC_CONFIG_FILES([
docs/reference/st/Makefile
docs/reference/st/st-docs.sgml
js/Makefile
src/calendar-server/evolution-calendar.desktop.in
src/Makefile
src/gvc/Makefile
browser-plugin/Makefile

View File

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<KeyListEntries schema="org.gnome.shell.keybindings"
group="system"
_name="System"
name="System"
wm_name="GNOME Shell"
package="gnome-shell">
<KeyListEntry name="toggle-message-tray"
_description="Show the notification list"/>
description="Show the notification list"/>
<KeyListEntry name="focus-active-notification"
_description="Focus the active notification"/>
description="Focus the active notification"/>
<KeyListEntry name="toggle-overview"
_description="Show the overview"/>
description="Show the overview"/>
<KeyListEntry name="toggle-application-view"
_description="Show all applications"/>
description="Show all applications"/>
<KeyListEntry name="open-application-menu"
_description="Open the application menu"/>
description="Open the application menu"/>
</KeyListEntries>

View File

@ -16,6 +16,7 @@ service_DATA = org.gnome.Shell.PortalHelper.service
CLEANFILES += \
org.gnome.Shell.PortalHelper.service \
org.gnome.Shell.PortalHelper.desktop \
org.gnome.Shell.PortalHelper.desktop.in \
$(NULL)
endif
@ -31,7 +32,9 @@ endif
-e "s|@VERSION[@]|$(VERSION)|" \
$< > $@ || rm $@
@INTLTOOL_DESKTOP_RULE@
%.desktop:%.desktop.in
$(AM_V_GEN) $(MSGFMT) --desktop --template $(builddir)/$< \
-d $(top_srcdir)/po -o $@
introspectiondir = $(datadir)/dbus-1/interfaces
introspection_DATA = \
@ -83,14 +86,11 @@ perf-background.xml: perf-background.xml.in
$< > $@ || rm $@
keysdir = @GNOME_KEYBINDINGS_KEYSDIR@
keys_in_files = 50-gnome-shell-system.xml.in
keys_DATA = $(keys_in_files:.xml.in=.xml)
keys_DATA = 50-gnome-shell-system.xml
gsettings_SCHEMAS = org.gnome.shell.gschema.xml
@INTLTOOL_XML_NOMERGE_RULE@
%.gschema.xml.in: %.gschema.xml.in.in Makefile
%.gschema.xml: %.gschema.xml.in Makefile
$(AM_V_GEN) sed -e 's|@GETTEXT_PACKAGE[@]|$(GETTEXT_PACKAGE)|g' \
$< > $@ || rm $@
@ -113,12 +113,12 @@ EXTRA_DIST = \
$(introspection_DATA) \
$(menu_DATA) \
$(convert_DATA) \
$(keys_in_files) \
$(keys_DATA) \
$(dist_theme_files) \
perf-background.xml.in \
org.gnome.Shell.PortalHelper.desktop.in \
org.gnome.Shell.PortalHelper.desktop.in.in \
org.gnome.Shell.PortalHelper.service.in \
org.gnome.shell.gschema.xml.in.in \
org.gnome.shell.gschema.xml.in \
gnome-shell-theme.gresource.xml \
$(resource_files) \
$(NULL)
@ -127,11 +127,9 @@ CLEANFILES += \
org.gnome.Shell.desktop.in \
gnome-shell-extension-prefs.in \
$(desktop_DATA) \
$(keys_DATA) \
$(gsettings_SCHEMAS) \
perf-background.xml \
gschemas.compiled \
org.gnome.shell.gschema.valid \
org.gnome.shell.gschema.xml.in \
gnome-shell-theme.gresource \
$(NULL)

View File

@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
_Name=GNOME Shell Extension Preferences
_Comment=Configure GNOME Shell Extensions
Name=GNOME Shell Extension Preferences
Comment=Configure GNOME Shell Extensions
Exec=@bindir@/gnome-shell-extension-prefs %u
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-shell

View File

@ -1,5 +1,5 @@
[Desktop Entry]
_Name=Network Login
Name=Network Login
Type=Application
Exec=gapplication launch org.gnome.Shell.PortalHelper
DBusActivatable=true

View File

@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
_Name=GNOME Shell
_Comment=Window management and application launching
Name=GNOME Shell
Comment=Window management and application launching
Exec=@bindir@/gnome-shell
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-shell

View File

@ -3,84 +3,84 @@
gettext-domain="@GETTEXT_PACKAGE@">
<key name="development-tools" type="b">
<default>true</default>
<_summary>
<summary>
Enable internal tools useful for developers and testers from Alt-F2
</_summary>
<_description>
</summary>
<description>
Allows access to internal debugging and monitoring tools
using the Alt-F2 dialog.
</_description>
</description>
</key>
<key name="enabled-extensions" type="as">
<default>[]</default>
<_summary>UUIDs of extensions to enable</_summary>
<_description>
<summary>UUIDs of extensions to enable</summary>
<description>
GNOME Shell extensions have a UUID property; this key lists extensions
which should be loaded. Any extension that wants to be loaded needs
to be in this list. You can also manipulate this list with the
EnableExtension and DisableExtension D-Bus methods on org.gnome.Shell.
</_description>
</description>
</key>
<key name="disable-extension-version-validation" type="b">
<default>false</default>
<_summary>Disables the validation of extension version compatibility</_summary>
<_description>
<summary>Disables the validation of extension version compatibility</summary>
<description>
GNOME Shell will only load extensions that claim to support the current
running version. Enabling this option will disable this check and try to
load all extensions regardless of the versions they claim to support.
</_description>
</description>
</key>
<key name="favorite-apps" type="as">
<default>[ 'epiphany.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
<_summary>List of desktop file IDs for favorite applications</_summary>
<_description>
<summary>List of desktop file IDs for favorite applications</summary>
<description>
The applications corresponding to these identifiers
will be displayed in the favorites area.
</_description>
</description>
</key>
<key name="app-picker-view" type="u">
<default>0</default>
<_summary>App Picker View</_summary>
<_description>
<summary>App Picker View</summary>
<description>
Index of the currently selected view in the application picker.
</_description>
</description>
</key>
<key name="command-history" type="as">
<default>[]</default>
<_summary>History for command (Alt-F2) dialog</_summary>
<summary>History for command (Alt-F2) dialog</summary>
</key>
<key name="looking-glass-history" type="as">
<default>[]</default>
<!-- Translators: looking glass is a debugger and inspector tool, see https://wiki.gnome.org/Projects/GnomeShell/LookingGlass -->
<_summary>History for the looking glass dialog</_summary>
<summary>History for the looking glass dialog</summary>
</key>
<key name="always-show-log-out" type="b">
<default>false</default>
<_summary>Always show the 'Log out' menu item in the user menu.</_summary>
<_description>
<summary>Always show the 'Log out' menu item in the user menu.</summary>
<description>
This key overrides the automatic hiding of the 'Log out'
menu item in single-user, single-session situations.
</_description>
</description>
</key>
<key name="remember-mount-password" type="b">
<default>false</default>
<_summary>Whether to remember password for mounting encrypted or remote filesystems</_summary>
<_description>
<summary>Whether to remember password for mounting encrypted or remote filesystems</summary>
<description>
The shell will request a password when an encrypted device or a
remote filesystem is mounted. If the password can be saved for
future use a 'Remember Password' checkbox will be present.
This key sets the default state of the checkbox.
</_description>
</description>
</key>
<key name="had-bluetooth-devices-setup" type="b">
<default>false</default>
<_summary>Whether the default Bluetooth adapter had set up devices associated to it</_summary>
<_description>
<summary>Whether the default Bluetooth adapter had set up devices associated to it</summary>
<description>
The shell will only show a Bluetooth menu item if a Bluetooth
adapter is powered, or if there were devices set up associated
with the default adapter. This will be reset if the default
adapter is ever seen not to have devices associated to it.
</_description>
</description>
</key>
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
<child name="keyboard" schema="org.gnome.shell.keyboard"/>
@ -90,44 +90,44 @@
gettext-domain="@GETTEXT_PACKAGE@">
<key name="open-application-menu" type="as">
<default>["&lt;Super&gt;F10"]</default>
<_summary>Keybinding to open the application menu</_summary>
<_description>
<summary>Keybinding to open the application menu</summary>
<description>
Keybinding to open the application menu.
</_description>
</description>
</key>
<key name="toggle-application-view" type="as">
<default>["&lt;Super&gt;a"]</default>
<_summary>Keybinding to open the "Show Applications" view</_summary>
<_description>
<summary>Keybinding to open the "Show Applications" view</summary>
<description>
Keybinding to open the "Show Applications" view of the Activities
Overview.
</_description>
</description>
</key>
<key name="toggle-overview" type="as">
<default>["&lt;Super&gt;s"]</default>
<_summary>Keybinding to open the overview</_summary>
<_description>
<summary>Keybinding to open the overview</summary>
<description>
Keybinding to open the Activities Overview.
</_description>
</description>
</key>
<key name="toggle-message-tray" type="as">
<default>["&lt;Super&gt;v","&lt;Super&gt;m"]</default>
<_summary>Keybinding to toggle the visibility of the notification list</_summary>
<_description>
<summary>Keybinding to toggle the visibility of the notification list</summary>
<description>
Keybinding to toggle the visibility of the notification list.
</_description>
</description>
</key>
<key name="focus-active-notification" type="as">
<default>["&lt;Super&gt;n"]</default>
<_summary>Keybinding to focus the active notification</_summary>
<_description>
<summary>Keybinding to focus the active notification</summary>
<description>
Keybinding to focus the active notification.
</_description>
</description>
</key>
<key name="pause-resume-tweens" type="as">
<default>[]</default>
<_summary>Keybinding that pauses and resumes all running tweens, for debugging purposes</_summary>
<_description></_description>
<summary>Keybinding that pauses and resumes all running tweens, for debugging purposes</summary>
<description></description>
</key>
</schema>
@ -135,10 +135,10 @@
gettext-domain="@GETTEXT_PACKAGE@">
<key name="keyboard-type" type="s">
<default>'touch'</default>
<_summary>Which keyboard to use</_summary>
<_description>
<summary>Which keyboard to use</summary>
<description>
The type of keyboard to use.
</_description>
</description>
</key>
</schema>
@ -147,11 +147,11 @@
gettext-domain="@GETTEXT_PACKAGE@">
<key type="b" name="current-workspace-only">
<default>false</default>
<_summary>Limit switcher to current workspace.</_summary>
<_description>
<summary>Limit switcher to current workspace.</summary>
<description>
If true, only applications that have windows on the current workspace are shown in the switcher.
Otherwise, all applications are included.
</_description>
</description>
</key>
</schema>
@ -165,20 +165,20 @@
gettext-domain="@GETTEXT_PACKAGE@">
<key name="app-icon-mode" enum="org.gnome.shell.window-switcher.AppIconMode">
<default>'both'</default>
<_summary>The application icon mode.</_summary>
<_description>
<summary>The application icon mode.</summary>
<description>
Configures how the windows are shown in the switcher. Valid possibilities
are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-only'
(shows only the application icon) or 'both'.
</_description>
</description>
</key>
<key type="b" name="current-workspace-only">
<default>true</default>
<_summary>Limit switcher to current workspace.</_summary>
<_description>
<summary>Limit switcher to current workspace.</summary>
<description>
If true, only windows from the current workspace are shown in the switcher.
Otherwise, all windows are included.
</_description>
</description>
</key>
</schema>
@ -186,43 +186,43 @@
gettext-domain="@GETTEXT_PACKAGE@">
<key name="attach-modal-dialogs" type="b">
<default>true</default>
<_summary>Attach modal dialog to the parent window</_summary>
<_description>
<summary>Attach modal dialog to the parent window</summary>
<description>
This key overrides the key in org.gnome.mutter when running
GNOME Shell.
</_description>
</description>
</key>
<key name="edge-tiling" type="b">
<default>true</default>
<_summary>Enable edge tiling when dropping windows on screen edges</_summary>
<_description>
<summary>Enable edge tiling when dropping windows on screen edges</summary>
<description>
This key overrides the key in org.gnome.mutter when running GNOME Shell.
</_description>
</description>
</key>
<key name="dynamic-workspaces" type="b">
<default>true</default>
<_summary>Workspaces are managed dynamically</_summary>
<_description>
<summary>Workspaces are managed dynamically</summary>
<description>
This key overrides the key in org.gnome.mutter when running GNOME Shell.
</_description>
</description>
</key>
<key name="workspaces-only-on-primary" type="b">
<default>true</default>
<_summary>Workspaces only on primary monitor</_summary>
<_description>
<summary>Workspaces only on primary monitor</summary>
<description>
This key overrides the key in org.gnome.mutter when running GNOME Shell.
</_description>
</description>
</key>
<key name="focus-change-on-pointer-rest" type="b">
<default>true</default>
<_summary>Delay focus changes in mouse mode until the pointer stops moving</_summary>
<_description>
<summary>Delay focus changes in mouse mode until the pointer stops moving</summary>
<description>
This key overrides the key in org.gnome.mutter when running GNOME Shell.
</_description>
</description>
</key>
</schema>
</schemalist>

68
po/Makevars Normal file
View File

@ -0,0 +1,68 @@
# 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 \
--flag=g_dngettext:2:pass-c-format \
--flag=g_strdup_printf:1:c-format \
--flag=g_string_printf:2:c-format \
--flag=g_string_append_printf:2:c-format \
--flag=g_error_new:3:c-format \
--flag=g_set_error:4:c-format \
--flag=g_markup_printf_escaped:1:c-format \
--flag=g_log:3:c-format \
--flag=g_print:1:c-format \
--flag=g_printerr:1:c-format \
--flag=g_printf:1:c-format \
--flag=g_fprintf:2:c-format \
--flag=g_sprintf:2:c-format \
--flag=g_snprintf:3:c-format
# 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 = Translation copyright holder
# 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 = http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&keywords=I18N+L10N&component=general
# 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 =
# Ignore the timestamp of the .pot file, as git clones do not have
# deterministic timestamps, and .po files are updated by translators
# (only) in GNOME projects.
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

View File

@ -1,11 +1,10 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
data/50-gnome-shell-system.xml.in
data/50-gnome-shell-system.xml
data/gnome-shell-extension-prefs.desktop.in.in
data/org.gnome.Shell.desktop.in.in
data/org.gnome.shell.gschema.xml.in.in
data/org.gnome.Shell.PortalHelper.desktop.in
data/org.gnome.shell.gschema.xml.in
data/org.gnome.Shell.PortalHelper.desktop.in.in
js/extensionPrefs/main.js
js/gdm/authPrompt.js
js/gdm/loginDialog.js
@ -62,7 +61,7 @@ js/ui/viewSelector.js
js/ui/windowAttentionHandler.js
js/ui/windowManager.js
js/ui/windowMenu.js
src/calendar-server/evolution-calendar.desktop.in.in
src/calendar-server/evolution-calendar.desktop.in
# Please do not remove this file from POTFILES.in. Run "git submodule init && git submodule update" to get it.
src/gvc/gvc-mixer-control.c
src/main.c

View File

@ -1,4 +0,0 @@
data/org.gnome.shell.evolution.calendar.gschema.xml.in
src/calendar-server/evolution-calendar.desktop.in
# Meh, autofools :-(
sub/src/calendar-server/evolution-calendar.desktop.in

View File

@ -12,7 +12,9 @@ desktopdir=$(datadir)/applications
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
desktop_in_files = calendar-server/evolution-calendar.desktop.in
@INTLTOOL_DESKTOP_RULE@
%.desktop:%.desktop.in
@$(MKDIR_P) $(builddir)/calendar-server
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
gnome_shell_calendar_server_CFLAGS = \
-I$(top_srcdir)/src \
@ -30,6 +32,7 @@ gnome_shell_calendar_server_LDADD = \
EXTRA_DIST += \
calendar-server/README \
calendar-server/org.gnome.Shell.CalendarServer.service.in \
$(desktop_in_files) \
$(NULL)
CLEANFILES += \

View File

@ -1,5 +1,5 @@
[Desktop Entry]
_Name=Evolution Calendar
Name=Evolution Calendar
Exec=evolution -c calendar
Icon=evolution
NoDisplay=true