Commit graph

194 commits

Author SHA1 Message Date
Timo Tijhof eb236e81de Fix tests to pass after 58a161f in mediawiki/core
Status::getHtml now wraps the html in <p> tags, unwrapping
them for now, classic parseinline style..

Change-Id: Ic9b651cbd76752346ea7cbf230af49f09ef3ec12
2013-12-10 22:13:10 +01:00
Translation updater bot 4cd9b6e00a Localisation updates from https://translatewiki.net.
Change-Id: Ib9dd2c55fbd304106338943a438ee83a97be4e1c
2013-12-08 20:28:28 +00:00
Translation updater bot abc2762de3 Localisation updates from https://translatewiki.net.
Change-Id: If162ba6f874bf87344e604fd4497eaddb671725e
2013-12-07 01:52:32 +00:00
Siebrand Mazeland c705e026bd Update ternary notation
Change-Id: I04f8a1158b6135e5387244c104ace3518416bd54
2013-12-04 09:47:08 +01:00
Translation updater bot 7c7f8a24a7 Localisation updates from http://translatewiki.net.
Change-Id: Idc2e5be08554a47d960f6c9ce3e8e0530d2e228e
2013-11-18 20:40:06 +00:00
Aaron Schulz 7629dba738 Avoid extra parsing on edit
bug: 57026
Change-Id: I0782ea669b431697d6c76be945c93d3e2f30f3cf
2013-11-15 00:17:03 +00:00
Translation updater bot 99f9641bd7 Localisation updates from http://translatewiki.net.
Change-Id: Ib091fb5fa21176de2b3204f80f050e06c826b621
2013-11-13 20:24:18 +00:00
Translation updater bot 596cbf9c75 Localisation updates from http://translatewiki.net.
Change-Id: Iadb4e8c9f486c453d646d8eb35a3856175cef3b1
2013-11-12 20:32:35 +00:00
Translation updater bot 39f27782a6 Localisation updates from http://translatewiki.net.
Change-Id: I02d421102391cc86d9954a29cf158a86a02fb1ee
2013-11-10 20:29:43 +00:00
Translation updater bot 94f1072cb1 Localisation updates from http://translatewiki.net.
Change-Id: Iea118b18eb1f97cbc9c05890da07e13d5630127a
2013-11-09 19:13:35 +00:00
Timo Tijhof 0a03f37581 Specify "content" and "unbalanced-wikitext" as a valid parameter types
Bug: 51374
Change-Id: I711998193cc542b72213b56046529b53ebb17d73
2013-11-07 19:39:29 +00:00
Timo Tijhof 6cdb47d097 Drop type prefixes because all values are strings in HTML (and wikitext)
Change-Id: I8655393320064dd8d6f8f06abff6d5abc0baa795
2013-11-07 19:39:24 +00:00
Timo Tijhof 50bbd93e6a Fix roundtrip issues (normalised output for API must be valid input)
For example, in case of failure we were defaulting to an empty
object, even though that is invalid input.

Change-Id: I00b4ce26b04ec408b5e86b9a2242cf942300ad41
2013-11-07 19:39:20 +00:00
jenkins-bot 5b9a84e25a Merge "Add Root#paramOrder to spec and implemention thereof" 2013-11-07 19:39:14 +00:00
Timo Tijhof a800a46c7f Add Root#paramOrder to spec and implemention thereof
* Detail the new property in the spec.
* The property is optional (as all new properties have to be
  for backwards compatibility).
* Validate value if present, and for normalisation fill it
  with inferred order from the JSON parser. This means the API
  output will always contain #paramOrder, however the strict
  specification for it is optional and users must still account
  for absence of this property.

Bug: 53608
Change-Id: I7bcd7c9146f5ae75c4bad22b0a9cd4400f196c8c
2013-11-07 20:34:45 +01:00
Translation updater bot 288d7cea95 Localisation updates from http://translatewiki.net.
Change-Id: Id4df9d60a0ad06fe4f623a07e5d06f3193d01b78
2013-11-03 19:58:48 +00:00
Translation updater bot 88547821f6 Localisation updates from http://translatewiki.net.
Change-Id: Ic80fcd03019f474e3e4360dad83882a58a0bd368
2013-11-02 20:03:27 +00:00
Translation updater bot e2d99f03dc Localisation updates from http://translatewiki.net.
Change-Id: Ie99b55d7660b74f4a43718ad3c29d65db003aacf
2013-10-31 20:22:46 +00:00
Translation updater bot bd4a1a74cc Localisation updates from http://translatewiki.net.
Change-Id: I54a63083388a5f936550f9c86c58b90a1414382e
2013-10-30 19:37:01 +00:00
Timo Tijhof 46509ebd2a Require Set#params to be non-empty and improve error
* An empty array for a Set is invalid and the implementation now
  enforces this.
