[totem] build: Use intltool to translate GSettings schema files directly



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

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

 configure.ac                                       |    8 ++--
 data/Makefile.am                                   |    3 -
 ...ma.xml.in.in => org.gnome.totem.gschema.xml.in} |   50 ++++++++++----------
 po/POTFILES.in                                     |    6 +-
 src/plugins/opensubtitles/Makefile.am              |    5 +--
 ...ome.totem.plugins.opensubtitles.gschema.xml.in} |    4 +-
 src/plugins/pythonconsole/Makefile.am              |    5 +--
 ...ome.totem.plugins.pythonconsole.gschema.xml.in} |    4 +-
 8 files changed, 38 insertions(+), 47 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 925c9f4..51d9ca7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ dnl Add the languages which your application supports to po/LINGUAS
 GETTEXT_PACKAGE=totem
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name])
 AC_SUBST(GETTEXT_PACKAGE)
-IT_PROG_INTLTOOL([0.40.0])
+IT_PROG_INTLTOOL([0.50.1])
 
 # User Documentation
 YELP_HELP_INIT
@@ -562,7 +562,7 @@ src/plugins/gromit/Makefile
 src/plugins/lirc/Makefile
 src/plugins/media-player-keys/Makefile
 src/plugins/opensubtitles/Makefile
-src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in
+src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml
 src/plugins/properties/Makefile
 src/plugins/recent/Makefile
 src/plugins/rotation/Makefile
@@ -571,14 +571,14 @@ src/plugins/skipto/Makefile
 src/plugins/samplepython/Makefile
 src/plugins/sample-vala/Makefile
 src/plugins/pythonconsole/Makefile
-src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in
+src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml
 src/plugins/brasero-disc-recorder/Makefile
 src/plugins/chapters/Makefile
 src/plugins/zeitgeist-dp/Makefile
 src/plugins/vimeo/Makefile
 src/backend/Makefile
 data/Makefile
