[go: up one dir, main page]

Menu

#1164 Translation memories are not correctly reloaded after team synchronization

6.1
open-fixed
None
5
2024-08-21
2023-05-03
msoutopico
No

I am experiencing the following issue in OmegaT 5.7.1. The issue appears erratically, it's not easy to reproduce, so the steps to reproduce below might not always lead to the issue (other variables

The issue has been reproduced by different users both on Windows and Linux, working on different files and in different team projects, but with similar settings and always hosted in AWS CodeCommit.

The issue happens erratically, not systematically. It may happen, it may not. I will provide more info in the comments if I discover more.

Preconditions

The starting point is that segments are pretranslated with exact matches from a TM in /tm/auto. I use pink background color to highlight those segments.

Steps to reproduce

The issue may reproduce when the user activates a segment.

The segment may be activated by double-clicking it or by moving to it (pressing Ctrl+Enter to go to the previous segment, or Enter to go to the next one).

Expected results

When double-clicking a segment or moving into it by other means, the segment becomes active and the translation is the exact match coming from the TM in /tm/auto (same match that is there before activating the segment).

Actual results

When the user activates the segment, the segment gets activated but the pre-populated translation disappears.

Two variants of the problem have been reproduced:

  • In OmegaT 5.7.1, the segment becomes untranslated (the x-auto translation gets deleted)
  • In OmegaT 6.1.0 (commit ebff1d4ea), the translation is replaced with the source text

Demo

In the animation below, first I move through the segments with Enter and Ctrl+Enter. Then I double click segment #0403, where the issue happens. Then I move to the following segments, where the issue also happens.

