Brown-University-Library / usepweb_project

MIT License
0 stars 5 forks source link

Change the order in which languages display on a collections list page (3days?) #59

Closed emylonas closed 3 years ago

emylonas commented 3 years ago

Currently when you look at a collection in USEP, the inscriptions are sorted by language. As far as I can tell, the languages are listed in order of first occurrence - Greek | Latin or Latin | Greek. However, if there is an Etruscan inscription, it sometimes sorts first Etruscan | Greek | Latin The order should always be Greek, Latin and then other language(s), in no particular order. It looks as if this is handled here: https://github.com/Brown-University-Library/usepweb_project/blob/master/usep_app/usep_templates/collectioN.html lines 16, 17. Examples: https://usepigraphy.brown.edu/projects/usep/collections/MI.AA.UM.KM has 4 language types. Greek is third in the list. https://usepigraphy.brown.edu/projects/usep/collections/NY.NY.CU.Butl/ This one is has an ok order, but the Etruscan isn't expanded, so it appears as ett.

We also have Raetic = I'm not sure where the language labels come from. we should check to make sure that all the language attributes are being expanded correctly.

The language values are set here: https://github.com/Brown-University-Library/usepweb_project/blob/master/usep_app/models.py. line 194 ff.

Changes are: etr should be ett add zxx with value "Non-linguistic" (or something similar, EM should check with John Bodel).

Also, EM check two letter and three letter codes in language-writing system encodings.

emylonas commented 3 years ago

1st step: Add new languages and full-text labels, so languages display correctly. As noted above, the language values are set here: https://github.com/Brown-University-Library/usepweb_project/blob/master/usep_app/models.py . line 194 ff Which currently reads:

 u"lat": u"Latin",
        u"grc": u"Greek",
        u"la": u"Latin",
        u"la-Grek": u"Latin written in Greek",
        u"lat-Grek":u"Latin written in Greek",
        u"etr":u"Etruscan",
        u"xrr":u"Raetic",
        u"und": u"Undecided",
        u"unknown": u"Unknown"

It should read:

 u"lat": u"Latin",
        u"grc": u"Greek",
        u"la": u"Latin",
        u"la-Grek": u"Latin written in Greek",
        u"lat-Grek":u"Latin written in Greek",
        u"ett":u"Etruscan",
        u"xrr":u"Raetic",
        u"hbo":u"Hebrew",
        u"phn":u"Punic",
        u"arc":u"Aramaic",
        u"und": u"Unknown",
        u"zxx": u"No Linguistic Content"

Etruscan has been changed to "ett" from "etr", and I've added "zxx" which stands for Non-Linguistic Content", also Aramaic, Punic, Hebrew.

Test examples: https://usepigraphy.brown.edu/projects/usep/collections/CA.Malibu.JPGM/ This collection should display Latin | Greek | Etruscan instead of Latin | Greek | ett at the top of the page

jbodel commented 3 years ago

Latin texts still displaying before Greek in collections (e.g. NY.NY.MMA). Continued high priority to fix. Order of languages always (as above) 1) Greek 2) Latin 3) any other languages represented in the collection, listed alphabetically

emylonas commented 3 years ago

completed!! closing