Commit graph

297 commits

Author SHA1 Message Date
Translation updater bot 4d186cb231 Localisation updates from http://translatewiki.net.
Change-Id: I18b1f823cc321d92e778e5f35a36b95941ddb99d
2013-04-03 19:50:56 +00:00
raymond a0a53bf110 Add namespace translation for 'cy'
Requested by Lloffiwr
https://translatewiki.net/wiki/Thread:Support/Module_namespace_for_cy_wikis

Change-Id: I90a11fa7e4cdf8cb59742b9f61a66827c45c5a56
2013-04-03 09:15:51 +02:00
Brad Jorsch ca3b0b55b2 Add timezone support to mw.lang:formatDate
This uses the timezone support added to core Language::sprintfDate in
Iea1f7842 to add support for various timezone-related formatting
characters, and to correct the output for 'c', 'r', and 'U' in local
mode.

This is related to bug 33454, which requests the same for
ParserFunctions' {{#timel:}}.

Bug: 33454
Change-Id: I1b92dc671051a6cc53e35ebd74d383448e16696c
2013-04-02 23:15:16 +00:00
Brad Jorsch 71d9f600dc (bug 46294) Fix for Windows text-mode file handles
On Windows for LuaStandalone, the lua executable's standard output is a
text-mode file handle, even if the pipe is opened from PHP with the
binary flag. Which means that when Lua returns a "\n", it gets silently
rewritten to "\r\n" and the unserialization fails.

So, change the protocol for Lua→PHP messages to encode \r and \n (and \
itself, as the escape character) to avoid this issue.

Bug: 46294
Change-Id: I73b5f44e8aa0334f5fd03013dc027d1a57318349
2013-04-02 23:05:38 +00:00
Translation updater bot 2a1e1b57a3 Localisation updates from http://translatewiki.net.
Change-Id: Iabf82ced63c5325a494d86f5c13f63a9a0a897f1
2013-04-02 19:11:18 +00:00
Brad Jorsch adb7b5f939 Make pairs() work with various library objects
Users are reporting disappointment that using pairs on title objects
doesn't let them see the fields available. It's easy enough to add a
__pairs metamethod to allow pairs to work on title objects, so let's do
that.

The same can be done for mw.uri objects.

For mw.message objects, we can easily enough change the implementation
to be like mw.language objects, which doesn't have this problem.

For mw.site.stats, we may as well just remove the load-on-demand feature
since it will be demanded as soon as the environment is cloned for the
first module.

Change-Id: Ie5a3b5684b2bb6c090f9994baa03977687688929
2013-04-02 17:23:42 +00:00
Translation updater bot 9e6d0848ee Localisation updates from http://translatewiki.net.
Change-Id: Id3a7ec403c9a6cfc922c3a59323bd520bdbc88a8
2013-03-31 18:53:49 +00:00
Translation updater bot f1849c00b9 Localisation updates from http://translatewiki.net.
Change-Id: If0264b66c1cb7e4c2e534303168abf6e3bc50814
2013-03-29 20:43:34 +00:00
Brad Jorsch 4374903e83 (bug 46635) Recognize Windows path+drive letter
The logic for recognizing absolute versus relative paths needs to take
into account the possibility of a Windows drive letter.

Bug: 46635
Change-Id: I3a43acac2f6e8b481807e1babe5a261b9eb1fe23
2013-03-29 09:26:13 -04:00
Translation updater bot 45cda698ec Localisation updates from http://translatewiki.net.
Change-Id: I98fa964e241d1beb7285f3f369e9bb25399dfa05
2013-03-27 21:02:34 +00:00
jenkins-bot a85275592c Merge "Add text module" 2013-03-27 16:55:07 +00:00
Siebrand Mazeland bff2ed5a24 Add namespace translations for 'ilo'
Requested by Lam-ang at
https://translatewiki.net/wiki/Thread:Support/Module_namespace_translation_for_ilo_wiki

Also fixed sorting.

Change-Id: Ia112447c12d841844bb18ef27672a85719b067ef
2013-03-27 11:17:26 +01:00
Translation updater bot 9dc2e235a3 Localisation updates from http://translatewiki.net.
Change-Id: I5d640a256f44ecc3e1a8170f0de615d980882d23
2013-03-25 20:08:50 +00:00
Brad Jorsch 5989d28678 (bug 39655) Add Lua version info to Special:Version
Use the SoftwareInfo hook to add the versions of LuaSandbox and Lua to
Special:Version.

Bug: 39655
Change-Id: I912197efee0211066677c4d46e638fb546a410c6
2013-03-25 04:07:30 +00:00
jenkins-bot 47e826d082 Merge "(bug 46405) Fix errors in mw.title.new( pageid )" 2013-03-24 20:57:26 +00:00
raymond 7a9fdf8e05 Add namespace translation for 'sv'
Translation by C.Nilsson
https://translatewiki.net/wiki/Thread:Support/Module_namespace_translation_for_sv-wikis

PS2: Fixed typo

