Menu

#337 Clarify statement about /tm/enforce

3.6 - user manual
closed-fixed
/tm/enforce (1)
5
2016-07-12
2015-05-07
No

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

1 Attachments

Discussion

  • Kos Ivantsov

    Kos Ivantsov - 2015-05-07
    • labels: --> /tm/enforce
     
  • Aaron Madlon-Kay

    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 to project_save.tmx and persisted across loads.

     
  • Didier Briel

    Didier Briel - 2015-05-07

    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

     
  • Kos Ivantsov

    Kos Ivantsov - 2015-05-07

    Thanks for clearing it. I'll move the bug to Documentation to clarify it in the manual. It currently says:

    tm/enforce folder
    If you have no doubt that a TMX is more accurate than the project_save.tmx of OmegaT, put this TMX in /tm/enforce to overwrite existing default translations unconditionally.

     
  • Kos Ivantsov

    Kos Ivantsov - 2015-05-07

    Ticket moved from /p/omegat/bugs/748/

     
  • Kos Ivantsov

    Kos Ivantsov - 2015-05-07
    • summary: Enforced TU's don't persist when TMX is removed from /tm/enforce/ --> Clarify statement about /tm/enforce
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,9 +1,12 @@
    +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.
    
    -If needed, it can be moved to RFE's.
    -
     --
     Kos
    
    • Group: 3.4 --> www.omegat.org
     
  • Kos Ivantsov

    Kos Ivantsov - 2015-05-07
    • Group: www.omegat.org --> Future
     
  • Didier Briel

    Didier Briel - 2016-03-24
    • assigned_to: Vincent Bidaux
     
  • Vincent Bidaux

    Vincent Bidaux - 2016-04-08

    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?

     
  • Kos Ivantsov

    Kos Ivantsov - 2016-04-08

    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:

    1. Put the updated TMX into /tm/enforce
    2. Reload the project
    3. Introduce a change anywhere in the project, however miminam it would be
    4. Make decision about immunity of the enforced segments:
      • If they don't need to "immunize" enforced TU's from further changes, then the TMX needs to be removed from /tm/enforce.
      • If those updated and enforced segments need to stay immune from farther changes, the TMX should be kept in /tm/enforce.
     
  • Vincent Bidaux

    Vincent Bidaux - 2016-07-01

    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:

    1. Put the TMX in /tm/enforce.
    2. Reload the project.
    3. Make a slight change anywhere in the project (this rewrites projectsave.tmx)
    4. Make decision about immunity of the enforced segments:
      • If they DON'T NEED to stay immune from further changes, then remove the TMX from /tm/enforce.
      • If they NEED to stay immune from further changes, then keep the TMX in /tm/enforce.

    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
    • Kos Ivantsov

      Kos Ivantsov - 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
  • Vincent Bidaux

    Vincent Bidaux - 2016-07-01

    OK thanks

     
  • Vincent Bidaux

    Vincent Bidaux - 2016-07-01
    • status: open --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2016-07-02

    I disagree with

    <para>Note that the behaviour is different than in tm/auto: if TMX
                is removed from /tm/enforce before step 3, enforcements aren't
                kept at all.</para>
    

    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

     
  • Vincent Bidaux

    Vincent Bidaux - 2016-07-02
    • status: closed-fixed --> open
     
  • Vincent Bidaux

    Vincent Bidaux - 2016-07-02

    OK, I will not mention the difference, and I'll update the tm/auto description so it looks similar to the tm/enforce one.

     
    • Didier Briel

      Didier Briel - 2016-07-02

      Thank you.

      Didier

       
  • Didier Briel

    Didier Briel - 2016-07-12

    The text was updated in SVN (3.6).

    I close.

    Didier

     
  • Didier Briel

    Didier Briel - 2016-07-12
    • status: open --> closed-fixed
    • Group: Future --> 3.6 - user manual
     

Log in to post a comment.