Commit graph

1243 commits

Author SHA1 Message Date
Adam Wight 74f66bc478 Avoid creating a MWReferenceModel if not needed
It's fine to copy attributes directly from the reference node rather
than go through the specialized model object.

Bug: T336417
Change-Id: Idaca192137dc762ddced2ee8446a7d838f97e317
2024-02-07 15:24:12 +01:00
Translation updater bot 8333e70453 Localisation updates from https://translatewiki.net.
Change-Id: Ic325aea9e6f28d870f3bfe5ad4962419723267ce
2024-02-01 09:01:15 +01:00
Adam Wight b0b628afd5 First tests for ve.dm.MWReferenceModel
Begin a QUnit test module for the reference model.  Tests demonstrate
that a new ref and a normal ref reuse from the full document both
behave as expected.

Bug: T336417
Change-Id: I1337806d41b50329ba971c8e68e1a62b52cc9a52
2024-01-31 13:52:40 +01:00
Translation updater bot f7d1ecb84b Localisation updates from https://translatewiki.net.
Change-Id: I4c21c3ea065de3e17672e19a7cb86907b4467d1c
2024-01-31 08:28:49 +01:00
Adam Wight 9535126304 [lint] Satisfy max-len rule
These changes mostly improve the code, and align the lint rules with
the MediaWiki base.

Change-Id: Ib4b0595fd9a9298039b8b44a0f1d4a9e90731527
2024-01-30 12:18:52 +01:00
Translation updater bot 723571b5d3 Localisation updates from https://translatewiki.net.
Change-Id: Ic56560791c1d93bde35617b594126fec2c578f9a
2024-01-28 16:05:40 +01:00
thiemowmde 16711d681b Group and nest stylesheets now they are .less files
Change-Id: Iedd9748cf9f38847ef4553459d533a67a0950645
2024-01-21 15:59:20 +01:00
thiemowmde 80c8eaf3ce Convert (almost) all .css files to .less
Intentionally no other change is made (yet). This is for a later,
separate patch.

Intentionally not touching the huge list of per-language
ext.cite.style.*.css files for the moment. Again, I would prefer to
do this in a separate patch.

Change-Id: I4e392c7bd1c69849a6c7946676a64c749ddbcd60
2024-01-21 15:39:08 +01:00
jenkins-bot 030e9a2a7e Merge "Fix event logging for the reference previews baseline" 2024-01-18 13:16:31 +00:00
Translation updater bot 2c84fbbc08 Localisation updates from https://translatewiki.net.
Change-Id: I34a16a2997cfad7578aa05a5704059a78c66b134
2024-01-18 09:24:42 +01:00
WMDE-Fisch b59eef1cfe Fix event logging for the reference previews baseline
The current tracking is wrong for several reasons. Mainly because
of a race condition if the Popups extension fininshed loading
before the Cite tracking script is executed. But further more
wgPopupsReferencePreviews was not a good choice to see if the user
sees previews or not.

The logging now uses the monoschema and only checks for enabled
previews when the click events are fired. The chances that Popups
finished initilizing then are much higher then. We still can see
if the init is not finished and the variable not set though.

Also we won't track the overall pageviews in here but use the
generic pageview_hourly from the data lake instead.

Bug: T353798
Depends-On: I1c434f0098ae23bd62256686a658e3d5ef7f70b9
Change-Id: I7a9524274efb58286f520c6148d5463bb0a78dbf
2024-01-17 13:11:17 +01:00
Translation updater bot 33f5611e1c Localisation updates from https://translatewiki.net.
Change-Id: If1cd1df28a06c68d35ee4b03e6ad3c9e7b01820a
2024-01-16 08:25:24 +01:00
Translation updater bot 7f71ada8f8 Localisation updates from https://translatewiki.net.
Change-Id: I14dfb64deb13f0113940b6e295fba232f941e2f6
2024-01-15 08:23:57 +01:00
Translation updater bot 9156975dae Localisation updates from https://translatewiki.net.
Change-Id: I0d9d5f9812c30d615bf8b150204ab5cab2d30858
2024-01-10 08:32:37 +01:00
thiemowmde ddda536792 Drop unused cite_reference(s)_link_prefix messages
Same as Icfa8215 where we removed the …_suffix messages.

