Commit Graph

731 Commits

Author SHA1 Message Date
Translation updater bot c745dc19f9 Localisation updates from https://translatewiki.net.
Change-Id: If0ab0ee83fada9b414263cafe633a93511207e52
2020-04-23 08:45:46 +02:00
Translation updater bot b5d0ecd71a Localisation updates from https://translatewiki.net.
Change-Id: Ic194a805168de29d4f83f39e023eccdaf52d7297
2020-04-22 08:58:36 +02:00
Translation updater bot 14aee3e147 Localisation updates from https://translatewiki.net.
Change-Id: Ifbf1cc7610dd582c423a79e7cf48809de8b34e1e
2020-04-20 08:46:42 +02:00
Translation updater bot 286fcb94d3 Localisation updates from https://translatewiki.net.
Change-Id: I322840b459b880e8c52f2ab5ea8f2933f7cf7f1f
2020-04-17 09:09:28 +02:00
Translation updater bot ab7dc57923 Localisation updates from https://translatewiki.net.
Change-Id: I09eb15ced351460329cd522ef069d9151262afe6
2020-04-15 08:27:40 +02:00
Translation updater bot 15960b33c7 Localisation updates from https://translatewiki.net.
Change-Id: Ie7160c050f3aced480433fb77a367ae8c79c17be
2020-04-13 09:07:27 +02:00
Translation updater bot ce1c8709fc Localisation updates from https://translatewiki.net.
Change-Id: I923e235581d6fed875bc9b029cfc1d3a2bfa90eb
2020-04-09 08:41:40 +02:00
Translation updater bot 6667b65c6c Localisation updates from https://translatewiki.net.
Change-Id: Ib1ee31fe83deb370809f4aaaa37be50cc2cfece5
2020-04-08 09:07:13 +02:00
Translation updater bot 2939100fff Localisation updates from https://translatewiki.net.
Change-Id: I21f34b2e922b1970a14f33da0bc9c7579701839b
2020-04-06 09:06:21 +02:00
Translation updater bot 8a5fec19c5 Localisation updates from https://translatewiki.net.
Change-Id: I8ad09f3c059746952234c5d85f379b604d966a69
2020-04-03 08:30:14 +02:00
Translation updater bot 6dfae96ed2 Localisation updates from https://translatewiki.net.
Change-Id: I89a09c1be0737a6d30bcf4c23f04955a8243ecbb
2020-04-02 08:27:12 +02:00
Translation updater bot 72c44e60b0 Localisation updates from https://translatewiki.net.
Change-Id: Ic28331d6b0009db3e7c5720cf9f2da4409ce44dc
2020-04-01 08:27:11 +02:00
Translation updater bot 13c6a959a9 Localisation updates from https://translatewiki.net.
Change-Id: Id859f5f0730f60b31ae13e6e6c4a08e9da81b1ea
2020-03-31 08:31:02 +02:00
Translation updater bot 633affb6cf Localisation updates from https://translatewiki.net.
Change-Id: Id05e808e2c18e4ef0ad917be73d11d395ded9bd6
2020-03-27 08:43:55 +01:00
jenkins-bot d2b19192c7 Merge "Add opt-out link to Sidebar for Vector/Logged-in Users Without Abstractions" 2020-03-27 00:36:29 +00:00
Nicholas Ray ec382a8c86 Add opt-out link to Sidebar for Vector/Logged-in Users Without Abstractions
This commit is singularly focused on adding a link to the sidebar for
Vector, logged-in users. It does the bare minimum to fulfill the
requirements of T243281.

Additionally, it will help to answer the question "Do we need to use
abstractions (other than maybe different templates) to separate Legacy
Vector from Vector" by intentionally leaving out any abstractions in
order to make it easier to compare with a follow-up patch
(Ib2ef15180df73360cc1de25b893e49d415d23e1a) which does use abstractions.

It is a good thing to question whether or not we need addtional
abstractions in VectorTemplate and if they will help us as unnecessary
abstractions can have the opposite effect and just lead to further
frustrations down the road.