* Add new error message for invalid value. When Sets contain a
  reference to a key that doesn't exist, it should say that that
  reference in the Set is invalid instead of saying that Params
  is invalid for not having it.
  > { params: {}, sets: [ { params: [ "quux" ] } ] }
  - Required property "params.quux" not found.
  + Invalid value for property "sets.0.params[1]".

Also:
* Abstracted handling of $case and the different assertions
  on it in a helper function so that we don't have to repeat
  it everywhere.
* Use the same hack as in other tests to display the status error
  message in the phpunit output (true === isGood ?: getHtml).
  Maybe use '' === getHtml instead, though that is also evil
  since Status fatals if you call getMessage/getHtml for a good
  Status object.

Change-Id: I06a6615f728cd287a4839e09eedc2d0eeb537949
2013-10-30 00:10:38 +00:00
Translation updater bot 2e75f125ba Localisation updates from http://translatewiki.net.
Change-Id: I7ee5e6a523cc7f1783bf42e6f8b4d3dbe03f0bf3
2013-10-25 18:59:36 +00:00
Translation updater bot 26dacfcc70 Localisation updates from http://translatewiki.net.
Change-Id: I5a74b2f691196739a5656060045d600278b61d87
2013-10-24 20:50:37 +00:00
Translation updater bot 4c848ea297 Localisation updates from http://translatewiki.net.
Change-Id: I35cc27931b8fbedad86bd920e903dfce5870c832
2013-10-22 19:21:35 +00:00
Translation updater bot c321aa7ee7 Localisation updates from http://translatewiki.net.
Change-Id: I61ff9acb427bf2cb14b0d294fdefe035cc35df63
2013-10-21 19:40:38 +00:00
Translation updater bot d45255b146 Localisation updates from http://translatewiki.net.
Change-Id: Ie69c1aa4569f74fda1c71e2c03f40f6e20e93c44
2013-10-20 21:47:57 +00:00
Translation updater bot bbae7751ec Localisation updates from http://translatewiki.net.
Change-Id: I6f8f1450c65c958a9676f2d4e11412ee61b05021
2013-10-17 19:34:34 +00:00
Translation updater bot d4e02e3e23 Localisation updates from http://translatewiki.net.
Change-Id: I9f3af8f0623f334e395dfefe9dd7fc9fd4b7e43a
2013-10-15 19:32:44 +00:00
Translation updater bot c94013fdb1 Localisation updates from http://translatewiki.net.
Change-Id: I333a92c12cad2eeb2954f81c7f29fa12b6a838b1
2013-10-13 19:30:43 +00:00
Translation updater bot 835dfb3719 Localisation updates from http://translatewiki.net.
Change-Id: I9587c211d4160392bc740820afe331f5d68d3f89
2013-10-11 19:13:12 +00:00
Translation updater bot 2a3f47f8cb Localisation updates from http://translatewiki.net.
Change-Id: I8f712b5b382c858d1cb6c501c7762faefaabad0e
2013-10-10 19:04:41 +00:00
Translation updater bot 0c59b67757 Localisation updates from http://translatewiki.net.
Change-Id: Ibc9a7f59ace70e4ca06be1182703ef3a76e5de37
2013-10-09 19:39:30 +00:00
Translation updater bot 18d93c1944 Localisation updates from http://translatewiki.net.
Change-Id: I9486e89626ae46e064d73d19d7154be510103054
2013-10-08 19:08:18 +00:00
Translation updater bot a554e87917 Localisation updates from http://translatewiki.net.
Change-Id: I0a9edbe97ec5785cdf45e38e83868a3f2b2cfc1c
2013-10-08 01:00:37 +00:00
jenkins-bot f115835eca Merge "Localize default "empty" value and status (deprecated, optional, required)" 2013-10-07 18:56:32 +00:00
jenkins-bot bd4f75b5e4 Merge "Implement getInterfaceTextInLanguage and use API and Parser" 2013-10-07 18:54:57 +00:00
Timo Tijhof ddd6b2761e Localize default "empty" value and status (deprecated, optional, required)
* Fixed 'should be not be'  in other 'qqq' messages.
* Fixed absence of ->text() in other wfMessage uses
  (defaulted to parse, which was wrong as these are Html::element
  uses that take text input, so it was being double escaped).

