Commit graph

1995 commits

Author SHA1 Message Date
Translation updater bot 2aa1f897cc Localisation updates from http://translatewiki.net.
Change-Id: If00e44e7fdfefbd2b87301e1f4dbd3488cd87b9b
2012-12-27 21:26:50 +00:00
Translation updater bot ce61573ec5 Localisation updates from http://translatewiki.net.
Change-Id: I8b07012db015760ec7cc0475f69260e36158e6c8
2012-12-23 21:57:52 +00:00
Translation updater bot c17b6a12e7 Localisation updates from http://translatewiki.net.
Change-Id: Iaa7cccba055f021691ef7e92f490de771f46c8ab
2012-12-22 22:19:07 +00:00
Demon 8ed53b1280 Merge "Allow mw.log and console to handle multiple values" 2012-12-21 15:29:54 +00:00
Brad Jorsch 9a5dc931f5 Allow mw.log and console to handle multiple values
In the debug console, "=unpack( { 1, 2, 3 } )" prints only "1". And
similarly, "mw.log( 1, 2, 3 )" logs only "1". Since Lua uses multiple
return values extensively, this is not particularly helpful.

Following the lead of the lua command-line client, change these to
output multiple values by converting each one using tostring() and then
concatenating them with tab as a separator.

Change-Id: I791d4c92415fc722bbd7c62d0f5f88752d31fe07
2012-12-21 10:26:38 -05:00
Chad Horohoe 590d40e145 Make sure to call parent::setUp()
Change-Id: I9da9bbf803ee37d48b954e2e82407fae4dfe464c
2012-12-20 11:43:03 -05:00
Demon e7c930256d Merge "Unit test: verify LuaSandbox and LuaStandalone are equivalent" 2012-12-20 16:32:26 +00:00
Translation updater bot 565c090f76 Localisation updates from http://translatewiki.net.
Change-Id: Iae0dbde50466609e29b2e17f2b684f4047c018a6
2012-12-18 20:39:43 +00:00
Demon 89e103274f Merge "Handle cloned parsers correctly" 2012-12-14 15:00:42 +00:00
Brad Jorsch 27f9cb5d91 Unit test: verify LuaSandbox and LuaStandalone are equivalent
We should include a unit test to try to ensure that we don't add
features to one environment and forget about the other.

Change-Id: I72b1acf8eea4a05e05fed1efeb0663a3eff9278a
2012-12-13 13:53:29 -05:00
Brad Jorsch eabb081c4f Handle non-finite numbers
There's no reason LuaStandalone cannot handle NaN and Inf.

Also, add some unit tests to check this.

Change-Id: I8570242a792e212489ad24dfc04fb1f2940190a5
2012-12-13 13:40:18 -05:00
Translation updater bot bbd155c72a Localisation updates from http://translatewiki.net.
Change-Id: I644d9959a543693add908e4a0aadfd3faad21005
2012-12-04 21:07:32 +00:00
Tim Starling d5bd1102d0 Fixed transmission of \0 from Lua standalone
* string.format() truncates the string at a null character, causing a
  deadlock when Lua attempts to send null characters to PHP. Use
  concatenation instead.
* Added test.
* Fixed an error reporting issue in the console, which I happened to
  notice at the same time as the above bug.

Change-Id: I2e6061a04512557492bffbd04bc09ca3bc1d80d6
2012-12-03 17:46:11 +11:00
Translation updater bot 037463715c Localisation updates from http://translatewiki.net.
Change-Id: I6d8fad75ee4d4f23f1dbc6eda37cecdc017b349f
2012-11-27 21:09:21 +00:00
Translation updater bot 54aef84b55 Localisation updates from http://translatewiki.net.
Change-Id: Ib77390bf10acdcd236e444144b6619f693a0e26c
2012-11-19 20:19:31 +00:00
Brad Jorsch 50cde6fe8d Handle cloned parsers correctly
If the parser is cloned, we need to give the new instance a new
ScribuntoEngine. Otherwise when one of the clones has ParserClearState
called, the engine for the other will also be unexpectedly destroyed.

