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

AYANOKOUZI, Ryuunosuke i38w7i3 at yahoo.co.jp
Tue May 24 16:31:22 UTC 2016


Dear Raphael,

Thanks for many comments.
Now, I am running automated build test at hourly basis.

At Tue, 24 May 2016 11:25:37 +0200,
Raphael Hertzog wrote:
>
> 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).

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.

[1] https://docs.weblate.org/en/latest/admin/continuous.html#lazy-commit
[2] https://travis-ci.org/l/debian-handbook/builds/132586316#L2654

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

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

That's right. The error message is not easy to understand,
but once translators understand the meaning it would be easy to fix.
I'll try to send error report saying additional remarks.

> > 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".

OK, I understand. I'll include Weblate URLs to error report.
These points to the position of PO entry causing build failure.

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

To solve these automation-related problems,
I slightly changed the test build configuration and scripts:

1. Build trigger is managed usually by cron and sometimes by hand.
   It meas that Webhook from Weblate is not needed.
   I hopefully think daily or hourly build is sufficient for translators.
2. '.travis.yml' and build scripts are no longer needed to be placed
   in target branch 'jessie/master'.
3. Build environment is initialized based on 'jessie/master' branch from Weblate [4].
   And, latest translation is downloaded from Weblate just before build test [5].

[4] https://travis-ci.org/l/debian-handbook/builds/132586316#L2625
[5] https://travis-ci.org/l/debian-handbook/builds/132586316#L2654

After the modifications, We are able to ran automated build test
without any modification to Weblate and 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.

Thanks. I'll try to send error report which would be easy to understand for translators
to this mailing list from this time forward.

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/20160525/8871be46/attachment.sig>


More information about the Debian-handbook-translators mailing list