UniStuttgart-VISUS / damast

Code for the DH project "Dhimmis & Muslims – Analysing Multireligious Spaces in the Medieval Muslim World" (VolkswagenFoundation)
MIT License
10 stars 1 forks source link

Change sorting of alternative names in tooltip of place in location list #74

Closed tutebatti closed 2 years ago

tutebatti commented 2 years ago

The alternative names in the tooltip when hovering a place in the location list needs to be changed. The first key for sorting should be the language column in alphabetical order. The second key should be the alternative name, also alphabetically.

(Cf. #73)

mfranke93 commented 2 years ago

I anticipate a "yes" for the of first question, but for completion's sake:

  1. This sorting should apply as well to the place URI page and the reports, right? See screenshots below.
  2. "Sorting alphabetically" is straightforward when only ASCII (Latin alphabet) is involved. If there are any modified letters (even Umlauts) it gets harder, but is still possible. The hard part is when many other scripts are involved. Where to sort in Arabic script, or Hebrew? I see two possibilities, please let me know which one you prefer:

    1. Sort by locale. This would put "Täbris" after "Tabris", but before "Tebris" (Umlauts, accents etc. are put with their "base" letter"), but would group all Arabic/Greek/Hebrew... names together and sort them "alphabetically" (I don't know exactly what that would look like and can also not check if it is correct since I don't read these scripts). Since names would be grouped by language anyways this would only affect it insofar as there might be names still in the database that are in Arabic, but written in Latin script. This is probably what I would suggest.
    2. Sort by transcription if it is not empty. The transcription should be empty if the alternative name itself is "latin-readable". Then, everything would be sorted as with (i.), but maybe more logically sorted for people that cannot read Arabic/Hebrew/Greek scripts. However, in the unlikely case of mixed scripts from (i.), these names could appear somewhere in the middle of the block for that language.

Place URI Page, Ahnas

image

PDF Report, Ahnas

image

HTML Report, Ahnas

image

tutebatti commented 2 years ago
  1. This sorting should apply as well to the place URI page and the reports, right?

Good point, and, as expected, yes! :)

2. Sort by transcription if it is not empty.

This is, on the one hand, not a good idea, because the Latin alphabet has a different order than, e.g., the Arabic. On the other hand, it is straightforward and consistent even for people not familiar with certain non-Latin scripts.

Would you mind showing the results of both sorting by transcription and sorting by locale as applied to Antakya?

mfranke93 commented 2 years ago

Would you mind showing the results of both sorting by transcription and sorting by locale as applied to Antakya?

Sure. I'm afraid it will have to wait until next week though.

mfranke93 commented 2 years ago

For Antioch, both variants result in the same order: image

That's not surprising. As I already indicated: The names are grouped by language anyways, so ideally, all places of a language either have a transcription, or not. For the case that they have, as you said, the ordering of the alphabets might differ. We can see that with Aleppo, which has a few more alternative names:

Order by language, then by name (2.i. here): image

Order by language, then by either transcription or name (2.ii.): image

Note that the Armenian name Xałap is now at the end, as is the Syriac Bērū'ā. In the latter case, that is because the alternative Syriac name " Ḥālāḇ" starts with a space; probably a data entry error.

Note: I did these screenshots with the data from the testing database, because I use that for development for obvious reasons (bugs in DB-writing code during development cannot affect the live database). If you want to see what it looks like with the current data, let me know and I'll try to get that connected.

tutebatti commented 2 years ago

the alternative Syriac name " Ḥālāḇ" starts with a space; probably a data entry error

Yes, very likely an error.

I prefer the second variant. I do not read Armenian script and the Latin order is immediately intuitive, as I thought before. The same is true for most anyone regarding non-Latin scripts they do not know. What do you say, @rpbarczok?

rpbarczok commented 2 years ago

Difficult decision. I am sitting here and thinking now for 5 min about it, and there a good reasons for both. So, either I toss a coin, or I just go with Florian. I think I do the latter.

mfranke93 commented 2 years ago

The interface is in English anyways, so we could assume that visitors can read the Arabic Latin alphabet. Plus, there are very few places with so many alternative names.

tutebatti commented 2 years ago

so we could assume that visitors can read the Arabic alphabet

Really? Or did you forget a "not" somewhere? Anyhow, I am not sure what you mean with your comment, also the second sentence.

mfranke93 commented 2 years ago

Really? Or did you forget a "not" somewhere?

Edited my comment, I meant "Latin" (i.e., visitors that can read the user interface can also read the transcriptions). Although not everyone might know the alphabetic order of the Latin alphabet intuitively. But see below.

Anyhow, I am not sure what you mean with your comment, also the second sentence.

Mainly this: even if some few names are not perfectly in the alphabetic order someone with Arabic/Armenian/... background would expect, there are never so many names that there is a lot of searching involved. Like here, we have about 30 alternative names, which is a lot for our data. Everyone can just quickly scan through that. If there were, say, 200 Arabic names listed here, having an alphabetic order that everyone can intuitively use would be more important, but now, it is a non-issue IMO.