This patch is not blocked on anything according to CodeSearch:
https://codesearch.wmcloud.org/search/?q=cite_references%3F_link_prefix

According to GlobalSearch there are 2 usages we need to talk about:
https://global-search.toolforge.org/?q=.&regex=1&namespaces=8&title=Cite.references%3F.link.prefix.*

zh.wiktionary replaces "cite_ref-" with "_ref-", and "cite_note-"
with "_note-", i.e. they did nothing but remove the word "cite". This
happened in 2006, with no explanation.

ka.wikibooks and ka.wikiquote replace "cite_note-" with "_შენიშვნა-",
which translates back to "_note-". One user did this in 2007,
16 seconds apart.

It appears like both are attempts to localize what can be localized,
no matter if it's really necessary or not.
https://zh.wiktionary.org/wiki/Special:Contributions/Shibo77?offset=20060510
https://ka.wikiquote.org/wiki/Special:Contributions/Trulala?offset=20070219
Note how one user experimented with an "a" in some of the edits to
see what effect the change might have, to imediatelly revert it.

The modifications don't really have an effect on anything, except on
the anchors in the resulting <a href="#_ref-5"> and <sup id="_ref-5">
HTML. It might also be briefly visible in the browser's address bar
when such a link is clicked. We can only assume the two users did this
to make the URL appear shorter (?). A discussion apparently never
happened. Bot users are inactive.

Both pieces of HTML are generated in the Cite code. Removing the
messages will change all places the same time. All links will
continue to work. The only possible effect is that hard-coded
weblinks to an individual reference will link to the top of the
article instead. But:
a) This is extremely unlikely to happen. There is no reason to link
   to a reference from outside of the article.
b) Such links are not guaranteed to work anyway as they can break
   for a multitude of other reasons, e.g. the <ref> being renamed,
   removed, or replaced.
c) Even if such a link breaks, it still links to the correct article.

There is also no on-wiki code on zh.wiktionary that would do anything
with the shortened prefix:
https://zh.wiktionary.org/w/index.php?search=insource%3A%2F_%28ref%7Cnote%29-%2F&title=Special%3A%E6%90%9C%E7%B4%A2&profile=advanced&fulltext=1&ns2=1&ns4=1&ns8=1&ns10=1&ns12=1&ns828=1&ns2300=1

I argue this is safe to remove, even without contacting the mentioned
communities first.

Bug: T321217
Change-Id: I160a119710dc35679dbdc2f39ddf453dbd5a5dfa
2024-01-04 13:17:42 +01:00
jenkins-bot 533869a8de Merge "Use 'html' instead of 'text' on headings in WikiEditor toolbar config" 2024-01-03 12:46:31 +00:00
Translation updater bot 086f5af8f8 Localisation updates from https://translatewiki.net.
Change-Id: I26541cfb187ee00cfee76e74d57ef702adcd8fed
2024-01-03 08:34:14 +01:00
Translation updater bot 07d75d4ebe Localisation updates from https://translatewiki.net.
Change-Id: Ie77f4c3e4e29cb1a67e40438443d4ad560404d7b
2024-01-02 08:48:22 +01:00
Translation updater bot 81502b4294 Localisation updates from https://translatewiki.net.
Change-Id: I540883ba46e78aaf77d20714bb3975ede2d676c3
2023-12-26 14:42:33 +01:00
Translation updater bot 12c414f4c4 Localisation updates from https://translatewiki.net.
Change-Id: Iaab9324e298b755d96678ac8868cbd98fc9d82f8
2023-12-22 17:45:28 +01:00
Fomafix 184fc92c3f Use 'html' instead of 'text' on headings in WikiEditor toolbar config
WikiEditor also uses 'html' instead of 'text' on headings. At the
moment both keys have the same behavior, but the original intended idea
is to have 'html' as already valid HTML (like on .parse()) and 'text'
on plain text which has to be escaped.

