OASIS XML Localisation Interchange File Format (XLIFF) TC

  • 1.  XLIFF 2.0 + ICU messages in Angular

    Posted 04-12-2021 11:24
    Hi, Angular, a very popular JavaScript framework, supports XLIFF 2.0 for internationalization. See https://angular.io/guide/i18n It is interesting to notice how Angular mixes XLIFF 2.0 with ICU Message Format for handling plurals and alternates. It places raw ICU notation in <source>, something that requires additional processing before translation. I've got a sample file with XLIFF 2.0 that has some validation issues. It might be interesting to contact the i18n group at Angular and work with them on XLIFF 2.0 support. Regards, Rodolfo


  • 2.  Re: [xliff] XLIFF 2.0 + ICU messages in Angular

    Posted 04-12-2021 13:08
    Most interesting indeed. Thanks for sharing this, Rodolfo. I think reaching out to that group would be a very good idea. Thanks, Bryan On Monday, April 12, 2021, 4:23:48 AM PDT, Mr. Rodolfo Raya <rmraya@maxprograms.com> wrote: Hi, Angular, a very popular _javascript_ framework, supports XLIFF 2.0 for internationalization. See https://angular.io/guide/i18n It is interesting to notice how Angular mixes XLIFF 2.0 with ICU Message Format for handling plurals and alternates. It places raw ICU notation in <source>, something that requires additional processing before translation. I've got a sample file with XLIFF 2.0 that has some validation issues. It might be interesting to contact the i18n group at Angular and work with them on XLIFF 2.0 support. Regards, Rodolfo


  • 3.  RE: [xliff] XLIFF 2.0 + ICU messages in Angular

    Posted 04-13-2021 15:57




    +1
    Thank you, Rodolfo.
    Luc Ãa
     


    De : xliff@lists.oasis-open.org <xliff@lists.oasis-open.org>
    De la part de Bryan Schnabel
    Envoyà: 12 April 2021 15:08
    à: xliff@lists.oasis-open.org; Mr. Rodolfo Raya <rmraya@maxprograms.com>
    Objet : Re: [xliff] XLIFF 2.0 + ICU messages in Angular


     


    Most interesting indeed. Thanks for sharing this, Rodolfo. I think reaching out to that group would be a very good idea.


     


    Thanks,


     


    Bryan


     





    On Monday, April 12, 2021, 4:23:48 AM PDT, Mr. Rodolfo Raya < rmraya@maxprograms.com > wrote:



     


     



    Hi,


     


    Angular, a very popular _javascript_ framework, supports XLIFF 2.0 for internationalization. See
    https://angular.io/guide/i18n



     


    It is interesting to notice how Angular mixes XLIFF 2.0 with ICU Message Format for handling plurals and alternates. It places raw ICU notation in <source>,
    something that requires additional processing before translation.


     


    I've got a sample file with XLIFF 2.0 that has some validation issues. It might be interesting to contact the i18n group at Angular and work with them on XLIFF
    2.0 support.


     


    Regards,


    Rodolfo










  • 4.  RE: [xliff] XLIFF 2.0 + ICU messages in Angular

    Posted 04-13-2021 19:19
    I'm curious what is recommended _expression_ for this type of message in XLIFF. I think contacting Angular folks is OK, but I'm not sure XLIFF working group has any reasonable suggestion ready. The biggest problem is, each sub pattern is associated with a plural category (zero/one/two/few/many/others), and appropriate set of categories depends on target language. So for example, default set of categories used by English is [one] and [others]. one: A file will be deleted. others: %d files will be deleted. In Japanese, it will be turned into a single category - others, while Russian translation requires 4 categories - one/few/many/others. At this moment, I'm not sure if XLIFF provide any reasonable framework to handle these categories. Another complexity of plural format is that a developer may special case pattern for specific number. For example - 0: No users enters the room. one: {0} enters the room. 2: {0} and {1} enter the room. 3: {0}, {1} and {2} enter the room. others: {0}, {1}, {2} and others enter the room. I heard some companies (I believe it was Google) discourage developers to use categories other than default categories, because it makes translation extremely difficult. I thought Google person mentioned they do have internal translation tool that automatically populate default categories for each target language. In IBM, we also integrate helper tool for translation to produce proposed plural categories and also validating translation result. I'm participating Unicode CLDR project and ICU project. I don't have bandwidth to participate Message Format Working Group, which was created under CLDR project. How to map such complicated construction to XLIFF is our interest, and I'm sure David is participating the working group because of this. David, do you have any insights? -Yoshito


  • 5.  Re: [xliff] XLIFF 2.0 + ICU messages in Angular

    Posted 04-12-2021 13:39
    Hi Rodolfo, > It is interesting to notice how Angular mixes XLIFF 2.0 with ICU > Message Format for handling plurals and alternates. It places raw > ICU notation in <source>, something that requires additional > processing before translation. > > I've got a sample file with XLIFF 2.0 that has some validation > issues. It might be interesting to contact the i18n group at Angular > and work with them on XLIFF 2.0 support. The goal of Unicode Message Format Working Group ( https://github.com/unicode-org/message-format-wg ) is standardizing message format pattern and behavior including plural. They started with ICU message format as the base. David is participating the working group, and as far as I know, one of his main interest is XLIFF representation for message format patterns. He may have some better insights for plural message pattern issue. I'm also struggling the plural format handling in our private translation service in IBM. Some teams started using ICU style plural message format (through formatJS, Angular, etc.) and some other teams started using gettext plural. The gettext plural is a bit difficult to handle, because it require to produce different numbers of segments. So our internal code maps gettext plural messages into ICU style plural pattern. Of course, it ended up the raw pattern is passed through XLIFF and it's really error prone. We need extra tooling for translation workbench to detect and handle the pattern. -Yoshito