| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge Interwiki extension into core, with some changes:
* Always register 'interwiki' user right and 'interwiki' log type, and
remove $wgInterwikiViewOnly
* Remove nonstandard 'intro' and 'body' CSS classes on Special:Interwiki
* Make interlanguage special cases be conditional on $wgInterwikiMagic
* Other cleanups
* Add SpecialInterwikiTest
* Add a constant MW_HAS_SPECIAL_INTERWIKI which can be used in config to
suppress loading of the extension.
After merging Interwiki extension into core we can remove
InterwikiLoadPrefix hook, which is incompatible with Parsoid.
Bug: T33951
Bug: T270444
Bug: T312425
Bug: T315759
Bug: T357247
Depends-On: I0d02d93f49c746a7ce86b72b456f13c4af9b6c34
Change-Id: I05049e7c2e056928977245367583d027b80ef613
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
There's no feasible change process for this data in CLDR. Microsoft and
Apple just waved this through and now you would need 13 Unicode member
organisations to vote against them. As Wikimedia-managed data, we can
choose a reasonable value on the balance of probabilities.
Bug: T262500
Change-Id: I61511d42243aaa540b56b4107b04e4acdeb39ae0
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Bug: T304802
Change-Id: Iccacf6288d758e526c95df69861385a4ac2d0f55
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Use @phpcs-require-sorted-array from new codesniffer release 32.0.0
Bug: T255826
Change-Id: I827d1f5010d000609324ec398beeb142d9bac299
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, MediaWiki will no longer have a 'JavaScript-powered'
wikitext toolbar, and instead sysadmins will be required to choose one
(or more) of the several extensions available for this purpose if they
need the functionality. For over half a decade MediaWiki's tarball has
included the 2010-era replacement for this feature, WikiEditor. We are
now working on replacing even that, with the 2013-era visual editor, a
mode of which is the forthcoming 2017-era wikitext editor, and several
more specialised editors like CodeEditor.
Beyond this, the core editor toolbar is ancient, un-loved, and is used
only exceptionally rarely, mostly by accident. It is unhelpful to give
implicitly this as the primary editor for MediaWiki just because we've
not removed it from core when it is not a very good experience for any
kind of user, and has not received the attention that users deserve to
be worth retaining in core.
The old core preference, which was intended to govern whether this old
toolbar should be shown, has since mutated into whether the to run the
EditPageBeforeEditToolbar hook. The hook is used by several extensions
to provide toolbars in lieu of the core one. This preference has been,
in practice, a very confusing preference for MediaWiki users, who have
to interact with quite similar preferences to toggle their real editor
which sit next to this one on the preferences page. Consequently, this
preference is also removed.
The code could be made into an extension for those (very few) users of
MediaWiki who might want to keep on using it. However, the author will
offer their services but not their encouragement in said undertaking.
Bug: T30856
Bug: T32795
Change-Id: I2b05f0ca25873ad8e0b33a5e4938bef52c4e9347
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some languages it's conventional not to insert a thousands
separator in numbers that are four digits long (1000-9999).
Rather than copy-paste the custom code to do this between 13 files,
introduce another option and have the base Language class handle it.
This also fixes an issue in several languages where this logic
previously would not work for negative or fractional numbers.
To implement this, a new option is added to MessagesXx.php files,
`$minimumGroupingDigits = 2;`, with the meaning as defined in
<http://unicode.org/reports/tr35/tr35-numbers.html>. It is a little
roundabout, but it could allow us to migrate the number formatting
(currently all custom code) to some generic library easily.
Bug: T177846
Change-Id: Iedd8de5648cf2de1c94044918626de2f96365d48
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MessagesKk_arab.php:
MessagesKk_cyrl.php:
MessagesKk_latn.php:
MessagesRu.php:
* Translations of a comment warning end-users against editing
localisation messages in these files. That comment was removed
from MessagesEn.php in b38247894422fb34dbddaea23cfc08cd72f48d5b,
as we no longer store localisation messages here.
MessagesKsh.php
* Warning for translators not to use encodings other than UTF-8.
Change-Id: I1ff2cf035b84dc53c368ad7182f294c7fb8f1a3d
|
|
|
|
|
|
|
|
| |
This change is performed using:
sed -i -e 's/http:\/\/www.amazon/https:\/\/www.amazon/g' languages/messages/Messages*.php
Change-Id: I22c5e7a8d33a80b8cbe814f9735e7c24f1b004f9
|
|
|
|
|
|
|
| |
Performed using
find . -name \*.php -exec sed -i -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' {} \;
Change-Id: I5d0627f94c73690cf3a8a453539c22c760c2aa60
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
* Fix errors spotted by new release
* Introduce "composer fix", which uses phpcbf to automatically fix some
errors spotted by phpcs.
* Drop $PHPCS_ARGS variable that didn't work on Windows, and add -s flag
* Remove rules from phpcs.xml that are now in MW-CS ruleset.
Change-Id: I13e2155695918c918b67497ac65b85a03897095e
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
|
|
| |
The bit being removed here causes a NOTICE with HitCounters.
Change-Id: I318eb641d4ed4b50dea0a172cf7970045b3a49e7
|
|
|
|
|
|
| |
Updates for magic words.
Change-Id: Ic564d36de395c9a30be5f1390591da723f47edce
|
|
|
|
|
|
| |
Updates for special page aliases.
Change-Id: Ic2b34a948d527cee6b76abd7e24a6d8a33b65bd2
|
|
|
|
|
|
|
|
|
| |
Tuvan (tyv) didn't have a special page section, so now it's added.
See also I6f84eaf414b6d4239522bad14e90b1cbfc82590f.
Bug: 69461
Change-Id: Ie6a4d878b87ee030f9c042b43f7b1fb424b54099
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, try out a way to have per-module LESS variables defined in PHP.
This might come in handy in the future… Maybe for skin theme support?
(I recommend reviewing the file changes in the order below. :D)
includes/resourceloader/ResourceLoaderFileModule.php
* Pass the context (ResourceLoaderContext) deeper down via
readStyleFiles() and readStyleFile(). We need it to compile the
.less files for the right language.
* Extract LESS compiler creation to getLessCompiler().
* Allow passing a LESS compiler instance to compileLessFile(), rather
than getting one after the method is called.
All of the changes are backwards-compatible.
includes/resourceloader/ResourceLoaderEditToolbarModule.php
* New module to support getting the language data and passing it to
LESS variables.
It might be a good idea to factor out a reusable class for a LESS
module with additional variables, but that would require more
attention to design than I gave it.
resources/src/mediawiki.action/mediawiki.action.edit.toolbar/mediawiki.action.edit.toolbar.less
* Glue code to use the language data defined by the module above and
put it in final CSS.
includes/EditPage.php
* Do not hardcode image URLs in output HTML, as they are provided in
CSS now. This gets rid of some usage of globals.
In fact, we should be able to finally move the inline JavaScript
calls out of getEditToolbar(), but I'm already introducing too many
changes for one patch. That can be done later.
languages/Language.php
* Add getImageFiles() to complement existing getImageFile() method.
Misleadingly named, it returns paths for images for the toolbar
only (and no other ones at all).
skins/common/ → resources/src/mediawiki.action/mediawiki.action.edit.toolbar/
* Moved all of the button images to new location.
Also, boring cleanup that was harder before because we treated the
paths as public API:
* Placed default ones in en/ subdirectory.
* Renamed cyrl/ to ru/.
* Renamed ksh/button_S_italic.png → ksh/button_italic.png.
languages/messages/
* Adjusting paths and filenames for the changes above.
resources/src/mediawiki.action/mediawiki.action.edit.css
resources/src/mediawiki.action/mediawiki.action.edit.js
* Added styles and updated the script to make it possible to have
non-<img> elements as toolbar buttons.
* Consolidated styles that were already required, but defined
somewhere else:
* `cursor: pointer;` (from shared.css)
* `vertical-align: middle;` (from commonElements.css)
Bug: 69277
Change-Id: I39d8ed4258c7da0fe4fe4c665cdb26c86420769c
|
|
|
|
|
|
|
|
| |
* Interface strings are now elsewhere
* MessagesQQQ no longer exists
* Prefer https for translatewiki.net
Change-Id: I76652ea94cca80441cd5d978029e4707ee41c4fd
|
|
|
|
|
|
| |
Largest patch set in the history of MediaWiki!
Change-Id: I918cfdc46c099017ca3622d1bcbbdd30c4fd00f6
|
|
|
|
| |
Change-Id: I54a8e52634c1e36fadd7a84f236747765fc98684
|
|
|
|
| |
Change-Id: Ifc65d7c3844bfaabd97c803b2c72dc8a49cdcc65
|
|
|
|
| |
Change-Id: Ica6fa7fc2d685a655e07b24cd54c7ec42d10f214
|
|
|
|
| |
Change-Id: I31ee0d1685cdf6b315cb5336b30e548c76d67a95
|
|
|
|
| |
Change-Id: Icad3f57cf182107ce7e813297f00473e75e4ad6f
|
|
|
|
| |
Change-Id: I18970accbce3b383e4ad89df2b5cd0d638861e26
|
|
|
|
| |
Change-Id: If3a8ff71e98aab98c39991147c715ec388ef91aa
|
|
|
|
| |
Change-Id: Id6221ab7d0d906278a9163513ca63b74c9d41645
|
|
|
|
| |
Change-Id: I91e14444039b2b1345602a8c3291794ab3beafd1
|
|
|
|
| |
Change-Id: If66ddc1478b986417b08bd6d84cf441ea7f4526c
|
|
|
|
| |
Change-Id: I87ed70aa87a61057fa81f0eae63363af85fd71a0
|
|
|
|
| |
Change-Id: I14a8aeb0af4aa632d89d7b6e27eca33bf855f46d
|
|
|
|
| |
Change-Id: I6301ccc1c875aea9851b5d134ba3061a094ebaf4
|
|
|
|
| |
Change-Id: Iac95418170688f90f53dcc28f6c429f0e79b0ac4
|
|
|
|
| |
Change-Id: I2dd97b0dda0af44be6ad3979d5934554a4d7e31c
|
|
|
|
| |
Change-Id: I2535a33defbc75fdb860acac3c98a8511e064a0a
|
|
|
|
| |
Change-Id: I11ac7d4aeadddc7f20f44b98a9c08c8f20019ee6
|
|
|
|
| |
Change-Id: I71e13fdbb541c2fccbe303849a3c78f0c1260bd2
|
|
|
|
| |
Change-Id: Ie1ce49320e2baf9daaa1b2b32dbe881c1e26026f
|
|
|
|
| |
Change-Id: Id88aa24093b40a87b6beee70d81124179f95f006
|
|
|
|
| |
Change-Id: I86c1c01411f82197c10f7c3cce25feede39f9166
|
|
|
|
| |
Change-Id: I276bff053ef2bfea3180abe56bc2e26b5fcbe89b
|
|
|
|
| |
Change-Id: I57623a929ef7cce482f476d6e2aa557d4a6f5c89
|
|
|
|
| |
Change-Id: Ie265f224e4d0e521670d892447842c60d7f57e61
|
|
|
|
| |
Change-Id: If319ada434046084f15742666d6b01504d028faa
|