[gtksourceview] language-specs: remove translatable strings from new *.lang files



commit 17affd74ade6b94c41306a1b566c06c244e4a6fb
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Sep 6 14:15:16 2017 +0200

    language-specs: remove translatable strings from new *.lang files
    
    Keep only the _section translatable, those make sense to translate and
    they are already translated.
    
    The language names (Swift, Kotlin and Maxima) should not be translated,
    for example if Maxima is translated the user will certainly be confused…
    
    The style names are not very useful to translate, because the user never
    sees those strings! It is used for example by a gedit plugin to
    create/edit style schemes. The style names are probably hard to
    translate anyway, and I'm sure that it is often translated in a way that
    the user doesn't understand what it means… So, since those strings are
    extremely rarely used, and since they are hard to translate without
    context, it is better to not translate them at all. It's like GObject
    properties.
    
    The *.lang file format doesn't support well translatable strings.
    Ideally each translatable string should have its own tag, with the
    translatable="yes" property, the possibility to add a context, etc.
    
    The Kotlin, Maxima and Swift *.lang files will be backported on
    GtkSourceView 3.24, where we must not add new translatable strings. So
    this commit eases the process and will permit to cherry-pick new commits
    for those *.lang files without conflict.
    
    It is planned to remove translatable strings from all *.lang files in
    the future (except the _section), so this is just a first step for the
    new *.lang files that will be backported.

 data/language-specs/kotlin.lang |   34 +++++++++++++++++-----------------
 data/language-specs/maxima.lang |   12 ++++++------
 data/language-specs/swift.lang  |   30 +++++++++++++++---------------
 3 files changed, 38 insertions(+), 38 deletions(-)
---
diff --git a/data/language-specs/kotlin.lang b/data/language-specs/kotlin.lang
index fbfa4a0..b019ec4 100644
--- a/data/language-specs/kotlin.lang
+++ b/data/language-specs/kotlin.lang
@@ -21,7 +21,7 @@
 
 -->
 
-<language id="kotlin" _name="Kotlin" version="2.0" _section="Source">
+<language id="kotlin" name="Kotlin" version="2.0" _section="Source">
 
   <metadata>
     <property name="mimetypes">text/x-kotlin</property>
@@ -32,22 +32,22 @@
   </metadata>
 
   <styles>
-    <style id="builtin"           _name="Builtin Value"           map-to="def:builtin"/>
-    <style id="comment"           _name="Comment"                 map-to="def:comment"/>
-    <style id="declaration"       _name="Declaration"             map-to="def:type"/>
-    <style id="default"           _name="Default"/>
-    <style id="error"             _name="Error"                   map-to="def:error"/>
-    <style id="escaped-character" _name="Escaped Character"       map-to="def:special-char"/>
-    <style id="external"          _name="External"                map-to="def:preprocessor"/>
-    <style id="identifier"        _name="Identifier"              map-to="def:identifier"/>
-    <style id="interpolated"      _name="Interpolated Expression" map-to="def:identifier"/>
-    <style id="keyword"           _name="Keyword"                 map-to="def:keyword"/>
-    <style id="modifier"          _name="Modifier"                map-to="def:type"/>
-    <style id="number"            _name="Number"                  map-to="def:decimal"/>
-    <style id="operator"          _name="Operator"                map-to="def:operator"/>
-    <style id="special"           _name="Special Constant"        map-to="def:special-constant"/>
-    <style id="string"            _name="String"                  map-to="def:string"/>
-    <style id="type"              _name="Data Type"               map-to="def:identifier"/>
+    <style id="builtin"           name="Builtin Value"           map-to="def:builtin"/>
+    <style id="comment"           name="Comment"                 map-to="def:comment"/>
+    <style id="declaration"       name="Declaration"             map-to="def:type"/>
+    <style id="default"           name="Default"/>
+    <style id="error"             name="Error"                   map-to="def:error"/>
+    <style id="escaped-character" name="Escaped Character"       map-to="def:special-char"/>
+    <style id="external"          name="External"                map-to="def:preprocessor"/>
+    <style id="identifier"        name="Identifier"              map-to="def:identifier"/>
+    <style id="interpolated"      name="Interpolated Expression" map-to="def:identifier"/>
+    <style id="keyword"           name="Keyword"                 map-to="def:keyword"/>
+    <style id="modifier"          name="Modifier"                map-to="def:type"/>
+    <style id="number"            name="Number"                  map-to="def:decimal"/>
+    <style id="operator"          name="Operator"                map-to="def:operator"/>
+    <style id="special"           name="Special Constant"        map-to="def:special-constant"/>
+    <style id="string"            name="String"                  map-to="def:string"/>
+    <style id="type"              name="Data Type"               map-to="def:identifier"/>
   </styles>
 
   <definitions>
