[gnome-clocks] build: Use intltool to translate GSettings schema file directly



commit f70549e5798e888cc909503b54db12bf62865acb
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri Dec 19 22:23:22 2014 +0000

    build: Use intltool to translate GSettings schema file directly
    
    Instead of using intltool’s XML rules, use its specific GSettings schema
    rules to simplify translation of the schema file.
    
    This bumps the intltool dependency to 0.50.1.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741793

 Makefile.am                                        |    8 +---
 configure.ac                                       |    4 +-
 ...a.xml.in.in => org.gnome.clocks.gschema.xml.in} |   42 ++++++++++----------
 po/POTFILES.in                                     |    2 +-
 4 files changed, 25 insertions(+), 31 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 50def4a..243989a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,6 @@ searchprovider_DATA = data/org.gnome.clocks.search-provider.ini
 
 # gsettings
 gsettings_SCHEMAS = data/org.gnome.clocks.gschema.xml
- INTLTOOL_XML_RULE@
 @GSETTINGS_RULES@
 
 # icons
@@ -157,17 +156,13 @@ EXTRA_DIST = \
        $(images_DATA) \
        $(resource_files) \
        data/appdata/org.gnome.clocks.appdata.xml \
-       data/gnome-clocks.gresource.xml \
-       data/org.gnome.clocks.gschema.xml.in.in
+       data/gnome-clocks.gresource.xml
 
 CLEANFILES = \
        $(appdata_DATA) \
        $(applications_DATA) \
        $(service_DATA)
 
-DISTCLEANFILES = \
-       $(gsettings_SCHEMAS)
-
 MAINTAINERCLEANFILES = \
        ABOUT-NLS \
        aclocal.m4 \
@@ -179,7 +174,6 @@ MAINTAINERCLEANFILES = \
        install-sh \
        ltmain.sh \
        missing \
-       $(gsettings_SCHEMAS:.xml=.valid) \
        $(VALA_SOURCES:.vala=.c) \
        *.stamp
 
diff --git a/configure.ac b/configure.ac
index 808f913..853373d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ AC_CONFIG_SRCDIR(src/main.vala)
 AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip foreign])
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
-IT_PROG_INTLTOOL(0.40)
+IT_PROG_INTLTOOL([0.50.1])
 AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION([0.17])
 GETTEXT_PACKAGE=AC_PACKAGE_NAME
@@ -63,7 +63,7 @@ YELP_HELP_INIT
 
 AC_CONFIG_FILES([
     Makefile
-    data/org.gnome.clocks.gschema.xml.in
+    data/org.gnome.clocks.gschema.xml
     help/Makefile
     po/Makefile.in
 ])
diff --git a/data/org.gnome.clocks.gschema.xml.in.in b/data/org.gnome.clocks.gschema.xml.in
similarity index 69%
rename from data/org.gnome.clocks.gschema.xml.in.in
rename to data/org.gnome.clocks.gschema.xml.in
index 2842eb1..01f79c5 100644
--- a/data/org.gnome.clocks.gschema.xml.in.in
+++ b/data/org.gnome.clocks.gschema.xml.in
@@ -2,31 +2,31 @@
   <schema id="org.gnome.clocks" path="/org/gnome/clocks/">
     <key name="world-clocks" type="aa{sv}">
       <default>[]</default>
-      <_summary>Configured world clocks</_summary>
-      <_description>
+      <summary>Configured world clocks</summary>
+      <description>
         List of world clocks to show.
-      </_description>
+      </description>
     </key>
     <key name="alarms" type="aa{sv}">
       <default>[]</default>
-      <_summary>Configured alarms</_summary>
-      <_description>
+      <summary>Configured alarms</summary>
+      <description>
         List of alarms set.
-      </_description>
+      </description>
     </key>
     <key name="timer" type="u">
       <default>300</default>
-      <_summary>Timer</_summary>
-      <_description>
+      <summary>Timer</summary>
+      <description>
         Configured timer duration in seconds.
-      </_description>
+      </description>
     </key>
     <key name="geolocation" type="b">
       <default>true</default>
-      <_summary>Geolocation support</_summary>
-      <_description>
+      <summary>Geolocation support</summary>
+      <description>
         Turn geolocation support on and off.
-      </_description>
+      </description>
     </key>
   </schema>
   <enum id="org.gnome.clocks.panelid">
@@ -41,24 +41,24 @@
   <schema id="org.gnome.clocks.state.window" path="/org/gnome/clocks/state/window/">
     <key type="i" name="state">
       <default>0</default>
-      <_summary>Window state</_summary>
-      <_description>
+      <summary>Window state</summary>
+      <description>
         State of the window, e.g. maximized.
-      </_description>
+      </description>
     </key>
     <key type="(ii)" name="size">
       <default>(870, 690)</default>
-      <_summary>Window width and height</_summary>
-      <_description>
+      <summary>Window width and height</summary>
+      <description>
         Width and height of the window.
-      </_description>
+      </description>
     </key>
     <key enum="org.gnome.clocks.panelid" name="panel-id">
       <default>"world"</default>
-      <_summary>Panel state</_summary>
-      <_description>
+      <summary>Panel state</summary>
+      <description>
         Current clock panel.
-      </_description>
+      </description>
     </key>
   </schema>
 </schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 11da86b..db2eec3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,6 @@
 data/appdata/org.gnome.clocks.appdata.xml.in
 data/org.gnome.clocks.desktop.in
-data/org.gnome.clocks.gschema.xml.in.in
+[type: gettext/gsettings]data/org.gnome.clocks.gschema.xml.in
 src/alarm.vala
 src/application.vala
 src/clock.vala


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