Merge lp:~dpm/intltool/add-qtdesigner-support into lp:intltool
- add-qtdesigner-support
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 744 | ||||
Proposed branch: | lp:~dpm/intltool/add-qtdesigner-support | ||||
Merge into: | lp:intltool | ||||
Diff against target: |
392 lines (+306/-1) 7 files modified
doc/intltool-extract.8 (+2/-0) intltool-extract.in (+73/-1) tests/cases/Makefile.am (+2/-0) tests/cases/extract-qtdesigner.ui (+210/-0) tests/results/Makefile.am (+1/-0) tests/results/extract-qtdesigner.ui.h (+13/-0) tests/selftest.pl.in (+5/-0) |
||||
To merge this branch: | bzr merge lp:~dpm/intltool/add-qtdesigner-support | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Данило Шеган | Approve | ||
Review via email: mp+145112@code.launchpad.net |
Commit message
Description of the change
This branch adds support for extracting translatable strings from Qt Designer files through a new gettext/qtdesigner type (lp:953342).
Notes: the regexp used to extract the strings from the XML attributes of the <string> tag used by Qt .ui files is similar to the one used to extraxt strings from Glade .ui files in the sense that it relies on those tags being present in a particular order.
- 739. By David Planella
-
Updated links to Qt translation format specs
- 740. By David Planella
-
Updated test case for Qt Designer extraction: no escapes
- 741. By David Planella
-
Added Qt Designer .ui file extraction support using the internal XML parser
- 742. By David Planella
-
Updated man page with the new gettext/qtdesigner type for extraction
- 743. By David Planella
-
Added files for gettext/qtdesigner testcase and result to the corresponding Makefile.am files
David Planella (dpm) wrote : | # |
Ok, addressed the two points above and re-submitted MP.
Rohan Garg (rohangarg) wrote : | # |
Any ETA when this is going to land? This also fixes bug 1234106 for Kubuntu so it'll be nice to have it land soon.
Данило Шеган (danilo) wrote : | # |
Hi David (and other interested parties): sorry for taking this long to take another look at this. It somehow slipped my radar (so thanks everyone for reminding me).
The branch looks pretty good. Since you are also doing special whitespace handling, it would be good to have at least one of the strings in a test case actually demonstrate that. Since I've taken this long to review it, I'll do this myself.
I'll be merging this branch, but I won't be releasing it until we clarify a few other things. I am most worried about the escaping support. One of the examples in the test case is an HTML string, but ideally, that'd be unescaped in PO files (for translators' benefit). Where's the code that actually reads MO files? Is there any good example code for me to check out to see how would everything fit together?
Preview Diff
1 | === modified file 'doc/intltool-extract.8' | |||
2 | --- doc/intltool-extract.8 2011-10-08 19:24:23 +0000 | |||
3 | +++ doc/intltool-extract.8 2013-05-10 09:59:25 +0000 | |||
4 | @@ -54,6 +54,8 @@ | |||
5 | 54 | "gettext/scheme" (.scm) | 54 | "gettext/scheme" (.scm) |
6 | 55 | .br | 55 | .br |
7 | 56 | "gettext/xml" (Generic XML file) | 56 | "gettext/xml" (Generic XML file) |
8 | 57 | .br | ||
9 | 58 | "gettext/qtdesigner" (Qt Designer .ui files) | ||
10 | 57 | .IP "\fB\-v\fR" 4 | 59 | .IP "\fB\-v\fR" 4 |
11 | 58 | .PD 0 | 60 | .PD 0 |
12 | 59 | .IP "\fB\--version\fR" 4 | 61 | .IP "\fB\--version\fR" 4 |
13 | 60 | 62 | ||
14 | === modified file 'intltool-extract.in' | |||
15 | --- intltool-extract.in 2012-08-23 03:39:02 +0000 | |||
16 | +++ intltool-extract.in 2013-05-10 09:59:25 +0000 | |||
17 | @@ -165,7 +165,7 @@ | |||
18 | 165 | "gettext/glade", "gettext/ini", "gettext/keys" | 165 | "gettext/glade", "gettext/ini", "gettext/keys" |
19 | 166 | "gettext/rfc822deb", "gettext/schemas", | 166 | "gettext/rfc822deb", "gettext/schemas", |
20 | 167 | "gettext/gsettings", "gettext/xml", "gettext/quoted", | 167 | "gettext/gsettings", "gettext/xml", "gettext/quoted", |
22 | 168 | "gettext/quotedxml", "gettext/tlk" | 168 | "gettext/quotedxml", "gettext/tlk", "gettext/qtdesigner" |
23 | 169 | -l, --local Writes output into current working directory | 169 | -l, --local Writes output into current working directory |
24 | 170 | (conflicts with --update) | 170 | (conflicts with --update) |
25 | 171 | --update Writes output into the same directory the source file | 171 | --update Writes output into the same directory the source file |
26 | @@ -225,6 +225,7 @@ | |||
27 | 225 | &type_quoted if $gettext_type eq "quoted"; | 225 | &type_quoted if $gettext_type eq "quoted"; |
28 | 226 | &type_quotedxml if $gettext_type eq "quotedxml"; | 226 | &type_quotedxml if $gettext_type eq "quotedxml"; |
29 | 227 | &type_tlk if $gettext_type eq "tlk"; | 227 | &type_tlk if $gettext_type eq "tlk"; |
30 | 228 | &type_qtdesigner if $gettext_type eq "qtdesigner"; | ||
31 | 228 | } | 229 | } |
32 | 229 | 230 | ||
33 | 230 | sub entity_decode_minimal | 231 | sub entity_decode_minimal |
34 | @@ -828,6 +829,77 @@ | |||
35 | 828 | } | 829 | } |
36 | 829 | } | 830 | } |
37 | 830 | 831 | ||
38 | 832 | # Parse the tree as returned by readXml() for Qt Designer .ui files. | ||
39 | 833 | sub traverse_qtdesigner { | ||
40 | 834 | my $nodename = shift; | ||
41 | 835 | my $content = shift; | ||
42 | 836 | my @list = @{ $content }; | ||
43 | 837 | my $attrs_ref = shift @list; | ||
44 | 838 | my %attrs = %{ $attrs_ref }; | ||
45 | 839 | if ($nodename eq 'string' and !exists $attrs{"notr"}) { | ||
46 | 840 | # Preserve whitespace. Deal with it ourselves, below. | ||
47 | 841 | my $message = getXMLstring($content, 1); | ||
48 | 842 | |||
49 | 843 | # We strip leading and trailing whitespace but | ||
50 | 844 | # preserve whitespace within (e.g. newlines) | ||
51 | 845 | $message =~ s/^\s+//; | ||
52 | 846 | $message =~ s/\s+$//; | ||
53 | 847 | |||
54 | 848 | my $context = $attrs{'comment'}; | ||
55 | 849 | # Remove enclosing quotes from msgctxt | ||
56 | 850 | $context =~ s/^["'](.*)["']/$1/ if $context; | ||
57 | 851 | $message = $context . "\004" . $message if $context; | ||
58 | 852 | add_message($message); | ||
59 | 853 | my $comment = $attrs{'extracomment'}; | ||
60 | 854 | # Remove enclosing quotes from developer comments | ||
61 | 855 | $comment =~ s/^["'](.*)["']/$1/ if $comment; | ||
62 | 856 | $comments{$message} = $comment if $comment; | ||
63 | 857 | } else { | ||
64 | 858 | my $index = 0; | ||
65 | 859 | while (scalar(@list) > 1) { | ||
66 | 860 | my $type = shift @list; | ||
67 | 861 | my $content = shift @list; | ||
68 | 862 | if (!$type || "$type" eq "1") { | ||
69 | 863 | next; | ||
70 | 864 | } else { | ||
71 | 865 | traverse_qtdesigner($type, $content); | ||
72 | 866 | } | ||
73 | 867 | } | ||
74 | 868 | } | ||
75 | 869 | } | ||
76 | 870 | |||
77 | 871 | sub type_qtdesigner { | ||
78 | 872 | ### For translatable Qt Designer XML files ### | ||
79 | 873 | # | ||
80 | 874 | # Specs: | ||
81 | 875 | # | ||
82 | 876 | # - http://qt-project.org/doc/qt-5.0/qtlinguist/linguist-ts-file-format.html | ||
83 | 877 | # - http://qt-project.org/doc/qt-5.0/qtdesigner/designer-ui-file-format.html | ||
84 | 878 | # | ||
85 | 879 | # <string> tag attributes: | ||
86 | 880 | # | ||
87 | 881 | # notr="true" means the string is not translatable | ||
88 | 882 | # extracomment maps to a developer comment in gettext | ||
89 | 883 | # comment corresponds to "disambiguation" in the Qt Linguist API, and maps | ||
90 | 884 | # to msgctxt in gettext | ||
91 | 885 | # | ||
92 | 886 | # Example: | ||
93 | 887 | # | ||
94 | 888 | # <string comment="Button" extracomment="TRANSLATORS: refers to the | ||
95 | 889 | # action of accepting something">Ok</string> | ||
96 | 890 | |||
97 | 891 | my $tree = readXml($input); | ||
98 | 892 | my @tree_nodes = @{ $tree }; | ||
99 | 893 | my $node = shift @tree_nodes; | ||
100 | 894 | while (!$node || "$node" eq "1") { | ||
101 | 895 | shift @tree_nodes; | ||
102 | 896 | $node = shift @tree_nodes; | ||
103 | 897 | } | ||
104 | 898 | my $content = shift @tree_nodes; | ||
105 | 899 | traverse_qtdesigner($node, $content); | ||
106 | 900 | |||
107 | 901 | } | ||
108 | 902 | |||
109 | 831 | sub type_glade { | 903 | sub type_glade { |
110 | 832 | ### For translatable Glade XML files ### | 904 | ### For translatable Glade XML files ### |
111 | 833 | 905 | ||
112 | 834 | 906 | ||
113 | === modified file 'tests/cases/Makefile.am' | |||
114 | --- tests/cases/Makefile.am 2011-10-08 18:08:58 +0000 | |||
115 | +++ tests/cases/Makefile.am 2013-05-10 09:59:25 +0000 | |||
116 | @@ -16,6 +16,7 @@ | |||
117 | 16 | extract8.glade \ | 16 | extract8.glade \ |
118 | 17 | extract9.po \ | 17 | extract9.po \ |
119 | 18 | extract9.xml.in \ | 18 | extract9.xml.in \ |
120 | 19 | extract-qtdesigner.ui \ | ||
121 | 19 | fr.po \ | 20 | fr.po \ |
122 | 20 | fr_BE.po \ | 21 | fr_BE.po \ |
123 | 21 | fr_FR.po \ | 22 | fr_FR.po \ |
124 | @@ -58,6 +59,7 @@ | |||
125 | 58 | extract14.xml.in.h \ | 59 | extract14.xml.in.h \ |
126 | 59 | extract9.xml \ | 60 | extract9.xml \ |
127 | 60 | extract9.xml.in.h \ | 61 | extract9.xml.in.h \ |
128 | 62 | extract-qtdesigner.ui.h \ | ||
129 | 61 | gsettings.gschema.xml.h \ | 63 | gsettings.gschema.xml.h \ |
130 | 62 | iso88591text.xml.in.h \ | 64 | iso88591text.xml.in.h \ |
131 | 63 | merge-cdata.xml \ | 65 | merge-cdata.xml \ |
132 | 64 | 66 | ||
133 | === added file 'tests/cases/extract-qtdesigner.ui' | |||
134 | --- tests/cases/extract-qtdesigner.ui 1970-01-01 00:00:00 +0000 | |||
135 | +++ tests/cases/extract-qtdesigner.ui 2013-05-10 09:59:25 +0000 | |||
136 | @@ -0,0 +1,210 @@ | |||
137 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
138 | 2 | <ui version="4.0"> | ||
139 | 3 | <class>main</class> | ||
140 | 4 | <widget class="QWidget" name="main"> | ||
141 | 5 | <property name="geometry"> | ||
142 | 6 | <rect> | ||
143 | 7 | <x>0</x> | ||
144 | 8 | <y>0</y> | ||
145 | 9 | <width>640</width> | ||
146 | 10 | <height>457</height> | ||
147 | 11 | </rect> | ||
148 | 12 | </property> | ||
149 | 13 | <property name="sizePolicy"> | ||
150 | 14 | <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||
151 | 15 | <horstretch>0</horstretch> | ||
152 | 16 | <verstretch>0</verstretch> | ||
153 | 17 | </sizepolicy> | ||
154 | 18 | </property> | ||
155 | 19 | <property name="windowTitle"> | ||
156 | 20 | <string>Form</string> | ||
157 | 21 | </property> | ||
158 | 22 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
159 | 23 | <property name="spacing"> | ||
160 | 24 | <number>0</number> | ||
161 | 25 | </property> | ||
162 | 26 | <property name="margin"> | ||
163 | 27 | <number>0</number> | ||
164 | 28 | </property> | ||
165 | 29 | <item> | ||
166 | 30 | <widget class="QTabWidget" name="tabWidget"> | ||
167 | 31 | <property name="currentIndex"> | ||
168 | 32 | <number>0</number> | ||
169 | 33 | </property> | ||
170 | 34 | <widget class="QWidget" name="tabWelcome"> | ||
171 | 35 | <attribute name="title"> | ||
172 | 36 | <string notr="true">Do not translate this</string> | ||
173 | 37 | </attribute> | ||
174 | 38 | <layout class="QHBoxLayout" name="horizontalLayout_5"> | ||
175 | 39 | <property name="spacing"> | ||
176 | 40 | <number>0</number> | ||
177 | 41 | </property> | ||
178 | 42 | <property name="margin"> | ||
179 | 43 | <number>0</number> | ||
180 | 44 | </property> | ||
181 | 45 | <item> | ||
182 | 46 | <layout class="QVBoxLayout" name="verticalLayout_5"> | ||
183 | 47 | <property name="spacing"> | ||
184 | 48 | <number>0</number> | ||
185 | 49 | </property> | ||
186 | 50 | <item> | ||
187 | 51 | <widget class="QWidget" name="welcomeTop" native="true"> | ||
188 | 52 | <property name="sizePolicy"> | ||
189 | 53 | <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> | ||
190 | 54 | <horstretch>0</horstretch> | ||
191 | 55 | <verstretch>0</verstretch> | ||
192 | 56 | </sizepolicy> | ||
193 | 57 | </property> | ||
194 | 58 | <property name="minimumSize"> | ||
195 | 59 | <size> | ||
196 | 60 | <width>0</width> | ||
197 | 61 | <height>100</height> | ||
198 | 62 | </size> | ||
199 | 63 | </property> | ||
200 | 64 | <layout class="QVBoxLayout" name="verticalLayout_6"> | ||
201 | 65 | <property name="spacing"> | ||
202 | 66 | <number>0</number> | ||
203 | 67 | </property> | ||
204 | 68 | <property name="margin"> | ||
205 | 69 | <number>0</number> | ||
206 | 70 | </property> | ||
207 | 71 | <item> | ||
208 | 72 | <layout class="QHBoxLayout" name="horizontalLayout_4"> | ||
209 | 73 | <property name="spacing"> | ||
210 | 74 | <number>0</number> | ||
211 | 75 | </property> | ||
212 | 76 | <item> | ||
213 | 77 | <widget class="QWidget" name="welcomeTopText" native="true"> | ||
214 | 78 | <widget class="QLabel" name="welcomeLabel"> | ||
215 | 79 | <property name="geometry"> | ||
216 | 80 | <rect> | ||
217 | 81 | <x>30</x> | ||
218 | 82 | <y>20</y> | ||
219 | 83 | <width>330</width> | ||
220 | 84 | <height>51</height> | ||
221 | 85 | </rect> | ||
222 | 86 | </property> | ||
223 | 87 | <property name="font"> | ||
224 | 88 | <font> | ||
225 | 89 | <family>Ubuntu</family> | ||
226 | 90 | <pointsize>21</pointsize> | ||
227 | 91 | </font> | ||
228 | 92 | </property> | ||
229 | 93 | <property name="text"> | ||
230 | 94 | <string extracomment="TRANSLATORS: this is the main title of the authentication dialog">This is a translatable title</string> | ||
231 | 95 | </property> | ||
232 | 96 | </widget> | ||
233 | 97 | </widget> | ||
234 | 98 | </item> | ||
235 | 99 | </layout> | ||
236 | 100 | </item> | ||
237 | 101 | </layout> | ||
238 | 102 | </widget> | ||
239 | 103 | </item> | ||
240 | 104 | <item> | ||
241 | 105 | <widget class="QWidget" name="welcomeBottom" native="true"> | ||
242 | 106 | <property name="sizePolicy"> | ||
243 | 107 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||
244 | 108 | <horstretch>0</horstretch> | ||
245 | 109 | <verstretch>0</verstretch> | ||
246 | 110 | </sizepolicy> | ||
247 | 111 | </property> | ||
248 | 112 | <property name="minimumSize"> | ||
249 | 113 | <size> | ||
250 | 114 | <width>0</width> | ||
251 | 115 | <height>0</height> | ||
252 | 116 | </size> | ||
253 | 117 | </property> | ||
254 | 118 | <widget class="QTextEdit" name="welcomeTextBox"> | ||
255 | 119 | <property name="geometry"> | ||
256 | 120 | <rect> | ||
257 | 121 | <x>30</x> | ||
258 | 122 | <y>20</y> | ||
259 | 123 | <width>571</width> | ||
260 | 124 | <height>181</height> | ||
261 | 125 | </rect> | ||
262 | 126 | </property> | ||
263 | 127 | <property name="frameShape"> | ||
264 | 128 | <enum>QFrame::NoFrame</enum> | ||
265 | 129 | </property> | ||
266 | 130 | <property name="frameShadow"> | ||
267 | 131 | <enum>QFrame::Plain</enum> | ||
268 | 132 | </property> | ||
269 | 133 | <property name="readOnly"> | ||
270 | 134 | <bool>true</bool> | ||
271 | 135 | </property> | ||
272 | 136 | <property name="html"> | ||
273 | 137 | <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | ||
274 | 138 | <html><head><meta name="qrichtext" content="1" /><title>HTML document extraction test</title><style type="text/css"> | ||
275 | 139 | p, li { white-space: pre-wrap; } | ||
276 | 140 | </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> | ||
277 | 141 | <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Once upon a time, in a galaxy far, far away... </p></body></html></string> | ||
278 | 142 | </property> | ||
279 | 143 | </widget> | ||
280 | 144 | <widget class="QPushButton" name="friendlyTestsButton"> | ||
281 | 145 | <property name="geometry"> | ||
282 | 146 | <rect> | ||
283 | 147 | <x>30</x> | ||
284 | 148 | <y>210</y> | ||
285 | 149 | <width>571</width> | ||
286 | 150 | <height>31</height> | ||
287 | 151 | </rect> | ||
288 | 152 | </property> | ||
289 | 153 | <property name="font"> | ||
290 | 154 | <font> | ||
291 | 155 | <pointsize>9</pointsize> | ||
292 | 156 | </font> | ||
293 | 157 | </property> | ||
294 | 158 | <property name="text"> | ||
295 | 159 | <string comment="Button" extracomment="TRANSLATORS: refers to the action of accepting something">Ok</string> | ||
296 | 160 | </property> | ||
297 | 161 | </widget> | ||
298 | 162 | <widget class="QCheckBox" name="checkBox"> | ||
299 | 163 | <property name="geometry"> | ||
300 | 164 | <rect> | ||
301 | 165 | <x>30</x> | ||
302 | 166 | <y>280</y> | ||
303 | 167 | <width>321</width> | ||
304 | 168 | <height>20</height> | ||
305 | 169 | </rect> | ||
306 | 170 | </property> | ||
307 | 171 | <property name="font"> | ||
308 | 172 | <font> | ||
309 | 173 | <family>Ubuntu</family> | ||
310 | 174 | </font> | ||
311 | 175 | </property> | ||
312 | 176 | <property name="text"> | ||
313 | 177 | <string comment="WelcomeDialog">Don't show me this message in the future</string> | ||
314 | 178 | </property> | ||
315 | 179 | </widget> | ||
316 | 180 | <widget class="QCheckBox" name="checkBox_2"> | ||
317 | 181 | <property name="geometry"> | ||
318 | 182 | <rect> | ||
319 | 183 | <x>30</x> | ||
320 | 184 | <y>260</y> | ||
321 | 185 | <width>321</width> | ||
322 | 186 | <height>20</height> | ||
323 | 187 | </rect> | ||
324 | 188 | </property> | ||
325 | 189 | <property name="font"> | ||
326 | 190 | <font> | ||
327 | 191 | <family>Ubuntu</family> | ||
328 | 192 | </font> | ||
329 | 193 | </property> | ||
330 | 194 | <property name="text"> | ||
331 | 195 | <string extracomment="TRANSLATORS: authentication is required to perform this action">Require authentication</string> | ||
332 | 196 | </property> | ||
333 | 197 | </widget> | ||
334 | 198 | </widget> | ||
335 | 199 | </item> | ||
336 | 200 | </layout> | ||
337 | 201 | </item> | ||
338 | 202 | </layout> | ||
339 | 203 | </widget> | ||
340 | 204 | </widget> | ||
341 | 205 | </item> | ||
342 | 206 | </layout> | ||
343 | 207 | </widget> | ||
344 | 208 | <resources/> | ||
345 | 209 | <connections/> | ||
346 | 210 | </ui> | ||
347 | 0 | 211 | ||
348 | === modified file 'tests/results/Makefile.am' | |||
349 | --- tests/results/Makefile.am 2011-10-08 18:08:58 +0000 | |||
350 | +++ tests/results/Makefile.am 2013-05-10 09:59:25 +0000 | |||
351 | @@ -17,6 +17,7 @@ | |||
352 | 17 | extract12.xml.in.h \ | 17 | extract12.xml.in.h \ |
353 | 18 | extract14.xml.in.h \ | 18 | extract14.xml.in.h \ |
354 | 19 | extract-gtkbuilder.ui.h \ | 19 | extract-gtkbuilder.ui.h \ |
355 | 20 | extract-qtdesigner.ui.h \ | ||
356 | 20 | gsettings.gschema.xml.h \ | 21 | gsettings.gschema.xml.h \ |
357 | 21 | iso88591text.xml.in.h \ | 22 | iso88591text.xml.in.h \ |
358 | 22 | merge-cdata.xml \ | 23 | merge-cdata.xml \ |
359 | 23 | 24 | ||
360 | === added file 'tests/results/extract-qtdesigner.ui.h' | |||
361 | --- tests/results/extract-qtdesigner.ui.h 1970-01-01 00:00:00 +0000 | |||
362 | +++ tests/results/extract-qtdesigner.ui.h 2013-05-10 09:59:25 +0000 | |||
363 | @@ -0,0 +1,13 @@ | |||
364 | 1 | char *s = N_("Form"); | ||
365 | 2 | /* TRANSLATORS: this is the main title of the authentication dialog */ | ||
366 | 3 | char *s = N_("This is a translatable title"); | ||
367 | 4 | char *s = N_("<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n" | ||
368 | 5 | "<html><head><meta name="qrichtext" content="1" /><title>HTML document extraction test</title><style type="text/css">\n" | ||
369 | 6 | "p, li { white-space: pre-wrap; }\n" | ||
370 | 7 | "</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">\n" | ||
371 | 8 | "<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Once upon a time, in a galaxy far, far away... </p></body></html>"); | ||
372 | 9 | /* TRANSLATORS: refers to the action of accepting something */ | ||
373 | 10 | char *s = C_("Button", "Ok"); | ||
374 | 11 | char *s = C_("WelcomeDialog", "Don't show me this message in the future"); | ||
375 | 12 | /* TRANSLATORS: authentication is required to perform this action */ | ||
376 | 13 | char *s = N_("Require authentication"); | ||
377 | 0 | 14 | ||
378 | === modified file 'tests/selftest.pl.in' | |||
379 | --- tests/selftest.pl.in 2012-08-23 03:39:02 +0000 | |||
380 | +++ tests/selftest.pl.in 2013-05-10 09:59:25 +0000 | |||
381 | @@ -294,6 +294,11 @@ | |||
382 | 294 | system("$INTLTOOL_EXTRACT --type=gettext/glade --quiet --update cases/$case") == 0 or $failed = 1; | 294 | system("$INTLTOOL_EXTRACT --type=gettext/glade --quiet --update cases/$case") == 0 or $failed = 1; |
383 | 295 | check_extract_result($case); | 295 | check_extract_result($case); |
384 | 296 | 296 | ||
385 | 297 | print "40. Extract messages from a Qt Designer UI file: "; | ||
386 | 298 | $case = "extract-qtdesigner.ui"; | ||
387 | 299 | system("$INTLTOOL_EXTRACT --type=gettext/qtdesigner --quiet --update cases/$case") == 0 or $failed = 1; | ||
388 | 300 | check_extract_result($case); | ||
389 | 301 | |||
390 | 297 | 302 | ||
391 | 298 | system("rm -f cases/*.*") if $srcdir ne "."; | 303 | system("rm -f cases/*.*") if $srcdir ne "."; |
392 | 299 | system("rm -rf C az extract9 fr fr_BE fr_FR merge6 schemasmerge1 schemasmerge2 spacepreserve test test-quoted merge6.xml"); | 304 | system("rm -rf C az extract9 fr fr_BE fr_FR merge6 schemasmerge1 schemasmerge2 spacepreserve test test-quoted merge6.xml"); |
Btw, at least the doc links are incorrect in intltool- extract. in:
- http:// qt-project. org/doc/ qt-5.0/ qtlinguist/ linguist- ts-file- format. html qt-project. org/doc/ qt-5.0/ qtdesigner/ designer- ui-file- format. html
- http://
are currently correct links (I assume they have changed since you started work on this).
Btw, I would prefer if the support was done using the real XML parser: that would ensure that a lot more of the XML syntax is supported, and that we don't accidentally break when eg. the order of attributes changes in the XML file.
A good example is type_gsettings/ traverse_ gsettings functions.