LibreOffice plugin to pipe whole Writer documents through Google Translate, that ought to keep most of the page formatting.

⌈⌋ branch:  PageTranslate


Check-in [805811f8ff]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a few more languages.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 805811f8ffab8aa42937c8de9d1aee17a51b9e3f
User & Date: mario 2021-02-04 18:01:50
Context
2021-02-08
05:45
Add mymemory backend without dependency on python-translate. check-in: 979729eaed user: mario tags: trunk
2021-02-04
18:01
Add a few more languages. check-in: 805811f8ff user: mario tags: trunk
2021-02-03
20:25
Add more languages ('le continental submenus) check-in: bc8c7befa0 user: mario tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Addons.xcu.

75
76
77
78
79
80
81






82
83
84
85
86
87
88
...
137
138
139
140
141
142
143














































































































































































144
145
146
147
148
149
150
...
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
...
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
...
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
...
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
...
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
                </node>
                <node oor:name="M2PL" oor:op="replace">
                  <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                  <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=pl</value></prop>
                  <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Polish 🇵🇱</value></prop>
                  <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                </node>






                <node oor:name="M2RU" oor:op="replace">
                  <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                  <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ru</value></prop>
                  <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Russian 🇷🇺</value></prop>
                  <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                </node>
                <node oor:name="M2SV" oor:op="replace">
................................................................................
                    </node>
                    <node oor:name="M2VI" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=vi</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Vietnamese 🇻🇮</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>














































































































































































                  </node>
                </node>
                <node oor:name="M3AF" oor:op="replace">
                  <prop oor:name="Title"><value xml:lang="en">Africa</value></prop>
                  <prop oor:name="ImageIdentifier" oor:type="xs:string"><value></value></prop>
                  <node oor:name="Submenu">
                    <node oor:name="M2AF" oor:op="replace">
................................................................................
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=hr</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Croatian 🇭🇷</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2CS" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=cs</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Czech 🇨🇸</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2ET" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=et</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Estonian 🇪🇹</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
................................................................................
                    </node>
                    <node oor:name="M2GL" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=gl</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Galician 🇬🇱</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2KA" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ka</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Georgian 🇰🇦</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2HE" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=he</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Hebrew 🇭🇪</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2HU" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=hu</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Hungarian 🇭🇺</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
................................................................................
                    </node>
                    <node oor:name="M2MT" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=mt</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Maltese 🇲🇹</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2PT" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=pt</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Portuguese 🇵🇹</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2RO" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ro</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Romanian 🇷🇴</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2SR" oor:op="replace">
................................................................................
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=sl</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Slovenian 🇸🇱</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2UK" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=uk</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Ukrainian 🇺🇰</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2WLS" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=wls</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Wallisian 🇼🇱🇸</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2CY" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=cy</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Welsh 🇨🇾</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2YI" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=yi</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Yiddish 🇾🇮</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                  </node>
                </node>
                <node oor:name="M3OC" oor:op="replace">
                  <prop oor:name="Title"><value xml:lang="en">Oceania</value></prop>
                  <prop oor:name="ImageIdentifier" oor:type="xs:string"><value></value></prop>
................................................................................
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ho</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Hiri Motu</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2MI" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=mi</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Maori 🇲🇮</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2MH" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=mh</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Marshallese 🇲🇭</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>







>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|







 







<
<
<
<
<
<



|







 







<
<
<
<
<
<







 







|





|





|





|







 







|







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
...
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
...
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
...
521
522
523
524
525
526
527






528
529
530
531
532
533
534
535
536
537
538
...
581
582
583
584
585
586
587






588
589
590
591
592
593
594
...
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
...
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
                </node>
                <node oor:name="M2PL" oor:op="replace">
                  <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                  <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=pl</value></prop>
                  <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Polish 🇵🇱</value></prop>
                  <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                </node>
                <node oor:name="M2PT" oor:op="replace">
                  <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                  <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=pt</value></prop>
                  <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Portuguese 🇵🇹</value></prop>
                  <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                </node>
                <node oor:name="M2RU" oor:op="replace">
                  <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                  <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ru</value></prop>
                  <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Russian 🇷🇺</value></prop>
                  <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                </node>
                <node oor:name="M2SV" oor:op="replace">
................................................................................
                    </node>
                    <node oor:name="M2VI" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=vi</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Vietnamese 🇻🇮</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2AR" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ar</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Arabic 🇸🇦</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2HY" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=hy</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Armenian 🇦🇲</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2AZ" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=az</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Azerbaijani 🇦🇿</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2BN" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=bn</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Bengali 🇧🇳</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2BE" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=be</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Bielarus 🇧🇪</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2MY" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=my</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Burmese 🇲🇾</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2DZO" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=dzo</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Dzongkha </value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2KA" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ka</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Georgian 🇬🇪</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2ID" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=id</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Indonesian 🇮🇩</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2KK" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=kk</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Kazakh 🇰🇿</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2KM" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=km</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Khmer 🇰🇲</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2KU" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ku</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Kurdish</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2KY" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ky</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Kyrgyz 🇰🇾</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2LO" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=lo</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Lao 🇱🇦</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2MS" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ms</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Malay 🇲🇸</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2MN" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=mn</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Mongolian 🇲🇳</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2NE" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ne</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Nepali 🇳🇪</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2UR" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ur</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Pakistani 🇵🇰</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2PA" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=pa</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Panjabi 🇵🇦</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2FA" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=fa</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Persian 🇮🇷</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2RU" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ru</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Russian 🇷🇺</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2TG" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=tg</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Tajik 🇹🇬</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2TA" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ta</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Tamil 🇹🇦</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2TE" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=te</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Telugu</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2BOD" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=bod</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Tibetan</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2TR" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=tr</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Turkish 🇹🇷</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2TK" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=tk</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Turkmen 🇹🇰</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2UZ" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=uz</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Uzbek 🇺🇿</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2VI" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=vi</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Vietnamese 🇻🇳</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                  </node>
                </node>
                <node oor:name="M3AF" oor:op="replace">
                  <prop oor:name="Title"><value xml:lang="en">Africa</value></prop>
                  <prop oor:name="ImageIdentifier" oor:type="xs:string"><value></value></prop>
                  <node oor:name="Submenu">
                    <node oor:name="M2AF" oor:op="replace">
................................................................................
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=hr</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Croatian 🇭🇷</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2CS" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=cs</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Czech 🇨🇿</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2ET" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=et</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Estonian 🇪🇹</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
................................................................................
                    </node>
                    <node oor:name="M2GL" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=gl</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Galician 🇬🇱</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>






                    <node oor:name="M2HE" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=he</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Hebrew 🇮🇱</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2HU" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=hu</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Hungarian 🇭🇺</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
................................................................................
                    </node>
                    <node oor:name="M2MT" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=mt</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Maltese 🇲🇹</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>






                    <node oor:name="M2RO" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ro</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Romanian 🇷🇴</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2SR" oor:op="replace">
................................................................................
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=sl</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Slovenian 🇸🇱</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2UK" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=uk</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Ukrainian 🇺🇦</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2WLS" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=wls</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Wallisian 🇼🇫</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2CY" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=cy</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Welsh <!--🏴󠁧󠁢󠁷󠁬󠁳󠁿--></value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2YI" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=yi</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Yiddish 🇮🇱</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                  </node>
                </node>
                <node oor:name="M3OC" oor:op="replace">
                  <prop oor:name="Title"><value xml:lang="en">Oceania</value></prop>
                  <prop oor:name="ImageIdentifier" oor:type="xs:string"><value></value></prop>
................................................................................
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=ho</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Hiri Motu</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2MI" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=mi</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Maori 🇳🇿</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
                    </node>
                    <node oor:name="M2MH" oor:op="replace">
                      <prop oor:name="Context" oor:type="xs:string"><value/></prop>
                      <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=mh</value></prop>
                      <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Marshallese 🇲🇭</value></prop>
                      <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>

Changes to description.xml.

1
2
3
4
5
6
7
8
9
10
11
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
  <identifier value="vnd.include-once.pagetranslate"/>
  <version value="1.6.10"/>
  <display-name>
    <name lang="en">PageTranslate</name>
  </display-name>
  <dependencies>
    <OpenOffice.org-minimal-version value="3.0" dep:name="OpenOffice.org 3.0"/>
  </dependencies>
  <registration>



|







1
2
3
4
5
6
7
8
9
10
11
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
  <identifier value="vnd.include-once.pagetranslate"/>
  <version value="1.6.39"/>
  <display-name>
    <name lang="en">PageTranslate</name>
  </display-name>
  <dependencies>
    <OpenOffice.org-minimal-version value="3.0" dep:name="OpenOffice.org 3.0"/>
  </dependencies>
  <registration>

Changes to help/en/vnd.include-once.pagetranslate/extending.page.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
36
37
38
39
40
41
42







43
44
45
<p>Adding a new target language to the PageTranslate tools menu requires
just a bit of effort, but little programming.</p>
<steps>
 <item>Get a copy of the <file>pagetranslate.oxt</file> package.</item>
 <item>Unzip the file (<file>.oxt</file> is a <app>.zip</app>) in an empty directory.</item>
 <item>Edit the <file>Addons.xcu</file>
   <terms>
     <item>You just need to <em>duplicate</em> one of the following blocks:
       <code><![CDATA[
      <node oor:name="M2XXXXXXXX" oor:op="replace">
        <prop oor:name="Context" oor:type="xs:string"><value/></prop>
        <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=XX</value></prop>
        <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Lang XX</value></prop>
        <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
      </node>
................................................................................
   </terms>  
 </item>
 <item>And finally just repackage the <file>Addons.xcu</file> into the oxt:
   <p><input>zip a pagetranslate.oxt Addons.xcu</input></p>
 </item>
 <item>Then reinstall the customized extension.</item>
</steps>







</section>

</page>







|







 







>
>
>
>
>
>
>



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<p>Adding a new target language to the PageTranslate tools menu requires
just a bit of effort, but little programming.</p>
<steps>
 <item>Get a copy of the <file>pagetranslate.oxt</file> package.</item>
 <item>Unzip the file (<file>.oxt</file> is a <app>.zip</app>) in an empty directory.</item>
 <item>Edit the <file>Addons.xcu</file>
   <terms>
     <item>Therein <em>duplicate</em> one of the following blocks:
       <code><![CDATA[
      <node oor:name="M2XXXXXXXX" oor:op="replace">
        <prop oor:name="Context" oor:type="xs:string"><value/></prop>
        <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=XX</value></prop>
        <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">→Lang XX</value></prop>
        <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
      </node>
................................................................................
   </terms>  
 </item>
 <item>And finally just repackage the <file>Addons.xcu</file> into the oxt:
   <p><input>zip a pagetranslate.oxt Addons.xcu</input></p>
 </item>
 <item>Then reinstall the customized extension.</item>
</steps>

<p>
There's also a contrib/dev script <file>addlang.py</file> to generate such a language block,
which crafts the Unicode flag emoji as well. If you want to contribute/correct some of the
existing menu entries, please just register a repository account and send a mail to have it
elevated for commit permissions.
</p>
</section>

</page>

Changes to help/en/vnd.include-once.pagetranslate/extending.xhp.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
47
48
49
50
51
52
53







54
55
56
57
   <meta>
      <topic id="topic_d1e2" indexer="include" status="PUBLISH">
         <title xml-lang="en" id="title_d1e2">Extending menu options</title>
         <filename>/help/vnd.include-once.pagetranslate/extending.xhp</filename>
      </topic>
      <history>
         <created date="2020-02-02T22:22:22"/>
         <lastedited date="2020-06-17T12:59:40.567+02:00"/>
      </history>
   </meta>
   <body>



      <paragraph id="hd_d1e10" role="heading" level="1" xml-lang="en">Extending menu options</paragraph>
................................................................................
         <paragraph id="par_d1e15" role="paragraph" xml-lang="en">Adding a new target language to the PageTranslate tools menu requires
just a bit of effort, but little programming.</paragraph>
         <list id="steps_d1e18" bullet="disc" type="ordered" xml-lang="en">
            <listitem id="item_d1e20" xml-lang="en">Get a copy of the <item type="fileitem">pagetranslate.oxt</item> package.</listitem>
            <listitem id="item_d1e26" xml-lang="en">Unzip the file (<item type="fileitem">.oxt</item> is a <item type="menuitem">.zip</item>) in an empty directory.</listitem>
            <listitem id="item_d1e35" xml-lang="en">Edit the <item type="fileitem">Addons.xcu</item>
               <list id="terms_d1e40" xml-lang="en">
                  <listitem id="item_d1e42" xml-lang="en">You just need to <emph>duplicate</emph> one of the following blocks:
       <paragraph id="par_d1e47" role="code" xml-lang="en" xml:space="preserve">
    
      &lt;node oor:name="M2XXXXXXXX" oor:op="replace"&gt;
        &lt;prop oor:name="Context" oor:type="xs:string"&gt;&lt;value/&gt;&lt;/prop&gt;
        &lt;prop oor:name="URL" oor:type="xs:string"&gt;&lt;value&gt;service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;amp;lang=XX&lt;/value&gt;&lt;/prop&gt;
        &lt;prop oor:name="Title" oor:type="xs:string"&gt;&lt;value/&gt;&lt;value xml:lang="en-US"&gt;→Lang XX&lt;/value&gt;&lt;/prop&gt;
        &lt;prop oor:name="Target" oor:type="xs:string"&gt;&lt;value&gt;_self&lt;/value&gt;&lt;/prop&gt;
................................................................................
                  <paragraph id="par_d1e74" role="code" xml-lang="en" xml:space="preserve">
    zip a pagetranslate.oxt Addons.xcu
  </paragraph>
               </paragraph>
            </listitem>
            <listitem id="item_d1e78" xml-lang="en">Then reinstall the customized extension.</listitem>
         </list>







      </paragraph>

   </body>
</helpdocument>







|







 







|







 







>
>
>
>
>
>
>




3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
   <meta>
      <topic id="topic_d1e2" indexer="include" status="PUBLISH">
         <title xml-lang="en" id="title_d1e2">Extending menu options</title>
         <filename>/help/vnd.include-once.pagetranslate/extending.xhp</filename>
      </topic>
      <history>
         <created date="2020-02-02T22:22:22"/>
         <lastedited date="2021-02-03T22:37:36.182+01:00"/>
      </history>
   </meta>
   <body>



      <paragraph id="hd_d1e10" role="heading" level="1" xml-lang="en">Extending menu options</paragraph>
................................................................................
         <paragraph id="par_d1e15" role="paragraph" xml-lang="en">Adding a new target language to the PageTranslate tools menu requires
just a bit of effort, but little programming.</paragraph>
         <list id="steps_d1e18" bullet="disc" type="ordered" xml-lang="en">
            <listitem id="item_d1e20" xml-lang="en">Get a copy of the <item type="fileitem">pagetranslate.oxt</item> package.</listitem>
            <listitem id="item_d1e26" xml-lang="en">Unzip the file (<item type="fileitem">.oxt</item> is a <item type="menuitem">.zip</item>) in an empty directory.</listitem>
            <listitem id="item_d1e35" xml-lang="en">Edit the <item type="fileitem">Addons.xcu</item>
               <list id="terms_d1e40" xml-lang="en">
                  <listitem id="item_d1e42" xml-lang="en">Therein <emph>duplicate</emph> one of the following blocks:
       <paragraph id="par_d1e47" role="code" xml-lang="en" xml:space="preserve">
    
      &lt;node oor:name="M2XXXXXXXX" oor:op="replace"&gt;
        &lt;prop oor:name="Context" oor:type="xs:string"&gt;&lt;value/&gt;&lt;/prop&gt;
        &lt;prop oor:name="URL" oor:type="xs:string"&gt;&lt;value&gt;service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;amp;lang=XX&lt;/value&gt;&lt;/prop&gt;
        &lt;prop oor:name="Title" oor:type="xs:string"&gt;&lt;value/&gt;&lt;value xml:lang="en-US"&gt;→Lang XX&lt;/value&gt;&lt;/prop&gt;
        &lt;prop oor:name="Target" oor:type="xs:string"&gt;&lt;value&gt;_self&lt;/value&gt;&lt;/prop&gt;
................................................................................
                  <paragraph id="par_d1e74" role="code" xml-lang="en" xml:space="preserve">
    zip a pagetranslate.oxt Addons.xcu
  </paragraph>
               </paragraph>
            </listitem>
            <listitem id="item_d1e78" xml-lang="en">Then reinstall the customized extension.</listitem>
         </list>

         <paragraph id="par_d1e82" role="paragraph" xml-lang="en">
There's also a contrib/dev script <item type="fileitem">addlang.py</item> to generate such a language block,
which crafts the Unicode flag emoji as well. If you want to contribute/correct some of the
existing menu entries, please just register a repository account and send a mail to have it
elevated for commit permissions.
</paragraph>
      </paragraph>

   </body>
</helpdocument>

Changes to pagetranslate.py.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
...
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
#!/usr/bin/python
# encoding: utf-8
# api: uno
# type: callback
# category: language
# title: PageTranslate
# description: Action button to get whole Writer document translated
# version: 1.6.10
# state: beta
# author: mario
# url: https://fossil.include-once.org/pagetranslate/
# depends: python:requests (>= 2.5), python:translate
# pack: *.py, pythonpath/*.py, META-INF/*, pkg-desc, *.x*, icons/*
# license: GNU LGPL 2.1
# forked-from: TradutorLibreText (Claudemir de Almeida Rosa)
................................................................................
# Handler for settings-embedded DialogOptions.xdl window, and read/write access to our leaf in the office registry.
# (This is fairly generic/reusable, because it directly maps a dict to/from the dialog widgets.)
#
class settings(unohelper.Base, XContainerWindowEventHandler, XServiceInfo):
    impl_id = "vnd.include-once.OptionsPageTranslate"

    def __init__(self, ctx, *kargs):
        log.info("__init__ of OptionsPageTranslate dialog")
        self.access = self.updatemgr(ctx)
        log.debug(dir(self.access)) #→ ['AsProperty', 'ElementNames', 'ElementType', 'HierarchicalName', 'HierarchicalPropertySetInfo', 'ImplementationId', 'ImplementationName', 'Name', 'PendingChanges', 'Properties', 'PropertySetInfo', 'SupportedServiceNames', 'Types', 'addChangesListener', 'addContainerListener', 'addEventListener', 'addPropertiesChangeListener', 'addPropertyChangeListener', 'addVetoableChangeListener', 'api_key', 'api_key', 'commitChanges', 'composeHierarchicalName', 'debug', 'debug', 'deepl_api', 'deepl_api', 'deepl_web', 'deepl_web', 'dispose', 'firePropertiesChangeEvent', 'getAsProperty', 'getByHierarchicalName', 'getByName', 'getElementNames', 'getElementType', 'getExactName', 'getHierarchicalName', 'getHierarchicalPropertySetInfo', 'getHierarchicalPropertySetInfo', 'getHierarchicalPropertyValue', 'getHierarchicalPropertyValues', 'getImplementationId', 'getImplementationName', 'getName', 'getPendingChanges', 'getProperties', 'getPropertyByHierarchicalName', 'getPropertyByName', 'getPropertySetInfo', 'getPropertySetInfo', 'getPropertyValue', 'getPropertyValues', 'getSupportedServiceNames', 'getTypes', 'google', 'google', 'hasByHierarchicalName', 'hasByName', 'hasElements', 'hasPendingChanges', 'hasPropertyByHierarchicalName', 'hasPropertyByName', 'queryAdapter', 'queryInterface', 'removeChangesListener', 'removeContainerListener', 'removeEventListener', 'removePropertiesChangeListener', 'removePropertyChangeListener', 'removeVetoableChangeListener', 'replaceByHierarchicalName', 'replaceByName', 'setHierarchicalPropertyValue', 'setHierarchicalPropertyValues', 'setName', 'setPropertyValue', 'setPropertyValues', 'supportsService']

    # get handle on OpenOffice registry (read/write)
    def updatemgr(self, ctx, registry="/vnd.include-once.pagetranslate.Options/Leaves/Flags"):
        try:
            nodepath = PropertyValue(Name="nodepath", Value=registry)
            config = ctx.ServiceManager.createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", ctx)
            return config.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", (nodepath,))
................................................................................
            if self.access.hasByName(name):
                self.access.setPropertyValue(name, value)
        self.access.commitChanges()

    # invoked on dialog initialization or for saving
    def callHandlerMethod(self, window=".UnoDialogControl", action="initialize|ok|back", name="external_event"):
        try:
            log.debug("callHandlerMethod({}, {}, {})".format(repr(window), action, name))
            params = self.read()
            log.info(repr(params))
            # iterate over all dialog controls by name, and assign from/to config dict
            for name, cntrl in [(c.Model.Name, c) for c in window.getControls()]:
                if action == "initialize":
                    self.setControlValue(cntrl, params.get(name))
                elif action == "ok":







|







 







|

|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
...
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
#!/usr/bin/python
# encoding: utf-8
# api: uno
# type: callback
# category: language
# title: PageTranslate
# description: Action button to get whole Writer document translated
# version: 1.6.39
# state: beta
# author: mario
# url: https://fossil.include-once.org/pagetranslate/
# depends: python:requests (>= 2.5), python:translate
# pack: *.py, pythonpath/*.py, META-INF/*, pkg-desc, *.x*, icons/*
# license: GNU LGPL 2.1
# forked-from: TradutorLibreText (Claudemir de Almeida Rosa)
................................................................................
# Handler for settings-embedded DialogOptions.xdl window, and read/write access to our leaf in the office registry.
# (This is fairly generic/reusable, because it directly maps a dict to/from the dialog widgets.)
#
class settings(unohelper.Base, XContainerWindowEventHandler, XServiceInfo):
    impl_id = "vnd.include-once.OptionsPageTranslate"

    def __init__(self, ctx, *kargs):
        log.info("OptionsPageTranslate:settings.__init__()")
        self.access = self.updatemgr(ctx)
        #log.debug(dir(self.access)) #→ ['AsProperty', 'ElementNames', 'ElementType', 'HierarchicalName', 'HierarchicalPropertySetInfo', 'ImplementationId', 'ImplementationName', 'Name', 'PendingChanges', 'Properties', 'PropertySetInfo', 'SupportedServiceNames', 'Types', 'addChangesListener', 'addContainerListener', 'addEventListener', 'addPropertiesChangeListener', 'addPropertyChangeListener', 'addVetoableChangeListener', 'api_key', 'api_key', 'commitChanges', 'composeHierarchicalName', 'debug', 'debug', 'deepl_api', 'deepl_api', 'deepl_web', 'deepl_web', 'dispose', 'firePropertiesChangeEvent', 'getAsProperty', 'getByHierarchicalName', 'getByName', 'getElementNames', 'getElementType', 'getExactName', 'getHierarchicalName', 'getHierarchicalPropertySetInfo', 'getHierarchicalPropertySetInfo', 'getHierarchicalPropertyValue', 'getHierarchicalPropertyValues', 'getImplementationId', 'getImplementationName', 'getName', 'getPendingChanges', 'getProperties', 'getPropertyByHierarchicalName', 'getPropertyByName', 'getPropertySetInfo', 'getPropertySetInfo', 'getPropertyValue', 'getPropertyValues', 'getSupportedServiceNames', 'getTypes', 'google', 'google', 'hasByHierarchicalName', 'hasByName', 'hasElements', 'hasPendingChanges', 'hasPropertyByHierarchicalName', 'hasPropertyByName', 'queryAdapter', 'queryInterface', 'removeChangesListener', 'removeContainerListener', 'removeEventListener', 'removePropertiesChangeListener', 'removePropertyChangeListener', 'removeVetoableChangeListener', 'replaceByHierarchicalName', 'replaceByName', 'setHierarchicalPropertyValue', 'setHierarchicalPropertyValues', 'setName', 'setPropertyValue', 'setPropertyValues', 'supportsService']

    # get handle on OpenOffice registry (read/write)
    def updatemgr(self, ctx, registry="/vnd.include-once.pagetranslate.Options/Leaves/Flags"):
        try:
            nodepath = PropertyValue(Name="nodepath", Value=registry)
            config = ctx.ServiceManager.createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", ctx)
            return config.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", (nodepath,))
................................................................................
            if self.access.hasByName(name):
                self.access.setPropertyValue(name, value)
        self.access.commitChanges()

    # invoked on dialog initialization or for saving
    def callHandlerMethod(self, window=".UnoDialogControl", action="initialize|ok|back", name="external_event"):
        try:
            log.debug("OptonsPageTranslate:settings.callHandlerMethod({}, {}, {})".format(repr(window), action, name))
            params = self.read()
            log.info(repr(params))
            # iterate over all dialog controls by name, and assign from/to config dict
            for name, cntrl in [(c.Model.Name, c) for c in window.getControls()]:
                if action == "initialize":
                    self.setControlValue(cntrl, params.get(name))
                elif action == "ok":