Menu

#996 XLIFF filter - RESNAME as id for alternative translations

3.1
closed-fixed
5
2014-07-17
2014-05-26
cienislaw
No

I've added possibility in XLIFF filter to use trans-unit RESNAME as a identifier for alternative translations. Also there were some changes in ID handling, mainly compatibility with SDLXLIFF sources where can be more than one source-seg entries and discarding of empty entries.

As it is quite a change I publish it here as patch to review. Today Aaron Madlon-Kay posted info on [Omega-dev-tech] group about his implementation of this feature which can be found at branch GIT/topic/aaron/xliff-resname.

1 Attachments

Discussion

  • Aaron Madlon-Kay

    Hi cienislaw. I took a look at your patch and I saw that you handled an issue I hadn't considered: that IDs for segments in a segmented trans-unit will be duplicated.

    On the other hand your patch doesn't respect existing users' preferences. So I've combined our changes on my branch.

     
    • cienislaw

      cienislaw - 2014-05-29

      Thank you for feedback, I will be more careful with preferences next time.

       
  • Aaron Madlon-Kay

    I finally had an opportunity to run this through a full project lifecycle, and I found that your patch (and mine, after combining our work) was not handling compilation-time correctly.

    The correct ID (=resname) was computed at parse-time, but not at compilation-time. So any alt translations would get dropped in the final translated output.

    This is fixed in the branch.

     
  • cienislaw

    cienislaw - 2014-07-03

    thanx for info, will check this out to remember for any future filter code. and many thanx for checking it in project. does it mean it will be included in in main soon?

     
  • Aaron Madlon-Kay

    I've committed to trunk (r6421).

     
  • Aaron Madlon-Kay

    Some detail on how IDs are determined when using @resname:

    @resname is not required to be present or unique in XLIFF. In OmegaT we fall back to the @id if @resname is not present.

    Once the OmegaT ID (@resname or @id) is determined, it is then required to be unique within its XLIFF <file>. This is accomplished by appending numerical suffixes ("_1", "_2", ...) if the ID has occurred before.

    A segmented <trans-unit> will produce multiple OmegaT segments, and these will be disambiguated as above.

     

    Last edit: Aaron Madlon-Kay 2014-07-04
  • cienislaw

    cienislaw - 2014-07-04

    after those changes XLIFF filter test is failing 3 more situations. probably its nothing, but I'm curious why.

     
  • Didier Briel

    Didier Briel - 2014-07-04

    Implemented in SVN (/trunk).

    Didier

     
  • Didier Briel

    Didier Briel - 2014-07-04
    • status: open --> open-fixed
     
  • Didier Briel

    Didier Briel - 2014-07-17

    Implemented in the released version 3.1.3 of OmegaT.

    Didier

     
  • Didier Briel

    Didier Briel - 2014-07-17
     
  • Didier Briel

    Didier Briel - 2014-07-17
    • status: open-fixed --> closed-fixed
    • Group: future --> 3.1
     

Log in to post a comment.