Commit graph

66 commits

Author SHA1 Message Date
Alex Monk 1de010108e Warn editors when they're adding blank TemplateData
Bug: T123207
Change-Id: I512ce01a0c7221e7636d26e546d1cbac5395b76b
2016-07-14 03:01:38 +01:00
Translation updater bot b9840bad26 Localisation updates from https://translatewiki.net.
Change-Id: I8c929a0362c4187325050e5525be00f630615bd2
2016-04-10 20:08:44 +02:00
Alex Monk 84b1ddf44c Localise names of types in HTML rendering
Reuses some messages, renaming them in the process.
Changes undefined on the client to unknown.

Bug: T61745
Change-Id: I2cf5c25acbe1c854c33b2eb3f23dc74393a456d4
2016-04-06 19:00:58 +00:00
Translation updater bot d3e515f662 Localisation updates from https://translatewiki.net.
Change-Id: Id1ffc64bc893e5e0827ad4f3c4eb2e8aea9401e5
2016-03-04 22:55:25 +01:00
Bartosz Dziewoński 8e55adab59 [BREAKING CHANGE] Change default format to null instead of 'inline'
Don't enforce 'inline' as the default format if none is specified.
Instead preserve the unspecified value as 'null'. This allows
third-party tools to provide a better default experience when changing
existing content (e.g. by using smart detection to follow the format
already used).

Bug: T128337
Change-Id: I911c7999e3731c0125fc058118f8d7287d8f88f4
2016-03-01 22:53:27 +00:00
jenkins-bot 2b5546d6cb Merge "Don't restrict format parameter in the API" 2016-01-26 17:40:56 +00:00
Alex Monk d723905034 Don't show warning about already-known parameters that weren't imported
Bug: T124223
Change-Id: Id102799b925ebaec6a1d819f1d2294982c24e407
2016-01-20 22:29:45 +00:00
Alex Monk 893eaad6af Don't restrict format parameter in the API
Bug: T91455
Change-Id: I847a0b70d437d6789f32e40199ea602ca3bfa6c8
2016-01-19 22:03:41 +00:00
Alex Monk cc6487498b Prompt user to confirm closing modified TemplateData edit dialog
Depends on Ieaf19fe4485b679e0ee21d16f8f2e0693808f386 to take effect with the
escape key. Otherwise only handles the visible 'Cancel' button.

Bug: T106382
Change-Id: Ibc55727fd6a5becfe10b4e74cae5e573d110575d
2016-01-12 17:43:50 +00:00
Translation updater bot 9345ba16fb Localisation updates from https://translatewiki.net.
Change-Id: Ice1b4e4466c309ba30420f382cd9761f2fb8ad47
2015-11-14 22:18:36 +01:00
Translation updater bot 4e8a896458 Localisation updates from https://translatewiki.net.
Change-Id: Iaf9ac38a5a6654448edc287d2b973ab002f4a172
2015-11-12 23:01:48 +01:00
eranroz 01821eae64 Introduce new 'format' template property
Adding format data, which defines the preferred source format
to use when using templates.

Possible formats:
* Inline - all parameters in a single line
* Block - each parameter is in its own line

Bug: T64147
Change-Id: Id856c4a38890526060d0619432f06174d66f7792
2015-11-11 23:52:17 +00:00
James D. Forrester 017fa53e65 Add a url type for URLs
Bug: T54880
Change-Id: I722fcbc957825c2aaea32d9350480d29a388bb68
2015-09-30 22:15:19 +00:00
James D. Forrester 62d3138216 Add a wiki-template-name type for template names
Bug: T88900
Change-Id: Ia1c87072f453df4b756de6725c4b3ab1dda84497
2015-09-17 12:28:11 -07:00
Translation updater bot 7da1de4d5d Localisation updates from https://translatewiki.net.
Change-Id: I2587e4f148a523d4e3c449453244c3b935e4cada
2015-09-16 22:47:33 +02:00
jenkins-bot 1e8b696bcb Merge "Dialog: Use a 'done' button on edit param page instead of 'back'" 2015-09-14 14:52:55 +00:00
Ed Sanders 9f96761044 Dialog: Use a 'done' button on edit param page instead of 'back'
'Back' suggests that changes in the form won't be saved.

Change-Id: I0df0887caa6317393a3a891dd292aa4dc54cc32b
2015-09-14 12:25:22 +01:00
Translation updater bot 8c76f4e9e7 Localisation updates from https://translatewiki.net.
Change-Id: Id451f517ad9b293a58f19b10de50215a744e7da4
2015-09-13 22:15:22 +02:00
Translation updater bot 32aa0dcc17 Localisation updates from https://translatewiki.net.
Change-Id: I5a8490ed0613898ac90749375c21484d3e15334b
2015-07-10 21:16:05 +02:00
Translation updater bot 7b42709399 Localisation updates from https://translatewiki.net.
Change-Id: I5bb4392ba8d5eaa283badfc3e159021d39eb7e7b
2015-05-14 22:10:03 +02:00
Timo Tijhof 65b101e60c Add example property to HTML rendering
Follows-up ec0467c65a.

