BuddhaNexus / buddhanexus-frontend

Frontend repository for BuddhaNexus. https://buddhanexus.net/
4 stars 1 forks source link

Links to various texts not correct #468

Open ayya-vimala opened 2 weeks ago

ayya-vimala commented 2 weeks ago

If I open a text in text view or table view mode and click on one of the colored text parts, the right column opens with it's matches. This is correct but if those matches have a - in it, the links to those are not correctly generated.

For instance atk-s0502a:97–99 renders the link https://buddhanexus2.kc-tbts.uni-hamburg.de/db/pli/atk/text?selectedSegment=atk&selectedSegmentIndex=0 instead of the correct https://buddhanexus2.kc-tbts.uni-hamburg.de/db/pli/atk-s0502a/text?selectedSegment=atk-s0502a:97. The correct filename is the part before the : so that has to be used to refer to. The part after the : is the segment number and that is what the selected segment number should become.

The numbers view does this partly correct in that it takes the correct filename, but all views, incl. numbers view still have the wrong selected segment number when there is a range. In the above example, atk-s0502a:97–99 is a range so the segment numbers are 97 through to 99 and therefore the number 97 should be used as the correct selectedSegment.

ayya-vimala commented 1 week ago

This should be solved when the filenames are changed in the new backend