Commit graph

2025 commits

Author SHA1 Message Date
Translation updater bot 7cda61f4a8 Localisation updates from https://translatewiki.net.
Change-Id: I5d184ba5440252e2e9c9f4514a4a23fca2c777c3
2015-03-09 22:09:20 +01:00
Translation updater bot 81619b95d6 Localisation updates from https://translatewiki.net.
Change-Id: I2e3e728bac976f0920d10aec35b0b8a12cc68930
2015-03-08 21:48:23 +01:00
Translation updater bot 0e56197561 Localisation updates from https://translatewiki.net.
Change-Id: I474bcbcc647ed6f962252a997b2e904b6c7f975b
2015-03-05 22:27:19 +01:00
Translation updater bot 316aa5d9a8 Localisation updates from https://translatewiki.net.
Change-Id: I53f9fa0623363e863b5a4dddb9d48df3e59c59db
2015-03-01 22:08:28 +01:00
Translation updater bot b15d28a9d7 Localisation updates from https://translatewiki.net.
Change-Id: I6d18bfda30cbcb23c4d3ee3df58c0185d0634bd3
2015-02-28 22:07:58 +01:00
Translation updater bot 10abeb5880 Localisation updates from https://translatewiki.net.
Change-Id: I6379b758c6408b9b16b7a1cbe26546820834d3b3
2015-02-26 21:38:18 +01:00
Translation updater bot 9e430d61aa Localisation updates from https://translatewiki.net.
Change-Id: Ib1a7cd874974c4a33df48980e12584545fb0c108
2015-02-25 22:56:50 +01:00
jenkins-bot eb568001a5 Merge "Update Scribunto tests after I562e437e" 2015-02-25 01:07:55 +00:00
Translation updater bot 824bae76e9 Localisation updates from https://translatewiki.net.
Change-Id: I14dc7a1cc19e49f31927a01cf4e315d96e2a27fe
2015-02-24 22:03:29 +01:00
Translation updater bot 8915ebec05 Localisation updates from https://translatewiki.net.
Change-Id: Ibfe47e02028c0be50b2c6bc3875d852b52d6b960
2015-02-23 21:58:45 +01:00
Translation updater bot 1a7538fb0e Localisation updates from https://translatewiki.net.
Change-Id: Ie37cc4d8aee3918080fdfaad2ebeab1e61181dbc
2015-02-22 21:36:24 +01:00
Translation updater bot c4e0f5026b Localisation updates from https://translatewiki.net.
Change-Id: I9a2fe271921dd3a5b6155e20619e1baeb9190480
2015-02-21 23:34:10 +01:00
Vivek Ghaisas bdec6124b5 Update Scribunto tests after I562e437e
The parser's output was changed in I562e437e to add clickable anchors
for section headers which made Scribunto parser tests fail.

Bug: T90018
Change-Id: Ia74877e0641f2763d42be4a8fad1aa8ecffe449e
2015-02-21 12:08:09 +05:30
Translation updater bot 21a5d22f5e Localisation updates from https://translatewiki.net.
Change-Id: I6295410af107eaf8a57516a177b2c45144a253ff
2015-02-20 22:29:00 +01:00
Marius Hoch 53ff0bf246 Revert "Revert "Make tests work when $wgLanguageCode != 'en'""
Should be good to apply now after Wikibase has been adopted to
this.

This reverts commit 06f03fe09b.

Bug: T69483
Change-Id: I28073a891b8847fc6aa5ad026bf702e4015f7d4a
2015-02-19 22:30:47 +00:00
Translation updater bot ad121101b5 Localisation updates from https://translatewiki.net.
Change-Id: I1938437702e486b84d47504d7c983b6cef609acd
2015-02-19 22:10:20 +01:00
Legoktm 06f03fe09b Revert "Make tests work when $wgLanguageCode != 'en'"
Broke Wikibase tests and hoo needs to do backports today.

This reverts commit 499665c36f.

Change-Id: I5151ce963bcd17ed6d3b98a0f332f95c99596bff
2015-02-19 17:41:19 +00:00
Brad Jorsch 499665c36f Make tests work when $wgLanguageCode != 'en'
* For most tests, subclassing MediaWikiLangTestCase instead of
  MediaWikiTestCase works.
* The Site library needs to not reuse its namespace cache if the
  language changed.
* ScribuntoExceptions are still being localized for some reason; test
  the message and args of the exception instead of using getMessage().

