Commit Graph
52 Commits
Author SHA1 Message Date
Abijeet 9ff95c5105 Update version for MLEB 2024.07 release
Bug: T369059
Change-Id: Iddbb640f6800c58531a17c2a7ab6242bc33f752c
2024-07-04 23:48:01 +05:30
Abijeetandjenkins-bot c82cd6dee0 Drop support for MW 1.40
Bug: T369064
Change-Id: Id3dde7df0fe963a35c68ff5b6bdf56a268eacc6e
2024-07-04 06:46:52 +00:00
Abijeetandjenkins-bot c1122f8e46 Update jQuery.ime and jQuery.uls from upstream
* jQuery.ime is updated to:
  https://github.com/wikimedia/jquery.ime/commit/4031b38c8c80c8a7fa13b5c390bd764c94472510
* jQuery.uls is updated to:
  https://github.com/wikimedia/jquery.uls/commit/7709695755b07391d5e81041f2118c41baa6ff0e
* jQuery.webfonts is already upto date

Bug: T356848
Change-Id: I02bc51c0155a0602e5085dc56ba49b4a00b37a49
2024-04-23 11:45:17 +00:00
Abijeetandjenkins-bot 186c412bfb Update language name search database
Fix failing tests

Bug: T356848
Change-Id: I1f00894e310e386bf9e91e8c67df44e677601f0b
2024-04-23 11:45:14 +00:00
Abijeetandjenkins-bot dd4da81376 Update version for MLEB 2024.04 release
Bug: T356848
Change-Id: I205d02682d5b02e5cde17cf9411aaa15f0e411fa
2024-04-23 11:45:09 +00:00
Abijeetandjenkins-bot ad5753ad40 Remove support for MediaWiki <= 1.39
With release of MediaWiki 1.41 we no longer need to support MW 1.39

Bug: T355105
Change-Id: I7957ca8aefee168ef11bc20905abd9944faecd73
2024-01-23 12:06:44 +00:00
Abijeetandjenkins-bot 46d59295c8 Update jquery.ime from upstream
Update to:
https://github.com/wikimedia/jquery.ime/commit/35c7df6049c4aa9920fe087b8d7f4c0fbc6af556

jquery.uls was updated in I245b4dd68151d9d680368d0cc5750cee4a167f50

Bug: T355104
Change-Id: I49d806c8fbfbede0e8071d31eec39099ed63d1d2
2024-01-22 12:17:27 +00:00
Abijeet 48de278a85 Update language name search database
Bug: T355104
Change-Id: If638c0137187b9015f2b3f46c5c7a46947688562
2024-01-21 16:25:13 +05:30
Abijeet 3cb7be867c Update version for MLEB 2024.01 release
Bug: T355104
Change-Id: I458d73e39d557b1c53cbaed9a5b0ed8647eac247
2024-01-21 15:26:27 +05:30
Abijeetandjenkins-bot 356df784d0 Bump version for MLEB 2023.12 bug-fix release
Bug: T351959
Change-Id: Ieb56e84b08b3997a37f3d85e967c8b5760cb30ff
2023-12-01 14:33:21 +00:00
Abijeetandjenkins-bot d413fc2721 Fix TypeError: mw.user.isNamed is not a function
This is happening due to operator precedence. Taking a simpler
example:

  return i || typeof i === 'function' ? i() : (i + 3); where i is 1

Explanation from ChatGPT:

