[gedit] Fix translations of GSettings and appdata at the same time



commit efe4de9a41cd1ebe131e7c6af3b6827520b47d35
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Sep 25 18:17:04 2013 +0200

    Fix translations of GSettings and appdata at the same time
    
    Use intltool native support for GSettings to translate it,
    which removes the need for INTLTOOL_XML_NOMERGE_RULE and allows
    us to use INTLTOOL_XML_RULE for appdata.

 configure.ac                                       |    4 +-
 data/Makefile.am                                   |    9 +-
 ...ma.xml.in.in => org.gnome.gedit.gschema.xml.in} |  152 ++++++++++----------
 po/POTFILES.in                                     |    2 +-
 po/POTFILES.skip                                   |    1 -
 5 files changed, 83 insertions(+), 85 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6b3f121..b303d8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,7 +163,7 @@ dnl ================================================================
 dnl Gettext stuff.
 dnl ================================================================
 
-IT_PROG_INTLTOOL([0.40.0])
+IT_PROG_INTLTOOL([0.50.1])
 
 AM_GNU_GETTEXT_VERSION([0.18])
 AM_GNU_GETTEXT([external])
@@ -439,7 +439,7 @@ AC_CONFIG_FILES([
 Makefile
 data/gedit.desktop.in
 data/gedit.pc
-data/org.gnome.gedit.gschema.xml.in
+data/org.gnome.gedit.gschema.xml
 data/Makefile
 docs/Makefile
 docs/reference/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 1298d2c..2c16571 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,7 +3,8 @@ desktop_in_files = gedit.desktop.in
 desktop_DATA    = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
- INTLTOOL_XML_NOMERGE_RULE@
+ INTLTOOL_XML_RULE@
+
 appdatadir = $(datadir)/appdata
 dist_appdata_DATA = $(appdata_in_files:.xml.in=.xml)
 appdata_in_files = gedit.appdata.xml.in
@@ -27,8 +28,6 @@ gsettings_ENUM_NAMESPACE = org.gnome.gedit
 gsettings_ENUM_FILES = $(top_srcdir)/gedit/*.h
 gsettings_SCHEMAS = org.gnome.gedit.gschema.xml
 
- INTLTOOL_XML_NOMERGE_RULE@
-
 @GSETTINGS_RULES@
 
 if OS_OSX
@@ -45,11 +44,11 @@ endif
 
 EXTRA_DIST =                                   \
        $(desktop_in_files)                     \
-       gedit.appdata.xml                       \
+       gedit.appdata.xml.in                    \
        $(service_in_files)                     \
        $(man_MANS)                             \
        gedit.pc.in                             \
-       org.gnome.gedit.gschema.xml.in.in       \
+       org.gnome.gedit.gschema.xml.in          \
        gedit.convert                           \
        osx.accels                              \
        osx.css                                 \
diff --git a/data/org.gnome.gedit.gschema.xml.in.in b/data/org.gnome.gedit.gschema.xml.in
similarity index 51%
rename from data/org.gnome.gedit.gschema.xml.in.in
rename to data/org.gnome.gedit.gschema.xml.in
index a7edcd9..cc23a15 100644
--- a/data/org.gnome.gedit.gschema.xml.in.in
+++ b/data/org.gnome.gedit.gschema.xml.in
@@ -27,43 +27,43 @@
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.gedit.preferences.editor" 
path="/org/gnome/gedit/preferences/editor/">
     <key name="use-default-font" type="b">
       <default>true</default>
-      <_summary>Use Default Font</_summary>
-      <_description>Whether to use the system's default fixed width font for editing text instead of a font 
specific to gedit. If this option is turned off, then the font named in the "Editor Font" option will be used 
instead of the system font.</_description>
+      <summary>Use Default Font</summary>
+      <description>Whether to use the system's default fixed width font for editing text instead of a font 
specific to gedit. If this option is turned off, then the font named in the "Editor Font" option will be used 
instead of the system font.</description>
     </key>
     <key name="editor-font" type="s">
       <default l10n="messages">'Monospace 12'</default>
-      <_summary>Editor Font</_summary>
-      <_description>A custom font that will be used for the editing area. This will only take effect if the 
"Use Default Font" option is turned off.</_description>
+      <summary>Editor Font</summary>
+      <description>A custom font that will be used for the editing area. This will only take effect if the 
"Use Default Font" option is turned off.</description>
     </key>
     <key name="scheme" type="s">
       <default>'classic'</default>
-      <_summary>Style Scheme</_summary>
-      <_description>The ID of a GtkSourceView Style Scheme used to color the text.</_description>
+      <summary>Style Scheme</summary>
+      <description>The ID of a GtkSourceView Style Scheme used to color the text.</description>
     </key>
     <key name="create-backup-copy" type="b">
       <default>true</default>
-      <_summary>Create Backup Copies</_summary>
-      <_description>Whether gedit should create backup copies for the files it saves. You can set the backup 
file extension with the "Backup Copy Extension" option.</_description>
+      <summary>Create Backup Copies</summary>
+      <description>Whether gedit should create backup copies for the files it saves. You can set the backup 
file extension with the "Backup Copy Extension" option.</description>
     </key>
     <key name="auto-save" type="b">
       <default>false</default>
-      <_summary>Autosave</_summary>
-      <_description>Whether gedit should automatically save modified files after a time interval. You can 
set the time interval with the "Autosave Interval" option.</_description>
+      <summary>Autosave</summary>
+      <description>Whether gedit should automatically save modified files after a time interval. You can set 
the time interval with the "Autosave Interval" option.</description>
     </key>
     <key name="auto-save-interval" type="u">
       <default>10</default>
-      <_summary>Autosave Interval</_summary>
-      <_description>Number of minutes after which gedit will automatically save modified files. This will 
only take effect if the "Autosave" option is turned on.</_description>
+      <summary>Autosave Interval</summary>
+      <description>Number of minutes after which gedit will automatically save modified files. This will 
only take effect if the "Autosave" option is turned on.</description>
     </key>
     <key name="undo-actions-limit" type="i">
       <default>25</default>
-      <_summary>Undo Actions Limit (DEPRECATED)</_summary>
-      <_description>Maximum number of actions that gedit will be able to undo or redo. Use "-1" for 
unlimited number of actions. Deprecated since 2.12.0</_description>
+      <summary>Undo Actions Limit (DEPRECATED)</summary>
+      <description>Maximum number of actions that gedit will be able to undo or redo. Use "-1" for unlimited 
number of actions. Deprecated since 2.12.0</description>
     </key>
     <key name="max-undo-actions" type="i">
       <default>2000</default>
-      <_summary>Maximum Number of Undo Actions</_summary>
-      <_description>Maximum number of actions that gedit will be able to undo or redo. Use "-1" for 
unlimited number of actions.</_description>
+      <summary>Maximum Number of Undo Actions</summary>
+      <description>Maximum number of actions that gedit will be able to undo or redo. Use "-1" for unlimited 
number of actions.</description>
     </key>
     <key name="wrap-mode" enum="org.gnome.gedit.WrapMode">
       <aliases>
@@ -72,48 +72,48 @@
         <alias value='GTK_WRAP_CHAR' target='char'/>
       </aliases>
       <default>'word'</default>
-      <_summary>Line Wrapping Mode</_summary>
-      <_description>Specifies how to wrap long lines in the editing area. Use "none" for no wrapping, "word" 
for wrapping at word boundaries, and "char" for wrapping at individual character boundaries. Note that the 
values are case-sensitive, so make sure they appear exactly as mentioned here.</_description>
+      <summary>Line Wrapping Mode</summary>
+      <description>Specifies how to wrap long lines in the editing area. Use "none" for no wrapping, "word" 
for wrapping at word boundaries, and "char" for wrapping at individual character boundaries. Note that the 
values are case-sensitive, so make sure they appear exactly as mentioned here.</description>
     </key>
     <key name="tabs-size" type="u">
       <default>8</default>
-      <_summary>Tab Size</_summary>
-      <_description>Specifies the number of spaces that should be displayed instead of Tab 
characters.</_description>
+      <summary>Tab Size</summary>
+      <description>Specifies the number of spaces that should be displayed instead of Tab 
characters.</description>
     </key>
     <key name="insert-spaces" type="b">
       <default>false</default>
-      <_summary>Insert spaces</_summary>
-      <_description>Whether gedit should insert spaces instead of tabs.</_description>
+      <summary>Insert spaces</summary>
+      <description>Whether gedit should insert spaces instead of tabs.</description>
     </key>
     <key name="auto-indent" type="b">
       <default>false</default>
-      <_summary>Automatic indent</_summary>
-      <_description>Whether gedit should enable automatic indentation.</_description>
+      <summary>Automatic indent</summary>
+      <description>Whether gedit should enable automatic indentation.</description>
     </key>
     <key name="display-line-numbers" type="b">
       <default>false</default>
-      <_summary>Display Line Numbers</_summary>
-      <_description>Whether gedit should display line numbers in the editing area.</_description>
+      <summary>Display Line Numbers</summary>
+      <description>Whether gedit should display line numbers in the editing area.</description>
     </key>
     <key name="highlight-current-line" type="b">
       <default>false</default>
-      <_summary>Highlight Current Line</_summary>
-      <_description>Whether gedit should highlight the current line.</_description>
+      <summary>Highlight Current Line</summary>
+      <description>Whether gedit should highlight the current line.</description>
     </key>
     <key name="bracket-matching" type="b">
       <default>false</default>
-      <_summary>Highlight Matching Brackets</_summary>
-      <_description>Whether gedit should highlight matching brackets.</_description>
+      <summary>Highlight Matching Brackets</summary>
+      <description>Whether gedit should highlight matching brackets.</description>
     </key>
     <key name="display-right-margin" type="b">
       <default>false</default>
-      <_summary>Display Right Margin</_summary>
-      <_description>Whether gedit should display the right margin in the editing area.</_description>
+      <summary>Display Right Margin</summary>
+      <description>Whether gedit should display the right margin in the editing area.</description>
     </key>
     <key name="right-margin-position" type="u">
       <default>80</default>
-      <_summary>Right Margin Position</_summary>
-      <_description>Specifies the position of the right margin.</_description>
+      <summary>Right Margin Position</summary>
+      <description>Specifies the position of the right margin.</description>
     </key>
     <key name="smart-home-end" enum="org.gnome.gedit.SmartHomeEnd">
       <aliases>
@@ -123,70 +123,70 @@
         <alias value='ALWAYS' target='always'/>
       </aliases>
       <default>'after'</default>
-      <_summary>Smart Home End</_summary>
-      <_description>Specifies how the cursor moves when the HOME and END keys are pressed. Use "disabled" to 
always move at the start/end of the line, "after" to move to the start/end of the line the first time the 
keys are pressed and to the start/end of the text ignoring whitespaces the second time the keys are pressed, 
"before" to move to the start/end of the text before moving to the start/end of the line and "always" to 
always move to the start/end of the text instead of the start/end of the line.</_description>
+      <summary>Smart Home End</summary>
+      <description>Specifies how the cursor moves when the HOME and END keys are pressed. Use "disabled" to 
always move at the start/end of the line, "after" to move to the start/end of the line the first time the 
keys are pressed and to the start/end of the text ignoring whitespaces the second time the keys are pressed, 
"before" to move to the start/end of the text before moving to the start/end of the line and "always" to 
always move to the start/end of the text instead of the start/end of the line.</description>
     </key>
     <key name="restore-cursor-position" type="b">
       <default>true</default>
-      <_summary>Restore Previous Cursor Position</_summary>
-      <_description>Whether gedit should restore the previous cursor position when a file is 
loaded.</_description>
+      <summary>Restore Previous Cursor Position</summary>
+      <description>Whether gedit should restore the previous cursor position when a file is 
loaded.</description>
     </key>
     <key name="syntax-highlighting" type="b">
       <default>true</default>
-      <_summary>Enable Syntax Highlighting</_summary>
-      <_description>Whether gedit should enable syntax highlighting.</_description>
+      <summary>Enable Syntax Highlighting</summary>
+      <description>Whether gedit should enable syntax highlighting.</description>
     </key>
     <key name="search-highlighting" type="b">
       <default>true</default>
-      <_summary>Enable Search Highlighting</_summary>
-      <_description>Whether gedit should highlight all the occurrences of the searched text.</_description>
+      <summary>Enable Search Highlighting</summary>
+      <description>Whether gedit should highlight all the occurrences of the searched text.</description>
     </key>
     <key name="ensure-trailing-newline" type="b">
       <default>true</default>
-      <_summary>Ensure Trailing Newline</_summary>
-      <_description>Whether gedit will ensure that documents always end with a trailing 
newline.</_description>
+      <summary>Ensure Trailing Newline</summary>
+      <description>Whether gedit will ensure that documents always end with a trailing newline.</description>
     </key>
   </schema>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.gedit.preferences.ui" 
path="/org/gnome/gedit/preferences/ui/">
     <key name="toolbar-visible" type="b">
       <default>true</default>
-      <_summary>Toolbar is Visible</_summary>
-      <_description>Whether the toolbar should be visible in editing windows.</_description>
+      <summary>Toolbar is Visible</summary>
+      <description>Whether the toolbar should be visible in editing windows.</description>
     </key>
     <key name="notebook-show-tabs-mode" enum="org.gnome.gedit.GeditNotebookShowTabsModeType">
       <default>'always'</default>
-      <_summary>Notebook Show Tabs Mode</_summary>
-      <_description>Specifies when to show the notebook tabs. Use "never" to never show the tabs, "always" 
to always show the tabs, and "auto" to show the tabs only when there is more than one tab. Note that the 
values are case-sensitive, so make sure they appear exactly as mentioned here.</_description>
+      <summary>Notebook Show Tabs Mode</summary>
+      <description>Specifies when to show the notebook tabs. Use "never" to never show the tabs, "always" to 
always show the tabs, and "auto" to show the tabs only when there is more than one tab. Note that the values 
are case-sensitive, so make sure they appear exactly as mentioned here.</description>
     </key>
     <key name="statusbar-visible" type="b">
       <default>true</default>
-      <_summary>Status Bar is Visible</_summary>
-      <_description>Whether the status bar at the bottom of editing windows should be visible.</_description>
+      <summary>Status Bar is Visible</summary>
+      <description>Whether the status bar at the bottom of editing windows should be visible.</description>
     </key>
     <key name="side-panel-visible" type="b">
       <default>false</default>
-      <_summary>Side panel is Visible</_summary>
-      <_description>Whether the side panel at the left of editing windows should be visible.</_description>
+      <summary>Side panel is Visible</summary>
+      <description>Whether the side panel at the left of editing windows should be visible.</description>
     </key>
     <key name="bottom-panel-visible" type="b">
       <default>false</default>
     </key>
     <key name="max-recents" type="u">
       <default>5</default>
-      <_summary>Maximum Recent Files</_summary>
-      <_description>Specifies the maximum number of recently opened files that will be displayed in the 
"Recent Files" submenu.</_description>
+      <summary>Maximum Recent Files</summary>
+      <description>Specifies the maximum number of recently opened files that will be displayed in the 
"Recent Files" submenu.</description>
     </key>
   </schema>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.gedit.preferences.print" 
path="/org/gnome/gedit/preferences/print/">
     <key name="print-syntax-highlighting" type="b">
       <default>true</default>
-      <_summary>Print Syntax Highlighting</_summary>
-      <_description>Whether gedit should print syntax highlighting when printing documents.</_description>
+      <summary>Print Syntax Highlighting</summary>
+      <description>Whether gedit should print syntax highlighting when printing documents.</description>
     </key>
     <key name="print-header" type="b">
       <default>true</default>
-      <_summary>Print Header</_summary>
-      <_description>Whether gedit should include a document header when printing documents.</_description>
+      <summary>Print Header</summary>
+      <description>Whether gedit should include a document header when printing documents.</description>
     </key>
     <key name="print-wrap-mode" enum="org.gnome.gedit.WrapMode">
       <aliases>
@@ -195,28 +195,28 @@
         <alias value='GTK_WRAP_CHAR' target='char'/>
       </aliases>
       <default>'word'</default>
-      <_summary>Printing Line Wrapping Mode</_summary>
-      <_description>Specifies how to wrap long lines for printing. Use "none" for no wrapping, "word" for 
wrapping at word boundaries, and "char" for wrapping at individual character boundaries. Note that the values 
are case-sensitive, so make sure they appear exactly as mentioned here.</_description>
+      <summary>Printing Line Wrapping Mode</summary>
+      <description>Specifies how to wrap long lines for printing. Use "none" for no wrapping, "word" for 
wrapping at word boundaries, and "char" for wrapping at individual character boundaries. Note that the values 
are case-sensitive, so make sure they appear exactly as mentioned here.</description>
     </key>
     <key name="print-line-numbers" type="u">
       <default>0</default>
-      <_summary>Print Line Numbers</_summary>
-      <_description>If this value is 0, then no line numbers will be inserted when printing a document. 
Otherwise, gedit will print line numbers every such number of lines.</_description>
+      <summary>Print Line Numbers</summary>
+      <description>If this value is 0, then no line numbers will be inserted when printing a document. 
Otherwise, gedit will print line numbers every such number of lines.</description>
     </key>
     <key name="print-font-body-pango" type="s">
       <default l10n="messages">'Monospace 9'</default>
-      <_summary>Body Font for Printing</_summary>
-      <_description>Specifies the font to use for a document's body when printing documents.</_description>
+      <summary>Body Font for Printing</summary>
+      <description>Specifies the font to use for a document's body when printing documents.</description>
     </key>
     <key name="print-font-header-pango" type="s">
       <default l10n="messages">'Sans 11'</default>
-      <_summary>Header Font for Printing</_summary>
-      <_description>Specifies the font to use for page headers when printing a document. This will only take 
effect if the "Print Header" option is turned on.</_description>
+      <summary>Header Font for Printing</summary>
+      <description>Specifies the font to use for page headers when printing a document. This will only take 
effect if the "Print Header" option is turned on.</description>
     </key>
     <key name="print-font-numbers-pango" type="s">
       <default l10n="messages">'Sans 8'</default>
-      <_summary>Line Number Font for Printing</_summary>
-      <_description>Specifies the font to use for line numbers when printing. This will only take effect if 
the "Print Line Numbers" option is non-zero.</_description>
+      <summary>Line Number Font for Printing</summary>
+      <description>Specifies the font to use for line numbers when printing. This will only take effect if 
the "Print Line Numbers" option is non-zero.</description>
     </key>
   </schema>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.gedit.preferences.encodings" 
path="/org/gnome/gedit/preferences/encodings/">
@@ -232,16 +232,16 @@
            Only recognized encodings are used.
            See http://git.gnome.org/browse/gedit/tree/gedit/gedit-encodings.c#n152 for
            a list of supported encodings -->
-      <_default l10n="messages">['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']</_default>
-      <_summary>Automatically Detected Encodings</_summary>
-      <_description>Sorted list of encodings used by gedit for automatically detecting the encoding of a 
file. "CURRENT" represents the current locale encoding. Only recognized encodings are used.</_description>
+      <default l10n="messages">['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']</default>
+      <summary>Automatically Detected Encodings</summary>
+      <description>Sorted list of encodings used by gedit for automatically detecting the encoding of a 
file. "CURRENT" represents the current locale encoding. Only recognized encodings are used.</description>
     </key>
     <key name="shown-in-menu" type="as">
       <!-- Translators: This is the list of encodings shown by default in the Character Encoding
            menu in open/save file selector. Only recognized encodings are displayed.-->
-      <_default l10n="messages">['ISO-8859-15']</_default>
-      <_summary>Encodings shown in menu</_summary>
-      <_description>List of encodings shown in the Character Encoding menu in open/save file selector. Only 
recognized encodings are used.</_description>
+      <default l10n="messages">['ISO-8859-15']</default>
+      <summary>Encodings shown in menu</summary>
+      <description>List of encodings shown in the Character Encoding menu in open/save file selector. Only 
recognized encodings are used.</description>
     </key>
   </schema>
   <schema id="org.gnome.gedit.state" path="/org/gnome/gedit/state/">
@@ -285,8 +285,8 @@
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.gedit.plugins" path="/org/gnome/gedit/plugins/">
     <key name="active-plugins" type="as">
       <default>[ ACTIVE_PLUGINS@]</default>
-      <_summary>Active plugins</_summary>
-      <_description>List of active plugins. It contains the "Location" of the active plugins. See the 
.gedit-plugin file for obtaining the "Location" of a given plugin.</_description>
+      <summary>Active plugins</summary>
+      <description>List of active plugins. It contains the "Location" of the active plugins. See the 
.gedit-plugin file for obtaining the "Location" of a given plugin.</description>
     </key>
   </schema>
 </schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 551e93b..022af05 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,7 +3,7 @@
 [encoding: UTF-8]
 data/gedit.appdata.xml.in
 data/gedit.desktop.in.in
-data/org.gnome.gedit.gschema.xml.in.in
+[type: gettext/gsettings]data/org.gnome.gedit.gschema.xml.in
 gedit/gedit-app.c
 gedit/gedit-app-osx.c
 gedit/gedit.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index f540f3b..16eb286 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,5 +1,4 @@
 data/gedit.desktop.in
-data/org.gnome.gedit.gschema.xml.in
 gedit/gedit-document-output-stream.c
 gedit/dialogs/gedit-style-scheme-dialog.c
 gedit/dialogs/gedit-style-scheme-dialog.ui


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