[gtksourceview/wip/dont-use-intltool-2: 1/2] i18n: use itstool to extract strings from style scheme files



commit 65409a5392fea41324f40c472f20e7908de9804c
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Aug 12 14:40:42 2015 +0200

    i18n: use itstool to extract strings from style scheme files

 data/styles/Makefile.am |    9 +++++-
 data/styles/styles.its  |    8 +++++
 data/styles/styles.pot  |   81 +++++++++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in          |    8 +----
 4 files changed, 98 insertions(+), 8 deletions(-)
---
diff --git a/data/styles/Makefile.am b/data/styles/Makefile.am
index 95727a3..709bb1d 100644
--- a/data/styles/Makefile.am
+++ b/data/styles/Makefile.am
@@ -12,6 +12,13 @@ STYLES =                     \
 stylesdir = $(datadir)/gtksourceview-3.0/styles
 styles_DATA = $(STYLES) styles.rng
 
-EXTRA_DIST = $(styles_DATA) check-style.sh
+EXTRA_DIST =           \
+       $(styles_DATA)  \
+       check-style.sh  \
+       styles.its      \
+       styles.pot
+
+$(srcdir)/styles.pot: $(STYLES) styles.its
+       $(ITSTOOL) -i styles.its -o $@ $(STYLES)
 
 -include $(top_srcdir)/git.mk
diff --git a/data/styles/styles.its b/data/styles/styles.its
new file mode 100644
index 0000000..73922a7
--- /dev/null
+++ b/data/styles/styles.its
@@ -0,0 +1,8 @@
+<its:rules
+  xmlns:its="http://www.w3.org/2005/11/its";
+  version="1.0">
+
+  <its:translateRule translate="no" selector="/style-scheme" />
+  <its:translateRule translate="yes" selector="//@_name" />
+  <its:translateRule translate="yes" selector="//_description" />
+</its:rules>
diff --git a/data/styles/styles.pot b/data/styles/styles.pot
new file mode 100644
index 0000000..9b501fd
--- /dev/null
+++ b/data/styles/styles.pot
@@ -0,0 +1,81 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2015-10-03 15:39+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL ADDRESS>\n"
+"Language-Team: LANGUAGE <LL li org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. (itstool) path: classic.xml/style-scheme _name
+#: classic.xml:24
+msgid "Classic"
+msgstr ""
+
+#. (itstool) path: style-scheme/_description
+#: classic.xml:26
+msgid "Classic color scheme"
+msgstr ""
+
+#. (itstool) path: cobalt.xml/style-scheme _name
+#: cobalt.xml:26
+msgid "Cobalt"
+msgstr ""
+
+#. (itstool) path: style-scheme/_description
+#: cobalt.xml:28
+msgid "Blue based color scheme"
+msgstr ""
+
+#. (itstool) path: kate.xml/style-scheme _name
+#: kate.xml:24
+msgid "Kate"
+msgstr ""
+
+#. (itstool) path: style-scheme/_description
+#: kate.xml:26
+msgid "Color scheme used in the Kate text editor"
+msgstr ""
+
+#. (itstool) path: oblivion.xml/style-scheme _name
+#: oblivion.xml:25
+msgid "Oblivion"
+msgstr ""
+
+#. (itstool) path: style-scheme/_description
+#: oblivion.xml:28
+msgid "Dark color scheme using the Tango color palette"
+msgstr ""
+
+#. (itstool) path: solarized-dark.xml/style-scheme _name
+#: solarized-dark.xml:24
+msgid "Solarized Dark"
+msgstr ""
+
+#. (itstool) path: style-scheme/_description
+#: solarized-dark.xml:26
+msgid "Color scheme using Solarized dark color palette"
+msgstr ""
+
+#. (itstool) path: solarized-light.xml/style-scheme _name
+#: solarized-light.xml:24
+msgid "Solarized Light"
+msgstr ""
+
+#. (itstool) path: style-scheme/_description
+#: solarized-light.xml:26
+msgid "Color scheme using Solarized light color palette"
+msgstr ""
+
+#. (itstool) path: tango.xml/style-scheme _name
+#: tango.xml:24
+msgid "Tango"
+msgstr ""
+
+#. (itstool) path: style-scheme/_description
+#: tango.xml:26
+msgid "Color scheme using Tango color palette"
+msgstr ""
+
diff --git a/po/POTFILES.in b/po/POTFILES.in
index db1b0c4..458dba6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,12 +1,6 @@
 data/glade/gtksourceview.xml.in
 data/language-specs/language-specs.pot
-data/styles/classic.xml
-data/styles/cobalt.xml
-data/styles/kate.xml
-data/styles/oblivion.xml
-data/styles/solarized-dark.xml
-data/styles/solarized-light.xml
-data/styles/tango.xml
+data/styles/styles.pot
 gtksourceview/completion-providers/words/gtksourcecompletionwords.c
 gtksourceview/gtksourcebuffer.c
 gtksourceview/gtksourcebufferinputstream.c


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