[gnome-shell-extensions] build: Say good-bye to intltool



commit db3e910b76b7972aea73b9d014e66d5f6e726000
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jul 22 12:05:52 2016 +0200

    build: Say good-bye to intltool
    
    intltool is unmaintained nowadays while upstream gettext gained
    support for everything we used it for, so make the switch.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769077

 .gitignore                                         |   16 +++--
 configure.ac                                       |    4 +-
 data/Makefile.am                                   |   26 +++-----
 data/gnome-classic.desktop.in                      |    7 +-
 ...ktop.in.in => gnome-classic.session.desktop.in} |    2 +-
 ...shell.extensions.classic-overrides.gschema.xml} |   30 ++++----
 ...shell.extensions.auto-move-windows.gschema.xml} |    4 +-
 ...org.gnome.shell.extensions.example.gschema.xml} |    4 +-
 ...extensions.native-window-placement.gschema.xml} |   12 ++--
 ...extensions.screenshot-window-sizer.gschema.xml} |    2 +-
 ....gnome.shell.extensions.user-theme.gschema.xml} |    4 +-
 ...gnome.shell.extensions.window-list.gschema.xml} |   12 ++--
 po/Makevars                                        |   68 ++++++++++++++++++++
 po/POTFILES.in                                     |   16 ++--
 settings.mk                                        |   11 ++--
 15 files changed, 142 insertions(+), 76 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9bb939c..8a6aaa0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,22 @@
+ABOUT-NLS
 Makefile
 Makefile.in
 Makefile.in.in
+aclocal.m4
+autom4te.cache/
+config/
 configure
 config.log
 config.status
