[gnome-builder] style-schemes: translate using an ITS file
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] style-schemes: translate using an ITS file
- Date: Tue, 27 Mar 2018 20:54:08 +0000 (UTC)
commit eb122fa50c675de568ba8ec08198fc4c8123d4b5
Author: Piotr Drąg <piotrdrag gmail com>
Date: Tue Mar 27 18:18:04 2018 +0200
style-schemes: translate using an ITS file
Closes: https://gitlab.gnome.org/GNOME/gnome-builder/issues/373
.../{builder-dark.xml => builder-dark.style-scheme.xml} | 4 ++--
data/style-schemes/{builder.xml => builder.style-scheme.xml} | 4 ++--
data/style-schemes/its/style-scheme.its | 6 ++++++
data/style-schemes/its/style-scheme.loc | 6 ++++++
data/style-schemes/meson.build | 4 ++--
po/POTFILES.in | 4 ++--
po/meson.build | 5 ++++-
7 files changed, 24 insertions(+), 9 deletions(-)
---
diff --git a/data/style-schemes/builder-dark.xml b/data/style-schemes/builder-dark.style-scheme.xml
similarity index 98%
rename from data/style-schemes/builder-dark.xml
rename to data/style-schemes/builder-dark.style-scheme.xml
index 5e7867865..4f3c6a63e 100644
--- a/data/style-schemes/builder-dark.xml
+++ b/data/style-schemes/builder-dark.style-scheme.xml
@@ -22,10 +22,10 @@
-->
-<style-scheme id="builder-dark" _name="Builder Dark" version="1.0">
+<style-scheme id="builder-dark" name="Builder Dark" version="1.0">
<author>Paolo Borelli, Christian Hergert</author>
- <_description>Dark color scheme for Builder using the Tango color palette</_description>
+ <description>Dark color scheme for Builder using the Tango color palette</description>
<!-- Tango Palette -->
<color name="butter1" value="#fce94f"/>
diff --git a/data/style-schemes/builder.xml b/data/style-schemes/builder.style-scheme.xml
similarity index 98%
rename from data/style-schemes/builder.xml
rename to data/style-schemes/builder.style-scheme.xml
index ac8e4373d..da2c40100 100644
--- a/data/style-schemes/builder.xml
+++ b/data/style-schemes/builder.style-scheme.xml
@@ -19,9 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
-<style-scheme id="builder" _name="Builder" version="1.0">
+<style-scheme id="builder" name="Builder" version="1.0">
<author>Christian Hergert</author>
- <_description>The default color scheme for Builder</_description>
+ <description>The default color scheme for Builder</description>
<!-- Tango Palette -->
<color name="bg1" value="#f6f7f8"/>
diff --git a/data/style-schemes/its/style-scheme.its b/data/style-schemes/its/style-scheme.its
new file mode 100644
index 000000000..bee6d157a
--- /dev/null
+++ b/data/style-schemes/its/style-scheme.its
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
+ <its:translateRule selector="/style-scheme" translate="no"/>
+ <its:translateRule selector="//style-scheme/@name" translate="yes"/>
+ <its:translateRule selector="//style-scheme/description" translate="yes"/>
+</its:rules>
diff --git a/data/style-schemes/its/style-scheme.loc b/data/style-schemes/its/style-scheme.loc
new file mode 100644
index 000000000..fa9170b16
--- /dev/null
+++ b/data/style-schemes/its/style-scheme.loc
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<locatingRules>
+ <locatingRule name="style-scheme" pattern="*.style-scheme.xml">
+ <documentRule localName="style-scheme" target="style-scheme.its"/>
+ </locatingRule>
+</locatingRules>
diff --git a/data/style-schemes/meson.build b/data/style-schemes/meson.build
index 64ea414a0..c50f31a53 100644
--- a/data/style-schemes/meson.build
+++ b/data/style-schemes/meson.build
@@ -1,4 +1,4 @@
install_data([
- 'builder.xml',
- 'builder-dark.xml',
+ 'builder.style-scheme.xml',
+ 'builder-dark.style-scheme.xml',
], install_dir: join_paths(get_option('datadir'), 'gtksourceview-3.0/styles'))
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 77f4f6420..7244d54a1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,8 +13,8 @@ data/gsettings/org.gnome.builder.terminal.gschema.xml
data/gsettings/org.gnome.builder.workbench.gschema.xml
data/org.gnome.Builder.appdata.xml.in
data/org.gnome.Builder.desktop.in.in
-data/style-schemes/builder-dark.xml
-data/style-schemes/builder.xml
+data/style-schemes/builder-dark.style-scheme.xml
+data/style-schemes/builder.style-scheme.xml
src/gstyle/data/palettes/basic.gstyle.xml
src/gstyle/gstyle-color-panel.c
src/gstyle/gstyle-color-plane.c
diff --git a/po/meson.build b/po/meson.build
index 8845932d2..cfac44297 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -3,5 +3,8 @@ i18n.gettext('gnome-builder',
args: [
'--msgid-bugs-address=https://gitlab.gnome.org/GNOME/gnome-builder/issues',
],
- data_dirs: [join_paths(meson.source_root(), 'src/gstyle/data')],
+ data_dirs: [
+ join_paths(meson.source_root(), 'src/gstyle/data'),
+ join_paths(meson.source_root(), 'data/style-schemes')
+ ],
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]