If TMX is used in /tm/enforce only temporarily, TU's from it persist in the project
only if some changes are made while the enforced TMX is present.
Below is a description when TU's aren't kept.
Problem: Changes from editors need to be merged into the existing ongoing project. That is achieved through /tm/enforce. The idea was that TU's from enforced TMX would make it into project_save.tmx and stay there even when enforced memory is removed (similarly to TU's from /tm/auto that make it into project_save.tmx upon project load and stay there for good). As it is now, when enforced TMX is removed and project reloaded, TU's revert back to what they were before the TMX was put into /tm/enforce.
I'm attaching a sample EN-US → EN-GB project with only a few sentences where project_save.tmx contains unedited version, and /tm/enforce/EDIT.tmx is the version that needs to be merged into the project.
The edits in the enforced memory are: "apologize" → "apologise", "discolored" → "discoloured" (segment 1), and "license" → "licence" (segment 2). After EDIT.tmx is added into /tm/enforce and the project is reloaded, those edits show in their respective targets, but when the EDIT.tmx is removed and the project reloads again, the targets revert back to what they originally were.
--
Kos
I think you need to introduce of some sort change into the project so that OmegaT knows it needs to rewrite the
project_save.tmx
. You could add a space to an existing translation, commit the change, then go back and remove the space. Upon saving, all current translations should be saved toproject_save.tmx
and persisted across loads.Seconded. The issue is that you do not save your translations. Once they are in project_save.tmx, they have not reason to change.
Didier
Thanks for clearing it. I'll move the bug to Documentation to clarify it in the manual. It currently says:
Ticket moved from /p/omegat/bugs/748/
Diff:
I added this sentence at the end of tm/enforce folder section:
"Overwriting is operating until the TMX is removed from /tm/enforce."
Do you think it's enough?
It should mention, I think, that enforced changes revert back only if the user didn't change the translation (added new segments or edited existing ones) while the TMX was present in /tm/enforce.
So if users want to to have TU's from /tm/enforce in their /omegat/project_save.tmx, they should:
Hi Kos, I re-used your text this way:
tm/enforce folder
If you have no doubt that a TMX is more accurate than the projectsave.tmx of OmegaT, put this TMX in /tm/enforce to overwrite existing default translations unconditionally.
Unlike in the tm/auto folder, the TMX present in /tm/enforce has a temporary effect:
Note: if TMX is removed before step 3, enforcements aren't kept at all.
Does that do the trick?
Vincent
Last edit: Vincent Bidaux 2016-07-01
Hi Vincent,
Thanks for getting to this tricky part. The only comment I have is that the
project's memory filename is project_save.tmx (note the underline).
--
Kos
Last edit: Vincent Bidaux 2016-07-01
OK thanks
I disagree with
The behaviour is exactly the same with a TM in the /auto folder: if you quit without any change, the translation is not recorded. (I just tested again to be sure.)
Consequently, this sentence "Unlike in the tm/auto folder, the TMX present in /tm/enforce has a temporary effect:" is debatable. TMs in /enforce have no more (or no less) a temporary effect than those in /auto.
Perhaps the confusion comes from the previous documentation:
all the segments in the source text, for which translations can be found in those "auto" TMs, will land in the main TM of the project without any user intervention.
So one of the step described (make a slight change) applies equaly to the /auto and /enforce folder (for a good reason, it's the same source code doing it).
Didier
OK, I will not mention the difference, and I'll update the tm/auto description so it looks similar to the tm/enforce one.
Thank you.
Didier
The text was updated in SVN (3.6).
I close.
Didier