XLIFF, versioning or translation updates process (Diff Leverage step)

拥有回忆 提交于 2019-12-05 12:08:26
Yves

There is an answer for this here: http://tech.groups.yahoo.com/group/okapitools/message/2494


EDIT: content of linked message

Hi Paul,

I am trying to figure out how to use the diff leverage to improve the translation experience and get an update xliff file when merging/leveraging existing translation with new version of the document with added/modified/removed strings.

As Jim noted, with XLIFF files you may be able to take advantage of ID-based steps.

But the Diff leverage step would work too. Here is how to do it:

I've assumed you have the XLIFF files and just want to update them. You could create pipelines that do additional things like create a translation kit etc. but this will keep things simple.

First you need to put the new source file in the Input List 1 and the translated file in the Input List 2.

Then you can create the following pipeline:

  • Raw document to Filter Events
  • Diff Leveraging
  • Filter Events to Raw Document

In the parameters for the Diff Leverage step: make sure the option "Copy to/over the target" is set.

Then execute the pipeline.

I've attached a comparison (compare_out.html) between the original new file and the output file. As you can see all the text that could be leveraged is now in the output. Your entry 'AdminTitleResource' is not translated because it's the source in the translated file is different, and your two new entries are also not translated.

You'll also note the new attributes approved='yes' that are there to indicate the translation was done. That extra flag can be used to differentiate entries that need translation from the one that have been leveraged.

For some reason two of the leveraged entries do not have it: I'll have to look at that and report back. It may be a bug or some condition I don't recall (maybe Jim does).

The Id-Based Copy step could almost be better. It would copy the translated text by matching in the resname of the entries. I say almost because currently it does not look at the source texts, so you get the translation even if the new source is different (it's not a 'leveraging' step). But we could add an option to make that extra check and that would make the step work like a leveraging step. I'll try to find the time do this.

Hope this helps, -yves

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!