* First, the typeof operator is evaluated for i. Since i is 1, typeof i
returns the string 'number'. The result of this operation is `'number'.
* Then, the === operator is applied to 'number' and 'function'. The
result is false because these two strings are not equal.
* Now, we have the logical OR (||) operator. The i (which is 1) is
compared to the result of the typeof and === operations combined, which
is false. Since 1 is considered truthy, the || operation results in 1.
* After the || operation, we have the conditional (ternary) operator ? :.
In this case, the condition to the left of ? is 1, which is truthy, so
the expression after ? is evaluated.
* i() is the expression after ?. Since i is not a function, and the
condition to the left is truthy, it attempts to call i() but throws
a "TypeError: i is not a function" error.

Fiddle that demonstrates the issue: https://jsfiddle.net/t2v1w6ae/2/

Bug: T347847
Change-Id: If5e8405141dfafd53c4495c91265545ec01acab3
2023-10-27 15:24:26 +00:00
Abijeet c296115614 Update version for MLEB 2023.10 release
Bug: T347847
Change-Id: I14f4c4d7e473da4aa67518006c0e3a2bee0d6e3c
2023-10-26 13:37:37 +05:30
Abijeetandjenkins-bot 6d22f7d23e Update language name search database
Fix failing tests

Bug: T347847
Change-Id: I1c14f6aa805a3b102c70c1eb275812f8e83b02bc
2023-10-25 16:37:17 +00:00
Abijeetandjenkins-bot dabd49e709 Update jquery.uls from upstream
* Update language-data to https://github.com/wikimedia/language-data/commit/bbdf55c1147a01618bcf5010aeacabe254fefd36
* Localisation update for bcc, cv, gn, ms-arab, nl-informal, sdh

Updating to:
https://github.com/wikimedia/jquery.uls/commit/d16d2be0ee78777435e5aeaf2145558cf38cea02

Previous update: I14775228a66a40bbb2e490537275fffc6bc4309c

Bug: T347847
Change-Id: I3d68f100f1f7412d8a6974cb4d2673d8ab0cb238
2023-10-25 14:41:02 +00:00
Abijeet 3cfecb4ece Update jquery.ime from upstream
* Remove Akan as a language and unify related code

Updating to
https://github.com/wikimedia/jquery.ime/commit/0baa262cc660e1a099144a6e7b84190ec0c8b027

Previous commit: I23a2ed7cf0812fc8b192b4cc6c766e34a9d1a7e7

Bug: T347847
Change-Id: Ia084f0ad368088637d8aad3c0fd07c549e13aff3
2023-10-25 16:10:26 +05:30
Abijeet 939c03bad1 ext.uls.interface.js: Inline isNamed() method
This module does not use ext.uls.common

Bug: T344635
Change-Id: Ib21c7f9020b8f51241299f4fb5b721c68de6a8e4
2023-08-22 19:37:27 +05:30
Abijeetandjenkins-bot 88f0045b94 ULS Frontend: Save preferences only for named users
Add a new method isNamed in ext.uls.common to use the isNamed
method if available else use the isAnon method as usual.

mw.user.isNamed was added in MW 1.40

Bug: T337780
Change-Id: I747c042a95e8edc793a2265a15ed6ba8ae9f1997
2023-08-21 11:08:26 +00:00
Abijeetandjenkins-bot 2434939475 Save preferred language only for named users
Bug: T337780
Change-Id: I6238ad1d64b60ec0ca62e696fed04e9742877d65
2023-08-21 09:17:42 +00:00
Abijeetandjenkins-bot 7a6906604f Update language name search database
Bug: T340729
Change-Id: Ic7b39c6c143e1cd1ba08c4e5f2da9c06a57f25db
2023-07-05 13:44:07 +00:00
Abijeetandjenkins-bot 860d40f53e Update version for MLEB 2023.07 release
Bug: T340729
Change-Id: Icbbf24cdd76ab6b6d777ec4b05c630554943976a
2023-07-05 12:36:15 +00:00
Abijeet 31d4bd8237 Drop support for MW 1.38
Update extension.json to set minimum supported version as MW 1.39.

Bug: T341090
Change-Id: I2ad1d61210e2f39cce89648f1228163a819f3161
2023-07-04 22:57:52 +05:30
Abijeet b4d4e20c15 Update jquery.uls from upstream
Updating to:
https://github.com/wikimedia/jquery.uls/commit/8292fe90e371310da5cc8f6b05aa2e313ba4f90d

Bug: T328956
Change-Id: I5e74b096f8b5c7c5b0263bfbc85aa0ee5f1b59f9
2023-05-29 14:04:54 +05:30
Abijeetandjenkins-bot 9b3fb0cc4e ext.uls.mixins: Use LESS variables from skin
Bug: T332541
Change-Id: If431b51615aa492b32a7707acc4946212d644971
2023-05-04 14:26:00 +00:00
Abijeet 6ae4b983a7 Update language name search database and related tests
Bug: T333822
Change-Id: Id5a2f1528e0ab009c8866c2237a827631adea0a9
2023-04-25 19:04:20 +05:30
Abijeet a2fc15af66 Update jquery.uls from upstream
Update jquery.uls to:
https://github.com/wikimedia/jquery.uls/commit/95e65bf1b0b7711d70a7726c6e6015a0680d435b

Bug: T333822
Change-Id: I85e3eccdb52b5178d2b1a8913fc069deb1d2345d
2023-04-25 18:44:02 +05:30
Abijeet 89c173ddac Update version for MLEB 2023.04
Bug: T333822
Change-Id: Iee07d58797a90dd13951c5bae22e19e003579f03
2023-04-25 11:03:31 +05:30
AbijeetandAbijeet Patro dc6b8da768 Update jquery.uls from upstream
Updating to https://github.com/wikimedia/jquery.uls/commit/a5a470179221d870a05b08ffbb71bfecfab60a62

Bug: T328956
Change-Id: Ibbce56b36231dc1e44bdff2542b4735c870cfe00
2023-03-13 14:21:38 +00:00
AbijeetandNikerabbit 28bfa3e9bc Update jquery.uls from upstream
https://github.com/wikimedia/jquery.uls/commit/02cd462

Bug: T328956
Change-Id: I66fd45ecfb8edf0ad8a710c556cd48c09e5d3ec4
2023-02-16 16:48:23 +00:00
Abijeetandjenkins-bot 5422719b70 Update minimum PHP version to 7.4 as per MLEB policy
Bug: T326537
Change-Id: Ie4cd36a267ee6912ad35b8c07724748498aea147
2023-01-25 12:02:42 +00:00
Abijeet b5ea94188c Update version for MLEB 2023.01
Bug: T326537
Change-Id: Icbfcf520edd52234cea328eb58e8cddbd9ee7527
2023-01-23 12:03:03 +05:30
Abijeetandjenkins-bot 742d0d9241 Update jQuery.uls to add support for up/down navigation of languages
Some localisation changes are also included.

Bug: T187964
Change-Id: I7d9554c9a4e2b18c805c9ef9b916c3961ae9c32c
2023-01-18 12:17:05 +00:00
Abijeetandjenkins-bot 3c77e27aa3 Update version for MLEB 2022.10
Bug: T319187
Change-Id: I35b36e1bb75eb09acfbe70243dfe26e941b3982e
2022-10-24 11:05:40 +00:00
Abijeetandjenkins-bot 4632f33e6a Drop support for MediaWiki 1.36
Bug: T311510
Change-Id: I9bc2f91f274df1d37ebad639b42ee4b542274db9
2022-07-26 11:04:40 +00:00
Abijeetandjenkins-bot 9eb5342795 Update version and required MediaWiki version for MLEB 2022.07
Bug: T311511
Change-Id: I301a288b840204c43c74a5654621995676b700f9
2022-07-25 13:06:00 +00:00
Abijeet a924ab4a8f Update version for MLEB 2022.04
Bug: T305141
Change-Id: I90a9eba2bb732dae855bfb58212d31b6fd7d0609
2022-04-25 18:16:52 +05:30
Abijeetandjenkins-bot 03cf7863ec Stop propagating first click handler when loading languagesettings
The languagesettings dialog does not open when clicking the
uls.trigger for the first time. This issue occurs when the user is
not logged in, ULSPosition is personal, and ULSAnonCanChangeLanguage
is false.

Without this change, the following happens:
* uls.languagesettings is loaded via uls.interface
* uls.languagesettings::hide is called via uls.languagesettings::init
* click method is triggered immediately via script in uls.interface
* uls.languagesettings::show is called
* uls.languagesettings::hide is called - triggered via ::show
  method - $( document.documentElement ).trigger( 'click' ); but
  dialog is not visible yet, so this does nothing
* uls.languagesettings::show displays the uls.languagesettings
* hide method called again via click handler for documentElement

With this change in place the hide method is not called again due to
e.stopPropagation();

Additionally add a parameter autoOpen that can be set to open the dialog
automatically.

Bug: T301882
Change-Id: I54e8172ae017c4a9c6ab5b841d9328b2f24f97a8
2022-03-08 09:39:43 +00:00
Abijeetandjenkins-bot 6e6635bdbb Move version check inside PersonalUrls hook
Stop additional conditional hook if MW < 1.37, and move the check
to inside the hook itself

Bug: T299305
Change-Id: Ied1c5c0beee015d7b0a8d6bd750346f4a8a5aaa1
2022-01-24 09:24:43 +00:00
Abijeetandjenkins-bot c9d695db36 Update version for MLEB 2022.01
Bug: T298889
Change-Id: I362f8c0c6a693b52c7d944976201290be3c55330
2022-01-19 08:10:11 +00:00
Abijeetandjenkins-bot 30986e6d9e Remove backward compatibility for MW <= 1.35
Bug: T298856
Change-Id: I1e635785d0a29d87f510e729b11fce9a2eb68e11
2022-01-18 12:51:07 +00:00
Abijeetandjenkins-bot defc3d416d ApiULSSetLanguage: Use LanguageNameUtils
Change-Id: I00e814894db4ba84f1d08c52db2993b59fbccf55
2021-11-16 18:36:23 +00:00
Abijeetandjenkins-bot 98252ee386 LanguageNameSearch: Remove usage of deprecated Language functions
Change-Id: Ia8f2961550ccb4e0032cd7e24d36628c675873a9
2021-11-16 13:57:36 +00:00
Abijeetandjenkins-bot da4d965739 Replace usage of ApiBase::PARAM_* with ParamValidator::PARAM_*
Change-Id: I4c7c16f8b3380cdaf32fbedc9d33f12b14050774
2021-11-16 13:56:49 +00:00
Abijeetandjenkins-bot 4d8131af10 MW 1.35: Re-add class attribute for ULS
Without the class attribute, the ULS does not open on MW <= 1.35.
This was changed in Ie9e30af5468aea9803d77c9a36e480ba2b2e86a0

Bug: T294021
Change-Id: I1bcf4e442e85f8848c5e4ff5609204602265b949
2021-10-28 08:08:29 +00:00
Abijeet 770b0dfe50 Update version for MLEB 2021.10
Bug: T294021
Change-Id: I252fffcde7d0c401cb8a460c3b162c71948ec018
2021-10-25 13:29:03 +05:30
Abijeetandjenkins-bot 30ba18e86d Update jquery.uls from upstream
Contains Localisation updates and a fix for T187553

Updating to https://github.com/wikimedia/jquery.uls/commit/e3a9a11840e2706a72ac23f8248ec935262fbe3f

Change-Id: I3bd3ec67fb0b1b7a487ccd5568e99f96636d7a88
2021-09-29 09:16:18 +00:00
AbijeetandAbijeet Patro 065018ef00 Update jquery.uls from upstream
Contains Localisation updates.

Updating to https://github.com/wikimedia/jquery.uls/commit/082092e81d012f3a67850870f57ce2d8e8040d7d

Change-Id: If66f3edb7cf318ee4fc4aee7cb9481df50ae573f
2021-09-22 08:49:18 +00:00
Abijeetandjenkins-bot 5baf437b3c Remove MW 1.34 backward compatible code
Move hooks and scripts to extensions.json

Bug: T282783
Change-Id: Id63d17d04789bb36fff35e0512e7878dc8bfe12c
2021-06-01 08:17:13 +00:00
Abijeetandjenkins-bot e44e59497c Set language URLs to empty for older version of skins
During MLEB 2020.07 release testing noticed that if $wgULSPosition
is interlanguage, the ULS was not appearing.

Revert some of the changes introduced in
I2843edde1bb45c70911d5acf2f7dafdff3bac53e to fix this

Tested this change on,
1. MW 1.34, Timeless (1b22886)
2. MW 1.34, Vector (f39a3f0)
3. MW 1.36, Timeless (e5e188f)
4. MW 1.36, Vector (3926ffa)

ULS appears in all scenarios

Change-Id: I84feaed26c4e32d74ae90152a2d006648d4d9b64
2020-07-23 11:42:40 +00:00
Abijeet 09a19700d2 Update ULS_VERSION for the MLEB release
This is currently used in CleanChanges extension:
https://codesearch.wmcloud.org/search/?q=ULS_VERSION&i=nope&files=&repos=

Bug: T257286
Change-Id: I62cf6a20c6a990d21b8f958356bf35aabb749f38
2020-07-23 16:16:28 +05:30
Abijeetandjenkins-bot 459d55c5d3 Remove setlang URL parameter on dialog close
Add two new options for ext.uls.dialog - afterOpen and afterClose.
These are callback function which will be triggered after the dialog
opens or closes.

Using the afterClose callback in ext.uls.setlang to remove the
setlang parameter from the URL if the dialog is closed without
pressing any button. This might happen if the user closes the dialog
by pressing Esc, or by clicking on the overlay.

Also see: Ie3215d12d9c77f15597495e21610707b272eeee9

In addition, renamed all occurrence of setlang to setLang.

Bug: T63115
Change-Id: Icaf086f947b1d91bf7ad5b36f126da0be1fc7747
2020-01-23 09:27:15 +00:00
Abijeetandjenkins-bot 5ad4f74ea9 Add support for keyboard events for the setlang dialog
Support has been added for:

* Esc: Closes the dialog
* Tab: Ensures that tabbing keeps focus on the focusable elements
  in the dialog. If no overlay is not present, the focus is
  allowed to flow normally.

This should not happen but if NO focusable elements are found and
overlay is displayed, focus is locked on the overlay.

Also add description and other license information for uls.dialog
& uls.setlang files.

Bug: T63115
Change-Id: Ie3215d12d9c77f15597495e21610707b272eeee9
2020-01-14 15:14:37 +00:00
Abijeetandjenkins-bot ff02e63a45 Update setlang to display confirmation dialog to change language
setlang will now display a dialog to confirm with the user that
they would like to change their interface language. The preferred
language will only be updated if the user confirms.

The dialog will be displayed if the setlang parameter is present in
the query string and,

* A user is logged in, and their preferred language is not the same
  as the one passed via setlang.
* For an anonymous user if the wgULSAnonCanChangeLanguage is true,
  and the current interface language is not the same as the one
  passed via setlang.

Bug: T63115
Change-Id: I882297d99a594fd82fd0aec3b4664e8bfd1eac3a
2019-12-19 14:54:34 +00:00