From 56328159760c103f614362c24214e8c5de3f1fd2 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Fri, 5 Oct 2018 18:37:53 +0200 Subject: [PATCH] Write Latin and other scripts with captial letter Change-Id: I16c660e54191b63cd6eb3407cb00504665930c4e --- UPGRADE | 2 +- includes/DefaultSettings.php | 2 +- includes/collation/IcuCollation.php | 4 ++-- includes/search/SearchMySQL.php | 2 +- includes/search/SearchSqlite.php | 2 +- languages/classes/LanguageOs.php | 6 +++--- languages/classes/LanguageTg.php | 2 +- languages/data/Names.php | 2 +- maintenance/language/generateCollationData.php | 2 +- maintenance/updateDoubleWidthSearch.php | 6 +++--- resources/src/jquery/jquery.highlightText.js | 2 +- resources/src/mediawiki.language/languages/os.js | 2 +- tests/phpunit/languages/classes/LanguageSrTest.php | 10 +++++----- tests/phpunit/languages/classes/LanguageUzTest.php | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/UPGRADE b/UPGRADE index 8fb187d8b0..6b38b09518 100644 --- a/UPGRADE +++ b/UPGRADE @@ -107,7 +107,7 @@ will probably want to update the search index. In the "maintenance" directory, run the updateDoubleWidthSearch.php script. This will update the searchindex table for those pages that -contain double-byte latin characters. +contain double-byte Latin characters. == Upgrading from 1.10 or earlier == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 2668cd7824..4fee5d7f75 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3117,7 +3117,7 @@ $wgDisableTitleConversion = false; $wgDefaultLanguageVariant = false; /** - * Whether to enable the pig latin variant of English (en-x-piglatin), + * Whether to enable the pig Latin variant of English (en-x-piglatin), * used to ease variant development work. */ $wgUsePigLatinVariant = false; diff --git a/includes/collation/IcuCollation.php b/includes/collation/IcuCollation.php index ad94d4746d..b23085dc94 100644 --- a/includes/collation/IcuCollation.php +++ b/includes/collation/IcuCollation.php @@ -75,8 +75,8 @@ class IcuCollation extends Collation { * letters (denoted by keys starting with '-'). * * These are additions to (or subtractions from) the data stored in the - * first-letters-root.php data file (which among others includes full basic latin, - * cyrillic and greek alphabets). + * first-letters-root.php data file (which among others includes full basic Latin, + * Cyrillic and Greek alphabets). * * "Separate letter" is a letter that would have a separate heading/section * for it in a dictionary or a phone book in this language. This data isn't diff --git a/includes/search/SearchMySQL.php b/includes/search/SearchMySQL.php index 806db7deb9..9f1069722b 100644 --- a/includes/search/SearchMySQL.php +++ b/includes/search/SearchMySQL.php @@ -144,7 +144,7 @@ class SearchMySQL extends SearchDatabase { } else { // For Chinese, words may legitimately abut other words in the text literal. // Don't add \b boundary checks... note this could cause false positives - // for latin chars. + // for Latin chars. } return $regex; } diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php index 0bc2d379a6..6332ea2b84 100644 --- a/includes/search/SearchSqlite.php +++ b/includes/search/SearchSqlite.php @@ -137,7 +137,7 @@ class SearchSqlite extends SearchDatabase { } else { // For Chinese, words may legitimately abut other words in the text literal. // Don't add \b boundary checks... note this could cause false positives - // for latin chars. + // for Latin chars. } return $regex; } diff --git a/languages/classes/LanguageOs.php b/languages/classes/LanguageOs.php index d374c859c2..60b3953c78 100644 --- a/languages/classes/LanguageOs.php +++ b/languages/classes/LanguageOs.php @@ -34,10 +34,10 @@ class LanguageOs extends Language { * Invoked with {{grammar:case|word}} * * Depending on word there are four different ways of converting to other cases. - * 1) Word consist of not cyrillic letters or is an abbreviation. + * 1) Word consist of not Cyrillic letters or is an abbreviation. * Then result word is: word + hyphen + case ending. * - * 2) Word consist of cyrillic letters. + * 2) Word consist of Cyrillic letters. * 2.1) Word is in plural. * Then result word is: word - last letter + case ending. Ending of allative case here is 'æм'. * @@ -77,7 +77,7 @@ class LanguageOs extends Language { $jot = 'й'; } elseif ( preg_match( "/у$/u", $word ) ) { # Checking if $word ends on 'у'. 'У' - # can be either consonant 'W' or vowel 'U' in cyrillic Ossetic. + # can be either consonant 'W' or vowel 'U' in Cyrillic Ossetic. # Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы. if ( !preg_match( "/[аæеёиоыэюя]$/u", mb_substr( $word, -2, 1 ) ) ) { $jot = 'й'; diff --git a/languages/classes/LanguageTg.php b/languages/classes/LanguageTg.php index ebc0d6ceaf..93333f8942 100644 --- a/languages/classes/LanguageTg.php +++ b/languages/classes/LanguageTg.php @@ -22,7 +22,7 @@ */ /** - * Converts Tajiki to latin orthography + * Converts Tajiki to Latin orthography * * @ingroup Language */ diff --git a/languages/data/Names.php b/languages/data/Names.php index 4a648f9af7..b038f08b1e 100644 --- a/languages/data/Names.php +++ b/languages/data/Names.php @@ -193,7 +193,7 @@ class Names { 'he' => 'עברית', # Hebrew 'hi' => 'हिन्दी', # Hindi 'hif' => 'Fiji Hindi', # Fijian Hindi (multiple scripts - defaults to Latin) - 'hif-latn' => 'Fiji Hindi', # Fiji Hindi (latin) + 'hif-latn' => 'Fiji Hindi', # Fiji Hindi (Latin script) 'hil' => 'Ilonggo', # Hiligaynon 'ho' => 'Hiri Motu', # Hiri Motu 'hr' => 'hrvatski', # Croatian diff --git a/maintenance/language/generateCollationData.php b/maintenance/language/generateCollationData.php index 97b46f7302..a10592055f 100644 --- a/maintenance/language/generateCollationData.php +++ b/maintenance/language/generateCollationData.php @@ -263,7 +263,7 @@ class GenerateCollationData extends Maintenance { // character has a longer primary weight sequence with an initial // portion equal to the first character, then remove the second // character. This avoids having characters like U+A732 (double A) - // polluting the basic latin sort area. + // polluting the basic Latin sort area. foreach ( $this->groups as $weight => $group ) { if ( preg_match( '/(\.[0-9A-F]*)\./', $weight, $m ) ) { diff --git a/maintenance/updateDoubleWidthSearch.php b/maintenance/updateDoubleWidthSearch.php index 810af57f7d..d28ae271f9 100644 --- a/maintenance/updateDoubleWidthSearch.php +++ b/maintenance/updateDoubleWidthSearch.php @@ -1,6 +1,6 @@ addDescription( 'Script to normalize double-byte latin UTF-8 characters' ); + $this->addDescription( 'Script to normalize double-byte Latin UTF-8 characters' ); $this->addOption( 'q', 'quiet', false, true ); $this->addOption( 'l', diff --git a/resources/src/jquery/jquery.highlightText.js b/resources/src/jquery/jquery.highlightText.js index 782d7118fd..7205620c14 100644 --- a/resources/src/jquery/jquery.highlightText.js +++ b/resources/src/jquery/jquery.highlightText.js @@ -35,7 +35,7 @@ var i, match, pos, spannode, middlebit, middleclone; if ( node.nodeType === Node.TEXT_NODE ) { // TODO - need to be smarter about the character matching here. - // non latin characters can make regex think a new word has begun: do not use \b + // non Latin characters can make regex think a new word has begun: do not use \b // http://stackoverflow.com/questions/3787072/regex-wordwrap-with-utf8-characters-in-js // look for an occurrence of our pattern and store the starting position match = node.data.match( pat ); diff --git a/resources/src/mediawiki.language/languages/os.js b/resources/src/mediawiki.language/languages/os.js index 14c98408bf..b7367b271c 100644 --- a/resources/src/mediawiki.language/languages/os.js +++ b/resources/src/mediawiki.language/languages/os.js @@ -26,7 +26,7 @@ mw.language.convertGrammar = function ( word, form ) { // Checking if word ends on one of the vowels: е, ё, и, о, ы, э, ю, я. jot = 'й'; } else if ( word.match( /у$/i ) ) { - // Checking if word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic. + // Checking if word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in Cyrillic Ossetic. // Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы. if ( !word.slice( -2, -1 ).match( /[аæеёиоыэюя]$/i ) ) { diff --git a/tests/phpunit/languages/classes/LanguageSrTest.php b/tests/phpunit/languages/classes/LanguageSrTest.php index 30b4df891d..b846c56daa 100644 --- a/tests/phpunit/languages/classes/LanguageSrTest.php +++ b/tests/phpunit/languages/classes/LanguageSrTest.php @@ -41,11 +41,11 @@ class LanguageSrTest extends LanguageClassesTestCase { public function testMixedConversions() { $this->assertCyrillic( 'шђчћжШЂЧЋЖ - šđčćž', - 'Mostly cyrillic characters' + 'Mostly Cyrillic characters' ); $this->assertLatin( 'šđč枊ĐČĆŽ - шђчћж', - 'Mostly latin characters' + 'Mostly Latin characters' ); } @@ -54,11 +54,11 @@ class LanguageSrTest extends LanguageClassesTestCase { */ public function testSameAmountOfLatinAndCyrillicGetConverted() { $this->assertConverted( - '4 latin: šđčć | 4 cyrillic: шђчћ', + '4 Latin: šđčć | 4 Cyrillic: шђчћ', 'sr-ec' ); $this->assertConverted( - '4 latin: šđčć | 4 cyrillic: шђчћ', + '4 Latin: šđčć | 4 Cyrillic: шђчћ', 'sr-el' ); } @@ -211,7 +211,7 @@ class LanguageSrTest extends LanguageClassesTestCase { /** * Verifiy the given Cyrillic text is not converted when using - * using the cyrillic variant and converted to Latin when using + * using the Cyrillic variant and converted to Latin when using * the Latin variant. * @param string $text Text to convert * @param string $msg Optional message diff --git a/tests/phpunit/languages/classes/LanguageUzTest.php b/tests/phpunit/languages/classes/LanguageUzTest.php index 367226d773..18b2031f80 100644 --- a/tests/phpunit/languages/classes/LanguageUzTest.php +++ b/tests/phpunit/languages/classes/LanguageUzTest.php @@ -90,7 +90,7 @@ class LanguageUzTest extends LanguageClassesTestCase { /** * Verifiy the given Cyrillic text is not converted when using - * using the cyrillic variant and converted to Latin when using + * using the Cyrillic variant and converted to Latin when using * the Latin variant. * @param string $text Text to convert * @param string $msg Optional message -- 2.20.1