The invalid characters ('|', '=', and '}}') will be displayed through
individual parameters, for consistency, and to avoid parsing problems
in translatewiki.
Change-Id: Ic87541419aab5664f3530209e1ad8689deec33a5
Translatewiki warns of an unbalanced parenthesis problem in the
translation string. Turning the {{ into a parameter solves this issue.
Change-Id: I2fd69b3e901175dad22d285aa2373916acd4f208
* Prevent mistakes such as fixed by Ic5b42c4189.
* Expose the previously-suppressed Root#sets property.
Change-Id: I0d5bf9f7b742db8b49d0af23371389b0a4cdf7a4
This adds a TemplateData manager to the edit page in the Template
namespace.
If a <templatedata> tag already exists, the tool will parse it and
display it in a visual interface that the user can then manipulate in
their own language. If there is no <templatedata> tag, the dialog will
appear empty and allow users to add and tweak their desired template
parameter data.
The tool also allows rudimentary parameter import, which picks up the
parameters from a current template into the GUI to make the user's life
easier when producing TemplateData.
The template documentation editor feature is off by default. To enable it
use $wgTemplateDataUseGUI = true in LocalSettings.
Bug: 50436
Change-Id: I863a8199c0b08cc52b320ed00dcba912dd2aeefc
This message is output' within the page. A single line in red text was
easily lost on a longer page. This also makes it consistent with other
errors from mediawiki.
Change-Id: I71b8be492d4f9f2ecdecc66a88e17490fbf62112
Status::getHtml now wraps the html in <p> tags, unwrapping
them for now, classic parseinline style..
Change-Id: Ic9b651cbd76752346ea7cbf230af49f09ef3ec12
For example, in case of failure we were defaulting to an empty
object, even though that is invalid input.
Change-Id: I00b4ce26b04ec408b5e86b9a2242cf942300ad41
* 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
* 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