Commit graph

1423 commits

Author SHA1 Message Date
Raimond Spekking 1a6d59e655 Localisation updates for core and extension messages from translatewiki.net (2011-05-20 20:10:00 UTC) 2011-05-20 20:22:23 +00:00
Huji 931e833501 Fixing a Persian translation (extra collon, can't be fixed through translatewiki) 2011-05-20 00:11:37 +00:00
Raimond Spekking af22aff90a 2011-05-17 20:25:48 +00:00
Raimond Spekking 933f6936eb Localisation updates for core and extension messages from translatewiki.net (2011-05-16 20:37:00 UTC) 2011-05-16 20:57:27 +00:00
Siebrand Mazeland ff9a5ae677 Localisation updates for magic word aliases for extensions from http://translatewiki.net. 2011-05-14 00:23:17 +00:00
Raimond Spekking 02d2afd591 Localisation updates for core and extension messages from translatewiki.net (2011-05-10 20:34:00 UTC) 2011-05-10 21:00:25 +00:00
Raimond Spekking 77cd1fef37 Localisation updates for core and extension messages from translatewiki.net (2011-05-09 21:19:00 UTC) 2011-05-09 21:32:46 +00:00
Raimond Spekking 1336e93ebc Localisation updates for core and extension messages from translatewiki.net (2011-05-06 22:02:00 UTC) 2011-05-06 22:11:48 +00:00
Tim Starling 77ccc4cf78 Fixed some register_globals vulnerabilities. 2011-05-05 02:55:51 +00:00
Raimond Spekking a79369b072 Localisation updates for core and extension messages from translatewiki.net (2011-05-04 19:40:00 UTC) 2011-05-04 20:09:49 +00:00
Raimond Spekking a54d7c2278 Localisation updates for core and extension messages from translatewiki.net (2011-05-02 20:13:00 UTC) 2011-05-03 20:29:05 +00:00
Ryan Kaldari a3dd6784c8 better language handling - abandon magic language switch in favor of using int:lang as parameter, use parser->getFunctionLang() instead of wgContLanguage in case of use in interface messages 2011-05-02 23:30:05 +00:00
Ryan Kaldari 752dd28e01 fix issues from r86927, user language and years over 9999 2011-05-02 22:21:56 +00:00
Raimond Spekking a78e4d434f Localisation updates for core and extension messages from translatewiki.net (2011-04-29 19:47:00 UTC) 2011-04-29 20:09:54 +00:00
Ryan Kaldari cb39cec9d6 adding language support to #time parser function, per bug 28655 2011-04-26 00:26:12 +00:00
Ryan Kaldari f9578f4d6a fix for bug 28655 - #time interpreting years incorrectly 2011-04-24 01:10:04 +00:00
Sam Reed 956982c04a More function documentation 2011-04-15 17:44:19 +00:00
Raimond Spekking ac9d9392b8 Localisation updates for ToolserverI18N messages from translatewiki.net (2011-04-14 19:30:00 UTC) 2011-04-14 19:49:05 +00:00
Sam Reed 64dd1d254e Made checkLength static to fix many STRICT errors 2011-04-13 14:17:43 +00:00
Paul Copperman 3350ea8f2d Make ParserFunctions work with HipHop.
* When using HipHop, is_callable() returns false for objects which have only a __call() method instead of the requested one.
* Work around this by removing the ParserFunctions_HookStub hack.
* To retain the behavior that the code of ParserFunctions_body.php is only loaded when needed, turn it into a static class.
* Defer the registering of the ParserClearState hook until a relevant function is called.
2011-04-11 17:27:51 +00:00
Raimond Spekking 7e5ace340c Localisation updates for core and extension messages from translatewiki.net (2011-04-04 12:51:00 UTC) 2011-04-04 13:21:39 +00:00
Aaron Schulz 022503d1b7 Follow-up changes to r84610:
* Cleaned up mImageTimeKeys format
* ImageMap: Removed redundant addImage call (makeImage handes this)
* ParserFunctions: added time/sha1 to addImage() call
* Removed excess ampersands in hooks
* Added some function doc comments
2011-04-04 01:22:08 +00:00
Raimond Spekking aa01da8b7f Localisation updates for core and extension messages from translatewiki.net (2011-03-27 19:42:00 UTC) 2011-03-27 20:12:23 +00:00
Raimond Spekking f251e8e2d3 Localisation updates for core and extension messages from translatewiki.net (2011-03-09 21:26:00 UTC) 2011-03-09 22:15:15 +00:00
Raimond Spekking a404c392f0 Localisation updates for core and extension messages from translatewiki.net (2011-03-03 21:42:00 UTC) 2011-03-03 21:51:07 +00:00
Happy-melon fd1620e14b Follow-up r81074, r81517: implement SI prefixes as a separate structure. You can now specify which units should take SI, and then they accept *all* SI prefixes centrally. Some care is still needed to avoid unit conflicts, but this substantially reduces the number of messages required.
The translations of prefixed units in some languages may be a little tricky if the prefix is inflected etc, but you know what?  You can always use ParserFunctions!!  :-D
2011-02-16 10:27:42 +00:00
Raimond Spekking 3b0d115620 Localisation updates for core and extension messages from translatewiki.net (2011-02-14 21:31:00 UTC) 2011-02-14 21:56:30 +00:00
Happy-melon b3d240bdba Follow-up r81074: turns out {{convert}} is (mostly) case-sensitive after all, so reclaim case-sensitivity here. Will work on abstracting out SI prefixes later. 2011-02-04 14:28:37 +00:00
Happy-melon d316c140e9 Follow-up r81074: better handling of whitespace, or lack thereof, between the digit and unit. 2011-01-29 15:59:17 +00:00
Happy-melon c65d2f8bbc Follow-up r81074: succumb, though it breaks my heart to do so (:P), to American linguistic imperialism... 2011-01-29 15:45:07 +00:00
Happy-melon f274e42be1 Follow-up r81074:
* subclass ConvertError and ExprError from MWException
* invoking the parser for error messages clears state and exposes strip markers, and the error messages should be in the content language anyway
* clean up the magic word list
2011-01-29 13:54:02 +00:00
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