Commit graph

96 commits

Author SHA1 Message Date
Translation updater bot 6682d9b89f Localisation updates from https://translatewiki.net.
Change-Id: I0d478fce0252bec71c4d6bd9ababe3638435ee53
2024-03-15 08:34:07 +01:00
Thiemo Kreuz b2574932e9 Turn deprecated/required/suggested checkboxes into select widget
* deprecated means "please do not use this".
* required means "you must use this".
* suggested means "it's a good idea to use this".
* optional means "you typically don't need this".

There is no combination that makes any sense. They are really
exclusive to each other.

Still we have to keep the three checkboxes for backwards
compatibility reasons. It was always possible (and will probably
continue to be possible) to have more than one of the three fields
enabled. While users like VisualEditor will make a good guess (e.g.
ignore the rest when "deprecated" is checked) I really think we
should not attempt to hide (and auto-fix) it in this dialog. That's
why the proposed code continues to show the old checkboxes when
more than one is checked.

Bug: T202851
Change-Id: I994268d658602761b180f489bedb50b91fe0c419
2023-11-16 14:06:06 +01:00
thiemowmde 9eb2e46f37 Remove two messages that are unused since 2014
The "uneditablefield" was added in 2014 via I9b13e2f, apparently
as a temporary workaround. It was apparently not possible to edit
multi-lingual language object back then.

All code related to that was removed about 5 months later via
I985ea03. The patch made it possible to edit such fields. They just
forgot to remove the message.

The "actions" message was added via I863a819. Apparently used for
an "action" table column where parameters could be deleted. This
also got lost in the same big rewrite in I985ea03.

Change-Id: I57329bef8de10ee19e1904d33605d2102fd22741
2023-09-14 18:01:35 +02:00
thiemowmde b632162245 Add missing validation for empty parameter names
Note this will make the templatedata API temporarily fail for
templates that are affected by this, until their documentation is
fixed. I think we have two ways to proceed here:

1. Thanks to Ie572809 we can change the API module to not do the
validation again. This allows us to make the validation more strict,
but the API module will continue to deliver the same data as before
until the parser cache is invalidated.

2. We accept it and merge this patch as it is. The problem is
extremely rare and easy to fix.

Bug: T333826
Change-Id: I16c7cc2328c47dde196e2dc07edb2eace33a624f
2023-04-11 19:08:37 +00:00
thiemowmde e222666e1f Rename message not specific to suggestedvalues
This fixes a FIXME in the code.

Change-Id: I3302352d000d865f074ddafe479d3f1afa62e93d
2022-12-19 07:39:17 +00:00
Thiemo Kreuz f7771a22a6 Edit aliases via a proper widget instead of comma-separated
Bug: T285284
Change-Id: I9450f70e705d9596c7e0d7545f9b5505fc4aae04
2021-12-17 11:50:27 +01:00
Translation updater bot b390e84ec6 Localisation updates from https://translatewiki.net.
Change-Id: I413c03ab59d86b9c7916c20b9aea261e3921f6d3
2021-06-22 08:09:57 +02:00
Adam Wight 7b32bcefb4 Add suggested values parameter
Parameters may include a `suggestedvalues` property, which is rendered
in the UI for some parameter types.

TemplateData editor UI elements are implemented behind the
TemplateDataSuggestedValuesEditor feature flag.

Bug: T271897
Change-Id: I14012c79b3fa0d48c58fd8999584cc03ec03575e
2021-04-09 12:05:37 +02:00
Adam Wight 67c8f1af8d Fix i18n documentation
Change-Id: I53a5371a0b01d918d149ffab8490374c52a21e16
2021-03-17 11:13:47 +01:00
Translation updater bot ab824ebb7c Localisation updates from https://translatewiki.net.
Change-Id: Ie6cfed275c326ce3a85a18867737712a0cffe952
2020-11-03 08:45:13 +01:00
jenkins-bot c42a4afede Merge "Allow different maps to be edited separately" 2020-08-30 16:14:59 +00:00
Khatean 76cf63dad2 Allow different maps to be edited separately
Seperate different maps of maps-object into different panels that
contains text-area to edit the map, delete button to delete the map, and
can be navigated through using a side-bar, that also have "Add new map"
button at the top to add a new map.

Bug: T258820
Change-Id: Ib53a73203f6010b3fd8a5cd78c74c904be2340f2
2020-08-28 20:18:27 +02:00
Translation updater bot ae9034d1b0 Localisation updates from https://translatewiki.net.
Change-Id: Id650ec56b7955cda163be04a49932f6da1803144
2020-08-14 08:39:34 +02:00
adham-khatean c4ca729ed5 Make the maps object editable from the TemplateData dialog
- Enable multiline.
- Enable updating the model with user changes if user clicks "Done".
- Disable "Done" button if the user inserts invalid JSON to handle JSON errors the
user might cause, and "Done" is enabled again if the JSON is valid.
- Create "cancel" button/action which will be for maps panel only, to
discard all changes made by the user.

