Commit graph

2356 commits

Author SHA1 Message Date
Thiemo Kreuz 10971b6124 Make TemplateDataBlob::normaliseInterfaceText() private
Not used anywhere else:
https://codesearch.wmcloud.org/search/?q=normaliseInterfaceText
Doesn't even need to be static, as it is never called from a
non-static context.

Change-Id: I0981392e18cab08fb19501f57d805caf8f57dd4a
2020-08-19 15:40:55 +02:00
Thiemo Kreuz c355a8fac4 More strict validation of InterfaceTexts
This fixes parts of a TODO in the code. Specifically:
* When an InterfaceText is an object, it can not be any object,
  but must be an stdClass.
* It can't be empty.
* Language codes must be non-empty strings.
* Values must be strings.

I'm intentionally not adding more validation for the language
codes, as this needs discussion (what values should be allowed?),
and can potentially break existing pages.

Same for empty strings. This can easily happen when users
manually create a <templatedata> tag and copy-paste pieces that
are meant to be filled in later. Empty strings are not really
invalid (again, this needs discussion), but might be something a
client want's to ignore.

Change-Id: I0facaa08cffe5a5a038423a58d55bc90a40b2d75
2020-08-19 15:29:55 +02:00
Thiemo Kreuz 62ac9da173 Use more canonical (object)[] instead of new stdClass
Both styles create the exact same object. Casting an array to an
object creates an stdClass object as well. The main benefit of this
syntax is that there is much less repetition. Everything is one
token instead of individual lines, where each line might contain a
typo.

Change-Id: I8fb09e9d33e5a1d91d4b32a71f658b31c629987b
2020-08-19 14:23:29 +02:00
Thiemo Kreuz 7fd1367918 Remove obsolete return true and & from hook handlers
In detail:
* Don't pass the Parser by reference. Hook handlers don't need to
  replace the object with another one, and shouldn't.
* Use __CLASS__ instead of repeating the class name.
* Returning true from a hook is meaningless and indistinguishable
  from the default.

Change-Id: Iac60f7f4946eb78cfb3b579fcdb1cab8bdcac7cd
2020-08-19 14:14:35 +02:00
Thiemo Kreuz 4a0d7139ca Remove unused variables
Change-Id: I3f307113be730d770af796e91bc28bb149c45ad5
2020-08-19 14:11:02 +02:00
Translation updater bot 1c91be000e Localisation updates from https://translatewiki.net.
Change-Id: I17a2c7b3a59a6e1928c38e464fa252487eddd4c9
2020-08-19 08:39:45 +02:00
Translation updater bot e415d623f6 Localisation updates from https://translatewiki.net.
Change-Id: Id8964ef24c6f248d92f84b14bb5799e424efe047
2020-08-18 08:37:51 +02:00
Siddharth VP 512911b92e Make getRawParams() ignore parameters in comments and nowiki tags
This is used by the includeMissingTitles option of API action=templatedata.
Parameter syntax existing within nowiki tags or comments will not be valid
for the template.