Change-Id: Ia7fc9cdbf3aa24e525018f0f23eab3b4aa15c6d1
2013-03-23 10:27:47 +01:00
Danny B 49a7626f78 + cs namespaces
Change-Id: I80bd543062961a97bfc859c96ed4d55620e7154b
2013-03-22 22:58:10 +01:00
raymond 62a4ec2803 Add namespace translation for 'tr'
Translation by Superyetkin
https://translatewiki.net/wiki/Thread:Support/Module_namespace_translation_for_trwiki

Change-Id: I842f4ce09af1f787263b9f7f4d039a8923aa3028
2013-03-22 11:33:03 +01:00
Translation updater bot 3ce106223a Localisation updates from http://translatewiki.net.
Change-Id: I2b8a67f17c14f82f2071253b41278919f527fde2
2013-03-21 22:42:59 +00:00
Brad Jorsch 3d4a81653c (bug 46405) Fix errors in mw.title.new( pageid )
mw.title.new( pageid ) should not throw an error for an nonexisting
pageid, just return nil. Similarly, it should always return nil for 0,
rather than returning the last non-existent title created.

Change-Id: I3cdbb24fc785aef0f8e75fba1feccd26ac5b7370
2013-03-21 09:39:25 -04:00
raymond 1735af7847 Add namespace translation for 'bs'
Translation by Edinwiki
https://translatewiki.net/wiki/Thread:Support/Module_namespace_translation_for_bs-wiki