Therefore, I urge you, the reviewer, to let me know your thoughts! If
abstractions are viewed as not making our lives any easier, the
follow-up patches may be completely discarded and that's totally okay
with me. :) I think it's a good think to talk about now though.

Important changes:

* The VectorTemplate constructor was changed to allow injecting the
config, templateParser, and isLegacy boolean (only the config was
allowed before this commit). According to MediaWiki's Stable Interface
Policy, "Constructor signatures are generally considered unstable unless
explicitly declared stable for calling" [3]. Given that VecorTemplate's
constructor is not marked as stable, it is justified to do this without
warning according to the policy.

* Due to the above, the 'setTemplate' method is no longer needed and was
marked as deprecated.

* VectorTemplateTest was made to adapt to the new VectorTemplate
constructor. Additionally, it now extends from
MediaWikiIntegrationTestCase which my intelliphense server can pick up.
I *think* MediaWikiTestCase is just an alias to
MediaWikiIntegrationTestCase [1] and MediaWikiTestCase file was renamed
to MediaWikiIntegrationTestCase in [2], but I'm willing to change it
back if there is pushback to this.

Open questions:

* What are VectorTemplate's responsibilities? To me, it acts right now
as a controller (because it echos the full HTML string from the
template), a model (because SkinTemplate::prepareQuickTemplate sets data
on it which it later retrieves through `$this->get()`), a presenter
(because it adds data tailored for a web-centric view), and a view
(because it renders HTML strings instead of letting the view/template be
solely responsible for that). Arguably, some business logic might be
mixed in there as well (because it checks to see if a User is logged
in/has necessary permissions to show x which my changes here add to).
This might not be a problem if we keep VectorTemplate relatively small,
but will it remain this way as we progress further in Desktop
Improvements?

* How do we write tests for VectorTemplate without exposing unnecessary
public methods? For example, if I want to test the `getSkinData()`
method to see what state will be sent to the template, how should I do
this? One option might be to use `TestingAccessWrapper` to expose these
private methods which is what
`VectorTemplateTest::testbuildViewsProps()` does. Another option is to
accept this method as public. Is there a better way? Keep in mind that
even with access to this method, there might be many things to mock.

[1] 0030cb525b/tests/common/TestsAutoLoader.php (L64)
[2] Ie717b0ecf4fcfd089d46248f14853c80b7ef4a76
[3] https://www.mediawiki.org/wiki/Stable_interface_policy

Bug: T243281
Change-Id: I0571b041bcd7f19bec9f103fa7bccdd093f6394d
2020-03-26 17:39:47 -06:00
Translation updater bot ac79997d87 Localisation updates from https://translatewiki.net.
Change-Id: Iacb49685bda1c21698f13d1f70682b7c04eb3edd
2020-03-26 08:34:53 +01:00
Translation updater bot 04e539c531 Localisation updates from https://translatewiki.net.
Change-Id: I4d499dbbcd0729f2d09ad63e61251f19fe991b5a
2020-03-25 08:36:06 +01:00
Translation updater bot 70f33d106d Localisation updates from https://translatewiki.net.
Change-Id: I74692926553636a9a5c6cea27022a2e0d2afdb9e
2020-03-23 09:08:05 +01:00
Umherirrender af4ce06bf6 Fix indent in en.json
Change-Id: I240883c739175b7b242b4bdd7c29c8e0997c8efd
2020-03-20 22:04:04 +01:00
Translation updater bot 6365eff58c Localisation updates from https://translatewiki.net.
Change-Id: If4e36572cc91c4e8aad2ea78e5c93a5d8bd41d8d
2020-03-20 08:27:04 +01:00
Translation updater bot 8aeef146d9 Localisation updates from https://translatewiki.net.
Change-Id: I7b74e23054593f2285fa4a7d9530f83ba2c5f125
2020-03-16 16:05:25 +01:00
Translation updater bot ac41baaf12 Localisation updates from https://translatewiki.net.
Change-Id: I11369a70d7a6faf7175cccb7baffbe5f0e18b203
2020-03-13 08:30:49 +01:00
Translation updater bot 864cc97092 Localisation updates from https://translatewiki.net.
Change-Id: I17512d362f5a5f94b7c74914a02d2bbc5152226d
2020-03-12 08:20:11 +01:00
Translation updater bot 478f0b5b24 Localisation updates from https://translatewiki.net.
Change-Id: I0888ea0891fb103e6429923f638d1cbe3e6956ff
2020-03-06 07:55:41 +01:00
Translation updater bot d6f9d0c1ff Localisation updates from https://translatewiki.net.
Change-Id: I8fbe972c796aac6ddda091764bcd146ab62eb2c6
2020-03-03 07:57:51 +01:00
Translation updater bot 3683a52f91 Localisation updates from https://translatewiki.net.
Change-Id: Ib604ee279875b1f518e7dc53902006bd0667f05e
2020-03-02 08:39:02 +01:00
jdlrobson 0ba99a1e97 Make sure Vector skin preferences always follows skin
Sections can be nested. Using rendering/skin as the parent
means that Vector's skin preference will always come straight
after the skin preference and before Popups.

