A team project including two repository to two folders mapped to the source folder.
<repository type="git" url="https://github.com/&ORG;/CommonFiles.git">
<mapping local="source/batch1" repository="source/batch1" />
<mapping local="source/batch2" repository="source/batch2" />
</repository>
Full example here.
batch1
folder from the settings of the project and masks it (see below, full example here), and pushes the new omegat.project
file to the repo. User reloads the project (e.g. pressing F5).<source_dir_excludes>
<mask>batch1/**</mask>
</source_dir_excludes>
<!-- ... -->
<repository type="git" url="https://github.com/&ORG;/CommonFiles.git">
<!-- <mapping local="source/batch1" repository="source/batch1" /> -->
<mapping local="source/batch2" repository="source/batch2" />
</repository>
bacht1
is still in the source folder but is not loaded in the project. Only files from folder batch2
are visible for translation.batch1
still appear in the editor and the project files dialog, and the log shows the following error:31398: Info: Click on 'projectReloadMenuItem' menu item (LOG_MENU_CLICK)
31398: Info: Project saving start (LOG_DATAENGINE_SAVE_START)
31398: FINE: Disable autosave
31398: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED)
31398: FINER: Time for find matches: 3
31398: FINEST: Issue detection took 0.001 s
31398: Info: No need to save project, because no changes were made (LOG_DATAENGINE_SAVE_NONEED)
31398: Info: Start rebase (TEAM_REBASE_START)
31398: FINE: Rebase and commit 'omegat/project_save.tmx'
31398: FINE: GIT switchToVersion 7bbacbb03a71ff9726c2923fe679b32d1e83c6f4
31398: FINE: local file 'omegat/project_save.tmx' wasn't changed
31398: FINE: GIT switchToVersion origin/master
31398: FINE: remote file 'omegat/project_save.tmx' was changed
31398: Info: Reading TMX file /home/souto/Work/rec_omt/.repositories/https_github.com_capstanlqc_pisa_pisa_t1_t2_rec_3omt_repo.git/rec_omt/omegat/project_save.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.0_0_8ae1ecfb (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: FINE: only remote changes - get remote 'omegat/project_save.tmx'
31398: Info: Reading TMX file /home/souto/Work/rec_omt/omegat/project_save.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.0_0_8ae1ecfb (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: FINE: Rebase and commit 'glossary/glossary.txt'
31398: FINE: GIT switchToVersion 7bbacbb03a71ff9726c2923fe679b32d1e83c6f4
31398: FINE: local file 'glossary/glossary.txt' wasn't changed
31398: FINE: GIT switchToVersion origin/master
31398: FINE: remote file 'glossary/glossary.txt' was changed
31398: FINE: only remote changes - get remote 'glossary/glossary.txt'
31398: Info: End rebase (TEAM_REBASE_END)
31398: FINE: Enable autosave
31398: Info: Project saving end (LOG_DATAENGINE_SAVE_END)
31398: FINE: Disable autosave
31398: Info: Project closed (LOG_DATAENGINE_CLOSE)
31398: FINE: Disable autosave
31398: Info: Event: project change - "SAVE" (LOG_INFO_EVENT_PROJECT_CHANGE)
31398: Info: Event: project change - "CLOSE" (LOG_INFO_EVENT_PROJECT_CHANGE)
31398: Info: Source tokenizer: org.omegat.tokenizer.LuceneEnglishTokenizer
31398: Info: Target tokenizer: org.omegat.tokenizer.LuceneFrenchTokenizer
31398: Info: Project loading start (LOG_DATAENGINE_LOAD_START)
31398: Info: This is not PISA, let's stop here. Good bye!
31398: Error: An error occurred
31398: Error: java.util.concurrent.ExecutionException: javax.script.ScriptException: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property 'projectName' on null object
31398: Error: at java.util.concurrent.FutureTask.report(FutureTask.java:122)
31398: Error: at java.util.concurrent.FutureTask.get(FutureTask.java:192)
31398: Error: at javax.swing.SwingWorker.get(SwingWorker.java:602)
31398: Error: at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.done(ScriptingWindow.java:564)
31398: Error: at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
31398: Error: at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
31398: Error: at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
31398: Error: at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
31398: Error: at javax.swing.Timer.fireActionPerformed(Timer.java:313)
31398: Error: at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
31398: Error: at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
31398: Error: at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
31398: Error: at java.awt.EventQueue.access$500(EventQueue.java:97)
31398: Error: at java.awt.EventQueue$3.run(EventQueue.java:709)
31398: Error: at java.awt.EventQueue$3.run(EventQueue.java:703)
31398: Error: at java.security.AccessController.doPrivileged(Native Method)
31398: Error: at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
31398: Error: at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
31398: Error: at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
31398: Error: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
31398: Error: at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
31398: Error: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
31398: Error: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
31398: Error: at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
31398: Error: Caused by: javax.script.ScriptException: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property 'projectName' on null object
31398: Error: at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158)
31398: Error: at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
31398: Error: at org.omegat.gui.scripting.ScriptRunner.executeScript(ScriptRunner.java:169)
31398: Error: at org.omegat.gui.scripting.ScriptRunner.executeScript(ScriptRunner.java:133)
31398: Error: at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.doInBackground(ScriptingWindow.java:558)
31398: Error: at org.omegat.gui.scripting.ScriptingWindow$ScriptWorker.doInBackground(ScriptingWindow.java:542)
31398: Error: at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
31398: Error: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
31398: Error: at javax.swing.SwingWorker.run(SwingWorker.java:334)
31398: Error: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
31398: Error: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
31398: Error: at java.lang.Thread.run(Thread.java:748)
31398: Error: Caused by: javax.script.ScriptException: java.lang.NullPointerException: Cannot get property 'projectName' on null object
31398: Error: at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320)
31398: Error: at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155)
31398: Error: ... 11 more
31398: Error: Caused by: java.lang.NullPointerException: Cannot get property 'projectName' on null object
31398: Error: at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
31398: Error: at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
31398: Error: at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46)
31398: Error: at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
31398: Error: at Script5.run(Script5.groovy:14)
31398: Error: at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317)
31398: Error: ... 12 more
31398: Info: done (147 ms elapsed)
31398: FINE: GIT switchToVersion origin/master
31398: FINE: GIT switchToVersion origin/master
31398: Info: Reading TMX file /home/souto/Work/rec_omt/omegat/project_save.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.0_0_8ae1ecfb (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: Info: Omtv= 5.7.1 flag2_5=true flag3_plus=true
31398: Info: Loading: '/home/souto/Work/rec_omt/source/ldw_batch1/i18next_sample.json' with okf_json@pisa25
31398: Info: Omtv= 5.7.1 flag2_5=true flag3_plus=true
31398: Info: Loading: '/home/souto/Work/rec_omt/source/maths_batch1/item1.xml' with okf_xml@pisa25
31398: Info: Load project source files: 95ms
31398: Info: Start rebase (TEAM_REBASE_START)
31398: FINE: Rebase and commit 'omegat/project_save.tmx'
31398: FINE: GIT switchToVersion 7885a48a29ba378a0bdbb87b4e9b9a3c5a6c6ce6
31398: FINE: local file 'omegat/project_save.tmx' wasn't changed
31398: FINE: GIT switchToVersion origin/master
31398: FINE: remote file 'omegat/project_save.tmx' wasn't changed
31398: FINE: there are no changes 'omegat/project_save.tmx'
31398: Info: Reading TMX file /home/souto/Work/rec_omt/omegat/project_save.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.0_0_8ae1ecfb (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: FINE: Rebase and commit 'glossary/glossary.txt'
31398: FINE: GIT switchToVersion 7885a48a29ba378a0bdbb87b4e9b9a3c5a6c6ce6
31398: FINE: local file 'glossary/glossary.txt' wasn't changed
31398: FINE: GIT switchToVersion origin/master
31398: FINE: remote file 'glossary/glossary.txt' wasn't changed
31398: FINE: there are no changes 'glossary/glossary.txt'
31398: Info: End rebase (TEAM_REBASE_END)
31398: FINER: File '/home/souto/Work/rec_omt/tm/rec/t02.tmx' added
31398: Info: Reading TMX file /home/souto/Work/rec_omt/tm/rec/t02.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.1_0_c3206253 (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: FINER: File '/home/souto/Work/rec_omt/tm/rec/t01.tmx' added
31398: Info: Reading TMX file /home/souto/Work/rec_omt/tm/rec/t01.tmx (TMXR_INFO_READING_FILE)
31398: Info: Created by: OmegaT (TMXR_INFO_CREATION_TOOL)
31398: Info: Version: 5.7.1_0_c3206253 (TMXR_INFO_CREATION_TOOL_VERSION)
31398: Info: Segmentation method: sentence (TMXR_INFO_SEG_TYPE)
31398: Info: Source language: en (TMXR_INFO_SOURCE_LANG)
31398: Info: Reading of TMX file complete (TMXR_INFO_READING_COMPLETE)
31398: Info: Project loading end (LOG_DATAENGINE_LOAD_END)
31398: FINE: Enable autosave
31398: Info: Event: project change - "LOAD" (LOG_INFO_EVENT_PROJECT_CHANGE)
31398: Info: Extra notes : /notes directory not found for this project
31398: Info: Selected LanguageTool source language: en
31398: Info: Selected LanguageTool target language: fr
31398: FINER: File '/home/souto/Work/rec_omt/glossary/glossary.txt#oldbased_on_f43602a27bf4f22de2084f9be54cb7657b9eef85' added
31398: FINER: File '/home/souto/Work/rec_omt/glossary/glossary.txt' added
31398: Info: Loading glossary glossary.txt (CT_LOADING_GLOSSARY)
31398: Info: Added 0 glossary entries from glossary.txt (CT_LOADING_GLOSSARY_DETAILS)
31398: FINER: File '/home/souto/Work/rec_omt/glossary/glossary.txt#oldbased_on_0a4b1cbccd66e723ad598326435e15ba1b8ac109' added
31398: FINER: File '/home/souto/Work/rec_omt/glossary/glossary.txt#oldbased_on_7bbacbb03a71ff9726c2923fe679b32d1e83c6f4' added
31398: Info: No spell checker found for language fr-ZZ
31398: FINE: Jumping to last entry #1.
31398: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED)
31398: FINER: Time for find matches: 5
31398: Info: Event: new entry activated (LOG_INFO_EVENT_ENTRY_ACTIVATED)
31398: FINER: Time for find matches: 1
31398: Info: This is not PISA, let's stop here. Good bye!
31398: Info: done (93 ms elapsed)
31398: FINEST: Issue detection took 0.001 s
The expected results are the case when the user closes the project and re-opens it.
I forgot to add support info:
Version: OmegaT-5.7.1_0_c3206253
Platform: Linux 6.0.2-arch1-1
Java: 1.8.0_312 amd64
Memory: 323MiB total / 59MiB free / 3520MiB max
Also reproduced on Windows 10 with version 5.7.0.
A error Exception is not related to team feature. Please ask Script author "PISA"?
Team and mapping feature has already changed on OmegaT 5.8 Nightly.
Thanks, Hiroshi. Indeed, the error seems related to my script. However, the actual results yet do not match the expected results. The project is not updated until it's closed and re-opened.
Diff:
In log file
There are files named;
ldw_batch1/..
andmaths_batch1/..
that is not match with maskbatch1/**
, and there is no log message forbatch1/
files.It is different with the claim.
From observation of reproduce procedure, when "reload(F5)" OmegaT DOES NOT download
omegat.project
file. When close and open team project it works as expected.A reload logic is in
ProjectUICommands
class in L711- L756 like as followsA core point is near a last line.
ProjectFactory.loadProject(props, true);
On there
props
is a content of LOCALomegat.project
, not Remote one because there is no download function betweencloseProject()
andloadProject()
.Start working to fix the issue
https://github.com/omegat-org/omegat/pull/303
When forcing download and reload project, it costs heavy work and significantly slow down the reload process. Is it an intended behavior for the issuer?
It may not be a good idea to change "reload local files" feature. Isn't it?
Enhancement is proposed. It add new menu item Project-> Reload team project
https://github.com/omegat-org/omegat/pull/304
The change is merged.
released 6.0