Change-Id: I1b4035a86ed56bfeb12d33b463d67099f7ae40e3
2023-12-22 13:29:39 +00:00
Translation updater bot 9b11e93bbe Localisation updates from https://translatewiki.net.
Change-Id: I04ba74f6fae07793f3a3180b204f3fbe89b16949
2023-12-21 19:45:01 +01:00
Translation updater bot e64d944194 Localisation updates from https://translatewiki.net.
Change-Id: Ice9b812492a0bce8ef003413a66501d9db1c75e2
2023-12-18 18:16:28 +01:00
WMDE-Fisch 2a02f5311d build: Update linter libs
* "eslint-config-wikimedia": "0.26.0"
* "grunt-eslint": "24.3.0"
* "grunt-stylelint": "0.19.0"
* "stylelint-config-wikimedia": "0.16.1"

Including auto fixes.

Change-Id: Iadacfc781a48675022144bb8c9489073d0bc19e3
2023-12-12 14:21:07 +01:00
thiemowmde 202c0d3636 Drop unused …_suffix and …_key_with_num messages
The three messages cite_reference_link_key_with_num,
cite_reference_link_suffix, and cite_references_link_suffix are not
used for anything.

According to CodeSearch:
https://codesearch.wmcloud.org/search/?i=1&q=cite_references?_link_(key|suffix)

According to GlobalSearch:
https://global-search.toolforge.org/?q=.&regex=1&namespaces=8&title=Cite.references?.link.(key|suffix).*
For comparison:
https://global-search.toolforge.org/?q=.&regex=1&namespaces=8&title=Cite.references?.link.prefix.*

They are not meant to be localized, as noted in qqq.json. As many
messages in Cite the idea is that individual wikis can customize the
generated HTML (!) via such messages. These particular ones apparently
have been introduced just because it's technically possible, but never
been used for anything. They exist since the very first commit from
2005: https://phabricator.wikimedia.org/rECITb714bf09

Note how these messages aren't even visible anywhere, except in the
browser's address bar as part of a #… fragment.

This obviously doesn't solve T321217 but helps minimizing the
surface.

Bug: T321217
Change-Id: Icfa82155e3b02df39bb6e924bc472f6edc565d5f
2023-12-08 09:26:05 +01:00
Translation updater bot d368264120 Localisation updates from https://translatewiki.net.
Change-Id: Icdbb6a0468db59a04887413a83afe7a90e02ea64
2023-12-05 09:14:17 +01:00
Translation updater bot c784c47de5 Localisation updates from https://translatewiki.net.
Change-Id: Ie8a88219eb6691d249af60195724a3ef428c5ef2
2023-12-04 09:03:37 +01:00
Translation updater bot 30607b4cf0 Localisation updates from https://translatewiki.net.
Change-Id: I840e39ba3d0fa4cc0687e148d865da0262373f12
2023-12-01 09:38:44 +01:00
Translation updater bot f8967415a8 Localisation updates from https://translatewiki.net.
Change-Id: I191f8a688ccf3b2085d9d993265f304da45d5085
2023-11-29 08:30:38 +01:00
Translation updater bot f8010df944 Localisation updates from https://translatewiki.net.
Change-Id: I981c304635cffc265ae0aed53db3829bc569471d
2023-11-27 08:31:55 +01:00
Translation updater bot c60d8d1f2f Localisation updates from https://translatewiki.net.
Change-Id: Ia43cb04dbac14774f8bad377c23f25b76fa93009
2023-11-23 11:55:51 +01:00
Translation updater bot eb2bd5ff15 Localisation updates from https://translatewiki.net.
Change-Id: I64d02118866e006a197e094f827696f3dc014573
2023-11-22 08:19:39 +01:00
Translation updater bot a56fc64d18 Localisation updates from https://translatewiki.net.
Change-Id: I9250b0f75e11df2b8ff685a8cb0a6fe22f2a2261
2023-11-20 08:50:57 +01:00
Translation updater bot 463e002854 Localisation updates from https://translatewiki.net.
Change-Id: Icb4e8c538d29fa667786df48b99ed3fa56fa0245
2023-11-17 08:52:12 +01:00
Translation updater bot f649124a7f Localisation updates from https://translatewiki.net.
Change-Id: I86b6ea8d3c0d85f4510dc71139c229b4fde5bf20
2023-11-16 09:08:57 +01:00
Translation updater bot 7ce0bb218c Localisation updates from https://translatewiki.net.
Change-Id: Idb7a47793b233425ecc0885910c9c2acdfd8a561
2023-11-15 15:43:23 +01:00
jenkins-bot 8ef6751c55 Merge "VE: Update group ordering when node is converted from placeholder" 2023-11-10 21:54:42 +00:00
Translation updater bot 483d5ad545 Localisation updates from https://translatewiki.net.
Change-Id: Ib733e398de88a624f11420d94bc1fbec444c83a1
2023-11-09 10:40:29 +01:00
Ed Sanders ada0820622 ve-cite: Remove unused messages for fake refernce headings
These were removed upstream in Iedc17c8ac9c.