Bug: 50370
Change-Id: Iba1a10f14e258a588435cd03017177acfb96d0f3
2013-10-07 18:54:56 +00:00
Timo Tijhof 4615338a51 Implement getInterfaceTextInLanguage and use API and Parser
Fallback for user language and content language is easiest to
resolve server-side. Also saves sending a lot of data to the
client that it doesn't need. Similar to how ResourceLoader only
sends 1 set of message values.

Bug: 50431
Bug: 52922
Change-Id: If8317ed6522a05d5a48a210ff43c97277b950a97
2013-10-07 19:26:59 +02:00
Translation updater bot 5fb125284c Localisation updates from http://translatewiki.net.
Change-Id: I3de92aed0cf72047bfa981da52fba3e59ca7b15f
2013-10-06 18:50:08 +00:00
Translation updater bot f5964289ba Localisation updates from http://translatewiki.net.
Change-Id: Ie64232e08663cfd0bf99182cb5c4146e5f22d9eb
2013-10-03 18:14:31 +00:00
Translation updater bot ced57d2f06 Localisation updates from http://translatewiki.net.
Change-Id: I0cc8f7f8d30e88de45eb86066319798c8c15dac3
2013-10-02 14:28:14 +00:00
Translation updater bot 5966ee9e4c Localisation updates from http://translatewiki.net.
Change-Id: Id8350bee1c7e1708987f3ba853dac2b4a43a7155
2013-10-01 19:24:16 +00:00
Translation updater bot c7a3c83ff5 Localisation updates from http://translatewiki.net.
Change-Id: I3ed4339d635c48157a85d62f20bbea1109fe233c
2013-09-29 20:17:05 +00:00
Timo Tijhof f8eb557a64 Account for absence of template description in #getHtml
The description property is optional and is explicitly set to
null by the parser in normalisation if there is none.

The HTML rendering of parameter descriptions (as oppposed to the
description of the template as a whole) already covered for this.
Used the same logic for the template parameter.

Also fixed:
* Localize the text "no description"
* Use !== null instead of isset() since the property is always
  set, we just need to know whether it is null or an object.

Bug: 54422
Change-Id: I86a40dbd1225feb54123e77a856b4ad6d525461b
2013-09-25 20:23:46 +00:00
Timo Tijhof 3ab2b4439a Re-add version_compare (>= 1.22wmf18)
Follows-up 98cf7e35e.

Change-Id: I07a63effb5cdb14e48c6b69780fe71dc24f17fd9
2013-09-20 00:57:00 +02:00
Reedy 98cf7e35e3 version_compare sucks
Change-Id: I13c2eaae2dbf2d4a4f77e17f601a735a5b0d24b0
2013-09-19 19:47:03 +01:00
Timo Tijhof fc9da6c7bf Remove global function gzdecode fallback
Moved into MediaWiki core (as of 1.22alpha) in change f72117e768.

Change-Id: I6383e933b10d8fca2a855c6b3e287264b176abb8
2013-09-19 08:14:06 +00:00
MatmaRex 7bf85a39a1 Remove all references to TemplateInfo
Change-Id: I5ffc8f75140a2c372fc1c64509b13a534fe07479
2013-09-12 11:41:07 +02:00
Antoine Musso 8dc157bc09 Test gzdecode() in TemplateDataBlob::newFromDatabase()
gzdecode() has been introduced in PHP 5.4 although gzencode() has been
there for a while.  Wikimedia is still using PHP 5.3, so the
TemplateDataBlob::newFromDatabase() would trigger a fatal error whenever
it is passed compressed JSON :-(

The test does not fix the root cause (that needs a fallback function in
the TemplateData extension), but it does highlight the issue in PHP 5.3.x.

Updated a @return comment, correcting the class being returned.

bug: 54058
Change-Id: I8357b474165f4317982b9c924cf0afe68650d677
2013-09-12 04:14:40 +00:00
Reedy 0e4339da86 Add fallback for gzdecode (only exists in PHP >= 5.4.0)
Bug: 54058
Change-Id: I62a843aec4657a3d4895d34535cc2be42d4552fd
2013-09-12 03:55:35 +00:00
Translation updater bot db3d942b69 Localisation updates from http://translatewiki.net.
Change-Id: I2e1ede7d148f8655cabde41365bb8a47da10b388
2013-09-09 19:29:34 +00:00