In the animation below, I am on segment 1564 and then I press Ctrl+Enter to move to the previous segment (#1563), where the issue happens.

Color legend:

  • Pink = pretranslated
  • Blue = untranslated
  • Green = active

Discussion

1 2 > >> (Page 1 of 2)
  • msoutopico

    msoutopico - 2023-05-03

    Some more info: In connection with the problem, I also get this dialog sometimes (I don't know how to reproduce it), where OmegaT thinks (incorrectly) that there's a conflict between the x-auto version, the source text and a "null" translation:

    This is probably yet another manifestation of the same underlying issue. This dialog should only appear to users that are sharing the project with other users when their work overlap, but in this case there's only one user working on the team project.

     

    Last edit: msoutopico 2023-05-03
  • Briac Pilpré

    Briac Pilpré - 2023-05-10

    This bug is reproducible on a minimal team project: https://github.com/briacp/omegat-team-project.git:
    1. Open/Download the project
    2. Go to the first segment
    3. Ctrl+S to force project synchronization
    4. Enter to move to second segment

    I think this happens during of the call to projectTMX.replaceContent(newTMX) inside RealProject.rebaseAndCommitProject(boolean).

    The defaults/alternative TM are reset before the updated TM from the remote server are read again, which in turn gives an empty result when the segment is activated and translations are search in RealProject.getAllTranslations(SourceTextEntry).

     
    • Thomas CORDONNIER

      The defaults/alternative TM are reset before the updated TM from the remote server are read again,

      Any reason why they are completely replaced? This is a real question, I rarely use the teams feature in OmegaT so maybe there is something I misunderstand.
      In the code it is written "it can be not loaded yet", which is true, but it may also happen that the memory (variable projectTMX) contains values which have not yet been sent in the project_save.tmx, and it is typically what happens when the data come from tm/auto, as they are also not saved in the project_save.tmx

      Can you have a look and tell me what you think about this change:
      https://github.com/t-cordonnier/omegat/tree/1164-reloadOnSync

      I did not succeed to reproduce the bug and again I may miss something as I rarely use teams feature, but that is an idea.

       
      👍
      1
      • msoutopico

        msoutopico - 2023-09-26

        Hi @t_cordonnier. I can't answer your question, I hope @briac_pilpre or @miurahr9 can.

        In order to reproduce it, this could help. In OmegaT 5.7.1 or 6.x, please do:

        1. Project > Download Team Project > https://github.com/capstanlqc/ticket_1164_test_omt.git (you shouldn't need to authenticate, but let me know if you do)
        2. Press Ctrl+J, enter 3 to go to segment 3
        3. Press Ctrl+S to save
        4. Press Enter to go to segment 1

        Can you reproduce it when you follow those steps?
        Thanks, Manuel

         
      • msoutopico

        msoutopico - 2023-09-26

        Hi again, @t_cordonnier! Very good news, I have tested your patch and it fixes the issue reported in this ticket (#1164) without introducing the bug that @briac_pilpre / @miurahr9 's patches have. Congrats!!

        It would be great to have some peer-review on your patch in the branch you shared, I hope someone can do that (or should that be done on your PR in the official repo?). Once that is done, would it be possible to release a version 5.7.2 including this bug fix?

         
  • Marco Cevoli

    Marco Cevoli - 2023-05-16

    Exactly same behaviour, but we aren't using /auto/ folder. It usually happens after I click CTRL+U: untranslated segments appear, but I'm 100% we already translate them. After I edit the first one and move to the next (that appears as translated), the translation is replaced with the source text.

    If I use TortoiseSVN to check the log, I do find the segments in old commits, but these translation units aren't saved elsewhere (neither in the current project-save.tmx, nor in the bak files).

     
  • msoutopico

    msoutopico - 2023-05-18

    Hello. I keep coming across what seem different manifestations of the same problem, however since the setup is different (enforce rather than auto) and as I wasn't sure it's the same actual bug I have created a separate ticket: #1171.

     
  • msoutopico

    msoutopico - 2023-05-23

    Here comes yet another way in which the issue kicks:

    1. Find segments that have an x-auto translation
    2. From the list of results of the Find dialog, double click the segment you want to activate

    Results: The segment activates but the auto-populate translation disappears.

    See video: https://i.imgur.com/vuW1eMH.mp4

     

    Last edit: msoutopico 2023-05-23
  • Briac Pilpré

    Briac Pilpré - 2023-06-20
    • summary: Auto-populated translations disappear when a segment gets activated --> External memories are not correctly reloaded after team synchronization
     
  • Briac Pilpré

    Briac Pilpré - 2023-06-20
    • summary: External memories are not correctly reloaded after team synchronization --> Translation memories are not correctly reloaded after team synchronization
     
  • Hiroshi Miura

    Hiroshi Miura - 2023-08-31

    Finally we will fix the bug with https://github.com/omegat-org/omegat/pull/733
    You will find the behavior that background color is lost but enforce translation is still there.

     
    • msoutopico

      msoutopico - 2023-08-31

      Thanks, Hiroshi. With regards the work we do in my team the background color of auto-populated segments is a fundamental feature. Do you mean that we should say goodbye to this feature or is it possible to restore it somehow? Does that affect both x-enforce and x-auto entries or only x-enforce?

       
      • Hiroshi Miura

        Hiroshi Miura - 2023-09-04

        The pull request is intended to fix "#1164 Translation memories are not correctly reloaded after team synchronization issue" only.

         
        • msoutopico

          msoutopico - 2023-09-04

          Thanks, Hiroshi. That is clear, but I'm not sure if I understand correctly when you say "you will find the behavior that background color is lost". Do you mean that this fix will resolve the problem of losing the auto-populated translation but will in turn introduce the side-effect problem that the background color will be gone?

           
          • Hiroshi Miura

            Hiroshi Miura - 2023-09-04

            auto/enforce entries are automatically saved and committed when syncing team project.
            After syncing team project, these saved entries are considered as translated entries.
            These entries are saved in project_save.tmx and load from it, so it is not enforced in the session after saving.

             
            • msoutopico

              msoutopico - 2023-09-05

              I think there's a misunderstanding.

              Translations are considered "enforced" when they come from a TMX file saved in /tm/enforce as long as that file is there (or at least that's the behaviour we have in offline projects, and the expected behaviour also in team projects).

              If the TMX file containing those matches is removed from /tm/enforce, then those translations will stay (since they are saved in the project_save.tmx) but are not considered enforced any more, they can be considered just normal translations and do not need to have a background color.

              However, as long as the TMX file is there in the /tm/enforce folder and it contains an exact match (either default or alternative) for a segment, it is considered that the translation of that segment is enforced and must be colored accordingly.

              We've been using this functionality for years, I hope we can continue using it.

               
              • Hiroshi Miura

                Hiroshi Miura - 2023-09-05

                However, as long as the TMX file is there in the /tm/enforce folder and it contains an exact match (either default or alternative) for a segment, it is considered that the translation of that segment is enforced and must be colored accordingly.

                Your explanation above is about #1171 Enforced translations lose background color not for here. So comment is invalid in this context.

                the issue "#1164 Translation memories are not correctly reloaded after team synchronization" here is the issue about a synchronization of team project.

                https://github.com/omegat-org/omegat/pull/733 try to solve the issue BUGS#1164 .
                The change aim to save enforced translation to the local project_save.tmx and upload to team repository, then reload into the project.

                It does not change a code when (re)loading project_save.tmx and there are enfoced tm have exact matches which is reported as BUGS#1171 by you.

                 
                • msoutopico

                  msoutopico - 2023-09-05

                  Thanks, Hiroshi. I think I understand now. By "You will find the behavior that background color is lost but enforce translation is still there." you simply meant that PR733 is a fix (TBC) of issue #1164, not of issue #1171. Thanks and sorry.

                   
  • Hiroshi Miura

    Hiroshi Miura - 2023-09-05

    @briac_pilpre please review https://github.com/omegat-org/omegat/pull/733 for BUGS#1164 ?
    Could you also please tackle with BUGS#1171 ?

     
    • msoutopico

      msoutopico - 2023-09-11

      Thanks, @miurahr9. I have tested your patch, I can't reproduce the issue reported in this ticket (1164). However, I do have another bigger problem: translations are not loaded when I download a team project. Segments that should appear translated are not when the project loads for the first time, and translations do not appear either in the matches pane. I need to reload to make them appear. This animation shows the problem:

      If anyone wants to reproduce, here are the steps I took:

      gh repo clone miurahr/omegat && cd omegat
      git checkout origin/topic/miurahr/autosegment-disappear-1164-3
      ./gradlew run --args="--config-dir=/home/souto/.omegat610-dev/"
      

      Then download project https://github.com/capstanlqc/ticket_1211_test_omt.git

       

      Last edit: msoutopico 2023-09-22
      • Hiroshi Miura

        Hiroshi Miura - 2023-09-28

        Thank you for reproducibles. I can reproduce it and found the PR does not process loading project_save.tmx in first download.
        In previous code, always reloading a tmx.

         
        • Hiroshi Miura

          Hiroshi Miura - 2023-09-28

          I've pushed a commit with the fix.
          I think it now behave as same as OmegaT 6.0.

           
  • Hiroshi Miura

    Hiroshi Miura - 2023-11-18
    • status: open --> open-fixed
    • assigned_to: Hiroshi Miura
     
  • Lev Abashkin

    Lev Abashkin - 2024-08-19

    There is still something broken with team synchronization in 6.1-git. Several months ago I tried to use 6.1, but it kept deleting recent TM submitted by other team members. Today I gave it another try with a fresh build and reproduced this bug. It seems that 6.1 makes an assumption at some point that the project is up to date when it's actually not. Meanwhile 6.0 works fine.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.