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.
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.
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).
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).
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 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:
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
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)insideRealProject.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).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.
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:
Can you reproduce it when you follow those steps?
Thanks, Manuel
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?
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).
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.
Here comes yet another way in which the issue kicks:
Results: The segment activates but the auto-populate translation disappears.
See video: https://i.imgur.com/vuW1eMH.mp4
Last edit: msoutopico 2023-05-23
Proposed a modified version of the fix.
https://github.com/omegat-org/omegat/pull/730
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.
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?
The pull request is intended to fix "#1164 Translation memories are not correctly reloaded after team synchronization issue" only.
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?
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.tmxand load from it, so it is not enforced in the session after saving.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.
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.tmxand upload to team repository, then reload into the project.It does not change a code when (re)loading
project_save.tmxand there are enfoced tm have exact matches which is reported as BUGS#1171 by you.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.
@briac_pilpre please review https://github.com/omegat-org/omegat/pull/733 for BUGS#1164 ?
Could you also please tackle with BUGS#1171 ?
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:
Then download project https://github.com/capstanlqc/ticket_1211_test_omt.git
Last edit: msoutopico 2023-09-22
Thank you for reproducibles. I can reproduce it and found the PR does not process loading
project_save.tmxin first download.In previous code, always reloading a tmx.
I've pushed a commit with the fix.
I think it now behave as same as OmegaT 6.0.
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.