equal
deleted
inserted
replaced
|
1 // i18n.ysl2 |
|
2 |
|
3 |
|
4 template "svg:tspan", mode="extract_i18n" { |
|
5 if "string-length(.) > 0" line { |
|
6 value "."; |
|
7 } |
|
8 } |
|
9 |
|
10 template "svg:text", mode="extract_i18n" { |
|
11 msg { |
|
12 attrib "id" value "@id"; |
|
13 attrib "label" value "@inkscape:label"; |
|
14 apply "svg:*", mode="extract_i18n"; |
|
15 } |
|
16 } |
|
17 |
|
18 const "translatable_texts", "//svg:text[starts-with(@inkscape:label, '_')]"; |
|
19 const "translatable_strings" apply "$translatable_texts", mode="extract_i18n"; |
|
20 |
|
21 emit "preamble:i18n" { |
|
22 const "translations", "ns:GetTranslations($translatable_strings)"; |
|
23 | var translations = { |
|
24 foreach "$translations/*" { |
|
25 | "«local-name()»":{ |
|
26 /* TODO */ |
|
27 | }`if "position()!=last()" > ,` |
|
28 } |
|
29 | }; |
|
30 | |
|
31 |
|
32 } |