indexphonemica / pshrimp-server

IPHON app backend
0 stars 1 forks source link

Enhance the /l path #22

Open defseg opened 4 years ago

defseg commented 4 years ago

I've added a lazy path: type /l/languagename and you'll be redirected to /languages/lang1234. But this could use some work:

  1. What happens if more than one language is returned? I don't think there are any cases of this yet, but it's possible. So there should be disambiguation pages. (And since the whole point is that going to the language index and clicking through is slow, the disambiguation page should play well with the tab key.)
  2. What to do about Glottolog's country-name disambiguation parentheticals? (e.g. Mari the Uralic family vs. Mari (Papua New Guinea) the Sepik language. Once disambiguation pages exist, it would be nice to be able to ignore the parentheticals. (The point is to be lazy, after all.)
  3. If it's not a language name, maybe it's a doculect name. Should be able to type ngadha and get Ngad'a.
  4. We're ignoring everything that isn't an ASCII letter - is there instead a way to normalize non-ASCII characters to ASCII ones? So that you can type xaracuu and get Xârâcùù. Right now, you get Xârâcùù by typing xrc. (Is there a good way to do this in Postgres so we don't have to add a stub column?)
defseg commented 4 years ago

4) Yes, psql's unaccent extension, so we can use that.