[OPEN-ILS-DEV] i18n in Angular client

Bill Erickson berickxx at gmail.com
Tue Jan 22 11:10:20 EST 2019


Hi Jane,

If we move forward with POEditor as Ben mentioned, the process would (I
think) look more like this:

1. npm run export-strings
2. Upload message.xmb to POEditor as the base en-US translation.
3. Apply fr-CA translations in POEditor
4. Export messages.fr-CA.xmb from POEditor
5. Commit messages.fr-CA.xmb to the Evergreen Git repository.
6. npm run build-fr-CA

We would no longer need the "merge-strings" step (or its dependency) since
that happens within POEditor.

Regarding splitting the translation files, I don't believe it's possible
with current technology, unless we were to add our own intermediate process
of splitting and re-joining the files.  Another option would be to break
the staff client up into multiple applications, but there are
pluses/minuses to consider there.

When creating production Angular builds, the translated strings are
inserted into the templates, replacing the en-US string.  So FWIW the
client never has to download these big translation files.  They lazy-loaded
with their components.

-b






On Mon, Jan 21, 2019 at 11:10 AM Ben Shum <ben at evergreener.net> wrote:

> Hi Jane,
>
> Thanks for the questions!
>
> Just a comment about Pootle... during the last Hack-A-Way, we did
> setup a Pootle test instance and it was unable to distinguish and was
> actively stripping out the code elements needed for angular from the
> generated xliff files.  Because of this, we started to investigate
> alternative i18n web tools.
>
> From Dan Wells' suggestion, we started to explore using POEditor.com
> to host the files and try things.  Bill Erickson and I found that it
> worked better using .xmb source files generated from the Evergreen
> code, and then importing those to POEditor.  And then doing some
> translations and then downloading back down .xtb translation files to
> be used.  The .xliff 1.2 version was expected by POEditor to be some
> sort of iOS file that it didn't react well to.
>
> This is a link to the POEditor Evergreen test instance we started
> playing with:  https://poeditor.com/join/project/2FlOsiPYag
>
> I have been a little busy to follow up, but hope to carve out more
> time and attention on this soon (or at least around April during
> conference season).  More to follow.
>
> -- Ben
>
>
> On Sat, Jan 19, 2019 at 4:38 PM Jane Sandberg <sandbej at linnbenton.edu>
> wrote:
> >
> > Hi all (especially Bill, Eva, and Ben),
> >
> > I'm trying to familiarize myself with the i18n process in the new
> > Angular code, and wanted to check my understanding.  I can generate a
> > new translation file using Bill's instructions here [1].  I'm just a
> > bit unclear about how to proceed from there.
> >
> > Here are my three questions:
> >
> > 1) After I've added a few translations to messages.fr-CA.xlf, I could
> > commit that and it would live inside the git repository, right?  Would
> > I need to commit messages.xlf as well, or just messages.fr-CA.xlf?
> >
> > 2) I noticed that, after the xliff files are first generated, all the
> > <target>s have the state of "new".  It looks like there are several
> > possible states [2].  I'm assuming that in most cases, after replacing
> > the target with a translation, we would change the state to
> > "translated"?  Or "final"?  What is the best practice?  It does seem
> > desirable to maintain some distinction between targets that have
> > actually been translated, and targets that are waiting for
> > translation.
> >
> > 3) These xliff files seem like they will get really huge really
> > quickly.  Is there a way to split these files into more manageable
> > pieces, and if so, would that be desirable?
> >
> > I know that the ultimate goal is to get an installation of Pootle
> > going for the community, so these questions might be moot soon.
> > Regardless, thanks very much for your help in the meantime.
> >
> > Thanks,
> >
> >    -Jane
> >
> > [1]
> https://github.com/evergreen-library-system/Evergreen/blob/master/Open-ILS/src/eg2/CHEAT_SHEET.adoc#optional-adding-a-locale
> > [2] https://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#state
> >
> > --
> > Jane Sandberg
> > Electronic Resources Librarian
> > Linn-Benton Community College
> > sandbej at linnbenton.edu / 541-917-4655
> > Pronouns: she/her/hers
>
>
>
> --
> Benjamin Shum
> Evergreener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20190122/a9c990f2/attachment.html>


More information about the Open-ils-dev mailing list