aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/language
Commit message (Collapse)AuthorAgeFilesLines
...
| * Chinese Conversion Table Update 2020-2Chiefwei2020-08-028-12/+48
| | | | | | | | | | | | | | | | | | Update the Chinese conversion table routinely to fix bugs reported at https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求. It is only data changes and only works for Chinese WikiProjects. Change-Id: Ife8aa010d7b1d77c2fe05df4bea856c4f36c464b
* | Merge "Use __CLASS__/::class to define callback for array_map/_filter/usort"jenkins-bot2021-02-051-1/+1
|\ \
| * | Use __CLASS__/::class to define callback for array_map/_filter/usortUmherirrender2021-01-221-1/+1
| | | | | | | | | | | | Change-Id: I3519dd5a1ce1ea688de602190cd74755c400c717
* | | Deprecate premature instantiation of services.daniel2021-01-192-10/+4
|/ / | | | | | | | | | | | | | | | | This deprecates access to the global service container before initialization is complete. For now, such premature access will trigger a deprecation warning. In 1.37 we can prevent it entirely. Bug: T153256 Change-Id: Ibd3ab32d92c9c3d3783082ab574739467c1c2ff9
* / Improve class property documentationUmherirrender2020-10-301-2/+4
|/ | | | | | Reformat existing documentation to match the format Change-Id: I190b54b5e962f17bab6502dd1b3c02f11dc926d2
* Make use of the preg_match() return value, if possibleThiemo Kreuz2020-07-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Instead of checking if the resulting $matches array is complete, we can safely assume it is, as long as the preg_match() call returned a non-false value. Note that some of these used empty() before and are actually bogus because of this! empty() considers the string "0" to be empty. In case of a ==0== headline that's an actual bug. I'm also removing the `= []` initialization before the preg_match. I understand why it was added: to make it a little more obvious that the variable is guaranteed to be initialized. But: * This is guaranteed by the preg_match anyway. * Neither initializing it with null or an empty array makes much sense because the code below assumes so much more, e.g. that specific elements exist, and are arrays. Again, these guarantees are all given by the preg_match. I find the additional initialization more distracting than helpful. Change-Id: I22b192b59038d9fa51a7e6f04d8d76634ae3de73
* Fix typo: 'avalaible' → 'available'MarcoAurelio2020-05-221-1/+1
| | | | Change-Id: I1e3c8a4106f94fa094532874a5ad927f75f5ba76
* Fix various MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineCommentReedy2020-05-211-1/+2
| | | | Change-Id: I50c7c93f1534e966224f98a835ca01f93eb9416d
* Narrow MediaWiki.Commenting.FunctionComment.WrongStyleReedy2020-05-201-2/+3
| | | | Change-Id: I95d1195f09a806910559a0c5106d472addd3dec4
* Fix PSR12.Properties.ConstantVisibility.NotFound in maintenance/Reedy2020-05-091-2/+2
| | | | Change-Id: Ib0f081f7b278fdd3f4083fc5020bcac97f6015b4
* Merge "language: Remove maintenance/language/languages.inc"jenkins-bot2020-04-161-832/+0
|\
| * language: Remove maintenance/language/languages.incNiklas Laxström2020-04-161-832/+0
| | | | | | | | | | | | | | Nothing uses this file or its classes anymore according to MediaWiki code search. Change-Id: Ie165ff887b43304ea519d8b7c0a99a2187a9137e
* | Merge "language: Remove maintenance/language/transstat.php"jenkins-bot2020-04-162-161/+0
|\|
| * language: Remove maintenance/language/transstat.phpNiklas Laxström2020-04-162-161/+0
| | | | | | | | | | | | | | https://www.mediawiki.org/wiki/Localisation_statistics hasn't been updated since 2015. Translatewiki.net provides up to date stats. Change-Id: I6f9902219edb63c2df08b1e1d70826cfc3531057
* | language: Remove maintenance/language/checkDupeMessages.phpNiklas Laxström2020-04-151-137/+0
|/ | | | | | It's broken, not updated for the move of translations to json files. Change-Id: If372596d272fabba27e7379c7867f472529f588a
* language: Remove maintenance/language/checkLanguage.phpNiklas Laxström2020-04-152-610/+0
| | | | | | Translation checks are done in translatewiki.net these days. Change-Id: I9c9b962a3accc50e875a53cec6ef458e4bb2a6a5
* language: Remove maintenance/language/checkExtensions.phpNiklas Laxström2020-04-152-253/+0
| | | | | | | | | | | | | Broken: ArgumentCountError from line 43 of /home/developer/mediawiki/workdir/ extensions/Translate/ffs/MediaWikiExtensions.php: Too few arguments to function PremadeMediawikiExtensionGroups::__construct(), 0 passed in /home/developer/mediawiki/workdir/maintenance/language/checkLanguage.inc on line 609 and exactly 2 expected No point fixing this, checks are done on translatewiki.net side. Change-Id: I9f39684c2ef8479ea35ad1d60e3f1f86d88a8067
* language: Stop using Languages class in maintenance/langmemusage.phpNiklas Laxström2020-04-151-4/+8
| | | | | | This class comes from languages.inc. Change-Id: I046fa583b95fe3dee3690fd7ca89e0ec0b3e63aa
* Merge "Chinese Conversion Table Update 2020-1"jenkins-bot2020-03-055-2/+29
|\
| * Chinese Conversion Table Update 2020-1Chiefwei2020-03-035-2/+29
| | | | | | | | | | | | | | | | | | Update the Chinese conversion table routinely to fix bugs reported at https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求. It is only data changes and only works for Chinese WikiProjects. Change-Id: Ia51d3b51e28bedffd8a8d800409e3dbe82f95187
* | Reduce usage of the Language classArtBaltai2020-03-032-8/+14
| | | | | | | | | | | | | | reduce/deprecate visibility of some members of the Language class Bug: T243913 Change-Id: I6bad608455ceaa46f895f00dcc6380cec6d32680
* | Update all use of $wgVersion to MW_VERSIONTimo Tijhof2020-02-251-3/+1
| | | | | | | | | | | | | | Follows-up I04628de4152dd5. Bug: T212738 Change-Id: I718474ec0d9fd29ac2c05477f0f2493615d8aff5
* | Remove usages of deprecated Language methodsPetr Pchelko2020-02-166-9/+34
| | | | | | | | Change-Id: Iad3375b141b1d87c890baec6ecd16ed92f93e699
* | Fix namespace for usage of StaticArrayWriterdaniel2020-01-151-0/+2
|/ | | | Change-Id: I6850b47f3868e1c5f7d5a0ffcfe413df2c599031
* Set method visibility on maintenance scriptsUmherirrender2019-11-164-22/+22
| | | | Change-Id: I44c82fbe65e1d002803ce065df6563f06dd39cd4
* Remove Language::factory and getParentLanguage useAryeh Gregor2019-10-273-3/+9
| | | | Change-Id: I11f8801ef47ec1a1f63d840116e69667e6f3ae3c
* Set public for override of Maintenance functionsUmherirrender2019-10-091-1/+1
| | | | | | | | | | | | The following function are set to public in the parent class and cannot have another visibility in subclasses Maintenance::__construct Maintenance::execute Maintenance::getDbType Maintenance::validateParamsAndArgs Maintenance::setDB Change-Id: I0cd6514642d479aca20f1221bf673b0713c21631
* Chinese Conversion Table Update 2019-3Chiefwei2019-09-1610-5/+52
| | | | | | | | Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 . It is only data changes and only works for Chinese WikiProjects. Change-Id: Iaed40e230bd7be0656af3b24837e870743c84700
* Chinese Conversion Table Update 2019-2Chiefwei2019-06-108-33/+66
| | | | | | | | Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 . It is only data changes and only works for Chinese WikiProjects. Change-Id: I95cb08470ff5fc94ca7d4508e7760ee7bde5a6c7
* Chinese Conversion Table Update 2019-1Chiefwei2019-04-269-43/+52
| | | | | | | | Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 . It is only data changes and only works for Chinese WikiProjects. Change-Id: Id2d16722eaa837c37e8696c9dd9a2d2231af26e8
* Fix the scripts to generate ucfirst overriddesGiuseppe Lavagetto2019-04-182-3/+7
| | | | | | | * Fix a couple mistakes in generateUcfirstOverrides.php * Skip surrogate codepoints as they can't be converted to json. Change-Id: I5eddd90f7b348806d502dfbac08c367701d17f25
* Add ability to override mb_strtoupper in Language::ucfirstGiuseppe Lavagetto2019-04-172-0/+132
| | | | | | | | | | | | Different PHP versions treat unicode differently, and specifically some wiki resources become unreachable if mb_strtoupper's behavior has changed. This patch allows to introduce an override table that allows to smooth the transition period. It also provides maintenance scripts to generate such an override table. Bug: T219279 Change-Id: I0503ff4207fded4648c58c7b50e67c55422a4849
* Add use Wikimedia\StaticArrayWriter statements to maintenance scriptsReedy2019-04-113-0/+6
| | | | | Follows-Up: I022c074e8a708fb5219bc4ff4b53e7e31f60dc4b Change-Id: Ieea214b31a6ba9cc8eb2b6bae50529d70448a872
* Chinese Conversion Table Update 2018-4Chiefwei2018-12-237-5/+25
| | | | | | | | Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 . It is only data changes and only works for Chinese WikiProjects. Change-Id: I6d5b3c190411453673952c3557e2ea81dec885e6
* Merge "Chinese Conversion Table Update 2018-3"jenkins-bot2018-12-109-56/+135
|\
| * Chinese Conversion Table Update 2018-3Chiefwei2018-10-069-56/+135
| | | | | | | | | | | | | | | | Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 . It is only data changes and only works for Chinese WikiProjects. Change-Id: Ib9ad77bd57dd55899ce685eb2023d1ee5c739e54
* | No yoda conditionsFomafix2018-11-212-2/+2
| | | | | | | | | | | | | | | | | | Replace if ( 42 === $foo ) by if ( $foo === 42 ) Change-Id: Ice320ef1ae64a59ed035c20134326b35d454f943
* | Use PHP 7 '??' operator instead of if-then-elseFomafix2018-10-271-5/+1
|/ | | | Change-Id: Ia86f8433f30a166d38ee63d0d1745b26740767b9
* Write Latin and other scripts with captial letterFomafix2018-10-051-1/+1
| | | | Change-Id: I16c660e54191b63cd6eb3407cb00504665930c4e
* Merge "Chinese Conversion Table Update 2018-2"jenkins-bot2018-08-219-18/+49
|\
| * Chinese Conversion Table Update 2018-2Chiefwei2018-06-109-18/+49
| | | | | | | | | | | | | | | | Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 . It is only data changes and only works for Chinese WikiProjects. Change-Id: I30ff17f8af3542dab38201141c01b1895dd00b10
* | Move wfMakeStaticArrayFile() into a classKunal Mehta2018-08-173-3/+6
| | | | | | | | | | | | | | | | | | | | And include tests :) This code is independent of MediaWiki, but not really large enough to be worth librarizing right now. Bug: T200626 Change-Id: I022c074e8a708fb5219bc4ff4b53e7e31f60dc4b
* | Merge "collation: Move first-letters-root to includes/collation/data"jenkins-bot2018-08-142-6/+25
|\ \
| * | collation: Move first-letters-root to includes/collation/dataTimo Tijhof2018-08-012-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency with other data files. Also, like the other data files: * For automated fetching of the Unicode files, move the steps from Makefile to a bash script. * Switch to a static array file format. Change-Id: If07487950a270283b8eaeda9a507e723ed2d89c4
* | | Merge "language: Add generate-normalize-data maintenance script"jenkins-bot2018-08-141-0/+19
|\| |
| * | language: Add generate-normalize-data maintenance scriptTimo Tijhof2018-08-011-0/+19
| | | | | | | | | | | | Change-Id: I64658cb74d81365a99d6b0a01807324eb5a39320
* | | Mass conversion of $wgContLang to serviceAryeh Gregor2018-08-111-1/+1
|/ / | | | | | | | | | | | | Brought to you by vim macros. Bug: T200246 Change-Id: I79e919f4553e3bd3eb714073fed7a43051b4fb2a
* | language: Document sources of data and example usageTimo Tijhof2018-07-191-0/+5
| | | | | | | | Change-Id: I0c72069d010285d9b88ff83bc1478410961065d3
* | Use $lang->hasVariants() instead of count( $lang->getVariants() ) > 1Fomafix2018-07-111-1/+1
|/ | | | Change-Id: I23668c69a8d8cc886168cbbd4f94cf13b597b5a6
* Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literalsBartosz Dziewoński2018-06-041-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where we're operating on text data (and not binary data), use e.g. "\u{00A0}" to refer directly to the Unicode character 'NO-BREAK SPACE' instead of "\xc2\xa0" to specify the bytes C2h A0h (which correspond to the UTF-8 encoding of that character). This makes it easier to look up those mysterious sequences, as not all are as recognizable as the no-break space. This is not enforced by PHP, but I think we should write those in uppercase and zero-padded to at least four characters, like the Unicode standard does. Note that not all "\xNN" escapes can be automatically replaced: * We can't use Unicode escapes for binary data that is not UTF-8 (e.g. in code converting from legacy encodings or testing the handling of invalid UTF-8 byte sequences). * '\xNN' escapes in regular expressions in single-quoted strings are actually handled by PCRE and have to be dealt with carefully (those regexps should probably be changed to use the /u modifier). * "\xNN" referring to ASCII characters ("\x7F" and lower) should probably be left as-is. The replacements in this commit were done semi-manually by piping the existing "\xNN" escapes through the following terrible Ruby script I devised: chars = eval('"' + ARGV[0] + '"').force_encoding('utf-8') puts chars.split('').map{|char| '\\u{' + char.ord.to_s(16).upcase.rjust(4, '0') + '}' }.join('') Change-Id: Idc3dee3a7fb5ebfaef395754d8859b18f1f8769a