Commit graph

76 commits

Author SHA1 Message Date
Marielle Volz d6cac31082 Implement new "maps" property in Root
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
2014-11-08 20:29:51 +00:00
Brad Jorsch a9ac3e201f Add i18n for API module help
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
2014-10-29 14:59:23 -07:00
Translation updater bot 06e441c100 Localisation updates from https://translatewiki.net.
Change-Id: Iee595191bc653a15051369f2da4c80786b04bc41
2014-10-23 23:27:07 +02:00
Translation updater bot 695da40846 Localisation updates from https://translatewiki.net.
Change-Id: I4832b6ee10c7c160483e476d7bb79a578b0f6cbd
2014-10-21 23:02:30 +02:00
James D. Forrester f7706868f3 Let help link target be locally over-ridden; default to the MW help page
Bug: 67621
Change-Id: Ic205a8bd51516d3fa580955b310014e4fe30ec6d
2014-09-25 11:05:39 -07:00
Translation updater bot 45b253179d Localisation updates from https://translatewiki.net.
Change-Id: I2df1d4ba803a2abd108a078fcc207917c74b5e22
2014-09-20 21:43:44 +02:00
Moriel Schottlender 4f3e647758 Implement new 'autovalue' parameter property
Add an 'autovalue' parameter property to the TemplateData spec. And
implement it in the validation for the API and in the editor.

Also added tests to make sure all parameter attributes preserve
their values before and after parsing, including the 'autovalue'
parameter.

Bug: 51428
Change-Id: Iffb376a804d39388d2b5b6ea3583ef2a292eea41
2014-09-19 16:36:29 -07:00
Translation updater bot 4ec096fa9f Localisation updates from https://translatewiki.net.
Change-Id: Ia5744344539d4cfdd9a530879fbd74e585fb89b7
2014-09-01 22:37:43 +02:00
Translation updater bot ba2b3aa0ba Localisation updates from https://translatewiki.net.
Change-Id: Id226c60da209770074402eeccb0d6ab64c12bb30
2014-08-31 22:00:02 +02:00
James D. Forrester 4b27cb0642 Sort i18n files alphabetically for better diffs in future
Change-Id: Idbdfd19e8b41129d40cb0c26dec8547e039715b4
2014-08-30 15:54:41 -07:00
Moriel Schottlender b313bbe485 Refactor TemplateData Editor
Refactor and rewrite the templatedata editor to make it more flexible and
adaptable to new types. Separating the model from the gui, and adding new and
improved unit tests.

Also added features:
* Map depracated param types into current types.
* Retrieve template code from top template page if we are in a subpage.
* Mark parameters that do not appear in the template code.
* Add parameter types and a more flexible way to add and adjust the types.
* Add a link to TemplateData documentation from the main edit page.
* Add support for paramOrder; order the parameters according to the given array.
* Make the template parameter table sortable so users can change the paraOrder.

Bug: 59745
Bug: 65951
Bug: 66920
Bug: 67310
Bug: 67621
Change-Id: I65a76c2b772ef76c5dbbe71dd433c881c097b202
2014-08-30 15:18:05 -07:00
Translation updater bot d90d43de42 Localisation updates from https://translatewiki.net.
Change-Id: I520b25f04e2d244c7ce161ba22f8983ce2dee2ac
2014-08-05 21:58:52 +02:00
Translation updater bot a782fe3ea3 Localisation updates from https://translatewiki.net.
Change-Id: Ie772d45aa7c5f25274eb62b4f5787ae6e43ae495
2014-06-13 20:50:59 +00:00
Translation updater bot 0f624c5ca7 Localisation updates from https://translatewiki.net.
Change-Id: I00a4637e54fc3425b3b508fed6f8e2338d474161
2014-06-09 20:31:51 +00:00
Moriel Schottlender 9a7f8de499 Block object descriptions from edit
Some descriptions allow for language objects. For the moment, these
should be blocked for editing so the original JSON string won't be
corrupted. The current fix blocks any input that is not a string
or an expected array in aliases as uneditable.

Bug: 60089
Change-Id: I9b13e2f3cfd805d382564e270484557567932a0f
2014-06-04 17:37:02 -07:00
Translation updater bot 3a59315d9c Localisation updates from https://translatewiki.net.
Change-Id: I6c07fc04f4bd32db443a24cc8c1134b8ef04fa60
2014-05-26 20:13:03 +00:00
Translation updater bot 90c7aa8d72 Localisation updates from https://translatewiki.net.
Change-Id: Ief7812eb6738a22050b314717e59ab53643ee957
2014-05-25 19:37:55 +00:00
James D. Forrester 3f05967d94 Add 'date' type support for ISO 8601 date-times
Change-Id: Ida5b09fb763bef12f92cf687b5170b5f5b5840a2
2014-05-23 18:50:00 -07:00
James D. Forrester 759f0eef20 Add 'boolean' type support
Bug: 55331
Change-Id: I2508e3cc6e04f1eb382e6ec18c636bebdfccbf99
2014-05-20 20:40:05 +02:00
Translation updater bot ae9462eef3 Localisation updates from https://translatewiki.net.
Change-Id: I4fa4c535ce767f0c0ca5eae6e628292b90319b88
2014-05-06 19:54:07 +00:00
Translation updater bot 889109d6ba Localisation updates from https://translatewiki.net.
Change-Id: I5c3ddbc73ccc7d34592b721de3d9e5f88478950d
2014-05-04 20:09:15 +00:00
Translation updater bot d2b194921c Localisation updates from https://translatewiki.net.
Change-Id: I03edd97a258830670dbb6a9e053f8db0d19a5965
2014-04-30 20:44:16 +00:00
James D. Forrester fb34a07c02 Add a wiki-file-name type for file names
Bug: 52652
Change-Id: Ibe8d143abbb607eb71549536aaac6555528813cc
2014-04-28 13:21:53 -07:00
James D. Forrester 5293a6d3da Add 'suggested' status type for parameters
This is a status for parameters which are not 'required' but are recommended
to be high value, if not always used, by downstream template users. This
commit does not add GUI-related changes to address this, as the interface
probably needs moving from checkbox- to dropdown-based status setting given
that there are now four, rather than three, mutually-exclusive statuses.

Change-Id: I104976e76d5ad6d586d9c818418ba6e16af53506
2014-04-28 11:45:44 -07:00
Translation updater bot 66018f08ff Localisation updates from https://translatewiki.net.
Change-Id: I0b3b699254a290dd2843462d8bedc1e172fda395
2014-04-16 17:02:15 +00:00
Siebrand Mazeland 255fc8225f Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: I6627353205c79a91da7615833ebfefe3316bff8d
2014-03-28 14:45:07 -07:00