wikimedia / language-data

Language data and utilities
GNU General Public License v2.0
16 stars 23 forks source link

getScript/getDir/isRtl return incorrect data for unrecognised codes containing a script tag #333

Open nikkiwd opened 9 months ago

nikkiwd commented 9 months ago

If a language code contains a script tag, getScript, getDir and isRtl should not need the code to be defined, because it already contains the information they need.

e.g. For mis-arab (uncoded language, Arabic script):

$.uls.data.getScript("mis-arab"); currently returns Zyyy instead of Arab.

$.uls.data.getDir("mis-arab"); currently returns ltr instead of rtl.

$.uls.data.isRtl("mis-arab"); currently returns false instead of true.

amire80 commented 3 months ago

Sorry about the delay, I forgot it somehow.

When is it necessary to run these functions with unrecognized codes?