Bug: T69483
Change-Id: I1c0ca3b11b6228654b47ceb92c1b1be7bda6709a
2015-02-19 16:05:17 +00:00
Translation updater bot 2cf290d05b Localisation updates from https://translatewiki.net.
Change-Id: Idccfa53e12ec4f9b10f1d963334fbf911b184ac1
2015-02-18 22:06:11 +01:00
Chad Horohoe beb8b63683 Remove obvious function-level profiling
Change-Id: I94654fc0f72d0953c618a9e0a9b73f4a387df8b7
2015-02-12 11:53:18 -08:00
rillke fba298c26f Expose file size and MIME to Lua
Use cases:
- size: Showing links (like to SVG validator) conditionally (e.g.
        only if the filesize is below the threshold it can work on)
- mime: No longer have to guess the MIME type based on the file
        extension. We use the MIME type for displaying correct and
        precise information about maximum thumbnailable sizes in
        case an uploaded work exceeds this limit.

This change will not have negative impact on performance; as soon
as width or height is loaded, the two newly added information are
gratis.

Change-Id: I25aad85c2a558a684aca83374aeb628f355fad1c
2015-02-12 01:18:57 +01:00
jenkins-bot f62b6b4379 Merge "Adds support for JSON encoding and decoding" 2015-02-05 02:58:44 +00:00
Translation updater bot df36b64b64 Localisation updates from https://translatewiki.net.
Change-Id: I55100fbdff252419e904c7d8a5dfd552676e70e4
2015-02-04 22:27:10 +01:00
Kunal Mehta f5a8a3b0ae Update make-normalization-table for core file moves
Depends upon Ib530ad9dbe1d3a33dc53ef8b9620f61d4e1a2d62 in core.