A change in core is needed to update the selector for the element which
shows/hides the subsection as well as provide a generic message key to
replace the one inside this repository.

Note: If the "Vector" specific heading is needed, we can achieve this
with a little more work but that is a conversation for another time.

Depends-On: Idd06bcfe7935e16732a6a95c1253dbf95c8aca2e
Bug: T246162
Change-Id: I4be9764ddca186e5bfd493678afd62d446072e8f
2020-02-29 00:35:50 +00:00
Translation updater bot 611c4ae035 Localisation updates from https://translatewiki.net.
Change-Id: I29b92bc0a9af7559e9d366bd5cba179ab12712da
2020-02-28 07:57:34 +01:00
Translation updater bot 2b5c6563c8 Localisation updates from https://translatewiki.net.
Change-Id: Idc32101f93d2554652f01c58f8327dc04fd7a6d0
2020-02-27 08:12:32 +01:00
Stephen Niedzielski de76ab59c1 [Special:Preferences] [PHP] Add skin version user preference and configs
Add a Vector-specific user preference to Special:Preferences for
toggling skin version, either Legacy Vector or the latest Vector.

The presentation of the new preference section and the default values
for anonymous, new, and existing accounts are configurable via
$wgVectorShowSkinPreferences, $wgVectorDefaultSkinVersion (to be used by
the feature manager in T244481),
$wgVectorDefaultSkinVersionForExistingAccounts, and
$wgVectorDefaultSkinVersionForNewAccounts. These configurations default
to the fullest experience so that third-party configuration is minimal.
See skin.json for details. The configurations are each tested in
VectorHooksTest.php.

When presentation is enabled, the new preference appears as a checkbox;
enabled is Legacy mode and disable is latest. There are a number of
unfortunate details:

- Showing and hiding a checkbox is supported by OOUI. Showing and hiding
  a whole section (Vector skin preferences, in this case) is not so this
  additional client JavaScript functionality is added in Core (see
  Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377).
- Stylization as a checkbox is wanted. However, the implied storage type
  for OOUI checkboxes is a boolean. This is not wanted in the event that
  another skin version is added (e.g., '3' or 'alpha'). As a workaround,
  the preference is converted from a boolean to a version string ('1' or
  '2') on save in Hooks::onPreferencesFormPreSave() and from a version
  string to a checkbox enable / disable string ('1' or '0') in
  onGetPreferences(). There a number of test cases to help cover these
  concerning details.

Documentation for overriding the skin version as a URL query parameter
is provided in anticipation of T244481.

