Commit graph

542 commits

Author SHA1 Message Date
Raimond Spekking f7f2327e11 Localisation updates for core and extension messages from translatewiki.net (2011-01-27 21:09:00 UTC) 2011-01-27 21:35:41 +00:00
Happy-melon 7ec54c6cfc Follow-up r81074 CR:
* Use autoloader for ConvertParser, and ExprParser which the code was cloned from
* Fix PHP 5.1 compatibility, while there's no requirement for us to keep it, there's also no need to break it unnecessarily, and it's a really trivial fix in this case.
* Tidy whitespace
* Use ConvertDimension::getLocalisedName() for the dimensionmismatch error, as intended
2011-01-27 17:34:37 +00:00
Happy-melon 65e9e69202 (bug 235) parser function for conversion of units of measurement.
[[Template:Convert]] on enwiki is a behemoth of a construction that just about manages to do this sort of conversion, taking {{convert|5|mi|km}} and outputting "5 miles (8 km)", etc.  To port this to another wiki requires copying over three and a half thousand subtemplates.  The additional load produced by including numerous copies of this template is measurable on large pages on enwiki, and it eats voraciously into the template limits.

This revision introduces {{#convert: 5 mi | km }}, outputting "8 km" or thereabouts.  See http://www.mediawiki.org/wiki/User:Happy-melon/Convert for more details, or look at the examples in the parser tests.  

In a very rough profile, comparing 50 calls to {{convert}} verses the same 50 calls to the wrapper template shown at the link above, the parser function implementation reduces page load time by 72%, preprocessor node count by 83%, post-expand include size by 86% and template argument size by 97%.  More detailed profiling would probably reveal places where extra caching could improve performance further.

The primary reason for putting it in ParserFunctions instead of its own extension is availability: PFs are already available across the cluster, and it's accepted as an essential extension for any wiki wishing to emulate or mirror WMF content.  One less separate extension installed on the cluster is one less extension which has to be matched by reusers.  

It's still missing a lot of units, which I ran out of patience to copy from {{convert}}; I thought I'd get some feedback on the infrastructure first.
2011-01-27 00:13:10 +00:00
Siebrand Mazeland e512f7f3cd Localisation updates for extensions from translatewiki.net. 2011-01-22 20:08:34 +00:00
Raimond Spekking 7a4160bebc Localisation updates for core and extension messages from translatewiki.net (2011-01-22 15:41:00 UTC) 2011-01-22 16:06:05 +00:00
Raimond Spekking 86ee441d84 Localisation updates for core and extension messages from translatewiki.net (2011-01-17 18:14:00 UTC) 2011-01-17 19:48:22 +00:00
Sam Reed aa43a8cfe5 Document return type 2011-01-14 00:40:30 +00:00
Raimond Spekking b02d8ff940 Localisation updates for core and extension messages from translatewiki.net (2011-01-12 21:05:00 UTC) 2011-01-12 21:33:03 +00:00
Sam Reed dadcb4f018 Update README a bit 2011-01-10 05:24:36 +00:00
Raimond Spekking a44a4701eb Localisation updates for core and extension messages from translatewiki.net (2011-01-03 20:25:00 UTC) 2011-01-03 20:52:23 +00:00
Raimond Spekking 4f02105dbf Localisation updates for core and extension messages from translatewiki.net (2010-12-19 20:48:00 UTC) 2010-12-19 21:29:55 +00:00
Raimond Spekking b41061d9af Localisation updates for core and extension messages from translatewiki.net (2010-11-11 20:17:00 UTC) 2010-11-11 20:52:15 +00:00
Raimond Spekking 23e20bafd6 Localisation updates for core and extension messages from translatewiki.net (2010-11-10 21:28:00 UTC) 2010-11-10 21:42:18 +00:00
Raimond Spekking fae11433d3 Localisation updates for core and extension messages from translatewiki.net (2010-11-08 20:05:00 UTC) 2010-11-08 20:25:23 +00:00
Siebrand Mazeland 2549442166 Localisation updates from translatewiki.net 2010-10-31 17:55:47 +00:00
Sam Reed 17b2757a6a More deprecated method call removals and updates 2010-10-29 15:32:44 +00:00
Sam Reed 5fa066a6e9 Start removing/fixing calls to deprecated methods in WMF used extensions 2010-10-29 15:14:44 +00:00
Raimond Spekking 6395a10f1c Localisation updates for core and extension messages from translatewiki.net (2010-10-24 19:14:00 UTC) 2010-10-24 19:30:56 +00:00
Raimond Spekking c0fd88a0ee Localisation updates for core and extension messages from translatewiki.net (2010-10-22 18:58:00 UTC) 2010-10-22 19:41:58 +00:00
Raimond Spekking 2a7d125b74 Localisation updates for core and extension messages from translatewiki.net (2010-10-21 19:58:00 UTC) 2010-10-21 21:55:48 +00:00
Raimond Spekking f4a3058ddc Localisation updates for core and extension messages from translatewiki.net (2010-10-19 19:03:00 UTC) 2010-10-19 19:38:34 +00:00
Raimond Spekking ca856137bf Localisation updates for core and extension messages from translatewiki.net (2010-10-17 19:57:00 UTC) 2010-10-17 20:36:41 +00:00
Siebrand Mazeland 20888253e0 * remove MediaWiki pre-1.8 compatibility and remove SprintfDateCompat.php
* bump version to 1.4.0
* run stylize.php
2010-10-02 22:36:34 +00:00
Raimond Spekking c86b4dfe94 Localisation updates for core and extension messages from translatewiki.net (2010-09-15 19:08:00 UTC) 2010-09-15 19:17:03 +00:00
Raimond Spekking 7f8d553383 Localisation updates for core and extension messages from translatewiki.net (2010-09-07 20:20:00 UTC) 2010-09-07 20:50:14 +00:00
Raimond Spekking edb3668bb5 Localisation updates for core and extension messages from translatewiki.net (2010-09-03 21:31:00 UTC) 2010-09-03 21:48:42 +00:00
Raimond Spekking d0eedd991f Localisation updates for core and extension messages from translatewiki.net (2010-08-31 18:22:00 UTC) 2010-08-31 18:37:00 +00:00
Raimond Spekking 8fe42094e7 Localisation updates for core and extension messages from translatewiki.net (2010-08-30 18:48:00 UTC) 2010-08-30 19:13:28 +00:00
Siebrand Mazeland 902bfc86e6 Localisation updates for extensions from translatewiki.net
* update magic words.
2010-08-24 13:20:07 +00:00
Siebrand Mazeland 2810305735 Localisation updates for core and extension messages from translatewiki.net (2010-08-21 22:44 UTC) 2010-08-21 23:20:48 +00:00
Siebrand Mazeland 486887465e Localisation updates for core and extension messages from translatewiki.net (2010-08-16 22:21 UTC) 2010-08-16 22:43:58 +00:00
Siebrand Mazeland 33efc078d3 Localisation updates for core and extension messages from translatewiki.net (2010-08-13 21:35 UTC) 2010-08-13 23:21:38 +00:00
Raimond Spekking 7c5ce4fdff Localisation updates for core and extension messages from translatewiki.net (2010-08-10 19:19:00 UTC) 2010-08-10 19:34:11 +00:00
Raimond Spekking 832395cc5b Localisation updates for core and extension messages from translatewiki.net (2010-08-08 19:31:00 UTC) 2010-08-08 19:49:46 +00:00
X! c0835f5836 (bug 22116) Add limit parameter to {{#explode:}}. Patch by Christopher Baker 2010-08-08 16:18:33 +00:00
Raimond Spekking 449cc18ec8 Localisation updates for core and extension messages from translatewiki.net (2010-07-30 18:58:00 UTC) 2010-07-30 19:14:22 +00:00
Sam Reed 67fe9b30ec Make sprintfDate static 2010-07-26 13:14:31 +00:00
Raimond Spekking 677d2e7083 Localisation updates for core and extension messages from translatewiki.net (2010-07-13 18:48:00 UTC) 2010-07-13 19:10:15 +00:00
Max Semenik 0055784a24 Follow-up to r67044: moved string function tests to a separate file protected by conditional, tweaked test runner to skip instead of exploding when required function hook is not found. 2010-07-09 21:11:54 +00:00
Raimond Spekking 9d2d1f4959 Localisation updates for core and extension messages from translatewiki.net (2010-06-12 19:15:00 UTC) 2010-06-12 19:31:27 +00:00
Raimond Spekking 5de9bee2d6 Localisation updates for core and extension messages from translatewiki.net (2010-06-10 18:40:00 UTC) 2010-06-10 19:00:46 +00:00
Raimond Spekking 38182c6006 Localisation updates for core and extension messages from translatewiki.net (2010-06-09 18:50:00 UTC) 2010-06-09 19:22:07 +00:00
Meno25 dc0cbd532e i18n update 2010-06-07 09:00:42 +00:00
Alexandre Emsenhuber f9388f4fcb Big changes to extensions' documentation:
* changed all @addtogroup to @ingroup
* added some @file where needed
* changed some @package/@subpackage to @ingroup
2010-06-06 15:12:22 +00:00
Raimond Spekking 4badbfa114 Localisation updates for core and extension messages from translatewiki.net (2010-06-02 18:50:00 UTC) 2010-06-02 19:22:28 +00:00
Max Semenik 1b75afd18d (bug 19940) urldecode dropped during StringFunctions-ParserFunctions merger 2010-05-29 16:12:41 +00:00
Chad Horohoe 7d289782c8 Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh. 2010-05-27 15:56:53 +00:00
Chad Horohoe 1813ce38bb Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +00:00
Raimond Spekking 5863a03006 Localisation updates for core and extension messages from translatewiki.net (2010-05-24 18:20:00 UTC) 2010-05-24 18:36:06 +00:00
Raimond Spekking 42deab576c Localisation updates for core and extension messages from translatewiki.net (2010-05-23 20:40:00 UTC) 2010-05-23 21:12:35 +00:00