Script-related issue in the templates
I noticed a script-related issue in our templates, I don't know which module is responsible exactly as I've completely forgotten which module do what because I wasn't here for a while but it must be related to language utilites or script utilites or their related modules so I'm bringing it up here. The problem is script is chosen solely based on the script detection function and if it fails, the "None" class is used, instead of the first script in m.lang.scripts.
Examples:
- {{head|ccp|noun|head=๐๐ณ๐}}: ๐๐ณ๐ (nmฤ)
- {{l|ccp|๐๐ณ๐}}: ๐๐ณ๐ (nmฤ)
Related data in Module:languages/data3/c, note "scripts":
m["ccp"] = { names = {"Chakma"}, type = "regular", scripts = {"Cakm"}, family = "inc"}
Related data in Module:scripts/data, note the lack of "characters":
m["Cakm"] = { names = { "Chakma" }, }
I suppose that if there is only one script listed, we could use it as fallback if detection fails.
But as far as I recall we have always treated the first script in the list as the default one. and I think it's a good practice. Anyway, in this case we have only one script listed, but our templates mistakenly use "None" instead.
That was before we had Lua. Now, all scripts are treated as equal, with none given priority. This is still useful because there are cases where detection fails because the text actually isn't in any of the scripts. But in this case it fails because it's just not able to detect it at all. So that's a different case, and we could look at that.
That said, why can't the characters just be added to the script data instead? That would solve it.