Bug: T242381
Bug: T245793
Depends-On: Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377
Depends-On: Ifc2863fca9cd9efd11ac30c780420e8d89e8cb22
Change-Id: I177dad88fc982170641059b6a4f53fbb38eefad6
2020-02-26 12:56:10 -07:00
Translation updater bot 029ebd1cba Localisation updates from https://translatewiki.net.
Change-Id: I591eda4685ffbb18881b999a0c1ef09bfcdfbfbe
2020-02-26 07:59:09 +01:00
Translation updater bot 2dbb1c1721 Localisation updates from https://translatewiki.net.
Change-Id: I7412b9e9ceac048fff33fa5644708eb7f5707fdf
2020-02-25 08:25:50 +01:00
Translation updater bot a6790169a9 Localisation updates from https://translatewiki.net.
Change-Id: I33f52c4d3fd6ac6023dc4eb1794a0873ffa4d9c7
2020-02-24 08:33:17 +01:00
Translation updater bot 37874d4484 Localisation updates from https://translatewiki.net.
Change-Id: I234921da6b7f95a2983330fd7766ba0457067af8
2020-02-21 09:18:41 +01:00
Translation updater bot e19f6da3e0 Localisation updates from https://translatewiki.net.
Change-Id: Ief8b9f4e7a9271bbe9a754e8e95738a932cf5cbb
2020-02-20 09:05:57 +01:00
Volker E 5a4a589916 Unify user messages for Vector.js and Vector.css
Those messages have been untouched since introduction, but should be
unified. They are put on top of corresponding pages like
https://en.m.wikipedia.org/wiki/MediaWiki:Vector.js

Change-Id: Ib40a38dba553bf10070fedf368ba8ea581d2b4b9
2020-02-19 14:10:42 -08:00
Translation updater bot 1609747972 Localisation updates from https://translatewiki.net.
Change-Id: Ie13d077807d8e7a1a8f9ae52b4908a8249275609
2020-02-11 07:56:02 +01:00
Translation updater bot 0662f28024 Localisation updates from https://translatewiki.net.
Change-Id: Ice0d0138a11cd2ad058f49be4d3492080d206440
2020-02-10 07:57:44 +01:00
Translation updater bot 70eb612824 Localisation updates from https://translatewiki.net.
Change-Id: I2f01a3384e2ab9d1812d582702f63c41f94682b2
2020-02-07 08:48:36 +01:00
Translation updater bot 1f53b4c99b Localisation updates from https://translatewiki.net.
Change-Id: I7e0c298c35b405dfe4331a6e6a3046f706f20563
2020-02-04 08:10:46 +01:00
Translation updater bot 30217757c6 Localisation updates from https://translatewiki.net.
Change-Id: I59525a36df1902d56da2398b725855d0399c2e3e
2020-02-03 08:03:12 +01:00
Translation updater bot 052b26f684 Localisation updates from https://translatewiki.net.
Change-Id: I4eada4bdb013b6401333af5f3711d993f36925f4
2020-01-29 07:57:13 +01:00
Translation updater bot 183fef57cb Localisation updates from https://translatewiki.net.
Change-Id: I6b0254a0fb474c1e4b369a1387632f5f3a993aa1
2020-01-21 08:01:51 +01:00
Translation updater bot eedf2f582b Localisation updates from https://translatewiki.net.
Change-Id: I9bc149025518f06128df77e68135ce5f810d1cb4
2020-01-20 08:05:56 +01:00
Translation updater bot 746c05a0d1 Localisation updates from https://translatewiki.net.
Change-Id: Ic4bce80e3d543ce4ebcd6fc3df7facb568730b3c
2020-01-16 09:12:02 +01:00
Translation updater bot 05aab42559 Localisation updates from https://translatewiki.net.
Change-Id: Ifc5454f72af675170317630447a40b8f2db74dac
2020-01-06 08:21:20 +01:00
Translation updater bot 6abb5bffc2 Localisation updates from https://translatewiki.net.
Change-Id: I08b11aa759a21186847b0ca97f89e058382bdf80
2020-01-03 08:22:32 +01:00
Translation updater bot 14567269b7 Localisation updates from https://translatewiki.net.
Change-Id: I6037449a8ed1a106d23420d96d2bdc4524c59daa
2020-01-02 08:32:21 +01:00
Translation updater bot 52a272216b Localisation updates from https://translatewiki.net.
Change-Id: I683e3f1e7cdea2bc71431546aca26c3150977c62
2019-12-16 11:21:35 +01:00