Commit graph

1582 commits

Author SHA1 Message Date
Marius Hoch 08de37719d Don't try to inline load ext.scribunto on mobile
This module doesn't exist on mobile, so don't try to load it there
(which will produce an exception).

Bug: 59808
Change-Id: Ifad7edb508c1f740a109e8f5c1656e4c7841ab13
2014-03-21 03:00:42 +01:00
Jackmcbarn 50a1f556b7 Remove leftover code for titles in messages
Since the code related to titles in messages was removed from
mw.message.lua, remove it from here as well. Titles have no effect since
only the plain format is available.

Change-Id: I0c96a4e831abe61100b48cb6a898ad8dbffd8a72
2014-03-18 13:52:51 -04:00
Translation updater bot 6ce04f919b Localisation updates from https://translatewiki.net.
Change-Id: I1dbf433a67021ff4aae6c6807dff713c42acfac4
2014-03-13 15:45:41 +00:00
Jackmcbarn 18f177a3a9 Improve invalid title error message
Include the text of the title being complained about when returning an
invalid title error from expandTemplate.

Change-Id: I2261f9574557c3ae514c39cea71f9777f8f9f431
2014-03-11 17:06:23 +00:00
Brad Jorsch 29452c9bef mw.language: Fix exceptions and add tests
Various methods are throwing exceptions when passed invalid language
codes. Those need to be caught.

And we should really add unit tests for the mw.language library, too.
Doing so exposed another bug (in lang:gender), which is also fixed here.

Bug: 62242
Change-Id: Ib7d257cbb1ce179c510273526910d6ac5f3cac5d
2014-03-09 02:56:06 +00:00
Translation updater bot c6e6436665 Localisation updates from https://translatewiki.net.
Change-Id: I0e90a794890f9289f54028a84ecadb86c971ac67
2014-03-07 21:43:23 +00:00
Translation updater bot 9c30bc4c87 Localisation updates from https://translatewiki.net.
Change-Id: I7d7224e8d29c5ba804ec1639d10f51208116e492
2014-03-03 21:07:38 +00:00
Translation updater bot 61453b56a2 Localisation updates from https://translatewiki.net.
Change-Id: I40d900dcbc3e9a39bed06cb641108b86b0d8127f
2014-03-02 20:42:00 +00:00
Translation updater bot 126da47c9b Localisation updates from https://translatewiki.net.
Change-Id: I97c1f0e29a39a318793f24355353a3884b49f484
2014-02-26 22:02:05 +00:00
Brad Jorsch 84d96e843c LuaStandalone: Release functions when no longer referenced
The LuaStandalone interpreter needs to keep a mapping from integers
returned to PHP to the corresponding function. But if it never releases
these functions when PHP no longer has any reference to them, it can
result in Lua running out of memory if a module with a large number of
functions is invoked many times in one page.

The fix here is to track which function ids are referenced from PHP, and
periodically send the list to Lua so it can remove any that are no
longer used from its cache.

This also takes care of another issue where having multiple interpreter
instances and passing function objects from one into another could call
the wrong function in Lua.

