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



commit 74926c1a651d36734ec833b7284d4f1c8454bdd9
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 |   12 +++++++++++-
 data/styles/styles.its  |    8 ++++++++
 po/POTFILES.in          |    8 +-------
 3 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/data/styles/Makefile.am b/data/styles/Makefile.am
index 95727a3..8116c81 100644
--- a/data/styles/Makefile.am
+++ b/data/styles/Makefile.am
@@ -12,6 +12,16 @@ 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: $(STYLES) styles.its
+       $(ITSTOOL) -i styles.its -o $@ $(STYLES)
+
+all-local: styles.pot
+
+CLEANFILES = styles.pot
 
 -include $(top_srcdir)/git.mk
diff --git a/data/styles/styles.its b/data/styles/styles.its
new file mode 100644
index 0000000..5960cac
--- /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/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]