[OPEN-ILS-DEV] Angular6 update / input needed on template translation options

Bill Erickson berickxx at gmail.com
Wed Aug 15 11:09:26 EDT 2018


Hi All,

Now that others have installed and run the Angular 6 code, and we're on the
home stretch for 3.2, I have started putting the finishing touches on the
code in hopes we can merge for 3.2.

The biggest changes since my last wiki update [1] are related to continued
locale support.  The client now has a translation dialog component, which
can be plugged in anywhere, and is currently used from the auto-magic admin
UI for translating in-grid data (e.g. billing type names).

I also set about integrating Angular 6 template translations into the
Evergreen translation tool chain.  Here I hit my first real road block.
Angular template translation tools do not support .PO files.  I did not
expect this to be an issue, because translate-tookit (which we already use
for managing translations) has utilities for cross-walking to and from
XLIFF files (for Angular) and PO files (for Launchpad translations).

However, after a number of experiments I have found the process results in
critical loss of information.  First, the message IDs are jumbled, which
can be fixed with a little bit of Perl.  Second, and most problematic, the
interpolation values (in-text variables) are not correctly translated into
PO files.

For example:

XLIFF:
Add Record #<x id="INTERPOLATION" equiv-text="{{recId}}"/> to Bucket

Translates to PO:
Add Record # to Bucket

Unless I'm just missing something, xliff2po is simply not up to the task of
migrating XLIFF files generated by Angular.  Or, more likely, the .PO file
format is not up to the task of storing the needed data.

That leaves us with limited options for translating angular 6 templates in
the short term.

1. We quickly spin up a translation service (e.g. Pootle, Weblate).

2. Translators edit the Angular XLIFF files by hand.  The files contain
lots of context data and are generally pretty easy to understand, but it
requires editing XML by hand -- no UI.

Any other suggestions?

Thanks,

-b

[1]
https://wiki.evergreen-ils.org/doku.php?id=dev:browser_staff:angjs_to_ang_migration&s[]=angular&s[]=migration#notes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20180815/48470e3e/attachment.html>


More information about the Open-ils-dev mailing list