Closed susanodd closed 1 month ago
The relations view is also messed up by this function.
It's changes made in #1070
I resolved this on the streamline branch (#1071 )
This has been repaired and deployed.
The changes I made were to make the senses line up such that 2 is not right next to 3 if it's missing in a language. The only thing it did, I think, was add a newline if the sensetranslation for the language was empty.
Now this happens:
I'll try to look at it again
From the screenshot I can't really tell where the bugs are, can you show them more specifically?
I fixed this on Friday. It was getting run-time errors for an empty dictionary value. I fixed this.
The example above shows that the columns are not aligned with the header. I fixed that. The other error was a run-time error on a NoneType. (Empty dictionary.)
I guess maybe return a string with <br>
if it's empty?
This function had a problem. It didn't fix the runtime error except for relations view.
Yes that looks good! I also see the problem now with the columns
Then it's only in the gloss list view that they don't line up:
I'll try to repair the list view, unless you want to. I was working on the context variables in #1071 (those are deployed) That's when I came across the bug. Probably I made something undone for the format. It looks like I just replaced the code in GlossListView (gloss_row.html template).
But in the gloss list view, there can be more columns for other languages. In the Relations view there are only columns for the dataset of the gloss.
I think the bug had something to do with the languages not existing in the dictionary. It didn't want to loop over sensetranslations.items
Maybe if keys (orders) are skipped the code doesn't work properly?
This code assumes that all the order numbers exist? I don't know. It didn't want to iterate over the key, value in items, so I changed it to iterate over the keys.
new_dictionary[key] = "<br>"
I got it so that it has an empty row.
However, because of line wrapping in the columns, and that the languages are in separate columns, it is not known whether there is line-wrap or not.
Probably it needs a table inside the display for senses so the order is on a separate row and the line wrap forces the rows to align.
Yes, I thought that as well.. Although I think for most senses they will probably line up ok if not too many translations are given and it's a big screen. It's not ideal though either way.
There are quite a few formatting bugs with the senses when multiple datasets are chosen and senses are missing for languages. This is in Gloss List View.
There is a column shift and the Gloss fields appear under the Senses fields where the translations are missing.
This is because the lookup (generation of the gloss rows) is done over a "list" rather than a "language indexed dictionary".