Change-Id: Ic1240329de348a687db0373a9d247d3cd0780b46
2023-11-08 12:07:47 +00:00
Translation updater bot 2e006087fb Localisation updates from https://translatewiki.net.
Change-Id: I5520d02cb371d264d307fcf1e791b95d3123e131
2023-11-06 08:55:50 +01:00
Translation updater bot a4f9e88fc0 Localisation updates from https://translatewiki.net.
Change-Id: Ie76c448fff0963a1493e315335b1e3b3258844f7
2023-11-02 09:58:09 +01:00
Translation updater bot d4a54c4bc9 Localisation updates from https://translatewiki.net.
Change-Id: I3288c028e79553da2e120526a8e054ae9373c7c5
2023-11-01 09:07:54 +01:00
Translation updater bot 377a23e6dd Localisation updates from https://translatewiki.net.
Change-Id: I90e507e8b2c7846550387ac55c75b1a608aa3d7b
2023-10-31 09:08:41 +01:00
jenkins-bot 0daea7ed38 Merge "Remove closure in JavaScript files" 2023-10-30 20:53:31 +00:00
Translation updater bot b5e9632406 Localisation updates from https://translatewiki.net.
Change-Id: I5517aa23c58d76660b81254d522c716828e4d994
2023-10-30 17:58:55 +01:00
Volker E 677b2dd43a docs: Replace WikimediaUI Base reference in comment with Codex
Rely on Codex color palette descriptions.

Bug: T334934
Change-Id: Ib2456f5348183de938a68cf93f3000ea92f05393
2023-10-25 22:51:49 -07:00
Translation updater bot 2249b98685 Localisation updates from https://translatewiki.net.
Change-Id: Idaedffe51da8560e98da22caf7bdffd8addb8f8b
2023-10-23 09:50:22 +02:00
Translation updater bot a625c82c19 Localisation updates from https://translatewiki.net.
Change-Id: I7ba3ade6ca4ced17f9168b66d503480e9965b351
2023-10-19 08:41:18 +02:00
Ed Sanders b4b6dbba95 VE: Update group ordering when node is converted from placeholder
Logically depends on I45c7ab5fe5cd.

Bug: T332799
Change-Id: I143fa0d45572677d09320fff88076a53253ad714
2023-10-16 15:48:41 +01:00
Fomafix 38b208b1cc Remove closure in JavaScript files
In this JavaScript files the closure is not needed to prevent
declarations of functions and variables in the global scope.

Change-Id: I169a74c69a5e00b86fbcc9f56886a3c4157ebd0f
2023-10-10 09:00:00 +00:00