Bug: T257503
Change-Id: Icd495290bae0b1684f8cd53864904a35e60fffe7
2020-07-24 16:07:04 +02:00
Translation updater bot 02587278d6 Localisation updates from https://translatewiki.net.
Change-Id: Ic41be01dc557b2f81438212ebf6bbd321a07778f
2020-07-10 08:26:18 +02:00
adham-khatean e719555d30 Create initial UI for maps panel in TemplateData GUI
Adding maps object to TemplateData GUI. By adding mapPanelButton to the
main panel and creating the map panel which contains multiline input
widget to show and insert the map info.

Bug: T254478
Change-Id: Iacff86812cbc448fcdbae24e7eeffb0384781dd5
2020-07-09 19:13:29 +02:00
Translation updater bot 9cb59e33f8 Localisation updates from https://translatewiki.net.
Change-Id: Ia855e39b795440bf6e22a75fb78a518f674639ad
2020-04-07 08:50:47 +02:00
Translation updater bot fd7fd9495b Localisation updates from https://translatewiki.net.
Change-Id: Iaa56c127cfb984752bb0966f5bb3f283a0ed140c
2020-01-23 08:35:38 +01:00
zoranzoki21 ac59e27411 Move all apihelp translatable messages to separate files
Bug: T189982
Change-Id: I0614e26ad8205209f3efd5c480248740eee92aed
2018-12-03 20:41:20 +00:00
Agabi10 348edb68d2 Remove empty Default, Example and Auto value sections of the output table
Bug: T125333
Change-Id: I1f7135cdf22c04aaa31744096900fd7ea65f9a37
2018-09-28 15:24:14 +00:00
Sam Wilson f5fece10fd Guess template parameters when templatedata is missing
Deprecate the 'doNotIgnoreMissingTitles' parameter and
replace it with 'includeMissingTitles'. If this parameter
is requested 'raw parameters' will be added to the
response in the same format as templatedata parameters.
Raw parameters are those that *might* be in the
template (using the same logic as the TemplateData generator
wizard).

Also fix the example that was using a falsy value which
meant the option was enabled rather than disabled as it
says in the docs.

Bug: T191756
Change-Id: Ie5fe2097cda45968bb080643d3afcac0b2868a6c
2018-04-25 11:42:18 -07:00
Ed Sanders 313a261f7c Make '/doc' subpage an MW message for local overrides
Bug: T125222
Change-Id: I48c666a1e313a56fd3be98d28edc24d200a35309
2018-02-16 18:16:33 +00:00
David Lynch f75b144129 Block duplicate parameter names when editing existing parameters
Previous behavior was to silently append a number to the name, which was hard
to notice. New parameters with duplicate names were already blocked.

Also, fix the disabling of the done button when there are errors.

Bug: T166520
Change-Id: I1d0c51a2aa8b8158874c98ac48fe257baeb1aee1
2018-02-07 11:09:47 -06:00
Brad Jorsch edf5777310 API: Split description messages into summary + additional text
See MediaWiki core patch I778bab2b

Change-Id: I160bf82fdec76f4207e667c49b364ed61021ec0c
2017-06-13 13:27:51 -04:00
Translation updater bot a8ecd7af79 Localisation updates from https://translatewiki.net.
Change-Id: Id8b48544b3e2315793ab024d9c52d6aa411bb137
2017-04-25 22:59:27 +02:00
James D. Forrester 3175520949 API: Identify missing and no-TemplateData pages in the response
Change-Id: I7905502d0c419a04e4487095214634f1513b461c
2017-04-24 12:22:52 -07:00
Translation updater bot 9fffe9149c Localisation updates from https://translatewiki.net.
Change-Id: I8fad18c852bad4eec945cfe4cb0be49cdc72dd26
2017-02-03 23:03:11 +01:00
jenkins-bot a31aaedb88 Merge "Extend 'format' spec to include custom format strings." 2016-12-13 21:52:45 +00:00
Brad Jorsch 98473f59fe Update for API error i18n
See Iae0e2ce3. Since TemplateData master requires core master, this just
depends on the master patch instead of trying to maintain BC.

Depends-On: Iae0e2ce3bd42dd4776a9779664086119ac188412
Change-Id: Iebe8557affd5ecf206814e7fdef5d8656417dadb
2016-11-15 11:22:31 -05:00
C. Scott Ananian 5812413f11 Extend 'format' spec to include custom format strings.
Thanks to Thiemo Mättig for the suggestion and specification at
Wikimania 2016 in Esino Lario.

This is an extended version of Thiemo's original specification.  This
version also allows specification of "own line" properties for
templates; that is, whether the template should be preceded/followed
by a newline, as requested by James Forrester.

Bug: T138492
Bug: T135667
Change-Id: Idc6b2680330e6bf5caec2bf6fc86a705d25bc649
2016-09-01 14:14:47 -07:00
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