Bug: T237195
Change-Id: Ibbfa3e21488f2a37fc494862e929baf50607d4c9
2020-08-17 00:33:06 +00:00
Translation updater bot ae9034d1b0 Localisation updates from https://translatewiki.net.
Change-Id: Id650ec56b7955cda163be04a49932f6da1803144
2020-08-14 08:39:34 +02:00
Translation updater bot 281d7f9f26 Localisation updates from https://translatewiki.net.
Change-Id: I0c08728b8b3949581416fef18ffafa3ad1d8a8b3
2020-08-07 08:23:41 +02:00
Translation updater bot b1436601e4 Localisation updates from https://translatewiki.net.
Change-Id: I01f5e6397da7c7d5d60f502cdf74ff835d5bc902
2020-08-06 08:28:36 +02:00
Translation updater bot 997cc68ca9 Localisation updates from https://translatewiki.net.
Change-Id: I33fb24c95fc54454c428d099048555fdddcd8371
2020-08-03 08:33:45 +02:00
Ed Sanders 71b27ed1ba Set import button to display:block, fixing text overflow
Bug: T259348
Change-Id: Ibbe2ccef8062275a20200445279033e084ca12aa
2020-07-31 14:19:43 +01:00
Translation updater bot e08d6965f3 Localisation updates from https://translatewiki.net.
Change-Id: I9bb19fd1d741111ad5ef20b1f8cfe6ecf0ca1621
2020-07-30 08:36:23 +02:00
Translation updater bot 512d5ab211 Localisation updates from https://translatewiki.net.
Change-Id: I2ec7441fd9e6be5071ca4b5dd2f9c4775ea996c0
2020-07-29 08:36:13 +02:00
Translation updater bot da9000d325 Localisation updates from https://translatewiki.net.
Change-Id: Idb734e868760d85bb55af9daed25c41765356f2a
2020-07-28 08:25:14 +02:00
Translation updater bot 46accc641d Localisation updates from https://translatewiki.net.
Change-Id: Ifee2e0f038748440dbf48eb8be00099841607607
2020-07-27 08:38:34 +02:00
jenkins-bot 986ea490a2 Merge "Make the maps object editable from the TemplateData dialog" 2020-07-24 18:05:25 +00: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 d02bf4e3df Localisation updates from https://translatewiki.net.
Change-Id: Ibd361d0dcfaa4898984f2d781ccec049813b0e7c
2020-07-23 08:28:58 +02:00
Translation updater bot 0ba5121b8f Localisation updates from https://translatewiki.net.
Change-Id: I5a570656fac2b169c8b42dc38928bc8c81ce4bf6
2020-07-22 08:27:21 +02:00
Translation updater bot 5e54a4a35a Localisation updates from https://translatewiki.net.
Change-Id: I40dd0b20837c027543696c4820371480772c1fab
2020-07-21 09:13:37 +02:00
Translation updater bot d9eab99796 Localisation updates from https://translatewiki.net.
Change-Id: I0d62c2b00c515580d066c450b392ab87ea072c91
2020-07-20 09:02:11 +02:00
Translation updater bot 2da867f213 Localisation updates from https://translatewiki.net.
Change-Id: I0d1a1819e6d8055c0167352509c5a3098407a0e0
2020-07-17 08:29:26 +02:00
Translation updater bot 3372a9cd4e Localisation updates from https://translatewiki.net.
Change-Id: I3bea867be1374e7317d0bda2777fd2d811c29da9
2020-07-16 08:21:50 +02:00
Translation updater bot 2c3d0bb89e Localisation updates from https://translatewiki.net.
Change-Id: I601121797587219f766accb9c74d4872f65bb25c
2020-07-15 09:05:01 +02:00
libraryupgrader 5225cf4da7 build: Updating lodash to 4.17.19
* https://npmjs.com/advisories/1523
* CVE-2019-10744

Change-Id: I5efc3103f96314359050d1c96353a80e0995eb12
2020-07-11 05:22:31 +00:00
Translation updater bot 02587278d6 Localisation updates from https://translatewiki.net.
Change-Id: Ic41be01dc557b2f81438212ebf6bbd321a07778f
2020-07-10 08:26:18 +02:00
jenkins-bot 821c3b5af2 Merge "Create initial UI for maps panel in TemplateData GUI" 2020-07-09 19:12:27 +00: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
Ed Sanders bf67ec6d52 build: Update eslint-config-wikimedia to 0.16.2
Change-Id: Ib53aa55795f228768a6226eebfdb5734d8a976d1
2020-07-08 13:08:35 +01:00
Translation updater bot e4fbbe9e32 Localisation updates from https://translatewiki.net.
Change-Id: Ic1a85777f13ea97d923fab6932c144c059c85e0a
2020-07-03 08:34:08 +02:00
jenkins-bot ef576be613 Merge "Remove Sortable class from tables that have one row or less" 2020-06-22 08:36:05 +00:00
adham-khatean 55a423a5ba Remove Sortable class from tables that have one row or less
Removing the sorting arrows from tables that have one row or less in
templates. By using variable $sorting that changes according to the
coung of elements in the array $data->params, to determine whether the
table should have "sortable" class or not.

