Add the same no-arg options for language code that
{{#dir}} and {{#bcp47}} have, for consistency:
* `{{#language}}` will return the name of the *target language*
(for articles, the content language; for messages, the user language)
The default value for the "in language" argument should be the autonym.
This was working previously but only via a baroque code flow path for
invalid language codes. Make this a bit clearer and add tests.
Since non-autonym language code translations are added via the
[[Extension:CLDR]] in production, hook LanguageGetTranslatedLanguageNames
in the ParserTestRunner to ensure that we can test this.
Followup-To: Ice1c671c5b3cc077d2bb80ea5dc25c5eabbfeb36
Followup-To: I19c3e91a924e080f37dc95a0d4e61493583b533e
Change-Id: Ibf6e7f194cc056eadb48a5ad8e6d01a761d9351c
Copy the Renameuser extension into core, with minimal code changes. The
hook handlers are inlined into Article, SpecialLog and
SpecialContributions.
Bug: T27482
Change-Id: I314021f4138773df6aaf2753b33ab8283cd16974
Follows-up I301f471f86ba2.
For ease of navigation, move Converter subclasses to a group called
"Languages", which for documentation purposes is a subgroup of
"Language". The next commit does the same for Messages* files,
and Language subclasses (done separately for ease of review).
Change-Id: If1cef9aa15f536ebaedd4477ad7453426e7f3b85
Use @phpcs-require-sorted-array from new codesniffer release 32.0.0
Similiar to special page alias in
I827d1f5010d000609324ec398beeb142d9bac299
Bug: T255826
Change-Id: I7b7cbf0c03714001609437af68fe16e06930cc33
* Update digitGroupingPattern to match CLDR 31: New versions of CLDR has
digit grouping pattern with decimal part. Update digitGroupingPattern
values in Message classes with this improved pattern.
Refer: http://unicode.org/reports/tr35/tr35-numbers.html
* Refer the following chart for the decimal patterns.
http://www.unicode.org/cldr/charts/31/by_type/numbers.number_formatting_patterns.html
* Uses PHP NumberFormatter class for the commafy implementation, which
is available in PHP 7.
* Some tests need to update to match the TR 35 spec
* The formatNum public method in Language.php is the preferred way to
use this feature. It does separator transformation and digit transformation
wherever applicable.
* Renamed the second param name for formatNum from noCommafy to noSeparators
* commafy method is deprecated and formatNum is preferred. Practically,
we are not just adding comma, but seperators according to the language.
Replaced some tests based on commafy methods with tests based on formatNum.
Note: The corresponding js implementation is not changed in this commit.
It would probably be a good idea to use globalize.js, which is also based
on the CLDR patterns.
Note: This patch preserves the existing off-by-one error in
$minimumGroupingDigits; T262500 will eventually fix this.
Bug: T167088
Co-Authored-By: C. Scott Ananian <cscott@cscott.net>
Change-Id: Ic721b9a91e78e4ef07040339d1006b7a90a910c0
When there are multiple aliases, the first alias MUST be the
preferred alias in that language, so that wikitext code
generators can generate the desired syntax.
The other aliases SHOULD be sorted by the following convention:
- Local first, English last
- Most common first, least common last
Bug: T116020
Change-Id: Ia670512e0cb375335873e7f9a08b638bbe039e45
* All $namespaceNames and similar messages
that reference NS_* constants seem to use '_' for spaces,
except a few cases. I suspect its a mistake, thus replacing.
Regexes used:
([^'"\n]*['"][^'"\n]*(['"][^'"\n]*['"])*[^'"\n]*[^A-Za-z0-9]NS_)
contains a space in front, replaced with _\1
[^A-Za-z0-9]NS_([^'"\n]*['"][^'"\n]*['"])*[^'"\n]*['"][^'"\n]*
contains a space at the very end, replaced with \1_
Change-Id: Ibbc201678ee91db2b5bf3de597c1598b86558d77
Tuvan (tyv) didn't have a special page section, so now it's added.
See also I6f84eaf414b6d4239522bad14e90b1cbfc82590f.
Bug: 69461
Change-Id: Ie6a4d878b87ee030f9c042b43f7b1fb424b54099
* Interface strings are now elsewhere
* MessagesQQQ no longer exists
* Prefer https for translatewiki.net
Change-Id: I76652ea94cca80441cd5d978029e4707ee41c4fd