TagValidationTool#checkEntry do not have any logic to skip error checks other than no-translated entry.
Furhter investigation is impossible without reproduceable data and senario.
/***Checksentryforvalidtags.**@returnAn{@linkErrorReport}summarizingtheresults(willbeemptyif*noissuesfound)*/privateErrorReportcheckEntry(FileInfofi,SourceTextEntryste,TMXEntryte){ErrorReportreport=newErrorReport(ste,te);//ifthere's no translation, skip the string bugfix for://https://sourceforge.net/p/omegat/bugs/64/if(!te.isTranslated()||ste.getSrcText().isEmpty()){returnreport;}//Checkprintfvariablesif(Preferences.isPreference(Preferences.CHECK_ALL_PRINTF_TAGS)){TagValidation.inspectPrintfVariables(false,report);}elseif(Preferences.isPreference(Preferences.CHECK_SIMPLE_PRINTF_TAGS)){TagValidation.inspectPrintfVariables(true,report);}//ExtrachecksforPOfiles:if(fi.filterClass.getCanonicalName().equals("PoFilter")){TagValidation.inspectPOWhitespace(report);}TagValidation.inspectOmegaTTags(ste,report);if(Preferences.isPreference(Preferences.CHECK_JAVA_PATTERN_TAGS)){TagValidation.inspectJavaMessageFormat(report);}TagValidation.inspectRemovePattern(report);returnreport;}
Last edit: Hiroshi Miura 2023-07-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think the more consistent behavior would be for this option to be renamed to reflect that it deals with tags (its intention is rather obvious from the code). And then this option and the option in the Preferences > Tag Processing that prevents creating target documents with tag issues should temporarily disable any other checks selected in the Check Issues and cover only tags.
Both of these options are about files validity, not about QA.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What I’d like to know is whether the function was coded before we had all the other checks and then forgotten about, hence the inconsistency that we need to fix, or if it intended to leave them aside, in which case I'd be fine with temporarily reverting the labels.
I wrote that bug report because I wanted OmegaT to check for all the issues on leaving the segment and it did not do that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What I’d like to know is whether the function was coded before we had all the other checks and then forgotten about, hence the inconsistency that we need to fix, or if it intended to leave them aside, in which case I'd be fine with temporarily reverting the labels.
When it was added, we had only tag validation. Everything else was (and still is) available in the QA script. Then tag validation was retired and superseded by the Check Issues which is designed to be extendable by scripts and plugins. When it was done, I think very little though was given to automatic tag validation which would happen when leaving a segment and creating target files. Tag validation is relatively simple task as far as computing goes, but even on medium-sized projects it might slow things down. Add to that compute-hungry terminology checks and LanguageTool, and it becomes a real annoyance if it pops up every now and then.
I wrote that bug report because I wanted OmegaT to check for all the issues on leaving the segment and it did not do that.
Fair enough, but I think with the current implementation of the Check Issues function with the scope always being an entire current document, it is not a very good idea. If somehow the check could be limited to the segment only, that would be quite helpful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I agree with Kos’s explanation regarding the historical background and the current architectural constraints.
Technical Summary
The automatic check triggered when leaving a segment was originally implemented only for tag validation.
Later, tag validation was replaced by Check Issues, which introduced heavier checks (terminology, LanguageTool, scripts/plugins).
The current Check Issues system always operates on the entire document, so extending the per-segment automatic check to full QA would cause performance issues on medium or large projects.
Given this, the current behavior is not a functional bug but rather the result of:
legacy tag-validation logic, and
the document-wide architecture of Check Issues.
The real inconsistency lies in the labeling, which does not clearly indicate that this option is tag-specific.
Proposal for This Ticket
To resolve this ticket cleanly:
Update the label of the option so it explicitly refers to tag integrity/file validity.
Possible revised titles:
“Validate tags when leaving segment”
“Automatic tag integrity check on segment exit”
“Tag-only validation when changing segments”
Close this ticket after the label change, since the observed behavior matches the original design intention.
Open a separate feature request for extending the per-segment check to general QA, ideally with segment-scoped checks to avoid heavy document-wide processing.
Suggested Ticket Title Update
To reflect the real issue, the title could also be revised to something like:
“Rename segment-exit automatic check option to clarify it is tag-specific”
This keeps this ticket focused on UI clarity, and leaves functional enhancements to the new feature request.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. We can revert to something like "Check tag issues when leaving the segment".
Our next issue (and @miurahr9, you mentioned that the other day) is that some language pairs that require tag order changes will always appear in the the issue window. So this function should be limited in scope to the segment, and not to the document or full project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Uhm, I have just experienced a behavior @brandelune described in a case of #1308.
Dialog with the auto check when leaving segment, also checks spell checker and tag validator on OmegaT 6.0.x branch and also master branch.
It is just buggy.
😕
1
Last edit: Hiroshi Miura 2025-11-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In master branch, EditorController#commitAndDeactivate has a code
// validate tags if requiredif(Preferences.isPreference(Preferences.TAG_VALIDATE_ON_LEAVE)){Stringfile=getCurrentFile();newSwingWorker<Boolean,Void>(){@OverrideprotectedBooleandoInBackground()throwsException{returnCore.getTagValidation().checkInvalidTags(entry);}@Overrideprotectedvoiddone(){try{if(Boolean.FALSE.equals(get())){Core.getIssues().showForFiles(Pattern.quote(file),entry.entryNum());}}catch(InterruptedException|ExecutionExceptione){Log.logErrorRB(e,"LOG_ERROR_TAG_VALIDATION_FAILED");}}}.execute();}
Now doInBackground examine checkInvalidTags(entry) and done examine the result of tag validation by if (Boolean.FALSE.equals(get()))
This logic is the one JC explained, when tag error exists, check other issues. Otherwise skip another issues.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
TagValidationTool#checkEntrydo not have any logic to skip error checks other than no-translated entry.Furhter investigation is impossible without reproduceable data and senario.
Last edit: Hiroshi Miura 2023-07-03
I'll prepare something later. Thank you.
When no reproducible given, I'd like to close the issue.
Sorry, it's on my "todo" list. I'll be on it shortly.
See here:
https://sourceforge.net/p/omegat/bugs/1225/?limit=25#8cc4/2a02/1a77/7acf
The check I mention is the automatic check made when leaving a segment.
I think the more consistent behavior would be for this option to be renamed to reflect that it deals with tags (its intention is rather obvious from the code). And then this option and the option in the Preferences > Tag Processing that prevents creating target documents with tag issues should temporarily disable any other checks selected in the Check Issues and cover only tags.
Both of these options are about files validity, not about QA.
What I’d like to know is whether the function was coded before we had all the other checks and then forgotten about, hence the inconsistency that we need to fix, or if it intended to leave them aside, in which case I'd be fine with temporarily reverting the labels.
I wrote that bug report because I wanted OmegaT to check for all the issues on leaving the segment and it did not do that.
When it was added, we had only tag validation. Everything else was (and still is) available in the QA script. Then tag validation was retired and superseded by the Check Issues which is designed to be extendable by scripts and plugins. When it was done, I think very little though was given to automatic tag validation which would happen when leaving a segment and creating target files. Tag validation is relatively simple task as far as computing goes, but even on medium-sized projects it might slow things down. Add to that compute-hungry terminology checks and LanguageTool, and it becomes a real annoyance if it pops up every now and then.
Fair enough, but I think with the current implementation of the Check Issues function with the scope always being an entire current document, it is not a very good idea. If somehow the check could be limited to the segment only, that would be quite helpful.
I totally agree with you about limiting the scope to the current segment, in that particular case.
I agree with Kos’s explanation regarding the historical background and the current architectural constraints.
Technical Summary
Given this, the current behavior is not a functional bug but rather the result of:
The real inconsistency lies in the labeling, which does not clearly indicate that this option is tag-specific.
Proposal for This Ticket
To resolve this ticket cleanly:
Update the label of the option so it explicitly refers to tag integrity/file validity.
Possible revised titles:
“Validate tags when leaving segment”
“Tag-only validation when changing segments”
Close this ticket after the label change, since the observed behavior matches the original design intention.
Suggested Ticket Title Update
To reflect the real issue, the title could also be revised to something like:
“Rename segment-exit automatic check option to clarify it is tag-specific”
This keeps this ticket focused on UI clarity, and leaves functional enhancements to the new feature request.
Ok. We can revert to something like "Check tag issues when leaving the segment".
Our next issue (and @miurahr9, you mentioned that the other day) is that some language pairs that require tag order changes will always appear in the the issue window. So this function should be limited in scope to the segment, and not to the document or full project.
Uhm, I have just experienced a behavior @brandelune described in a case of #1308.
Dialog with the auto check when leaving segment, also checks spell checker and tag validator on OmegaT 6.0.x branch and also master branch.
It is just buggy.
Last edit: Hiroshi Miura 2025-11-26
In master branch,
EditorController#commitAndDeactivatehas a codeNow
doInBackgroundexaminecheckInvalidTags(entry)anddoneexamine the result of tag validation byif (Boolean.FALSE.equals(get()))This logic is the one JC explained, when tag error exists, check other issues. Otherwise skip another issues.
Historically
Core.getIssues().showForFiles(Pattern.quote(file), entry.entryNum());may just show the issues, but now it validate other issues.Here is a chain;
IssuePanelController#show->IssuePanelController#refreshData->new IssueLoader->getProviderIssues()This is an architecture design error that dialog controller handles validation.
And
showis called whentag errorexists.It is requires deep redesign of core feature how validate issues, it will lead huge change.
I proposed the change https://github.com/omegat-org/omegat/pull/1802
Is this a fix for #1308 ? You mentioned above that the behavior was consistent with the design and that we just needed to relabel the UI.
The fix has been merged. It make OmegaT checks all the issue even when tag error does not exist.