Make sure that aliases get trimmed and are not getting extra spaces
when saving a parameter.
NOTE: To prevent dirty diffs, only parameters that are 'touched'
(viewed or edited directly in the editor) will be trimmed. The editor
will keep all other "wrong" values that have trailing or preceding
whitespaces as-is.
Bug: T85330
Change-Id: I64ecb88a7d736fa36b5e6debf2e94b0d37152020
Fix onResourceLoaderRegisterModules() to
check if the jquery.uls.data module is already
loaded in the ResourceLoader.
Modify comment to indicate that VE also
loads this module.
Bug: T85733
Change-Id: Idd459555312879a85a0a56fba651f609b4f9a52a
Change the ui/data behavior to work with oojs and event emitters,
and replace the gui from jquery ui to oojs-ui.
Changes made:
* Recreate the templatedata editor with oojs and ooui.
* Create a standalone templatedata model with internal validation.
* Allow the user to insert language-specific strings:
* Allow adding arbitrary languages and values
* Normalize output between language object and 'simple' string
* Add new language code by searching for its name or code
* Import parameters from template code
* If the template is in subpage and there is no code in the
current page, the code will request the contents of the parent
page.
Change-Id: I985ea03dfee58984ec22ec9a157a00968bfca878
The noinclude tags should appear only if the page is not a subpage
and only around the <templatedata> tags.
Change-Id: I492bb35c8f2c70235f3ceefdddcc4df6548d7469
This will make the display table sortable; table which appears when
<templatedata> tag is used on a page.
Bug: 50435
Change-Id: If72a44eab3229139791ea2d06ef6a74e2ce2e0c9
Add "maps" as an allowed root value to template data JSON.
Maps allow applications to map equivalencies between their
application-specific parameters and valid template parameters.
Each Map has arbitrary keys (from the consuming application) that
are mapped to one or more template parameters.
* Added root.maps to TemplateDataBlob
* Validates that values are strings or arrays
* Validates that values are valid params
* Added templatedata-invalid-param to i18n/en.json
* Richer error message for when invalid value is a param
* Fixed existing tests to work with new "maps" property
* Added two new tests for maps
* Test for invalid value (!string or !array)
* Test for invalid parameter
* Added specification for root.maps property and Map object
Change-Id: I3bf5e002ad6c1632e02c4c2e393b244c51f77177
These wiktext-isms from the Status object make the tests rather
obfuscated and hard to read/maintain.
Change-Id: I6438c33229ac013489893f8a2241510d9b5a7765
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.
Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.
Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17