Bug: T53049
Change-Id: I07dd73b7e2ba0994f29e1b9e619c5cbf347d4d9d
2015-04-28 16:48:13 +01:00
Translation updater bot 4a8a78cb85 Localisation updates from https://translatewiki.net.
Change-Id: Ia66ede5eac2e6e830ceee05e38782ed21a4aedf3
2015-04-10 21:50:59 +02:00
Moriel Schottlender ec0467c65a Add an example property to parameters
The example is optional and can be translated.

Bug: T53049
Change-Id: I9e2d66a805e25409532a742521886233ce3de569
2015-04-09 19:23:42 +01:00
Translation updater bot 24005eb2e1 Localisation updates from https://translatewiki.net.
Change-Id: I8e20bd07f278562a18daac0361ac3f853ca18176
2015-04-03 21:27:31 +02:00
Moriel Schottlender ff77f32e38 [BREAKING CHANGE] Change "default" property to InterfaceText
Default should be InterfaceText and support languages.

Bug: T54966
Change-Id: I7be3a8be72df3e5d80300bd72fcd7197e43155aa
2015-04-02 08:53:51 +01:00
Translation updater bot 9732909c18 Localisation updates from https://translatewiki.net.
Change-Id: I518ac35d4e780e24a0bd6daae544ac300930047d
2015-03-23 22:08:20 +01:00
Amir E. Aharoni b7d232ca72 Extra credits in en.json and qqq.json
Change-Id: I84a84cc9d00bf5cac6641fb39cfb76cf0d63c80b
2015-03-20 00:00:41 +02:00
Translation updater bot cb268f26e5 Localisation updates from https://translatewiki.net.
Change-Id: Ia0029a3ba09b6164661a35dd0443e7bb91a894eb
2015-03-19 21:16:18 +01:00
Moriel Schottlender 3820295f23 Reorganize api calls and add sourceHandler and error message
Add a sourceHandler that deals with all source-related actions
like fetching template source and validating the existing
TemplateData string.

Also add a MessageDialog warning the user in case the TemplateData
is invalid. In this case, the user will be given the option either
to correct the JSON by hand or to start the editor to replace the
existing TemplateData with a new one.

Bug: T91730
Bug: T91325
Change-Id: I4e6d04f02565a02d8dcf5c70a575ab6433caa27f
2015-03-18 18:21:02 +00:00
Moriel Schottlender ffbc8e1520 TDG: Support optional text of 'deprecated' property
The deprecated property allows for either a boolean or text, so we
should allow the user to insert guidance text in case that property
is true. To achieve that, the model also defines 'textValue' for
boolean properties with text representation so an internal property can
be set to hold that value and inputs can be automatically built from the
property structure.

Bug: T90734
Change-Id: Iadc6abdcc0cf2721a311cf43847b306cb269b5e8
2015-03-11 17:08:26 +00:00
Translation updater bot b6c28878c7 Localisation updates from https://translatewiki.net.
Change-Id: Ic4878ccd705e1db1a8dc0b3e603ab0bc1c2c19d4
2015-02-21 23:34:54 +01:00
Moriel Schottlender d59d517339 Warn if a TemplateData block already exists in related page
Check if there already is a TemplateData block in a related
page and warn the user if that is the case. Related pages are
either the /doc page or, if we are already in a /doc page, its
immediate parent.

Bug: T74062
Change-Id: I83212f14ecd2dcc18970d21ad0d833b461405390
2015-02-18 17:56:13 -08:00
Moriel Schottlender 4757a83f88 Display a message when no parameters are defined
If no parameters are defined in the TemplateData, have the table
display a specific message noting that.

Bug: T53429
Change-Id: I3c9ae31ef9eafab7f94325fcd58e14a3e45c9818
2015-02-18 17:43:16 -08:00
Moriel Schottlender b3877b327d Allow adding a deleted parameter in the templatedata dialog
If a user adds a parameter that was previously deleted, the
parameter properties will be completely emptied, and the parameter
will be added as if it is new.

Bug: T86916
Change-Id: Ib739ee09229750f94314636d4290dbe6662b4c0f
2015-01-28 18:50:43 -08:00
Moriel Schottlender d212901649 Add param order drag/drop widget to TemplateData dialog
Make sure the parameter order is editable with the drag/drop widget.

Change-Id: I35079907b2ed9f5ecdcd438dd69ed9892ce3e428
2015-01-23 19:02:56 +00:00
Moriel Schottlender ee56d518fb Add deprecated switch to the editor
The 'deprecated' boolean property was missing from the templatedata
edit dialog.

Change-Id: Ib05e832d8fc91896816b3f8b22f7678dacb245cd
2015-01-16 11:00:27 -08:00
Translation updater bot b60c4ecdf1 Localisation updates from https://translatewiki.net.
Change-Id: I42d6fb1e402ebbe897b6c661ddfea3c373bec925
2014-12-26 09:47:51 +01:00
Moriel Schottlender df59f0179a Eventify TemplateDataGenerator and use oojs-ui
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
2014-12-22 12:58:37 -05:00
jenkins-bot 9322c4262d Merge "Implement new "maps" property in Root" 2014-11-19 03:48:41 +00:00
Translation updater bot e4d906a7d8 Localisation updates from https://translatewiki.net.
Change-Id: Id8eb7d9ac8d2d4e585bef211787354104fffc155
2014-11-18 21:35:07 +01:00
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