suttacentral / bilara

Our Computer Aided Translation software
10 stars 8 forks source link

split/merge bugs #159

Open sujato opened 4 months ago

sujato commented 4 months ago

Currently they are appearing on the new segment, eg.:

Old:

"sn7.1:1.4": "Einmal, als sie ihrem Mann sein Essen brachte, stolperte sie und drückte dreimal dieses innige Gefühl aus: ",

The text is on segment sn7.1:1.4. But after splitting we have:

"sn7.1:1.4": "",
  "sn7.1:1.5": "Einmal, als sie ihrem Mann sein Essen brachte, stolperte sie und drückte dreimal dieses innige Gefühl aus: ",

Now the text is on segment sn7.1:1.5. It should be:

"sn7.1:1.4": "Einmal, als sie ihrem Mann sein Essen brachte, stolperte sie und drückte dreimal dieses innige Gefühl aus: ",
  "sn7.1:1.5": "",
sujato commented 4 months ago

See original issue here: https://github.com/suttacentral/bilara/issues/157

The basic problem is that we cannot predict or automate how the HTML will look when splitting so it must be done manually.

So whenever split or merge is performed, the HTML column must be displayed. Then the superuser can edit it and confirm the split or merge.

sujato commented 4 months ago

You can see here, it says undefined

Screenshot from 2024-07-11 17-21-49

The problem is that the merging numbers cross a major segment number, i.e. we are merging sn7.3:1.6 with sn7.3:2.1.

The basic principle here is that we should always recalculate the following segment numbers so we can merge automatically, except if the numbering is not standard, for example if there are hyphens in the segment numbers. In that case it is too complex and it better be done manually.

But this is not such a case. Here the numbering is standard and we should be able to merge it.

In this case, the former segment sn7.3:2.1 is merged with sn7.3:1.6. Then we should change :

And that's it.