carpentries / glosario

A multilingual glossary for computing and data science terms.
https://glosario.carpentries.org
Other
104 stars 227 forks source link

[2024-06-24]: [Alphabetical ordering for Ukrainian and Portuguese languages] #724

Open olexandr-konovalov opened 2 months ago

olexandr-konovalov commented 2 months ago

The right navigation bar with letters at https://glosario.carpentries.org/uk/ does not follow the order of letters in Ukrainian alphabet, placing "І" at the last place. Is there a way to enforce the fixed order of the letters?

Screenshot 2024-06-24 at 18 53 38

olexandr-konovalov commented 1 month ago

It seems to me the issue is not with the navigation bar, but with terms being ordered in the wrong way in the first instance. I have traced this to "Find terms defined in this language and sort alphabetically":

https://github.com/carpentries/glosario/blob/b7d10b315e6e2b34572dfab4c5692187ec5fb225/_includes/glossary.html#L9C1-L9C61

but I don't know where to go from here.

YehorBoiar commented 1 month ago

Could it be because we don't have all letters for all terms? So it just ordered ones that only exist

olexandr-konovalov commented 1 month ago

@YehorBoiar we can of course try to push for more translations to cover more Ukrainian letters - new PRs welcome :)

But I don't think that "І" at the last place depends somehow on that. That is perhaps due to Unicode codes playing the role. Similar problem for Portuguese in https://glosario.carpentries.org/pt/ where  is not after A, but at the very end. I don't have any knowledge of Portuguese to comment on this, but https://portuguese.stackexchange.com/questions/5797/do-diacritical-marks-accents-affect-alphabetical-sorting-of-words suggests that this is not the way it should be.

olexandr-konovalov commented 1 month ago

P.S. Indeed the unicode code seems to be relevant: compare Ukrainian alphabet by position in alphabet at https://en.wikipedia.org/wiki/Ukrainian_alphabet with the Ukrainian character table at https://character-table.netlify.app/ukrainian/. So the question is as before - how to introduce sorting in a properly alphabetical order?

froggleston commented 3 days ago

This will be down to how liquid and jekyll implement their sort filter.

It seems that they sort by unicode rather than natural ordering in that specific language:

Relevant other info:

froggleston commented 2 days ago

Related to https://github.com/carpentries/glosario/issues/254

olexandr-konovalov commented 2 days ago

Would it be possible to provide correct sorting for each language explicitly (and request providing that as a part of adding new languages)?