This was done automatically using the
`Universal.WhiteSpace.CommaSpacing` sniff, which will be included in the
next release of the MW PHPCS config.
Some of these have been adjusted manually where the autofix broke
vertical alignment.
Change-Id: I54a4668d8a2759b9d7de47742c943a535a04e211
… or with $this->fail() from the PHPUnit TestCase base class.
I hope this makes the code more readable, i.e. communicate the
intention better. The output should be the same, i.e. the test fails
as before in case of an error.
Change-Id: Ied8a045141ac92d6af6398682bb5d9ca7ca88c49
segmentForDiff() is supposed to allow character-level diffing of Chinese
text, by adding spaces and then removing them after the diff is
complete. But when I tested it for I2d0a6996b02d37a3, unsegmentForDiff()
failed to remove the spaces, since there was an <ins> tag between the space
and the Chinese character.
So instead, use formfeed characters to separate the Chinese characters,
and strip them unconditionally instead of relying on them being next to
Chinese characters.
Add test.
Change-Id: I230d8261bbda34ad313785a1f7c31d4db7bf989b
Using the names of currently existing Wikimedia projects
and grammar cases already used in localisation messages.
Change-Id: I0ddd0c609a2c21dcb541718a5381d23c2c4e4213
Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.
Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.
Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
Move tests from /languages/ to /includes/language/ similiar to the
classes in f5644ba
Clean up suite config too not longer run that folder as test,
remove from coverage, there no php files to cover
Remove converter tests from Language*Test files,
all identical to the *ConverterTest cases (or remove the whole file)
Change-Id: I098ba241bd61d8ed2ee9b65393416077e3544e79
Allow Bcp47Code (which includes Language) as a parameter to
::getParentLanguage(), to match what was added in
Iea158fc849964ba71a27363f9522b1b3bbb82aee. Add a note to warn
callers that ::getParentLanguage() does *not* accept the same set
of string codes as ::getLanguage(); however if you pass an object
instead of a string the behavior matches.
Change-Id: I89c581ea12b354d8988c1ae8787a05976b8e3143
First step towards resolving bug T307207.
Other cases will be added in subsequent patches.
Bug: T307207
Change-Id: I7ae6c05cd2eca6031da29aa3c203341b70ebb1b1
Depending on which namespace we want these classes to have after
T166010 they could either stay in includes/languages/ (plural) in
their own MediaWiki\Languages\-namespace dedicated to Language
subclasses, or they could go in into a subdirectory like
`includes/language/languages/` if we want to keep them in the same
top-level namespace as other Language classes and services, but in
a more nested namespace.
For now, I've made the smaller change and kept the Language subclasses
in their own directory directly under includes/, not nested further.
Bug: T225756
Change-Id: I01015424707b442853879fd50c97f00215e5c2fa