Add Zyyy for an undetermined script and use it accordingly

This commit is contained in:
Amir E. Aharoni
2013-04-25 18:10:45 +03:00
parent d0d66ddc36
commit 986831b124
4 changed files with 10 additions and 2 deletions

View File

@@ -544,6 +544,8 @@ scriptgroups:
Mongolian: [Mong]
SignWriting: [Sgnw]
NativeAmerican: [Cher, Cans]
# Undetermined script
Special: [Zyyy]
rtlscripts:
[Arab, Hebr, Syrc, Nkoo, Thaa]

File diff suppressed because one or more lines are too long

View File

@@ -42,6 +42,11 @@
return $.uls.data.getScript( target );
}
if ( !$.uls.data.languages[language] ) {
// Undetermined
return 'Zyyy';
}
return $.uls.data.languages[language][0];
};

View File

@@ -97,7 +97,7 @@
assert.ok( $.fn.uls, '$.fn.uls is defined' );
} );
test( '-- $.uls.data testing', 46, function ( assert ) {
test( '-- $.uls.data testing', 47, function ( assert ) {
var autonyms,
allLanguagesByRegionAndScript,
languagesInEU,
@@ -141,6 +141,7 @@
'The script of the Inupiaq language belongs to the NativeAmerican group.'
);
assert.strictEqual( $.uls.data.getScript( 'no-such-language' ), 'Zyyy', 'A script for an unknown language is Zyyy - undetermined' );
assert.strictEqual( $.uls.data.getScript( 'ii' ), 'Yiii', 'Correct script of the Yi language was selected' );
assert.deepEqual( $.uls.data.getRegions( 'lzz' ), [
'EU', 'ME'