Script-related issue in the templates

Jump to navigation Jump to search

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" },
}
Zβ€Ž22:24, 19 July 2014

I suppose that if there is only one script listed, we could use it as fallback if detection fails.

β€”CodeCatβ€Ž22:26, 19 July 2014
Edited by 0 users.
Last edit: 22:34, 19 July 2014

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.

Zβ€Ž22:34, 19 July 2014

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.

β€”CodeCatβ€Ž22:38, 19 July 2014

So that was intentional? Ok, but we should have add the characters first, it has broken older entries and has caused confusion for users.[1]

By the way, the functionality of the detect_script is not perfect.

Zβ€Ž23:00, 19 July 2014