Bug: 51886
Change-Id: I4f15841051f7748d1d6df24080949e5cbd88f217
2014-02-25 22:59:05 +00:00
Translation updater bot c987f07e64 Localisation updates from https://translatewiki.net.
Change-Id: Ib2df7b718cc932c46386d1d1d400df96328ce0fa
2014-02-25 20:08:28 +00:00
Tomasz W. Kozlowski 5d7a06a21f Namespace translation for Urdu
Bug: 61905
Change-Id: Ibb25af7137d32682bf2a253694c82d6010683ddb
2014-02-25 14:04:39 +01:00
Translation updater bot 1540f4ae36 Localisation updates from https://translatewiki.net.
Change-Id: Ia33b34d291507447e093a857c8f3e9daaa79503a
2014-02-23 21:43:55 +00:00
Translation updater bot e713983b72 Localisation updates from https://translatewiki.net.
Change-Id: I105dab8606bdc7ac7e32e0e8122f75a7e607b604
2014-02-21 22:28:51 +00:00
Translation updater bot 86e4a01aa3 Localisation updates from https://translatewiki.net.
Change-Id: I9b71ea221a850568be20ba5f354b186d6331c754
2014-02-20 21:05:48 +00:00
Translation updater bot e115fc16c8 Localisation updates from https://translatewiki.net.
Change-Id: I5ccf74459906c1fa12f4b37119dcf3af9470df52
2014-02-19 20:10:21 +00:00
Translation updater bot 17e0846a8c Localisation updates from https://translatewiki.net.
Change-Id: Ie002e541673393d2abfb56255c31bde922147cb1
2014-02-17 20:48:03 +00:00
Translation updater bot ecc4e5d0a9 Localisation updates from https://translatewiki.net.
Change-Id: I67f6f5c4f057260b1d66371e7b4f3fc0a4d717eb
2014-02-16 20:21:29 +00:00
Translation updater bot fc88cc9ffb Localisation updates from https://translatewiki.net.
Change-Id: I34f35595eecdcd033f81dd18349a4f3854d20e42
2014-02-15 21:06:48 +00:00
Translation updater bot 906c147a3b Localisation updates from https://translatewiki.net.
Change-Id: I01732ca4281b04dc1299664e4732cc1028f840e5
2014-02-14 20:21:10 +00:00
Translation updater bot 2384f440b9 Localisation updates from https://translatewiki.net.
Change-Id: I87288f96925e871c874fd481d59c82eb6b669d36
2014-02-13 21:19:12 +00:00
Translation updater bot b59c2322ec Localisation updates from https://translatewiki.net.
Change-Id: Ib4d02296b42543db0a331ceba38180afca926f34
2014-02-12 21:36:04 +00:00
Translation updater bot e77c719367 Localisation updates from https://translatewiki.net.
Change-Id: I59faf1a4a85175da8cb7fde2514a72ead9604b9f
2014-02-10 20:49:50 +00:00
Brad Jorsch b58ee1da94 Use the new limit report hooks
Change Ie065c7b5 added an option to show profiling data at the bottom of
preview pages, and with it new hooks to gather and format this data in a
more structured way than is possible with ParserLimitReport. This change
adds support for the new hooks.

Depends-On: I7799616a602d90e1b8d3f0ece35811ca387bade7
Change-Id: Idffd2d78f9a0217c99c07cbbfc844d6daf0172f7
2014-02-10 04:11:35 +00:00
Brad Jorsch ed54cd7032 Fix PHP implementation of mw.ustring %W
Incorrect regex is making it match basically everything.

Bug: 60908
Change-Id: Ic1c5a740c6b825bb7dfacf684d0c7fa905b135ee
2014-02-10 00:45:46 +00:00
Brad Jorsch 1397351289 Add newlines around scribunto-doc-page-show wikitext
Change I15c10379 wrapped the scribunto-doc-page-show message in a div,
which is breaking things when the content of that message starts with
start-of-line-sensitive wikitext. So add a newline inside the div.

Bug: 60664
Change-Id: If596bed72f779f5980348ac111b63e7876d21ff4
2014-02-10 00:41:03 +00:00
Translation updater bot 4cd517ede6 Localisation updates from https://translatewiki.net.
Change-Id: Ic5786e4bebbb9e45f1bfee01b9c928098d03d1f6
2014-02-08 21:24:36 +00:00
Jackmcbarn 2b06e83816 Remove message formats other than plain
Message formats other than plain should have never been exposed in this
way, as they allow link tables, etc. to be bypassed and serve no useful
purpose. This removes them, and also removes title, as it serves no
purpose without them.

Bug: 60758
Change-Id: I96284ffbe986a9cd92d2bde1ffdb746029bad989
2014-02-03 15:29:39 -05:00
jenkins-bot 7146e6922d Merge "Module namespace translations for Serbian Latin and Croatian" 2014-02-02 09:37:07 +00:00
Translation updater bot 9b49b99ca2 Localisation updates from https://translatewiki.net.
Change-Id: Ie9acd24e69554d780a8caff8ec73b5e2bcf09842
2014-02-01 19:45:25 +00:00
Marius Hoch aa943d5795 Validate the type of the tagName given to mw.html.create
Change-Id: I35f70701ba6156325dfd268903452e6279aca528
2014-01-31 02:08:11 +01:00
Brad Jorsch 5cf28c5a15 Use a child frame in frame:expandTemplate
If we don't do this, then the section edit links point to the wrong page
if we expand a template that contains section headings.

