[[Template:catfix]]
Why isn't it working at Category:Hebrew terms belonging to the root כ־ת־ב (see {{HE root cat}}
)?
Actually, I think I get why. But can it be fixed in the general case, since Hebrew is 99% of the time in the "Hebr" script?
Essentially, my new question is, how can I make "Hebr" the default script for Hebrew categories?
The problem is that {{catfix}}
tries to do script detection on some nonsense text inside the template, and the result is always Latn. There is no way to change that because the actual category fix is done by JavaScript, and Lua is no longer in the picture. JavaScript would need its own form of script detection.
Good point. What Lua could do is put in the default script to wherever the sc=
would have went.
Right now, script detection counts characters in each of the language's scripts, and returns the one with the most characters matched. So there's no "default". However, if all of a language's scripts return 0 matches, then "None" is returned as the script. So perhaps that's where the default could fit in; it would be a fallback. But keep in mind it would only apply if there are no characters from ANY of the language's scripts. Just a single "a" when Latn is included in the list of scripts will make it pick Latn, even if the remaining characters are all gibberish.