Add Zyyy for an undetermined script and use it accordingly
This commit is contained in:
@@ -544,6 +544,8 @@ scriptgroups:
|
|||||||
Mongolian: [Mong]
|
Mongolian: [Mong]
|
||||||
SignWriting: [Sgnw]
|
SignWriting: [Sgnw]
|
||||||
NativeAmerican: [Cher, Cans]
|
NativeAmerican: [Cher, Cans]
|
||||||
|
# Undetermined script
|
||||||
|
Special: [Zyyy]
|
||||||
|
|
||||||
rtlscripts:
|
rtlscripts:
|
||||||
[Arab, Hebr, Syrc, Nkoo, Thaa]
|
[Arab, Hebr, Syrc, Nkoo, Thaa]
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -42,6 +42,11 @@
|
|||||||
return $.uls.data.getScript( target );
|
return $.uls.data.getScript( target );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !$.uls.data.languages[language] ) {
|
||||||
|
// Undetermined
|
||||||
|
return 'Zyyy';
|
||||||
|
}
|
||||||
|
|
||||||
return $.uls.data.languages[language][0];
|
return $.uls.data.languages[language][0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
assert.ok( $.fn.uls, '$.fn.uls is defined' );
|
assert.ok( $.fn.uls, '$.fn.uls is defined' );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( '-- $.uls.data testing', 46, function ( assert ) {
|
test( '-- $.uls.data testing', 47, function ( assert ) {
|
||||||
var autonyms,
|
var autonyms,
|
||||||
allLanguagesByRegionAndScript,
|
allLanguagesByRegionAndScript,
|
||||||
languagesInEU,
|
languagesInEU,
|
||||||
@@ -141,6 +141,7 @@
|
|||||||
'The script of the Inupiaq language belongs to the NativeAmerican group.'
|
'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.strictEqual( $.uls.data.getScript( 'ii' ), 'Yiii', 'Correct script of the Yi language was selected' );
|
||||||
assert.deepEqual( $.uls.data.getRegions( 'lzz' ), [
|
assert.deepEqual( $.uls.data.getRegions( 'lzz' ), [
|
||||||
'EU', 'ME'
|
'EU', 'ME'
|
||||||
|
|||||||
Reference in New Issue
Block a user