Consistently use parentheses in Chinese-script autonyms (#148)
Addresses #141. Co-authored-by: Kartik Mistry <kartikm@users.noreply.github.com>
This commit is contained in:
@@ -104,7 +104,7 @@ languages:
|
|||||||
# FIXME cdo will be modified later to split to Latin and Chinese more cleanly
|
# FIXME cdo will be modified later to split to Latin and Chinese more cleanly
|
||||||
cdo: [Latn, [AS], Mìng-dĕ̤ng-ngṳ̄]
|
cdo: [Latn, [AS], Mìng-dĕ̤ng-ngṳ̄]
|
||||||
cdo-latn: [Latn, [AS], Mìng-dĕ̤ng-ngṳ̄ Bàng-uâ-cê]
|
cdo-latn: [Latn, [AS], Mìng-dĕ̤ng-ngṳ̄ Bàng-uâ-cê]
|
||||||
cdo-hani: [Hani, [AS], 閩東語漢字]
|
cdo-hani: [Hani, [AS], 閩東語(漢字)]
|
||||||
ce: [Cyrl, [EU], нохчийн]
|
ce: [Cyrl, [EU], нохчийн]
|
||||||
ceb: [Latn, [AS], Cebuano]
|
ceb: [Latn, [AS], Cebuano]
|
||||||
ch: [Latn, [PA], Chamoru]
|
ch: [Latn, [PA], Chamoru]
|
||||||
@@ -121,7 +121,7 @@ languages:
|
|||||||
chy: [Latn, [AM], Tsetsêhestâhese]
|
chy: [Latn, [AM], Tsetsêhestâhese]
|
||||||
ciw: [Latn, [AM], Ojibwemowin]
|
ciw: [Latn, [AM], Ojibwemowin]
|
||||||
cjy: [cjy-hant]
|
cjy: [cjy-hant]
|
||||||
cjy-hans: [Hans, [AS], 晋语(简化字)]
|
cjy-hans: [Hans, [AS], 晋语(简化字)]
|
||||||
cjy-hant: [Hant, [AS], 晉語]
|
cjy-hant: [Hant, [AS], 晉語]
|
||||||
ckb: [Arab, [ME], کوردی]
|
ckb: [Arab, [ME], کوردی]
|
||||||
ckt: [Cyrl, [AS], ԓыгъоравэтԓьэн]
|
ckt: [Cyrl, [AS], ԓыгъоравэтԓьэн]
|
||||||
|
|||||||
@@ -652,7 +652,7 @@
|
|||||||
[
|
[
|
||||||
"AS"
|
"AS"
|
||||||
],
|
],
|
||||||
"閩東語漢字"
|
"閩東語(漢字)"
|
||||||
],
|
],
|
||||||
"ce": [
|
"ce": [
|
||||||
"Cyrl",
|
"Cyrl",
|
||||||
@@ -721,7 +721,7 @@
|
|||||||
[
|
[
|
||||||
"AS"
|
"AS"
|
||||||
],
|
],
|
||||||
"晋语(简化字)"
|
"晋语(简化字)"
|
||||||
],
|
],
|
||||||
"cjy-hant": [
|
"cjy-hant": [
|
||||||
"Hant",
|
"Hant",
|
||||||
|
|||||||
@@ -110,7 +110,8 @@ describe( 'languagedata', function () {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
it( 'autonyms', function () {
|
it( 'autonyms', function () {
|
||||||
var autonyms;
|
var autonyms, chineseScriptLanguages, i,
|
||||||
|
languagesWithParentheses = [];
|
||||||
// Add a language in run time.
|
// Add a language in run time.
|
||||||
// This is done early to make sure that it doesn't break other functions.
|
// This is done early to make sure that it doesn't break other functions.
|
||||||
languageData.addLanguage( 'qqq', {
|
languageData.addLanguage( 'qqq', {
|
||||||
@@ -130,6 +131,14 @@ describe( 'languagedata', function () {
|
|||||||
assert.deepEqual( [ 'de', 'fi', 'gn', 'hu' ].sort( languageData.sortByAutonym ), [
|
assert.deepEqual( [ 'de', 'fi', 'gn', 'hu' ].sort( languageData.sortByAutonym ), [
|
||||||
'gn', 'de', 'hu', 'fi'
|
'gn', 'de', 'hu', 'fi'
|
||||||
], 'Languages are correctly sorted by autonym' );
|
], 'Languages are correctly sorted by autonym' );
|
||||||
|
|
||||||
|
chineseScriptLanguages = languageData.getLanguagesInScripts( [ 'Hans', 'Hant', 'Hani' ] );
|
||||||
|
for ( i = 0; i < chineseScriptLanguages.length; ++i ) {
|
||||||
|
if ( languageData.getAutonym( chineseScriptLanguages[i] ).match( /[()]/ ) ) {
|
||||||
|
languagesWithParentheses.push( chineseScriptLanguages[i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assert.deepEqual( languagesWithParentheses, [], 'Chinese script languages\' autonyms don\'t have Western parentheses' );
|
||||||
} );
|
} );
|
||||||
it( 'regions and groups', function () {
|
it( 'regions and groups', function () {
|
||||||
var languagesAM;
|
var languagesAM;
|
||||||
|
|||||||
Reference in New Issue
Block a user