-aclocal.m4
-autom4te.cache/
 data/*.json
-po/gnome-shell-extensions.pot
+m4/
+po/*.header
+po/*.sed
+po/*.sin
+po/Makevars.template
 po/POTFILES
+po/Rules-quot
+po/gnome-shell-extensions.pot
 po/stamp-it
 staging/
 zip-files/
@@ -17,7 +25,5 @@ zip-files/
 *.gmo
 metadata.json
 *.desktop
-*.desktop.in
-*.gschema.xml
 *.gschema.valid
 *.session
diff --git a/configure.ac b/configure.ac
index c7e642c..12e4876 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,9 @@ GETTEXT_PACKAGE=gnome-shell-extensions
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
                    [The prefix for our gettext translation domains.])
-IT_PROG_INTLTOOL(0.26)
+
+AM_GNU_GETTEXT_VERSION([0.19.6])
+AM_GNU_GETTEXT([external])
 
 PKG_PROG_PKG_CONFIG([0.22])
 
diff --git a/data/Makefile.am b/data/Makefile.am
index 04da1bd..11cc6f0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,8 +1,7 @@
 include $(top_srcdir)/include.mk
 
 sessiondir = $(datadir)/gnome-session/sessions
-session_in_in_files = gnome-classic.session.desktop.in.in
-session_in_files = $(session_in_in_files:.session.desktop.in.in=.session.desktop.in)
+session_in_files = gnome-classic.session.desktop.in
 session_DATA = $(session_in_files:.session.desktop.in=.session)
 
 xsessiondir = $(datadir)/xsessions
@@ -39,17 +38,15 @@ theme_sources =                                                     \
                $(SASS) --sourcemap=none --update -f -q $<; \
        fi
 
-gsettings_in_files = org.gnome.shell.extensions.classic-overrides.gschema.xml.in
-gsettings_SCHEMAS = $(gsettings_in_files:.xml.in=.xml)
+gsettings_SCHEMAS = org.gnome.shell.extensions.classic-overrides.gschema.xml
 
-@INTLTOOL_XML_NOMERGE_RULE@
 @GSETTINGS_RULES@
 
-%.desktop.in:%.desktop.in.in
-       $(AM_V_GEN) sed \
-               -e "s|\@bindir\@|$(bindir)|" \
-               -e "s|\@VERSION\@|$(VERSION)|" \
-               $< > $@
+%.desktop:%.desktop.in
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
+%.session: %.session.desktop.in
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 comma:=,
 empty:=
@@ -61,15 +58,11 @@ extension_list:=$(subst $(space),$(comma),$(extensions))
                -e "s|\@CLASSIC_EXTENSIONS\@|$(extension_list)|g" \
                $< > $@
 
-%.session: %.session.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C 
$(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
-
-@INTLTOOL_DESKTOP_RULE@
-
 EXTRA_DIST = \
-       $(session_in_in_files) \
+       $(session_in_files) \
        $(xsession_in_files) \
        $(mode_in_files) \
-       $(gsettings_in_files) \
+       $(gsettings_SCHEMAS) \
        $(theme_DATA) \
        $(NULL)
 
@@ -77,5 +70,4 @@ CLEANFILES = \
        $(session_DATA) \
        $(xsession_DATA) \
        $(mode_DATA) \
-       $(gsettings_SCHEMAS) \
        $(NULL)
diff --git a/data/gnome-classic.desktop.in b/data/gnome-classic.desktop.in
index 70fb950..055ce64 100644
--- a/data/gnome-classic.desktop.in
+++ b/data/gnome-classic.desktop.in
@@ -1,8 +1,7 @@
 [Desktop Entry]
-_Name=GNOME Classic
-_Comment=This session logs you into GNOME Classic
+Name=GNOME Classic
+Comment=This session logs you into GNOME Classic
 Exec=env GNOME_SHELL_SESSION_MODE=classic gnome-session --session gnome-classic
 TryExec=gnome-session
-Icon=
 Type=Application
-DesktopNames=GNOME-Classic;GNOME
+DesktopNames=GNOME-Classic;GNOME;
diff --git a/data/gnome-classic.session.desktop.in.in b/data/gnome-classic.session.desktop.in
similarity index 81%
rename from data/gnome-classic.session.desktop.in.in
rename to data/gnome-classic.session.desktop.in
index 6e20cc9..7815e93 100644
--- a/data/gnome-classic.session.desktop.in.in
+++ b/data/gnome-classic.session.desktop.in
@@ -1,3 +1,3 @@
 [GNOME Session]
-_Name=GNOME Classic
+Name=GNOME Classic
 RequiredComponents=org.gnome.Shell;gnome-settings-daemon;nautilus-classic;
diff --git a/data/org.gnome.shell.extensions.classic-overrides.gschema.xml.in 
b/data/org.gnome.shell.extensions.classic-overrides.gschema.xml
similarity index 65%
rename from data/org.gnome.shell.extensions.classic-overrides.gschema.xml.in
rename to data/org.gnome.shell.extensions.classic-overrides.gschema.xml
index 19fdd98..83b89d9 100644
--- a/data/org.gnome.shell.extensions.classic-overrides.gschema.xml.in
+++ b/data/org.gnome.shell.extensions.classic-overrides.gschema.xml
@@ -4,43 +4,43 @@
          gettext-domain="gnome-shell-extensions">
     <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="button-layout" type="s">
       <default>"appmenu:minimize,maximize,close"</default>
-      <_summary>Arrangement of buttons on the titlebar</_summary>
-      <_description>
+      <summary>Arrangement of buttons on the titlebar</summary>
+      <description>
         This key overrides the key in org.gnome.desktop.wm.preferences 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="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>
diff --git a/extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml.in 
b/extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
similarity index 62%
rename from extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml.in
rename to extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
index 59753dc..1af61b3 100644
--- a/extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml.in
+++ b/extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
@@ -3,8 +3,8 @@
     <key name="application-list" type="as">
       <!-- FIXME: should be a(su), when JS supports more of GVariant -->
       <default>[ ]</default>
-      <_summary>Application and workspace list</_summary>
-      <_description>A list of strings, each containing an application id (desktop file name), followed by a 
colon and the workspace number</_description>
+      <summary>Application and workspace list</summary>
+      <description>A list of strings, each containing an application id (desktop file name), followed by a 
colon and the workspace number</description>
     </key>
   </schema>
 </schemalist>
diff --git a/extensions/example/org.gnome.shell.extensions.example.gschema.xml.in 
b/extensions/example/org.gnome.shell.extensions.example.gschema.xml
similarity index 59%
rename from extensions/example/org.gnome.shell.extensions.example.gschema.xml.in
rename to extensions/example/org.gnome.shell.extensions.example.gschema.xml
index 23aa34f..1f562f3 100644
--- a/extensions/example/org.gnome.shell.extensions.example.gschema.xml.in
+++ b/extensions/example/org.gnome.shell.extensions.example.gschema.xml
@@ -2,8 +2,8 @@
   <schema id="org.gnome.shell.extensions.example" path="/org/gnome/shell/extensions/example/">
     <key name="hello-text" type="s">
       <default>''</default>
-      <_summary>Alternative greeting text.</_summary>
-      <_description>If not empty, it contains the text that will be shown when clicking on the 
panel.</_description>
+      <summary>Alternative greeting text.</summary>
+      <description>If not empty, it contains the text that will be shown when clicking on the 
panel.</description>
     </key>
   </schema>
 </schemalist>
diff --git 
a/extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in 
b/extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml
similarity index 52%
rename from 
extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in
rename to extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml
index cf76399..07deac9 100644
--- a/extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in
+++ b/extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml
@@ -2,15 +2,15 @@
   <schema id="org.gnome.shell.extensions.native-window-placement" 
path="/org/gnome/shell/extensions/native-window-placement/">
     <key name="use-more-screen" type="b">
       <default>true</default>
-      <_summary>Use more screen for windows</_summary>
-      <_description>Try to use more screen for placing window thumbnails by adapting to screen aspect ratio, 
and consolidating
-      them further to reduce the bounding box. This setting applies only with the natural placement 
strategy.</_description>
+      <summary>Use more screen for windows</summary>
+      <description>Try to use more screen for placing window thumbnails by adapting to screen aspect ratio, 
and consolidating
+      them further to reduce the bounding box. This setting applies only with the natural placement 
strategy.</description>
     </key>
     <key name="window-captions-on-top" type="b">
       <default>true</default>
-      <_summary>Place window captions on top</_summary>
-      <_description>If true, place window captions on top the respective thumbnail, overriding shell default 
of placing it at
-      the bottom. Changing this setting requires restarting the shell to have any effect.</_description>
+      <summary>Place window captions on top</summary>
+      <description>If true, place window captions on top the respective thumbnail, overriding shell default 
of placing it at
+      the bottom. Changing this setting requires restarting the shell to have any effect.</description>
     </key>
   </schema>
 </schemalist>
diff --git 
a/extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml.in 
b/extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml
similarity index 86%
rename from 
extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml.in
rename to extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml
index f1739a9..ae8009e 100644
--- a/extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml.in
+++ b/extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml
@@ -4,7 +4,7 @@
           path="/org/gnome/shell/extensions/screenshot-window-sizer/">
     <key type="as" name="cycle-screenshot-sizes">
       <default><![CDATA[['<Alt><Control>s']]]></default>
-      <_summary>Cycle Screenshot Sizes</_summary>
+      <summary>Cycle Screenshot Sizes</summary>
     </key>
   </schema>
 </schemalist>
diff --git a/extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml.in 
b/extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml
similarity index 63%
rename from extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml.in
rename to extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml
index f765841..f3e6b03 100644
--- a/extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml.in
+++ b/extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml
@@ -2,8 +2,8 @@
   <schema id="org.gnome.shell.extensions.user-theme" path="/org/gnome/shell/extensions/user-theme/">
     <key name="name" type="s">
       <default>""</default>
-      <_summary>Theme name</_summary>
-      <_description>The name of the theme, to be loaded from ~/.themes/name/gnome-shell</_description>
+      <summary>Theme name</summary>
+      <description>The name of the theme, to be loaded from ~/.themes/name/gnome-shell</description>
     </key>
   </schema>
 </schemalist>
diff --git a/extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml.in 
b/extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml
similarity index 81%
rename from extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml.in
rename to extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml
index f736e36..95a12e5 100644
--- a/extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml.in
+++ b/extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml
@@ -9,19 +9,19 @@
     <key name="grouping-mode"
          enum="org.gnome.shell.extensions.window-list.GroupingMode">
       <default>'never'</default>
-      <_summary>When to group windows</_summary>
-      <_description>
+      <summary>When to group windows</summary>
+      <description>
         Decides when to group windows from the same application on the
         window list. Possible values are "never", "auto" and "always".
-      </_description>
+      </description>
     </key>
     <key name="show-on-all-monitors" type="b">
       <default>false</default>
-      <_summary>Show the window list on all monitors</_summary>
-      <_description>
+      <summary>Show the window list on all monitors</summary>
+      <description>
         Whether to show the window list on all connected monitors or
         only on the primary one.
-      </_description>
+      </description>
     </key>
   </schema>
 </schemalist>
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..2c670f3
--- /dev/null
+++ b/po/Makevars
@@ -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=extensions
+
+# 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
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5510b38..d98ca1b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,24 +1,24 @@
 data/gnome-classic.desktop.in
-data/gnome-classic.session.desktop.in.in
-data/org.gnome.shell.extensions.classic-overrides.gschema.xml.in
+data/gnome-classic.session.desktop.in
+data/org.gnome.shell.extensions.classic-overrides.gschema.xml
 extensions/alternate-tab/prefs.js
 extensions/apps-menu/extension.js
 extensions/auto-move-windows/extension.js
-extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml.in
+extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
 extensions/auto-move-windows/prefs.js
 extensions/drive-menu/extension.js
 extensions/example/extension.js
-extensions/example/org.gnome.shell.extensions.example.gschema.xml.in
+extensions/example/org.gnome.shell.extensions.example.gschema.xml
 extensions/example/prefs.js
 extensions/native-window-placement/extension.js
-extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in
+extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml
 extensions/places-menu/extension.js
 extensions/places-menu/placeDisplay.js
-extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml.in
+extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml
 extensions/user-theme/extension.js
-extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml.in
+extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml
 extensions/window-list/extension.js
-extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml.in
+extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml
 extensions/window-list/prefs.js
 extensions/windowsNavigator/extension.js
 extensions/workspace-indicator/extension.js
diff --git a/settings.mk b/settings.mk
index 8fc01fd..e1f8bb9 100644
--- a/settings.mk
+++ b/settings.mk
@@ -1,10 +1,9 @@
-gschemas_in = $(gschemaname).gschema.xml.in
+gsettings_SCHEMAS = $(gschemaname).gschema.xml
 
-@INTLTOOL_XML_NOMERGE_RULE@
-
-gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml)
+%.desktop:%.desktop.in
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 @GSETTINGS_RULES@
 
-CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
-EXTRA_DIST += $(gschemas_in)
+CLEANFILES += $(gsettings_SCHEMAS:.xml=.valid)
+EXTRA_DIST += $(gsettings_SCHEMAS)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]