Change-Id: Ia6ded082e5adddfbd91387bca825a305ccbf831d
Depends-On: Ieec65c908d71e89b9a66f83b9a626f842aadacbb
2012-11-16 11:27:55 -05:00
Translation updater bot c2aa4c7c39 Localisation updates from http://translatewiki.net.
Change-Id: Id4b1bb86b43fb60efd81c2a11da4a1d9990bb5a5
2012-11-02 20:20:32 +00:00
Translation updater bot f3c9525a2b Localisation updates from http://translatewiki.net.
Change-Id: I47231de2f7d4c3bcae0578dc3debf76560e60cb8
2012-10-31 20:40:52 +00:00
Translation updater bot 396bf79e27 Localisation updates from http://translatewiki.net.
Change-Id: I493e7a04b756e2488aa613c0a22663ee44756c3b
2012-10-22 01:43:21 +00:00
Siebrand Mazeland e7dd3e5275 Replace remaining wfMsgExt calls.
All of these were in getScriptTraceHtml, which used some magic ($msgOptions) which is no
longer that easy when using the Message class. As only inContentLanguage ('content') was
used, I documented that, and added the relevant code paths.

I tried to keep the code as readable and brief as possible and also removed an unused
local variable ($linedefined).

Change-Id: I38e1ce0bf90d9aa462e88ca7c795fcc848c4f118
2012-10-09 06:08:48 +00:00
Siebrand Mazeland 9d5759e985 Merge "Reformat JavaScript and CSS code." 2012-10-07 23:58:45 +00:00
Siebrand Mazeland d88f246cfc Merge "Replace deprecated methods." 2012-10-07 14:18:39 +00:00
Siebrand Mazeland ce27d6eefc Reformat JavaScript and CSS code.
Change-Id: Id5630bacfbc97ace3d2c68b69403b463eb6b5e87
2012-10-07 16:13:39 +02:00
Siebrand Mazeland 42c0c55225 Replace deprecated methods.
Change-Id: Ifab19bbc6f75148c8dcee758e09149280e2b229b
2012-10-07 02:59:30 +02:00
Siebrand Mazeland 7e43f640a6 Tweaks and fixes suggested by JSHint/JSLint.
Change-Id: Ia2e089dba787fafbd48e27a3da197dec328c5181
2012-10-07 02:36:28 +02:00
Translation updater bot 840a9fa586 Localisation updates from http://translatewiki.net.
Change-Id: I0af2b3951ca6ffdba0aa35721d44596d8692b86a
2012-10-03 20:17:56 +00:00
Translation updater bot 26e1149f64 Localisation updates from http://translatewiki.net.
Change-Id: I9ee9799add485fbac4274d38468297cc5ea4a954
2012-10-02 13:55:11 +00:00
Translation updater bot 303b8c0517 Localisation updates from http://translatewiki.net.
Change-Id: I0bb1c31875ae5739a162ca87b1ad6a2ab2b43bda
2012-09-26 19:52:17 +00:00
Tim Starling 27428cad87 Remove trailing whitespace
Test commit for wmf branch update script

Change-Id: Iafc71899d4cd9b827ec7325453950acf4f02314c
2012-09-26 13:35:46 +10:00
Tim Starling e287d47b4a (bug 40480) Fix "undefined class constant 'PERCENT'"
Do not try to use the new LuaSandbox class constants in the
backwards-compatible section of the code.

Change-Id: I0c4ca9e019095fce5bd1c1d17dbdf36dc198dfb7
2012-09-25 14:55:11 +10:00
Translation updater bot 071f22b295 Localisation updates from http://translatewiki.net.
Change-Id: I7881ef8c8ad93a8647618de5b45f65740ab6e5cc
2012-09-23 19:05:01 +00:00
Victor Vasiliev e286aba827 Merge "tests: skip CPU limit test on Darwin" 2012-09-22 05:45:40 +00:00
Translation updater bot 895c023996 Localisation updates from http://translatewiki.net.
Change-Id: I525c685727dad72d3e03d39c00d3d136d7eba2dd
2012-09-19 20:42:53 +00:00
Translation updater bot a2d18c9613 Localisation updates from http://translatewiki.net.
Change-Id: Id385858058d4654b63809078fa30d82fec06b11f
2012-09-16 19:55:29 +00:00
Translation updater bot 48f735fec8 Localisation updates from http://translatewiki.net.
Change-Id: I9ebadad0f6e83634aa9a677e4ca4b68ad2af81be
2012-09-15 19:53:13 +00:00
Translation updater bot 250bfc4e72 Localisation updates from http://translatewiki.net.
Change-Id: Idd46e729928cb3d272a5e8ef1c33c0f62edbe4fc
2012-09-14 21:10:41 +00:00
Translation updater bot ed05cb627f Localisation updates from http://translatewiki.net.
Change-Id: Ia17a6972df0832aa4262948c7d864bffb8ce74b0
2012-09-13 20:45:12 +00:00
Antoine Musso a179bd6182 tests: skip CPU limit test on Darwin
The Darwin does not support POSIX timer which is being used to limit CPU
usage. Running the tests on Mac OS X would never end so we are just
skipping it.

