[atomix] Made level names translatable
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atomix] Made level names translatable
- Date: Wed, 7 Mar 2018 17:13:36 +0000 (UTC)
commit 7ab69f77a4ae95b558360d91cfa523f50c84c78b
Author: Robert Roth <robert roth off gmail com>
Date: Wed Mar 7 19:13:18 2018 +0200
Made level names translatable
.gitignore | 1 +
data/level/Makefile.am | 52 +++++++++++++---------
...ticacid.atomix.xml => aceticacid.atomix.xml.in} | 0
.../{acetone.atomix.xml => acetone.atomix.xml.in} | 0
.../{butanol.atomix.xml => butanol.atomix.xml.in} | 0
...butane.atomix.xml => cyclobutane.atomix.xml.in} | 0
...ther.atomix.xml => dimethylether.atomix.xml.in} | 0
.../{ethanal.atomix.xml => ethanal.atomix.xml.in} | 0
.../{ethane.atomix.xml => ethane.atomix.xml.in} | 0
.../{ethanol.atomix.xml => ethanol.atomix.xml.in} | 0
...{ethylene.atomix.xml => ethylene.atomix.xml.in} | 0
...{glycerin.atomix.xml => glycerin.atomix.xml.in} | 0
...c-acid.atomix.xml => lactic-acid.atomix.xml.in} | 0
data/level/level.its | 15 +++++++
data/level/level.loc | 11 +++++
...{methanal.atomix.xml => methanal.atomix.xml.in} | 0
.../{methane.atomix.xml => methane.atomix.xml.in} | 0
...{methanol.atomix.xml => methanol.atomix.xml.in} | 0
...{propanal.atomix.xml => propanal.atomix.xml.in} | 0
...ropylene.atomix.xml => propylene.atomix.xml.in} | 0
.../{pyran.atomix.xml => pyran.atomix.xml.in} | 0
...tylen.atomix.xml => transbutylen.atomix.xml.in} | 0
.../{water.atomix.xml => water.atomix.xml.in} | 0
po/POTFILES.in | 38 ++++++++--------
24 files changed, 76 insertions(+), 41 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dbd65dc..57337d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ aclocal.m4
data/atomix.desktop
data/atomix.appdata.xml
data/atomix.appdata.valid
+data/level/*.atomix.xml
ar-lib
autom4te.cache/
config.guess
diff --git a/data/level/Makefile.am b/data/level/Makefile.am
index 8efb89d..dc68ab8 100644
--- a/data/level/Makefile.am
+++ b/data/level/Makefile.am
@@ -1,25 +1,33 @@
leveldir = $(pkgdatadir)/level
-level_files = \
- aceticacid.atomix.xml \
- acetone.atomix.xml \
- butanol.atomix.xml \
- cyclobutane.atomix.xml \
- dimethylether.atomix.xml \
- ethane.atomix.xml \
- ethanal.atomix.xml \
- ethanol.atomix.xml \
- ethylene.atomix.xml \
- glycerin.atomix.xml \
- lactic-acid.atomix.xml \
- methanal.atomix.xml \
- methane.atomix.xml \
- methanol.atomix.xml \
- propanal.atomix.xml \
- propylene.atomix.xml \
- pyran.atomix.xml \
- transbutylen.atomix.xml \
- water.atomix.xml
+level_in_files = \
+ aceticacid.atomix.xml.in \
+ acetone.atomix.xml.in \
+ butanol.atomix.xml.in\
+ cyclobutane.atomix.xml.in \
+ dimethylether.atomix.xml.in \
+ ethane.atomix.xml.in \
+ ethanal.atomix.xml.in \
+ ethanol.atomix.xml.in \
+ ethylene.atomix.xml.in \
+ glycerin.atomix.xml.in \
+ lactic-acid.atomix.xml.in \
+ methanal.atomix.xml.in \
+ methane.atomix.xml.in \
+ methanol.atomix.xml.in \
+ propanal.atomix.xml.in \
+ propylene.atomix.xml.in \
+ pyran.atomix.xml.in \
+ transbutylen.atomix.xml.in \
+ water.atomix.xml.in
-level_DATA = $(level_files) sequence
-EXTRA_DIST = $(level_DATA)
\ No newline at end of file
+level_XML= $(level_in_files:.xml.in=.xml)
+$(level_XML): %.xml: %.xml.in
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
+level_DATA = $(level_XML) sequence
+
+EXTRA_DIST = $(level_in_files) sequence
+
+CLEANFILES = \
+ $(level_XML)
diff --git a/data/level/aceticacid.atomix.xml b/data/level/aceticacid.atomix.xml.in
similarity index 100%
rename from data/level/aceticacid.atomix.xml
rename to data/level/aceticacid.atomix.xml.in
diff --git a/data/level/acetone.atomix.xml b/data/level/acetone.atomix.xml.in
similarity index 100%
rename from data/level/acetone.atomix.xml
rename to data/level/acetone.atomix.xml.in
diff --git a/data/level/butanol.atomix.xml b/data/level/butanol.atomix.xml.in
similarity index 100%
rename from data/level/butanol.atomix.xml
rename to data/level/butanol.atomix.xml.in
diff --git a/data/level/cyclobutane.atomix.xml b/data/level/cyclobutane.atomix.xml.in
similarity index 100%
rename from data/level/cyclobutane.atomix.xml
rename to data/level/cyclobutane.atomix.xml.in
diff --git a/data/level/dimethylether.atomix.xml b/data/level/dimethylether.atomix.xml.in
similarity index 100%
rename from data/level/dimethylether.atomix.xml
rename to data/level/dimethylether.atomix.xml.in
diff --git a/data/level/ethanal.atomix.xml b/data/level/ethanal.atomix.xml.in
similarity index 100%
rename from data/level/ethanal.atomix.xml
rename to data/level/ethanal.atomix.xml.in
diff --git a/data/level/ethane.atomix.xml b/data/level/ethane.atomix.xml.in
similarity index 100%
rename from data/level/ethane.atomix.xml
rename to data/level/ethane.atomix.xml.in
diff --git a/data/level/ethanol.atomix.xml b/data/level/ethanol.atomix.xml.in
similarity index 100%
rename from data/level/ethanol.atomix.xml
rename to data/level/ethanol.atomix.xml.in
diff --git a/data/level/ethylene.atomix.xml b/data/level/ethylene.atomix.xml.in
similarity index 100%
rename from data/level/ethylene.atomix.xml
rename to data/level/ethylene.atomix.xml.in
diff --git a/data/level/glycerin.atomix.xml b/data/level/glycerin.atomix.xml.in
similarity index 100%
rename from data/level/glycerin.atomix.xml
rename to data/level/glycerin.atomix.xml.in
diff --git a/data/level/lactic-acid.atomix.xml b/data/level/lactic-acid.atomix.xml.in
similarity index 100%
rename from data/level/lactic-acid.atomix.xml
rename to data/level/lactic-acid.atomix.xml.in
diff --git a/data/level/level.its b/data/level/level.its
new file mode 100644
index 0000000..109da7f
--- /dev/null
+++ b/data/level/level.its
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!--
+See the gettext documentation for the file format:
+http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html
+-->
+<its:rules xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0"
+ version="2.0">
+ <its:translateRule selector="/level/@_name" translate="yes"/>
+ <its:translateRule selector="//environment" translate="no"/>
+ <its:translateRule selector="///position" translate="no"/>
+ <its:translateRule selector="////tile" translate="no"/>
+ <its:translateRule selector="//scenario" translate="no"/>
+</its:rules>
+
diff --git a/data/level/level.loc b/data/level/level.loc
new file mode 100644
index 0000000..bec965f
--- /dev/null
+++ b/data/level/level.loc
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!--
+See the gettext documentation for the file format:
+http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html
+-->
+<locatingRules>
+ <locatingRule name="AtomixLevel" pattern="*.atomix.xml">
+ <documentRule localName="level" target="level.its"/>
+ </locatingRule>
+</locatingRules>
+
diff --git a/data/level/methanal.atomix.xml b/data/level/methanal.atomix.xml.in
similarity index 100%
rename from data/level/methanal.atomix.xml
rename to data/level/methanal.atomix.xml.in
diff --git a/data/level/methane.atomix.xml b/data/level/methane.atomix.xml.in
similarity index 100%
rename from data/level/methane.atomix.xml
rename to data/level/methane.atomix.xml.in
diff --git a/data/level/methanol.atomix.xml b/data/level/methanol.atomix.xml.in
similarity index 100%
rename from data/level/methanol.atomix.xml
rename to data/level/methanol.atomix.xml.in
diff --git a/data/level/propanal.atomix.xml b/data/level/propanal.atomix.xml.in
similarity index 100%
rename from data/level/propanal.atomix.xml
rename to data/level/propanal.atomix.xml.in
diff --git a/data/level/propylene.atomix.xml b/data/level/propylene.atomix.xml.in
similarity index 100%
rename from data/level/propylene.atomix.xml
rename to data/level/propylene.atomix.xml.in
diff --git a/data/level/pyran.atomix.xml b/data/level/pyran.atomix.xml.in
similarity index 100%
rename from data/level/pyran.atomix.xml
rename to data/level/pyran.atomix.xml.in
diff --git a/data/level/transbutylen.atomix.xml b/data/level/transbutylen.atomix.xml.in
similarity index 100%
rename from data/level/transbutylen.atomix.xml
rename to data/level/transbutylen.atomix.xml.in
diff --git a/data/level/water.atomix.xml b/data/level/water.atomix.xml.in
similarity index 100%
rename from data/level/water.atomix.xml
rename to data/level/water.atomix.xml.in
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8c3cc92..4b01c01 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,24 +1,24 @@
data/atomix.appdata.xml.in
data/atomix.desktop.in
-data/level/aceticacid.atomix.xml
-data/level/acetone.atomix.xml
-data/level/butanol.atomix.xml
-data/level/cyclobutane.atomix.xml
-data/level/dimethylether.atomix.xml
-data/level/ethanal.atomix.xml
-data/level/ethane.atomix.xml
-data/level/ethanol.atomix.xml
-data/level/ethylene.atomix.xml
-data/level/glycerin.atomix.xml
-data/level/lactic-acid.atomix.xml
-data/level/methanal.atomix.xml
-data/level/methane.atomix.xml
-data/level/methanol.atomix.xml
-data/level/propanal.atomix.xml
-data/level/propylene.atomix.xml
-data/level/pyran.atomix.xml
-data/level/transbutylen.atomix.xml
-data/level/water.atomix.xml
+data/level/aceticacid.atomix.xml.in
+data/level/acetone.atomix.xml.in
+data/level/butanol.atomix.xml.in
+data/level/cyclobutane.atomix.xml.in
+data/level/dimethylether.atomix.xml.in
+data/level/ethanal.atomix.xml.in
+data/level/ethane.atomix.xml.in
+data/level/ethanol.atomix.xml.in
+data/level/ethylene.atomix.xml.in
+data/level/glycerin.atomix.xml.in
+data/level/lactic-acid.atomix.xml.in
+data/level/methanal.atomix.xml.in
+data/level/methane.atomix.xml.in
+data/level/methanol.atomix.xml.in
+data/level/propanal.atomix.xml.in
+data/level/propylene.atomix.xml.in
+data/level/pyran.atomix.xml.in
+data/level/transbutylen.atomix.xml.in
+data/level/water.atomix.xml.in
data/ui/interface.ui
src/board-gtk.c
src/level-manager.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]