Change-Id: Id3849e413961e6475b44afb04a88f02b4c5b1509
2013-03-21 10:08:50 +00:00
Translation updater bot c4e94724b8 Localisation updates from http://translatewiki.net.
Change-Id: I279639ebbc3c50a81a385986d9eb1ed06de025ee
2013-03-20 20:57:59 +00:00
Brad Jorsch 0db3d7c6d2 Add text module
This exists for some common text-processing functions that aren't
included in string (and therefore also aren't in mw.ustring), as well as
a logical place for the "unstrip" function requested in bug 45085.

Bug: 45085
Change-Id: I47356215fcc8ddeed5f901cd933a30021394bd78
2013-03-20 10:10:15 -04:00
jenkins-bot 1745176df6 Merge "(bug 41769) Add frame:callParserFunction() and frame::extensionTag()" 2013-03-20 03:38:45 +00:00
Brad Jorsch 0dc45ff2f8 Improve caching in fetchModuleFromParser
On my test system, ScriuntoHooks::invokeHook takes about 4 seconds of
CPU time during the parse of a page containing 1000 #invokes of a module
containing a single do-nothing function. And about 2.3 of those seconds
appear to be spent in ScribuntoEngineBase::fetchModuleFromParser.

ScribuntoEngineBase::fetchModuleFromParser already assumes that if
Parser::fetchTemplateAndTitle returns the same $finalTitle then $text is
also the same and we can reuse the same module. But it seems just as
likely that the same input $title is always going to give the same
$finalTitle, so we may as well skip calling
Parser::fetchTemplateAndTitle entirely if we've seen the input $title
before.

This change takes the CPU time spent in ScriuntoHooks::invokeHook in the
test described above down to about 1.5 seconds. And since it's very
likely that $title and $finalTitle are the same (Modules don't support
redirects, so it's basically TemplateSandbox that would cause that), it
probably doesn't even increase the size of the module cache.

Change-Id: I87ad8b85d0f82791f49158d62effa6dc7c20f058
2013-03-20 02:13:33 +00:00
Translation updater bot 5e930029e7 Localisation updates from http://translatewiki.net.
Change-Id: I805dc4c37b58aa5ad14f8511bf1e54e9ca0d3af2
2013-03-19 21:44:02 +00:00
Translation updater bot 300fc07ff0 Localisation updates from http://translatewiki.net.
Change-Id: I3d1c6ddbd23c90c88b7068fcd3c3dee2bc9286fb
2013-03-18 21:07:57 +00:00
Brad Jorsch 541e61a1c4 (bug 41769) Add frame:callParserFunction() and frame::extensionTag()
Requires change I339b882010dedd714e7965e25ad650ed8b8cd48f to
mediawiki/core.

Bug: 41769
Change-Id: I0138836654b0e34c5c23daaedcdf5d4f9d1c7ab2
2013-03-18 13:46:26 -04:00
jenkins-bot 13f27fdfa2 Merge "Don't record self-link from mw.title" 2013-03-18 00:37:07 +00:00
Translation updater bot 1c7d72809c Localisation updates from http://translatewiki.net.
Change-Id: Ib0c5d00a229104882fb9e4ac5267163d2b4bcde6
2013-03-17 20:57:06 +00:00
Brad Jorsch 53c46561ab Don't record self-link from mw.title
Every Lua-using page loads the "self" title for mw.title. But we don't
want to record this self-link in the links table, because that confuses
people.

Change-Id: I1ef57daa615c176b7789f5f09bd15ee5b292ad0c
2013-03-17 14:55:04 -04:00
Translation updater bot 850320573e Localisation updates from http://translatewiki.net.
Change-Id: I3cae8cb00516da8831b40396f3b73aca12c17642
2013-03-16 21:30:35 +00:00
mxn c31b728996 (bug 45189) Added Vietnamese translations for Module namespaces
Change-Id: I7040cf1e247b1cc682a30fbda4533e1213d7fa57
2013-03-16 06:30:01 -07:00
Niklas Laxström b5015a2d8e (bug 45550) Add Portuguese translations for Module namespaces
Bug: 45550
Change-Id: I5ab549b77443990fd6614d97d20fe0cbcbfdae99
2013-03-16 08:18:48 +00:00
Translation updater bot fb5ac6492b Localisation updates from http://translatewiki.net.
Change-Id: I31fe8a7647fdf54314d3e05cc3dcdb40ee274cb0
2013-03-15 20:03:25 +00:00
Translation updater bot 198829a006 Localisation updates from http://translatewiki.net.
Change-Id: I417641df59d0535a593b3712d2772de0f5c0f628
2013-03-14 20:48:51 +00:00
jenkins-bot b59117fbdd Merge "Portable DIRECTORY_SEPARATOR :)" 2013-03-14 14:35:13 +00:00
Jens Ohlig 8fd450269c Portable DIRECTORY_SEPARATOR :)
Change-Id: I61d2ddc5367c2ffacd68c12bf9b6037cfc39d487
2013-03-14 15:09:45 +01:00
Demon 7fca5c1dbe Merge "(bug 45845) Allow for docs at non-subpages" 2013-03-13 22:37:16 +00:00
Translation updater bot fef33ba6db Localisation updates from http://translatewiki.net.
Change-Id: I128c1f7f8a33d2f68be6f91153ea0c2f0cefb0c0
2013-03-13 21:15:34 +00:00
Translation updater bot d892725a98 Localisation updates from http://translatewiki.net.
Change-Id: I034d644ee7e49951763bb61d4ca6086dd65d9ce1
2013-03-12 21:17:52 +00:00
Brad Jorsch ded331ddc9 (bug 45845) Allow for docs at non-subpages
It has been claimed that some wiki might want to place module
documentation at a location other than as a subpage of the module, for
example under "Project:Module documentation/$1". It's possible to
support this, so we may as well.

This also involves renaming the "scribunto-doc-subpage-*" messages to
"scribunto-doc-page-*", since the interpretation of
scribunto-doc-subpage-name would be drastically changed.

Note that any wiki that has customized scribunto-doc-subpage-name will
need to re-customize scribunto-doc-page-name, the old value will not be
transferred.

Bug: 45845
Change-Id: Ic453561691e04b5250d219cc7d871c17e60b9912
2013-03-12 14:33:40 -04:00
Brad Jorsch 7617f25a8b (bug 46031) scribunto-doc-subpage-name needs to be in the content language
Bug: 46031
Change-Id: I6e3c2c244f85258838774491d3bcc6ebd6a2c8c3
2013-03-12 14:18:28 -04:00
Brad Jorsch b6ea64f132 Make mw.getCurrentFrame() work in console, add frame:newChild()
It would be helpful for debugging if a frame object could be gotten in
the console. To that end, add an empty frame when running in the console
and allow it to be returned by mw.getCurrentFrame().

It would also be helpful to be able to create frames with arbitrary
arguments, again for testing. Fortunately support for creating child
frames with arbitrary arguments already exists in core, so we can just
use it.

And for good measure, be sure to restore the $engine->currentFrames
array even if the Lua code throws an exception.

Change-Id: I1dc8602d63af75424f267c42a3743fabbc1827f7
2013-03-12 14:42:36 +11:00
Brad Jorsch 5faa00150c (bug 45684) Don't count argument parsing time towards Lua limit
Currently, the time taken to parse the arguments passed to a Lua
function from #invoke will be counted against Lua's 10-second limit.
This is counterintuitive, and can remove incentive for users to convert
templates to Lua since they may have to convert a whole stack at once.

Note this requires change I11881232 to mediawiki/php/luasandbox to
actually have any effect.

Bug: 45684
Change-Id: I773950e4c399b8a1cfa6d1cde781a069d286b3bd
2013-03-12 03:18:05 +00:00
jenkins-bot a890c91bce Merge "Add namespace translations for dsb, eo, hsb" 2013-03-11 21:48:43 +00:00
Chad Horohoe 3ac6904790 Missing global
Change-Id: I78fc2acd31dd2969971e23239d5c820d867a204c
2013-03-11 14:55:23 -04:00
Translation updater bot 4822d97ec4 Localisation updates from http://translatewiki.net.
Change-Id: I05fefa28e6a00068ce8d525f0059c34ee91b737c
2013-03-10 21:40:17 +00:00
jenkins-bot df568c6a32 Merge "(bug 45774) Add title.fileExists, improve title.exists" 2013-03-08 23:38:31 +00:00
jenkins-bot 2cbaae6673 Merge "(bug 45887) Improve error popup discoverability" 2013-03-08 18:25:37 +00:00