-data/org.gnome.totem.gschema.xml.in
+data/org.gnome.totem.gschema.xml
 data/org.gnome.Totem.desktop.in.in
 data/totem.pc
 data/appdata/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 0cf72cc..aa10e60 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -116,9 +116,6 @@ CLEANFILES += \
 gsettings_ENUM_NAMESPACE = org.gnome.totem
 gsettings_ENUM_FILES = $(top_srcdir)/src/*.h $(top_srcdir)/src/backend/*.h
 gsettings_SCHEMAS = org.gnome.totem.gschema.xml
-CLEANFILES += $(gsettings_SCHEMAS)
-
- INTLTOOL_XML_NOMERGE_RULE@
 @GSETTINGS_RULES@
 
 convertdir = $(datadir)/GConf/gsettings
diff --git a/data/org.gnome.totem.gschema.xml.in.in b/data/org.gnome.totem.gschema.xml.in
similarity index 52%
rename from data/org.gnome.totem.gschema.xml.in.in
rename to data/org.gnome.totem.gschema.xml.in
index dc48ee6..b4236d0 100644
--- a/data/org.gnome.totem.gschema.xml.in.in
+++ b/data/org.gnome.totem.gschema.xml.in
@@ -3,41 +3,41 @@
        <schema id="org.gnome.totem" path="/org/gnome/Totem/" gettext-domain="@GETTEXT_PACKAGE@">
                <key name="brightness" type="i">
                        <default>32767</default>
-                       <_summary>The brightness of the video</_summary>
+                       <summary>The brightness of the video</summary>
                </key>
                <key name="contrast" type="i">
                        <default>32767</default>
-                       <_summary>The contrast of the video</_summary>
+                       <summary>The contrast of the video</summary>
                </key>
                <key name="hue" type="i">
                        <default>32767</default>
-                       <_summary>The hue of the video</_summary>
+                       <summary>The hue of the video</summary>
                </key>
                <key name="saturation" type="i">
                        <default>32767</default>
-                       <_summary>The saturation of the video</_summary>
+                       <summary>The saturation of the video</summary>
                </key>
                <key name="repeat" type="b">
                        <default>false</default>
-                       <_summary>Repeat mode</_summary>
+                       <summary>Repeat mode</summary>
                </key>
                <key name="disable-deinterlacing" type="b">
                        <default>false</default>
-                       <_summary>Whether to disable deinterlacing for interlaced movies</_summary>
+                       <summary>Whether to disable deinterlacing for interlaced movies</summary>
                </key>
                <key name="audio-output-type" enum="org.gnome.totem.BvwAudioOutputType">
                        <default>'stereo'</default>
-                       <_summary>Type of audio output to use</_summary>
+                       <summary>Type of audio output to use</summary>
                </key>
                <key name="network-buffer-threshold" type="d">
                        <default>2</default>
-                       <_summary>Network buffering threshold</_summary>
-                       <_description>Amount of data to buffer for network streams before starting to display 
the stream (in seconds).</_description>
+                       <summary>Network buffering threshold</summary>
+                       <description>Amount of data to buffer for network streams before starting to display 
the stream (in seconds).</description>
                </key>
                <key name="subtitle-font" type="s">
                        <default>'Sans Bold 20'</default>
-                       <_summary>Subtitle font</_summary>
-                       <_description>Pango font description for subtitle rendering.</_description>
+                       <summary>Subtitle font</summary>
+                       <description>Pango font description for subtitle rendering.</description>
                </key>
                <key name="subtitle-encoding" type="s">
                        <default l10n="messages" context="subtitle-encoding">
@@ -46,44 +46,44 @@
                                     encoding for fansub subtitles in your language. File a bug
                                     against Totem, and leave UTF-8 as the default if in doubt. -->
                                'UTF-8'</default>
-                       <_summary>Subtitle encoding</_summary>
-                       <_description>Encoding character set for subtitle.</_description>
+                       <summary>Subtitle encoding</summary>
+                       <description>Encoding character set for subtitle.</description>
                </key>
                <key name="open-uri" type="s">
                        <default>''</default>
-                       <_summary>Default location for the "Open..." dialogs</_summary>
-                       <_description>Default location for the "Open..." dialogs. Default is the current 
directory.</_description>
+                       <summary>Default location for the "Open..." dialogs</summary>
+                       <description>Default location for the "Open..." dialogs. Default is the current 
directory.</description>
                </key>
                <key name="screenshot-save-uri" type="s">
                        <default>''</default>
-                       <_summary>Default location for the "Take Screenshot" dialogs</_summary>
-                       <_description>Default location for the "Take Screenshot" dialogs. Default is the 
Pictures directory.</_description>
+                       <summary>Default location for the "Take Screenshot" dialogs</summary>
+                       <description>Default location for the "Take Screenshot" dialogs. Default is the 
Pictures directory.</description>
                </key>
                <key name="disable-user-plugins" type="b">
                        <default>false</default>
-                       <_summary>Whether to disable the plugins in the user's home directory</_summary>
+                       <summary>Whether to disable the plugins in the user's home directory</summary>
                </key>
                <key name="disable-keyboard-shortcuts" type="b">
                        <default>false</default>
-                       <_summary>Whether to disable the keyboard shortcuts</_summary>
+                       <summary>Whether to disable the keyboard shortcuts</summary>
                </key>
                <key name="autoload-subtitles" type="b">
                        <default>false</default>
-                       <_summary>Whether to autoload text subtitle files when a movie is loaded</_summary>
+                       <summary>Whether to autoload text subtitle files when a movie is loaded</summary>
                </key>
                <key name="autoload-chapters" type="b">
                        <default>true</default>
-                       <_summary>Whether to autoload external chapter files when a movie is loaded</_summary>
+                       <summary>Whether to autoload external chapter files when a movie is loaded</summary>
                </key>
                <key name="active-plugins" type="as">
                        
<default>['skipto','chapters','screenshot','media_player_keys','screensaver','movie-properties','save-file']</default>
-                       <_summary>Active plugins list</_summary>
-                       <_description>A list of the names of the plugins which are currently active (loaded 
and running).</_description>
+                       <summary>Active plugins list</summary>
+                       <description>A list of the names of the plugins which are currently active (loaded 
and running).</description>
                </key>
                <key name="filesystem-paths" type="as">
                        <default>[]</default>
-                       <_summary>Directories to show</_summary>
-                       <_description>Directories to show in the browse interface, none by 
default</_description>
+                       <summary>Directories to show</summary>
+                       <description>Directories to show in the browse interface, none by 
default</description>
                </key>
        </schema>
 </schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7a677b9..2e2f007 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -4,7 +4,7 @@
 data/appdata/org.gnome.Totem.appdata.xml.in
 [type: gettext/glade]data/controls.ui
 data/org.gnome.Totem.desktop.in.in.in
-data/org.gnome.totem.gschema.xml.in.in
+[type: gettext/gsettings]data/org.gnome.totem.gschema.xml.in
 [type: gettext/glade]data/playlist.ui
 [type: gettext/glade]data/preferences.ui
 [type: gettext/glade]data/properties.ui
@@ -57,10 +57,10 @@ src/plugins/lirc/totem-lirc.c
 [type: gettext/ini]src/plugins/opensubtitles/opensubtitles.plugin.in
 src/plugins/opensubtitles/opensubtitles.py
 [type: gettext/glade]src/plugins/opensubtitles/opensubtitles.ui
-src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in.in
+[type: gettext/gsettings]src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in
 [type: gettext/ini]src/plugins/properties/movie-properties.plugin.in
 src/plugins/properties/totem-movie-properties.c
-src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in.in
+[type: gettext/gsettings]src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in
 [type: gettext/ini]src/plugins/pythonconsole/pythonconsole.plugin.in
 src/plugins/pythonconsole/pythonconsole.py
 [type: gettext/ini]src/plugins/recent/recent.plugin.in
diff --git a/src/plugins/opensubtitles/Makefile.am b/src/plugins/opensubtitles/Makefile.am
index 116fd77..62f737c 100644
--- a/src/plugins/opensubtitles/Makefile.am
+++ b/src/plugins/opensubtitles/Makefile.am
@@ -9,11 +9,8 @@ uidir = $(plugindir)
 ui_DATA = opensubtitles.ui
 EXTRA_DIST += $(ui_DATA)
 
- INTLTOOL_XML_NOMERGE_RULE@
- GSETTINGS_RULES@
-
 gsettings_SCHEMAS = org.gnome.totem.plugins.opensubtitles.gschema.xml
-CLEANFILES += $(gsettings_SCHEMAS)
+ GSETTINGS_RULES@
 
 convertdir = $(datadir)/GConf/gsettings
 convert_DATA = opensubtitles.convert
diff --git a/src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in.in 
b/src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in
similarity index 68%
rename from src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in.in
rename to src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in
index 3f0bc80..aca65ce 100644
--- a/src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in.in
+++ b/src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in
@@ -3,8 +3,8 @@
        <schema id="org.gnome.totem.plugins.opensubtitles" path="/org/gnome/Totem/opensubtitles/" 
gettext-domain="@GETTEXT_PACKAGE@">
                <key name="language" type="s">
                        <default>''</default>
-                       <_summary>Subtitle language</_summary>
-                       <_description>The language to search for subtitles for movies in.</_description>
+                       <summary>Subtitle language</summary>
+                       <description>The language to search for subtitles for movies in.</description>
                </key>
        </schema>
 </schemalist>
diff --git a/src/plugins/pythonconsole/Makefile.am b/src/plugins/pythonconsole/Makefile.am
index 9627ea9..be224a6 100644
--- a/src/plugins/pythonconsole/Makefile.am
+++ b/src/plugins/pythonconsole/Makefile.am
@@ -5,11 +5,8 @@ plugin_PYTHON = pythonconsole.py console.py
 
 plugin_in_files = pythonconsole.plugin.in
 
- INTLTOOL_XML_NOMERGE_RULE@
- GSETTINGS_RULES@
-
 gsettings_SCHEMAS = org.gnome.totem.plugins.pythonconsole.gschema.xml
-CLEANFILES += $(gsettings_SCHEMAS)
+ GSETTINGS_RULES@
 
 convertdir = $(datadir)/GConf/gsettings
 convert_DATA = pythonconsole.convert
diff --git a/src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in.in 
b/src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in
similarity index 56%
rename from src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in.in
rename to src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in
index 0585782..43ac9c9 100644
--- a/src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in.in
+++ b/src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in
@@ -3,8 +3,8 @@
        <schema id="org.gnome.totem.plugins.pythonconsole" path="/org/gnome/Totem/pythonconsole/" 
gettext-domain="@GETTEXT_PACKAGE@">
                <key name="rpdb2-password" type="s">
                        <default>''</default>
-                       <_summary>rpdb2 password</_summary>
-                       <_description>A password to protect the rpdb2 server for debugging Totem from 
unauthorized remote access. If this is empty, a default of 'totem' will be used.</_description>
+                       <summary>rpdb2 password</summary>
+                       <description>A password to protect the rpdb2 server for debugging Totem from 
unauthorized remote access. If this is empty, a default of 'totem' will be used.</description>
                </key>
        </schema>
 </schemalist>


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