Bug: 55525
Change-Id: I00bda935be3e8b9c0f86fd0f131814207fbb34a7
2014-01-30 22:47:31 +00:00
jenkins-bot 4786af9fac Merge "Add composer.json file" 2014-01-29 19:22:55 +00:00
Adrian Lang d26c1eb961 Add composer.json file
Change-Id: Ib80bddfd3d8d40caf4f8efba4e3db6ef6fa2866d
2014-01-29 20:07:55 +01:00
Translation updater bot 45adde9f52 Localisation updates from https://translatewiki.net.
Change-Id: I7a9a1835bcfac0fd4309fb8b08344170f3718028
2014-01-28 21:21:54 +00:00
Translation updater bot aef5c07c8a Localisation updates from https://translatewiki.net.
Change-Id: Ie8eb2108922c9ff35e414c261c331719df54a9bf
2014-01-24 20:12:27 +00:00
Translation updater bot e2935310e3 Localisation updates from https://translatewiki.net.
Change-Id: Ibee9eef6a002814cc378793383cfca62328e3273
2014-01-23 20:18:56 +00:00
Translation updater bot 3e0ba646b7 Localisation updates from https://translatewiki.net.
Change-Id: I5659d67abe436992c6679eb4d60731c0887809fa
2014-01-20 20:26:01 +00:00
raymond 37d7a0c407 Module namespace translations for Serbian Latin and Croatian
By Kolega2357
https://translatewiki.net/wiki/Thread:Talk:Support/Module_namespace_-_translation_on_Serbian_Latin_and_Croatian

Change-Id: I9b3bd399ed3e0999efde61d6b885d2c33290729d
2014-01-19 21:48:34 +01:00
Marius Hoch 2bcd815d62 Allow changing the title used by Scribunto_LuaEngineTestBase
Change-Id: I8916fc855b96a566d775c947b117a31ad4a49dc8
2014-01-16 17:00:30 +01:00
jenkins-bot b1d7bac7b0 Merge "Add protectionLevels variable to mw.title output" 2014-01-15 20:21:48 +00:00
Jackmcbarn 9902ec1284 Add protectionLevels variable to mw.title output
Include a protectionLevels variable in the output of the mw.title.*
functions, containing the contents of the title's mRestrictions
array (i.e., its protection levels)

Change-Id: I79c9fed64bacfc90aee1d411a3e1b47e44c99755
2014-01-15 14:53:18 -05:00
Brad Jorsch f52136eada Handle invalid keys in Lua-to-PHP calls for LuaStandalone
PHP can't handle having arrays/objects or functions as keys in its
arrays, so make sure we don't try to pass them from Lua. Booleans aren't
really well-handled either, so let's disallow them too.

Also, add tests for proper stringification of floats and infinities when
those are used as keys.

Note this behavior change is needed to match the change in LuaSandbox
for fixing bug 54527, but isn't itself a security issue.

Change-Id: I1e2951bbe8cb78358650ad377bf7119fcac4485d
2014-01-14 10:03:42 -05:00
jenkins-bot bc65238698 Merge "Namespace translations for Serbian, Serbo-Croatian" 2014-01-08 07:51:53 +00:00
Tomasz W. Kozlowski 1c7df5a0a7 Namespace translations for Serbian, Serbo-Croatian
https://translatewiki.net/wiki/Thread:Support/Module_namespace_-_translation_on_Serbian_and_Serbo_Croatian

Change-Id: Ib5008d0281b05ef0d5703c885211e91ffc6ad45f
2014-01-08 07:48:41 +00:00
Translation updater bot b7b94fb11b Localisation updates from https://translatewiki.net.
Change-Id: I17e566581921e59d8ef6299276fc7c6aff9ac448
2014-01-07 20:46:07 +00:00
jenkins-bot b34e466b18 Merge "Add mw.html to Scribunto" 2014-01-07 14:09:46 +00:00
Translation updater bot 0ea533de53 Localisation updates from https://translatewiki.net.
Change-Id: I7bdc28c27ebb1a4fbda7815b77a579caf9d226c7
2014-01-06 20:07:35 +00:00
Bartosz Dziewoński 32b23da93a Namespace translation updates
* Renamed 'no' to 'nb'
* Added 'fi' and 'ro'

Requested at:
* bug 59014
* https://meta.wikimedia.org/wiki/User_talk:Matma_Rex#Translation_of_Module_namespace_name
* https://translatewiki.net/wiki/Thread:Support/Rename_%22module%22_namespace
* https://meta.wikimedia.org/w/index.php?title=Stewards%27_noticeboard&oldid=6929612#Renaming_namespaces

Change-Id: I69ec61305d638dd39e70406e192101c89ab7a1f4
2014-01-03 14:17:26 +01:00
Marius Hoch ac62e34952 Add mw.html to Scribunto
A module for building complex HTML from Lua using a
fluent interface. The module is originally from enwiki,
but the authors allowed us to reuse it under GPLv2+
(as stated in the file).
The module will be loaded per default and comes with
unit tests.

As discussed on wikitech-l:
http://lists.wikimedia.org/pipermail/wikitech-l/2013-December/073320.html

Change-Id: I7c8d4378091c13d5ace0dd1fcbb4e27163e8c896
2014-01-03 00:04:34 +01:00