diff --git a/data/language-specs/maxima.lang b/data/language-specs/maxima.lang
index d23aed9..442e8f3 100644
--- a/data/language-specs/maxima.lang
+++ b/data/language-specs/maxima.lang
@@ -21,7 +21,7 @@ This file is part of GtkSourceView
  along with this library; if not, see <http://www.gnu.org/licenses/>.
 -->
 
-<language id="maxima" _name="Maxima" version="2.0" _section="Scientific">
+<language id="maxima" name="Maxima" version="2.0" _section="Scientific">
   <metadata>
     <property name="mimetypes">text/mxm</property>
     <property name="globs">*.mac;*.MAC;*.dem;*.DEM;*.wxm;*.WXM</property>
@@ -30,11 +30,11 @@ This file is part of GtkSourceView
   </metadata>
 
   <styles>
-    <style id="comment" _name="Comment" map-to="def:comment"/>
-    <style id="string" _name="String" map-to="def:string"/>
-    <style id="builtin" _name="Builtin" map-to="def:builtin"/>
-    <style id="keyword" _name="Keyword" map-to="def:keyword"/>
-    <style id="variable" _name="Variable" map-to="def:identifier"/>
+    <style id="comment" name="Comment" map-to="def:comment"/>
+    <style id="string" name="String" map-to="def:string"/>
+    <style id="builtin" name="Builtin" map-to="def:builtin"/>
+    <style id="keyword" name="Keyword" map-to="def:keyword"/>
+    <style id="variable" name="Variable" map-to="def:identifier"/>
   </styles>
 
   <definitions>
diff --git a/data/language-specs/swift.lang b/data/language-specs/swift.lang
index fd06bce..a615bff 100644
--- a/data/language-specs/swift.lang
+++ b/data/language-specs/swift.lang
@@ -21,7 +21,7 @@
 
 -->
 
-<language id="swift" _name="Swift" version="2.0" _section="Source">
+<language id="swift" name="Swift" version="2.0" _section="Source">
 
   <metadata>
     <property name="mimetypes">text/x-swift</property>
@@ -32,20 +32,20 @@
   </metadata>
 
   <styles>
-    <style id="builtin"           _name="Builtin Value"           map-to="def:builtin"/>
-    <style id="comment"           _name="Comment"                 map-to="def:comment"/>
-    <style id="compiler-control"  _name="Compiler Control"        map-to="def:preprocessor"/>
-    <style id="declaration"       _name="Declaration"             map-to="def:type"/>
-    <style id="escaped-character" _name="Escaped Character"       map-to="def:special-char"/>
-    <style id="external"          _name="External"                map-to="def:preprocessor"/>
-    <style id="interpolated"      _name="Interpolated Expression" map-to="def:identifier"/>
-    <style id="keyword"           _name="Keyword"                 map-to="def:keyword"/>
-    <style id="modifier"          _name="Modifier"                map-to="def:type"/>
-    <style id="number"            _name="Number"                  map-to="def:decimal"/>
-    <style id="operator"          _name="Operator"                map-to="def:operator"/>
-    <style id="special"           _name="Special Constant"        map-to="def:special-constant"/>
-    <style id="string"            _name="String"                  map-to="def:string"/>
-    <style id="type"              _name="Data Type"               map-to="def:identifier"/>
+    <style id="builtin"           name="Builtin Value"           map-to="def:builtin"/>
+    <style id="comment"           name="Comment"                 map-to="def:comment"/>
+    <style id="compiler-control"  name="Compiler Control"        map-to="def:preprocessor"/>
+    <style id="declaration"       name="Declaration"             map-to="def:type"/>
+    <style id="escaped-character" name="Escaped Character"       map-to="def:special-char"/>
+    <style id="external"          name="External"                map-to="def:preprocessor"/>
+    <style id="interpolated"      name="Interpolated Expression" map-to="def:identifier"/>
+    <style id="keyword"           name="Keyword"                 map-to="def:keyword"/>
+    <style id="modifier"          name="Modifier"                map-to="def:type"/>
+    <style id="number"            name="Number"                  map-to="def:decimal"/>
+    <style id="operator"          name="Operator"                map-to="def:operator"/>
+    <style id="special"           name="Special Constant"        map-to="def:special-constant"/>
+    <style id="string"            name="String"                  map-to="def:string"/>
+    <style id="type"              name="Data Type"               map-to="def:identifier"/>
   </styles>
 
   <definitions>


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