Bug: T126150
Change-Id: I414c2375d4eb4da5d78f92f6b4e99b55e314ce4d
2020-06-22 09:13:17 +01:00
Translation updater bot 753e279d05 Localisation updates from https://translatewiki.net.
Change-Id: I8f24f0194fa4bd8a1e124eba6557353d4e7a87c0
2020-06-22 08:45:18 +02:00
Translation updater bot ae7cd5fa73 Localisation updates from https://translatewiki.net.
Change-Id: If05fd2d6d8bb7f8313191c9ae3d674cf9726cb47
2020-06-18 08:38:41 +02:00
Translation updater bot 8a8b022c88 Localisation updates from https://translatewiki.net.
Change-Id: I7e3e9929bd3a0ac63ce94e273a67d88c2332455e
2020-06-16 08:35:30 +02:00
Translation updater bot 13ddba615d Localisation updates from https://translatewiki.net.
Change-Id: I296da5a722a3f7523ec29e1d6bc8352508fc7c2d
2020-06-15 08:40:48 +02:00
Translation updater bot e0eacc18fa Localisation updates from https://translatewiki.net.
Change-Id: I76e1b56e75d3ab223b88ddeddeae1f95be146ed5
2020-06-12 08:38:34 +02:00
libraryupgrader 2f80e6ea97 build: Updating mediawiki/minus-x to 1.1.0
Change-Id: Ic5e14dd5bd93c42a1355d0243ae1f5f535520960
2020-06-10 07:38:59 +00:00
Translation updater bot 28a8a87504 Localisation updates from https://translatewiki.net.
Change-Id: I7560eda789cefeb1baa792c8cd75e50015bcb4e1
2020-06-09 09:14:44 +02:00
Translation updater bot 7af068aa09 Localisation updates from https://translatewiki.net.
Change-Id: If75268422d699b3db63433eb004820c427d04f0e
2020-06-08 08:52:33 +02:00
Translation updater bot f981386d25 Localisation updates from https://translatewiki.net.
Change-Id: Ic00c330171d11c6c5155f66b562977f0a8b2dca4
2020-06-03 08:31:06 +02:00
libraryupgrader d2cee1239d build: Updating mediawiki/mediawiki-phan-config to 0.10.2
Additional changes:
* Removed phan-taint-check-plugin from extra, now inherited from mediawiki-phan-config.

Change-Id: I1f52b9bd1dbbdf15359d16efd5fc35eaf8b8ea76
2020-06-02 02:54:09 +00:00
Translation updater bot 62a70dca29 Localisation updates from https://translatewiki.net.
Change-Id: I1c002467bc3438be56a0fa79da3221eaf817fe7f
2020-06-01 10:09:11 +02:00
libraryupgrader d534587294 build: Updating composer dependencies
* php-parallel-lint/php-console-highlighter: 0.4.0 → 0.5.0
* php-parallel-lint/php-parallel-lint: 1.0.0 → 1.2.0

Change-Id: I5740be26429cb302a0b284fd116677529c2221b3
2020-05-31 14:09:56 +00:00
libraryupgrader 246e14487b build: Updating mediawiki/mediawiki-codesniffer to 31.0.0
The following sniffs now pass and were enabled:
* PSR12.Properties.ConstantVisibility.NotFound

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".

Change-Id: I4dfbfd034a15cec9a107d20df9289ea47ab4a377
2020-05-30 08:01:36 +00:00
Translation updater bot 6e33d2998b Localisation updates from https://translatewiki.net.
Change-Id: Ia052b6b2ea81f8e224fd2b38cbd959765cf89008
2020-05-28 08:41:13 +02:00
Translation updater bot 680ab1ccb4 Localisation updates from https://translatewiki.net.
Change-Id: I957842266314c6f4bef8c488623e6f950bbc7717
2020-05-26 08:37:42 +02:00
Translation updater bot efbcdf60f8 Localisation updates from https://translatewiki.net.
Change-Id: Ib81a53807e32a8b213849d1a7e245880c4641ddb
2020-05-25 08:41:03 +02:00