Change-Id: I56c3e8cd1cba15d33256192aa7e721e6448c7a2e
2012-09-12 17:46:47 -07:00
Translation updater bot 01fc480cb2 Localisation updates from http://translatewiki.net.
Change-Id: I3f87ced73d7c8ce12926e7b2900d5a6983f94f17
2012-09-12 19:55:16 +00:00
Tim Starling b6ee139cdc (bug 39816) Remove undefined template callback
Change-Id: I644d73ff3471889f2dc27515ba7d5db7ebe4ea1f
2012-09-06 15:34:14 +10:00
Tim Starling 776cc1f93d (bug 39606) Add a tracking category for script errors
Change-Id: I5a925ccd41e494a7b06d98b1e1656250b80c143a
2012-09-06 14:56:42 +10:00
Tim Starling aacca08815 Add mw.getCurrentFrame()
Provide a convenient means to access the current frame so that the
parameter passed to module functions won't need to be conventionally
stored in a global variable.

Change-Id: I0254d86a1094866a3ce4899e4021d0b33367bb35
2012-09-06 14:54:26 +10:00
Tim Starling 9859591271 Allow time functions in LuaStandalone
As in LuaSandbox I7e116c76

Change-Id: I783e2ae802999701ebcd4d1a1b3d113a21b4ca9e
2012-09-06 11:01:53 +10:00
Tim Starling 996ea62765 LuaSandbox profiler support
Add a profiler report to the limit report for pages with more than 1s
of Lua time. Uses the profiler introduced in I0b83a914 of LuaSandbox.

Also, fixed some circular references which were preventing the
LuaSandbox object from being destroyed when Scribunto::resetEngine()
was called. Otherwise a large number of interval timers could be started
due to a LuaSandbox object resource leak.

Change-Id: I5487fe2623974939d07f09f7197e86a5f297a8f1
2012-09-06 01:00:20 +00:00
Translation updater bot 2bc7fac2f7 Localisation updates from http://translatewiki.net.
Change-Id: I3e61139bc26df539dea57fc306b60f568c4f1992
2012-09-05 19:24:20 +00:00
Translation updater bot aea0553458 Localisation updates from http://translatewiki.net.
Change-Id: I05222a32f2b3d0f3d359904b45b5cc486c1a1f3c
2012-08-31 19:52:29 +00:00
Translation updater bot deaf8ecaf0 Localisation updates from http://translatewiki.net.
Change-Id: I7a327cdcd903c40a8e7d62a526609054905f7d8b
2012-08-29 19:22:59 +00:00
Tim Starling 89cf9f187d Fixed parser tests broken by I97f7732010ebfebcf494ac9e308275b34dbb9609
Change-Id: Ifd46b5dd25edd912d3fc2ebb92326da11c9df67b
2012-08-28 16:23:52 +10:00
Tim Starling ea1347a620 Don't run Preprocessor::preprocessToObj() on cache hits
Don't run Preprocessor::preprocessToObj() for frame:preprocess() on
cache hits, only do it on cache misses. The rationale for passing a
PPNode from expandTemplate() to doCachedExpansion() remains: Parser
implements its own cache, as well as extra logic, inside
getTemplateDom().

Change-Id: I29e85e3e98d9590bbd1ae49fb2bb4deaa895edc9
2012-08-27 11:14:25 +10:00
Amir E. Aharoni c8809168b4 Add Hebrew namespace aliases
Change-Id: Iafa658b113525b72e813961e7565a6046aca1219
2012-08-26 18:20:59 +00:00