Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make spreadsheet-like ability to split and merge rows #149

Open
8 tasks
sujato opened this issue May 2, 2023 · 0 comments
Open
8 tasks

make spreadsheet-like ability to split and merge rows #149

sujato opened this issue May 2, 2023 · 0 comments
Labels
back end enhancement New feature or request front end UI user interactions major change requires major work on both front and back end

Comments

@sujato
Copy link
Contributor

sujato commented May 2, 2023

The main purpose of this is for expert speakers of root languages, so that they can adjust the segmentation of the text via the web app. This is especially important when adding new root texts.

Superusers will be able to split, edit, and merge the rows of the text, a bit like the "add new row" and "merge row" functions of a spreadsheet. Currently to do this we use Bilara i/o, which exports the data as tsv, then edit in a spreadsheet, then import again. This is powerful, but clumsy and error-prone, and not something a regular user would do.

The basic idea would be:

Split:

  • select a row
  • "add new row"
  • new row appears below
  • user manually adds appropriate data

Merge:

  • select two rows (or more?)
  • "merge rows"
  • row content is automatically added one after the other

The important thing is that all associated Bilara-data is updated properly. Thus all following rows must have their segment numbers incremented/decremented appropriately.

In more detail.

  • Before a superuser is allowed to edit the root, they must display at minimum the root, variant, and HTML columns, as well as their own translation and comments if applicable.
  • If anyone else has translated or commented on that segment, they get a notification. The notification should indicate that the row has been split or merged as appropriate.

split

When splitting, we cannot automate how the text is split. So we leave the text on the original row and add a new blank row. The superuser manually cuts and pastes the root text and their translation if any.

  • Variants must be manually edited by the superuser, else the Sutta checker will show an error.

Normally references will simply stay with the initial row, nothing to be done here.

split HTML

HTML can normally be split automatically. The basic cases:

  • {} --> add {} to both rows

  • <p>{} --> first row is <p>{}, second row is {}

  • {}</p> --> first row is {}, second row is {}</p>

  • <p>{}</p> --> first row is <p>{}, second row is {}</p>

  • These should be automated, and the superuser checks visually.

merge

Normally we can automate merging, but superusers and translators should visually check.

  • text is merged by simply adding second row after first row. (There should already be correct spacing at the end of a row, so this can be ignored.)
  • references are added with comma separation.
  • variants are added with pipe | separation.

segment number incrementation

After splitting/merging, we must increment the subsequent Bilara segments.

Now, in Bilara we typically have major and minor segment numbers. The incrementation applies to the minor number, and only until the next major number.

Take the following sequence.

mn123:5.5: abcd
mn123:5.6: efg
mn123:5.7: hij
mn123:6.1: klm
mn123:6.2: nop

Split the first segment:

mn123:5.5: abc
mn123:5.6: d
mn123:5.7: efg
mn123:5.8: hij
mn123:6.1: klm
mn123:6.2: nop

merge the first two segments of the original

mn123:5.5: abcdefg
mn123:5.6: hij
mn123:6.1: klm
mn123:6.2: nop

In some cases there are more the two levels of segment number (mn123:3.4.5) but in every case the incrementation happens only on the last number.

  • increment all related bilara-data files
@sujato sujato added major change requires major work on both front and back end enhancement New feature or request front end UI user interactions back end labels May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back end enhancement New feature or request front end UI user interactions major change requires major work on both front and back end
Projects
None yet
Development

No branches or pull requests

1 participant