Change-Id: Ib530ad9dbe1d3a33dc53ef8b9620f61d4e1a2d62
2015-02-04 20:04:41 +00:00
jenkins-bot 89a5a23fa1 Merge "Fix weird quotes in package.lua" 2015-02-03 01:49:50 +00:00
Marius Hoch c0480eef77 Fix weird quotes in package.lua
Change-Id: I6d11813ed00489a69c88ab26aeeec4c4dd42d5dd
2015-02-03 00:40:21 +01:00
Translation updater bot ff41c126d5 Localisation updates from https://translatewiki.net.
Change-Id: I3c2b128e75999b9db6aa32e62f0c4e0a69887812
2015-02-02 22:30:34 +01:00
Jackmcbarn 35e3ea3ce2 Simplify code in mw.html
Replace numeric loops with iteration, don't unnecessarily check for nil
before table.insert (since it's a no-op in that case anyway), and similar
restructuring.

Change-Id: I155839a648f242a1b1de35f4081d8bcfa34f6933
2015-01-31 13:26:40 +00:00
Translation updater bot 664430aa43 Localisation updates from https://translatewiki.net.
Change-Id: I6e7f7ce9e637246da249ad0f572d2bac49d24cfc
2015-01-29 23:05:35 +01:00
Brad Jorsch 10bc0f7316 Adds support for JSON encoding and decoding
Provides methods to encode and decode JSON in the mw.text module.

Bug: T47470
Change-Id: I274f2ff13adb616e50600ee30e29b35327f3251e
2015-01-26 15:13:22 -08:00
Brad Jorsch ccfcbfc17f Update unit tests for recent core changes
* I0ede3169 caused Language::fetchLanguageNames() to use 'en' rather than
  null when given an invalid language code. This didn't break Jenkins
  since, without cldr, it always uses null anyway.
* I4bead5f5 caused Language::listToText() to start encoding
  single-quotes in messages such as 'and'.

Bug: T85854
Change-Id: Ic2807be8dad3ef029652e4b0db05e4dd8a6631b9
2015-01-08 23:23:59 +00:00
Jackmcbarn f7fe4881a0 Pass the title's fragment to getExpensiveData
Without this, an error occurs when calling mw.title.new('#foo').exists
(or anything similar).

Change-Id: Id2b60fe3f121af95b4b54da3a7042b490ecbc3fe
2015-01-08 13:19:54 -05:00
Translation updater bot d090e5de30 Localisation updates from https://translatewiki.net.
Change-Id: Ic2c73c2e65fbc78579bdf6fd1a3e510ecdf044d8
2015-01-06 22:27:50 +01:00
Translation updater bot 7dfa59f2b5 Localisation updates from https://translatewiki.net.
Change-Id: I09b50e58e3da5981efc189bd76325226c71fc7c2
2015-01-03 23:04:24 +01:00
Mr. Stradivarius ad34c2bd94 Use protocol-relative URLs in mw.site.interwikiMap
At the moment, in mw.site.interwikiMap, URLs stored in the database
with relative protocols are converted to http or https depending
on the protocol of the user who last requested that the page be parsed.
However, this URL isn't updated for users pulling pages from the page
cache, so they may see links with an incorrect protocol. Module authors
can work round this by using mw.uri objects and the isProtocolRelative
property, but it would be simpler just to use relative URLs from the
outset.

Change-Id: If0a169cfd1597e09706fc0e6d5cdcc821ba8d06a
2014-12-26 20:28:49 +09:00
Mr. Stradivarius c58c528d28 Add mw.site.interwikiMap
This makes the interwiki map available to Lua modules. The code is
based on the API interwiki map code in core (the appendInterwikiMap
method of includes/api/ApiQuerySiteInfo.php.) Everything that the
API includes is added, apart from iw_api and iw_wikiid, which I
couldn't think of a use for from Lua modules.

Accessing the interwiki map would be useful for modules like
enwiki's Module:InterwikiTable,[1] as it would stop module writers
having to duplicate the data.

[1] https://en.wikipedia.org/wiki/Module:InterwikiTable

Change-Id: Ie8ad2582aaf5e422824f7da51714a347bb4041d1
2014-12-24 01:17:48 +09:00
Brad Jorsch ce034c2f92 Normalize newlines before calling preprocessor
The behavior of the different preprocessors differs when given \r or
\r\n newlines.

Bug: T78488
Change-Id: I74faee1d3deb57a70d0c8fb690e5abb388d1f61a
2014-12-22 04:15:52 +00:00
Thiemo Mättig 93579c7363 Add more comments and type hints
Change-Id: I8c4b91d3a6695cc33c9c3d3fb427af5412323ff7
2014-12-19 19:25:53 +00:00
jenkins-bot fbc7437af8 Merge "Handle PTD_FOR_INCLUSION properly" 2014-12-19 03:55:47 +00:00
Jackmcbarn c0c6170108 Handle PTD_FOR_INCLUSION properly
Change handling of PTD_FOR_INCLUSION to match that of the parser (i.e.,
don't set it if text is being expanded in the root frame), so that
frame:getParent():preprocess() will handle <noinclude> etc. correctly.

Change-Id: I13f45e57aa334642d310e9bd5fdd3dbe5922c4e1
2014-12-19 03:46:25 +00:00
Jackmcbarn 4002f43ef2 Use a metatable when os.date("*t") is called
When os.date("*t") or ("!*t") is called, instead of just setting the TTL
to 1 second, create a metatable that sets TTLs as the values are looked
at.

Change-Id: Id1e2df731f182f21cf19708738f9907fa927185c
2014-12-19 03:46:23 +00:00
Jackmcbarn 85ac0ae4bb Make Jenkins tests pass
Something apparently changed in core, and now we need some additional
autoload classes to make tests pass.

Change-Id: I1d4c764d3836b7207831cceca8daacd735288c38
2014-12-18 22:40:33 -05:00
Translation updater bot a3faa9ea61 Localisation updates from https://translatewiki.net.
Change-Id: Ie335c3a42c677710de92b106226fc3398804c1b4
2014-12-18 23:22:27 +01:00
Translation updater bot 98002006fc Localisation updates from https://translatewiki.net.
Change-Id: I1ead87daf115437795773b9238f5b2f7daeda72d
2014-12-13 22:36:14 +01:00
Jackmcbarn 819320ec3b Don't attempt to parse non-Modules in the console
When processing Lua console requests, don't attempt to parse pages that
aren't modules. This allows the Lua console to be successfully loaded
everywhere.

Change-Id: Idfd1985aca4acb6a8f3235d34ac00358e30e361c
2014-12-12 02:37:34 +00:00
Jackmcbarn 15203e9b72 Record a link to pages looked up by ID
If mw.title.new is called with a page ID, record a link to it.

Change-Id: Idc5327d21b780ff8242367878102034413663643
2014-12-11 16:10:42 -05:00
Jackmcbarn ce5ac6611d Avoid unnecessary database queries
Currently, mw.title.new always results in a database query, which holds up
the parse until it finishes. This changes it to not require a database
query if it's not actually necessary.

Bug: T68328
Change-Id: I62f347d4cd9176bd0440215dcbe804c1dc3d4c99
2014-12-11 13:34:06 -05:00
Mr. Stradivarius 98f25aa9a1 Improve error messages in mw.html
Add more information to error messages in mw.html. This includes the
error level, the function name, and the position of the argument in the
argument list. Where possible, use the functions in libraryUtil.lua to
do this.

Some functions in mw.html accept multiple types, so add a checkTypeMulti
function to libraryUtil.lua to make these kinds of functions easy to check.
And while we're at it, add test cases for libraryUtil.lua as well.

Change-Id: If9cf9a52bd4b1bb42cc7f9f1f1096828710cbc52
2014-12-08 17:01:31 +00:00
jenkins-bot ece90ec755 Merge "Improve argument validation in frame:expandTemplate()" 2014-12-07 03:15:48 +00:00
Translation updater bot ba6743a523 Localisation updates from https://translatewiki.net.
Change-Id: I1d214f6cdc989092cf86c1da7a78359eb81f7c35
2014-12-05 23:14:52 +01:00