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

Raphael Hertzog hertzog at debian.org
Tue May 24 09:25:37 UTC 2016


Hi,

On Mon, 23 May 2016, AYANOKOUZI, Ryuunosuke wrote:
> Sometime translators push a commit with error.
> This is caused by the lack of carefulness or
> knowledge about back-end used in the book (publican, docbook, xml etc...).
> If translators could concentrate on their translation,
> that would increase the quality of translation.
> How can we achieve it? I think CI is one of the solution.
> 
> To poof this concept, I linked personal debian-handbook repository on GitHub to Travis CI
> and performed build test in some error cases (recently reported error). Finally, I found that
> most of errors would detectable and the log would show the position of the error.

One issue with this is that we use lazy commits so you do not always have
the latest strings in git. Maybe weblate could be improved to maintain
a pu/<branch-name> that would be overwritten each time but that would
always contain the most recent content (while <branch-name> continues to
be updated lazily).

> 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?

> case 4: docbook format error: Element XXXXXX content does not follow the DTD
>         https://travis-ci.org/l/debian-handbook/builds/132288029#L2747

This one is hard to catch at the Weblate level and thus some build
automation, really helps. But I'm not sure that the translator would
understand the error either...

> Any translators can check whether if a commit which he push causes build error or not.
> Others can suggest him for fix.

Most translators are not even aware of the notion of "commit".

> However, There are some problem in terms of automation.
> First problem is that currently
> I have to fetch 'jessie/master' branch from Weblate by hand.
> GitHub pull request hook of Weblate may solve this problem
> (polling is another solution, but it is not so much sophisticated).

Weblate has many features (API, scripts) but not external Webhook
to trigger something else when its internal git repository has been
updated. But it should be doable with a custom post-commit script
or something like that.

> Second problem is that
> I have to put '.travis.yml' and some scripts which are needed for build test
> into 'jessie/master' by hand.
> If these are in official branch, I don't need to do so.

I have no problem to add CI-related files to the official repository.

> Is there anyone who think this concept is reasonable and this demonstration is useful.

I'm generally a supporter of such automation. But it really needs to be
used/monitored by the respective translation teams to be really useful.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



More information about the Debian-handbook-translators mailing list