Skip to content

Commit

Permalink
skip extra's id when updating with workfile
Browse files Browse the repository at this point in the history
  • Loading branch information
xulihang committed Feb 28, 2021
1 parent b629901 commit 2c3dba2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions BasicCAT/BasicCAT.b4j.meta
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,6 @@ ModuleClosedNodes8=
ModuleClosedNodes80=
ModuleClosedNodes81=
ModuleClosedNodes9=
NavigationStack=Main,init,170,3,Main,initializeNLP,201,0,Project,newProjectSetting,111,0,Project,open,97,5,Term,termsInASentence,274,0,ITP,getChunks,70,0,opennlp,Class_Globals,6,0,opennlp,Initialize,36,6,Term,termsInASentenceUsingIteration,323,0,Term,termsInASentenceUsingHashMap,287,4
NavigationStack=opennlp,Initialize,36,6,Term,termsInASentenceUsingIteration,323,0,Term,termsInASentenceUsingHashMap,287,4,xliffFilter,createWorkFile,66,0,xliffFilter,generateFile,296,0,xliffFilter,updateTransUnit,391,0,xliffFilter,updateNode,381,0,xliffFilter,insertTranslation,375,0,xliffFilter,buildMrk,439,0,Project,updateWithWorkfileMI_Action,893,0,Project,updateSegmentsWithWorkfile,931,6
SelectedBuild=0
VisibleModules=10,45,51,72,60,25,46,42,41,47,35,23
VisibleModules=10,45,51,72,60,25,46,42,41,47,75
2 changes: 1 addition & 1 deletion BasicCAT/Files/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.1
1.10.3
6 changes: 4 additions & 2 deletions BasicCAT/Project.bas
Original file line number Diff line number Diff line change
Expand Up @@ -935,9 +935,11 @@ Sub updateSegmentsWithWorkfile(workFilePath As String,segmentsToUpdate As List)
Dim extraFromWorkfile As Map
extraFromWorkfile=segmentFromWorkfile.Get(4)
If extraFromWorkfile.GetDefault("createdTime",1)>=extra.GetDefault("createdTime",0) Then
'only update translation and extra
'only update translation and extra except id
For Each key As String In extraFromWorkfile.Keys
extra.Put(key,extraFromWorkfile.Get(key))
If key<>"id" Then
extra.Put(key,extraFromWorkfile.Get(key))
End If
Next
segment.Set(1,segmentFromWorkfile.Get(1))
End If
Expand Down

0 comments on commit 2c3dba2

Please sign in to comment.