[Debian-handbook-translators] Validate translation (compatibility to the docbook format) done on Weblate

AYANOKOUZI, Ryuunosuke i38w7i3 at yahoo.co.jp
Tue Jun 21 15:06:25 UTC 2016

Dear Michal,

Thanks for comments.

At Tue, 21 Jun 2016 13:47:07 +0200,
Michal Čihař wrote:
> [1 Re: [Debian-handbook-translators] Validate translation (compatibility to the docbook format) done on Weblate <multipart/mixed (7bit)>]
> [1.1  <text/plain; UTF-8 (quoted-printable)>]
> Dne 24.5.2016 v 18:31 AYANOKOUZI, Ryuunosuke napsal(a):
> > OK, I understand lazy commits and conditions when a commit is performed [1].
> > In this case, downloading latest translation from Weblate just before build test [2]
> > is alternative way to keep build environment up-to-date.
> You can use Weblate API to get current translation file, however it will
> need some scripting to do that for all files and translatins:
> https://docs.weblate.org/en/latest/api.html#get--api-translations-%28string-project%29-%28string-component%29-%28string-language%29-file-

Currently, my build script downloads all translation files [1] through a link in website
(Files -> Download original translation file (Gettext PO file))
and update translation (which is not committed to git repository on Weblate) [2].

[1] https://travis-ci.org/l/debian-handbook-test/builds/139105237#L2626
[2] https://travis-ci.org/l/debian-handbook-test/builds/139105237#L3142

I have one question about URL and contents.
Even though the download link URL [3] and API URL [4] provide same contents,
both URLs does not match. Is link URL just an alias of API URL?

[3] https://hosted.weblate.org/download/debian-handbook/08_basic-configuration/zh_Hant/
[4] https://hosted.weblate.org/api/translations/debian-handbook/08_basic-configuration/zh_Hant/file/

> >>> Here are test cases I checked:
> >>> case 1: no problem
> >>>         https://travis-ci.org/l/debian-handbook/builds/132296396#L2585
> >>>
> >>> case 2: xml format error: mismatched tag
> >>>         https://travis-ci.org/l/debian-handbook/builds/132292727#L2746
> >>>
> >>> case 3: xml format error: not well-formed (invalid token)
> >>>         https://travis-ci.org/l/debian-handbook/builds/132217344#L2746
> >>
> >> Those two errors should really be caught by Weblate. Don't we have such
> >> basic XML checks?
> > 
> > It looks that Weblate detects 'mismatched tag' [3].
> > But I could not find error check function about 'not well-formed'.
> > 
> > [3] https://docs.weblate.org/en/latest/user/checks.html#xml-tags-mismatch
> It really should catch both. In case it doesn't please send me examples
> so that I can tweak the check (or directly report it on GitHub issue
> tracker, so that it's not forgotten in case I miss the mail as I did
> with this thread...).

Following bad test cases (msgstr is invalid XML) are detectable in Weblate?

msgid "<emphasis>1st test case</emphasis>"
msgstr "<emphasis>not well-formed (invalid token) XML case</ emphasis>"

msgid "<emphasis>2nd test case</emphasis>"
msgstr "<emphasis>not well-formed (invalid token) XML case< /emphasis>"

I am looking forward to your reply.

Sincerely yours,
Ryuunosuke Ayanokouzi
AYANOKOUZI, Ryuunosuke <i38w7i3 at yahoo.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/debian-handbook-translators/attachments/20160622/f1a5030f/attachment.sig>

More information about the Debian-handbook-translators mailing list