Commit graph

1477 commits

Author SHA1 Message Date
Translation updater bot 422bd03b74 Localisation updates from https://translatewiki.net.
Change-Id: I010fd555406fe85013cb0bc5d2b68bd88589a430
2024-05-21 09:27:42 +02:00
jenkins-bot 44f0010c07 Merge "Separate names for server-side vs. client-side feature flags" 2024-05-16 12:29:42 +00:00
thiemowmde 6c5c2dc6cb Remove separate private deferDoc property in ve.dm.MWReferenceModel
This is a direct follow-up for what I started in I3c9b9bb. Again all
this does is moving existing code around. The separate this.deferDoc
property is never used anywhere:
https://codesearch.wmcloud.org/search/?q=deferDoc&files=%5C.js%24
Instead I store the deferred function directly in the target property
this.doc and resolve it when needed.

Note that the concept of a parentDoc still exists. I tried to make
this as obvious as possible via comments and by arranging the code
accordingly:
1. A lot of code calls setDocument which directly sets this.doc. The
   parentDoc is never used in this case.
2. The parentDoc is only needed to auto-generate the (empty) document
   for the reference when a new reference is created.

That's also why the existing code always calls the constructor with
the parentDoc, even if this ends being unused in many cases: It's a
simple fallback.

Bug: T363096
Change-Id: I7874f187b2b397ed511b695ca9ff95838fcff302
2024-05-13 22:25:06 +02:00
thiemowmde 81f774c789 Don't call things "attrs" that aren't mw.attrs
mw.attrs does have a special meaning in this code. Together with
mw.body it reflects 1:1 what was written in the original wikitext
in the <ref …> and <references …> tags. Let's avoid using the same
(or almost same) variable name for other kinds of attributes.

Bug: T363096
Change-Id: I3e599ab910b9639e121f9b9d532b0f57f08f1e73
2024-05-13 18:37:17 +02:00
jenkins-bot 0c846421b3 Merge "Consolidate duplicate "is reference list empty" code paths" 2024-05-13 13:28:20 +00:00
jenkins-bot f9ba47d7f0 Merge "Drop separate MWReferenceModel.parentDoc property" 2024-05-13 13:01:26 +00:00
thiemowmde c921c76dd2 Consolidate duplicate "is reference list empty" code paths
Introduce a static method so we don't need to copy paste code.

Note that the static method still largely duplicates what the method
.buildIndex() will later do. Both loops iterate the reference groups
and the references in each group. The main difference is that the
"is empty" check stops extremely early the moment it finds any
non-empty group.

That's also why I'm convinced it's not worth caching the result.
I benchmarked it and it's nanoseconds. But there are more reasons:

The non-static .isIndexEmpty() method is currently only used when
Citoid is active the same time. Which means the cached result was
entirely unused on installations without Citoid.

Bug: T356871
Change-Id: Id5c4295086bc977ef52ad141be9962d2eecb1bcc
2024-05-07 15:51:12 +02:00
jenkins-bot 2349c3ceec Merge "Use OOUI's native "unselect all" feature" 2024-05-07 12:15:20 +00:00
WMDE-Fisch 52b9521dc9 Add tracking for VE Cite re-use interaction
Includes a minor drive by cleanup for an obsolete JSDoc block.

Bug: T362347
Change-Id: Ie4a6ebc5a468c0419001b0170c9cc7e13de616ba
2024-05-07 12:47:37 +02:00
Translation updater bot 48a4eb029e Localisation updates from https://translatewiki.net.
Change-Id: I0db6b2fce7293962a8f715ab746c3a8162a75cc1
2024-05-06 09:25:14 +02:00
Translation updater bot fd85662ab7 Localisation updates from https://translatewiki.net.
Change-Id: I80558444c309afb41efef8cbba144bbd16343a20
2024-05-03 09:28:19 +02:00
thiemowmde a531d4d82d Streamline code dealing with (undeployed) extends attribute
No need to create an expensive model here when all we need is a
single attribute.

Note this code is still behind a feature flag and not running
anywhere, except on the beta cluster.

Bug: T247922
Change-Id: Iea48837213b72a8d0f4b3cc9d9688d9a08315509
2024-05-02 17:13:24 +02:00
thiemowmde 790b46d41f Reduce minor code duplication in MWReferenceNode class
Parts of this was already done via I3edf0df.

Change-Id: Id71904ab9387c114b15757d35442e6e6632e87f2
2024-04-30 14:02:43 +02:00
thiemowmde e3fdee52aa Separate names for server-side vs. client-side feature flags
The two are different:

* CiteReferencePreviews as specified in extension.json is a feature
flag that allows us to disable the feature entirely. It could be
named "CiteReferencePreviewsFeature" or "CiteEnableReferencePreviews",
but renaming a feature flag that's already in use is hard.

* The client-side flag tells the JavaScript code "you know what, it
was kind of a mistake you got loaded, please stop". This is because
we can not make all decisions before we register the ResourceLoader
module, e.g. if the user has certain gadgets enabled.

Adding the word "Active" is not a huge improvement, but at least
makes the two different now. Suggestions welcome.

Bug: T362771
Change-Id: I0f6a911df8772616ac50c1301f402f77dbe32089
2024-04-30 11:57:47 +00:00
jenkins-bot 29e8ba9ea0 Merge "Further delay search index build in ReferenceSearchWidget" 2024-04-30 10:49:17 +00:00
jenkins-bot 74b42ace80 Merge "Make ReferenceSearchWidget code a bit more functional" 2024-04-30 10:49:14 +00:00
jenkins-bot 18635f501d Merge "Unify and streamline code working with mw.attrs" 2024-04-30 10:39:01 +00:00
jenkins-bot a6405f230e Merge "Add safe-guard to ReferenceSearchWidget.buildIndex" 2024-04-30 10:38:09 +00:00
jenkins-bot 7d3fcb651d Merge "Drop unused setters from MWReferenceModel class" 2024-04-30 09:48:23 +00:00
jenkins-bot 829d68d1ec Merge "Mark private MWReferenceModel setters as such" 2024-04-30 09:21:23 +00:00
WMDE-Fisch 179d402344 Add ReferencePreviews config checks to Cite extension
PHP classes and test are somewhat copies from the Popups codebase.
Some refactoring was applied. More could be done. Not to sure if
this should happen more in follow ups though.

Could also reduce the complexity of checks on the JS side. Most of
these things can only change on page load. The only dynamic part
left is the anon user setting managed by the Popups extension.

Note, that I needed to add a new PHP config for here although the
other still exists and is needed in the Popups extension. This
will change, when the user settings code also moves.

I guess it's okay for now though. Both settings default to true
and are not overridden in the config repos.

Also needed to add the Gadget extension as phan dependency.

Bug: T362771
Depends-On: Ia028c41f8aaa1c522dfc7c372e1ce51e40933a5e
Change-Id: Ie6e8bc706235724494036c7f0d873f5c996c46e6
2024-04-25 12:50:27 +02:00
thiemowmde f61b840dc8 Drop separate MWReferenceModel.parentDoc property
We can re-use the existing this.deferDoc property to achieve the
same. There is apparently no need for a separate "parentDoc"
property for anything else but what can be seen in this patch.

https://codesearch.wmcloud.org/search/?q=%5CbparentDoc%5Cb

And no need to keep neither the parentDoc reference nor deferDoc
callback indefinitely. We can drop it after it got resolved.

This really just moves existing code around without changing
anything.

Bug: T363096
Change-Id: I3c9b9bbdff29a3f35d5a0710b48ca59bf592c6ab
2024-04-24 14:49:05 +02:00
thiemowmde 1391f43d03 Drop unused setters from MWReferenceModel class
These aren't used anywhere:
https://codesearch.wmcloud.org/search/?q=%5Cbset%28ExtendsRef%7CList%28Key%7CGroup%7CIndex%29%29%5Cb
These setters are reaching into internal details that currently
aren't ever modified from outside of the class, and shouldn't.
If it turns out we ever need to modify one of these we can easily
re-introduce setter functions, but probably give them more
meaningful names.

Bug: T363096
Change-Id: I2c9efc114bdc110a29b8d7fb48ea8c1814cdeb21
2024-04-24 14:17:49 +02:00
thiemowmde 14fe315c62 Mark private MWReferenceModel setters as such
This just documents the current status quo. These methods are not
used anywhere, and probably shouldn't:
https://codesearch.wmcloud.org/search/?q=%5Cbset%28ExtendsRef%7CList%28Key%7CGroup%7CIndex%29%29%5Cb
The only place these should ever be called from is from
newFromReferenceNode in the same class.

Bug: T363096
Change-Id: Ic28dbb5cbb2beb98c9fe6d283ed87d879728da0f
2024-04-24 14:16:52 +02:00
jenkins-bot ca629c3dd1 Merge "Internal config variables renamed from Popups to Cite" 2024-04-22 16:01:31 +00:00
Adam Wight f0849b2b17 Internal config variables renamed from Popups to Cite
This updates the easy variables which are set and get within a single
module, these changes should have no effect and don't need to be
coordinated across extensions.

Bug: T362332
Change-Id: Ibbe69c321e9e2b744ec88cebbdc3476d776f5956
2024-04-22 14:31:55 +02:00
jenkins-bot 7a63c9fa95 Merge "Revert "Remove global for if previews are shown"" 2024-04-22 09:00:09 +00:00
WMDE-Fisch 4f50d3b009 Revert "Remove global for if previews are shown"
This reverts commit afdbf2d46d.

Causing some issues with the dependency. Will do this cleanup in a later step when most of the involved complexity is gone anyways.

Change-Id: I3f29d64503d5088d058bf87dd0448f5754d4c6fe
2024-04-22 08:30:55 +00:00
Translation updater bot d1e164ca8a Localisation updates from https://translatewiki.net.
Change-Id: I5bc4cea5b42fbd4be477cd2452df99593eb2dc0b
2024-04-22 09:27:49 +02:00
Translation updater bot cbfea786d8 Localisation updates from https://translatewiki.net.
Change-Id: If856eec18b5fc87044445ffb1a45edbfa58473c3
2024-04-19 09:46:00 +02:00
jenkins-bot 97ec15d8b1 Merge "Remove global for if previews are shown" 2024-04-18 09:17:37 +00:00
Translation updater bot 98a99171c9 Localisation updates from https://translatewiki.net.
Change-Id: I434483e134ceef88df5d6f53499ac0d60f75cfd8
2024-04-17 09:27:45 +02:00
WMDE-Fisch afdbf2d46d Remove global for if previews are shown
This global was needed to communicate the actual state of the
previews from Popups to Cite. Now this setting can be retrieved
in a more direct way.

Change-Id: I592761bb0121abcf7e8ab279b7385d6920cce37e
2024-04-15 20:17:25 +02:00
Translation updater bot b21dbff0cc Localisation updates from https://translatewiki.net.
Change-Id: I5d6258de46d20fb6375f3bba4c481b99ef67a373
2024-04-15 09:27:38 +02:00
mareikeheuer ce2f65c555 Add 'Extends' section to Wikitext toolbar Help menu in Beta Cluster
Implemented addition of 'extends' feature information to WikiEditor Help menu, under the extends feature flag

Bug: T361088
Change-Id: Ide15286527227f61a48386384b96ac965c5dec42
2024-04-09 18:27:52 +02:00
Translation updater bot 7b8ee26b51 Localisation updates from https://translatewiki.net.
Change-Id: Icfbf342ff65adcfcbd6013e5493a1111025fa784
2024-04-09 09:26:16 +02:00
thiemowmde e925fb4e16 Add safe-guard to ReferenceSearchWidget.buildIndex
Note this is only a bandaid patch that avoids the failure in this
place, but doesn't solve the fundamental problem. It appears like
the data coming from Parsoid (in internalList.….firstNodes and
internalList.….indexOrder) is somehow out of sync, and one of the
numbers in the .indexOrder array points to an element in .firstNodes
that doesn't exist (any more?). I don't know why.

Bug: T351550
Change-Id: Iaa4c748462d90d7783edb89713b61ffff6d70765
2024-04-09 09:23:32 +02:00
Translation updater bot 54c8aa860d Localisation updates from https://translatewiki.net.
Change-Id: Ib3b06dc0f0f3efe062ed39d674c0ed6960eda70f
2024-04-05 09:37:44 +02:00
thiemowmde 203a1cde34 Further delay search index build in ReferenceSearchWidget
The search index is really only used in a single place, in the
buildSearchResults method at the very bottom of the class. I find it
more obvious to understand what's going on when the places where the
search index is populated and used are as close together as possible.

This again really only moves existing code around without actually
changing anything.

We can also drop the extra "built" property and use a special null
value instead. This is possible because we know the only consumer of
the this.index property and can guarantee it can't get confused by
the null.

Bug: T356871
Change-Id: Iaddb3b16b3aa776f89fca2bf0350cce9b6bb1a23
2024-04-04 15:13:50 +02:00
thiemowmde e9561ade15 Make ReferenceSearchWidget code a bit more functional
This turns two methods with side-effects into more pure functions
with more obvious input and output. buildSearchIndex rebuilds the
internal search index from the internalList. buildSearchResults
filters and creates the result widgets the user will see.

This patch really only moves existing code around but doesn't change
anything. Except that this.built is set before onQueryChange is
called, not after. This avoids potential endless loops in case
onQueryChange happens to trigger buildIndex again.

Bug: T356871
Change-Id: Ib80a2dcb85779d64bec53caf90c49879d0ea2258
2024-04-04 15:12:57 +02:00
thiemowmde b02028b671 Move ve-cite QUnit tests to top-level tests/ directory
It's just hard to find and confusing when hidden in that
sub-directory.

Bug: T358851
Change-Id: I19ffe73b79fa9add52af12f477afe7abbc6db836
2024-04-03 12:03:33 +02:00
Ed Sanders 5ef2c13c48 Preserve reflist CSS in dynamic mode
Bug: T361359
Change-Id: I4c48129a54103f47ce512d685d2ab4b3c188a5b0
2024-03-29 13:04:40 +00:00
Translation updater bot c9a93cb3f4 Localisation updates from https://translatewiki.net.
Change-Id: I662c8bfc31d27125e969f8c7dfe8440effec62e8
2024-03-29 08:46:22 +01:00
jenkins-bot f4c690fa1a Merge "ce.MWReferenceListNode: Only open dialog on unmodified left clicks" 2024-03-28 16:14:32 +00:00
Ed Sanders d368f45c17 ce.MWReferenceListNode: Only open dialog on unmodified left clicks
Change-Id: I06f6e2cc89f595e6dcc931b78c908ff2270e4629
2024-03-28 15:30:43 +00:00
jenkins-bot 7906b2147a Merge "Remove confusing, unnecessary .length check on a string" 2024-03-27 08:15:09 +00:00
thiemowmde 61a49f4337 Remove confusing, unnecessary .length check on a string
I find this particularly confusing because it makes it look like this is
an array. As a reminder, while empty arrays are false in PHP they are
not in JavaScript. An extra `if ( array && array.length )` is really
critical. But this is a string. Empty strings are false in JavaScript.
No problem.

This was originally written in 2013 via Ib244ff6 as a pure .length
check. The duplication was added a year later via Id401d97 for an
unknown reason.

Bug: T356871
Change-Id: Ied335f170a9a0a7bbc8c8fd12f95b6902f401bbf
2024-03-27 07:16:54 +00:00
Translation updater bot 6ca87923bb Localisation updates from https://translatewiki.net.
Change-Id: I0c667f3a28bf61f9304ffe4f3c7844f17cf6af8e
2024-03-26 08:19:09 +01:00
jenkins-bot 78363709a3 Merge "Make use of LESS mixins in ext.cite.styles.less" 2024-03-22 22:29:29 +00:00
jenkins-bot b0b356f4e8 Merge "Add initial QUnit tests relevant for reference re-use in VE" 2024-03-22 10:49:33 +00:00
jenkins-bot c7eb279260 Merge "Use design tokens in Cite extension" 2024-03-22 08:31:29 +00:00
thiemowmde 9e7b365531 Make use of LESS mixins in ext.cite.styles.less
Bug: T360720
Change-Id: Ibef7df801f1dc5d550e6663200fa38ddf8c21054
2024-03-22 09:08:28 +01:00
Translation updater bot 7535cf0b3d Localisation updates from https://translatewiki.net.
Change-Id: I7b2bb4d2cf0dd4180484dc9fdd1361ddc1a576ac
2024-03-22 08:43:46 +01:00
Jon Robson 75b4682dbf Use design tokens in Cite extension
Upstream this value from Minerva where it is being
overriden.

Bug: T360720
Change-Id: I03536d033c7cc0f2420550f22fd4b094e0d179ba
2024-03-21 15:11:23 -07:00
thiemowmde d6a58cfa8d Add initial QUnit tests relevant for reference re-use in VE
Note these are more meant as regression test to better cover what's
done in other patches. Everybody should feel free to delete a test
when it gets in the way. I marked a few especially fragile places
with respective comments.

Bug: T358652
Change-Id: I7844907fe3ef4f3439717381b4ecdac9e2d0a825
2024-03-21 09:37:26 +01:00
Translation updater bot 9bc74e7694 Localisation updates from https://translatewiki.net.
Change-Id: I2d2a414f5fa41f47d6418302e8712bf2e1f30aba
2024-03-21 08:54:27 +01:00
Translation updater bot e6f17fd477 Localisation updates from https://translatewiki.net.
Change-Id: Icb746719a0a9d1b12c9ab23577a6fb4068c0957a
2024-03-20 08:23:14 +01:00
WMDE-Fisch 463e25b742 [Cypress] Streamline some selectors and click paths
Change-Id: I9c897f3c94a44f50de5c7a31822645a52cb3d70d
2024-03-19 11:33:23 +00:00
Translation updater bot 8dff3e20c5 Localisation updates from https://translatewiki.net.
Change-Id: I512a36ea005567c4acd4b5d158720922307a8351
2024-03-19 08:24:41 +01:00
jenkins-bot dbff601ebf Merge "Remove obsolete @method annotations" 2024-03-18 10:00:17 +00:00
jenkins-bot 974401489d Merge "Move reference previews to Cite extension" 2024-03-15 19:15:16 +00:00
jenkins-bot 2f1b3477f7 Merge "Remove broken CSS for ve.ui.MWReferenceGroupInputWidget" 2024-03-14 09:07:48 +00:00
Translation updater bot 5b7e331563 Localisation updates from https://translatewiki.net.
Change-Id: Ia5d8a16095d0a5893728799260bec416226e6e59
2024-03-14 09:02:36 +01:00
jenkins-bot cb725645ea Merge "Fix broken deletion of non-existing <ref refGroup="…">" 2024-03-13 16:37:43 +00:00
Jon Robson dcb513eb0e Move reference previews to Cite extension
The ext.cite.referencePreviews module will transparently replace the
ext.popups.referencePreviews module after this patch.  Configuration
stays in Popups for now, we can migrate it in later work.

CSS classes may be renamed in the future but this will be handled
separately since it could be a breaking change for on-wiki
customizations.

A lot of fancy footwork happens in this patch to emulate a soft
dependency on Popups.  This mechanism doesn't exist explicitly in
either ResourceLoader or QUnit, so lots of workarounds are used, to
conditionally load the module and to dynamically skip dependent tests.

renderer.test.js is fully skipped for now, but can be wired up in
later work.

Bug: T355194
Change-Id: I0dc47abb59a40d4e41e7dda0eb7b415a2e1ae508
2024-03-12 17:43:51 +01:00
thiemowmde fa77ef25bd Remove broken CSS for ve.ui.MWReferenceGroupInputWidget
This CSS exists since I2ab47e7 from August 2014. The original idea
was to dim the default "General references" when you edit a <ref> or
<references> list in VisualEditor.

Steps to reproduce:
* Start VisualEditor.
* Edit a <ref> or <references> list.
* Edit the group.
* You will see the dimmed text "General references". This is not the
  CSS in this patch, but the default styling for OOUI placeholders.
* Open the dropdown. The list will show a "General references" item.
  It's not dimmed. This is where the CSS was meant to be.

The CSS class name in the OOUI mixin was actually changed from
"oo-ui-flaggableElement-…" to "oo-ui-flaggedElement-…" via I1abecd8,
just a few days later.

In addition the selector wouldn't work anyway for other reasons.
The dropdown is not inside the `.ve-ui-mwReferenceGroupInputWidget`
container any more but placed outside by the OOUI window manager.
And the selector's specifity is to low, at least since Ic57b3ff.

I argue it's not worth fixing it. Nobody missed it for 10 years.
Light gray text would be illegible anyway on the light gray/light
blue backgrounds used in the dropdown menu. Let's consider it dead
code and just remove it.

The class name doesn't appear anywhere else (any more):
https://codesearch.wmcloud.org/search/?q=flaggableElement

Change-Id: Ia802303737ba35cd4b14fae924b7227472f905fd
2024-03-12 16:36:22 +01:00
thiemowmde ae786bc2ef Fix broken deletion of non-existing <ref refGroup="…">
This can be quite confusing:
* A node does have attributes. One of the attributes is called
  "refGroup", another one "mw".
* mw contains a JSON structure with just a few elements, most
  notably a "body" and an "attrs" element. These reflect what was
  originally written in the wikitext.
* mw.attrs reflects the original properties a.k.a. attributes from
  the <ref …> or <references …> tag.

Deleting mw.refGroup doesn't do anything because the attribute is
called <ref group="…"> in the wikitext, not <ref refGroup="…">.

You can actually see this bug in action on all wikis: Go to a page
that uses references in non-standard groups, e.g.
https://en.wikipedia.org/wiki/Historic_Cherokee_settlements
Start VisualEditor. Find e.g. the [notes 1] reference. Edit it
and change the group from "notes" to "General references". Click
"Publish…" and "Review" your changes. The visual diff works because
it apparently uses other information. The wikitext diff is empty.
This is also what's saved: nothing. The edit is lost.

Bug: T359943
Change-Id: I798605d2fd60a6b8f317ec85a4e4d08fd245e084
2024-03-12 14:44:00 +00:00
Adam Wight ba137fba88 Clean up top-level docs
* Include the README in generated JS docs.
* Tweak stray top-level files to explain their role.  Note that the
wmf template forces these files to appear on the docs home page...

Bug: T358641
Change-Id: If421414340903991f50a06a76551bd7cd2904c5e
2024-03-12 12:23:18 +01:00
thiemowmde 644597c402 Move Parsoid-specific CSS into a subdirectory
The first two files have been added to the root modules/ directory
via I487095d in 2015. No problem.

Many, many more files have been added via I000b453 in 2022. It's
really hard to tell what is what since then.

I'm not absolutely sure what the naming convention for this folder
should be. Could as well be "localized-styles/" or just "Parsoid/".

Bug: T156350
Change-Id: Ibcf8c7a6db5400ed8a9811244a070e03ff372a39
2024-03-11 12:42:25 +00:00
Translation updater bot 7b308564e0 Localisation updates from https://translatewiki.net.
Change-Id: I1273544798e72192a48ab0219f7e1748ffb95e33
2024-03-11 08:26:28 +01:00
Translation updater bot 15663dc283 Localisation updates from https://translatewiki.net.
Change-Id: I8eb8c35e3283224b8101ea59b421648f4dca24ad
2024-03-04 08:23:03 +01:00
Adam Wight 8d0202a664 Minor logic cleanup
This didn't mean what it looked like: `||` has higher priority, so an
undefined elem would not result in an empty string.

Change-Id: I1e361842f060815b04802a1ab8f077faa1a8bc6b
2024-02-29 12:12:56 +00:00
Adam Wight 73c90a0e7d Clean up and fix some jsdoc annotations
Some of the annotations were used in a way that confused jsdoc.  This
cleans up redundant annotations and uses more canonical tags.

These changes cause all classes to now appear in the generated pages.

Includes linking to external docs.

Bug: T358641
Change-Id: Iaee1dadcc19a70c27839d0d27dfa6a07a70fb46b
2024-02-29 13:05:42 +01:00
thiemowmde 5d8e256fbc Remove obsolete @method annotations
These tags are 10 years old. Current documentation generators don't
need them.

Tagging something explicitely as being a @method can be useful in
an interface where the elements are initialized with e.g. `= null;`
instead of having an implementation. But we have implementations
here. Sure these are methods. No need to say that in the
documentation.

Also removing a comment that's obviously a copy-paste mistake from
what was the ve.ui.MWMediaSearchWidget back then. See Ib244ff6 and
before.

Change-Id: I7df6c789d10fd89e7fe97d56c942fd22c56d8458
2024-02-22 20:07:33 +01:00
thiemowmde 96da6cedfe Use OOUI's native "unselect all" feature
No need to manually scan for the currently selected item. And no
need to do it twice. The feature is a little hidden (calling the
method with no parameter) but always was supported.

Bug: T356871
Change-Id: I02401284eef5687eb0825d8d9ae0df294b3b4e03
2024-02-22 18:58:01 +01:00
thiemowmde 7151077e5f Unify and streamline code working with mw.attrs
I find it very helpful to use the name "mwAttrs" specifically for the
mw.attrs thingy that contains the original key-value pairs from the
wikitext.

An alternative is to use ve.getProp, which is helpful in other
situations.

Change-Id: I3edf0dfe5b9629fcda0bf8cb3b734215377a5c77
2024-02-21 13:52:12 +01:00
jenkins-bot 5bad2b183f Merge "Revert "Avoid creating a MWReferenceModel if not needed"" 2024-02-16 08:30:13 +00:00
DLynch 6bc1ae4146 Revert "Avoid creating a MWReferenceModel if not needed"
This reverts commit 74f66bc478.

Reason for revert: this broke reference reuse from Citoid

Change-Id: I86efea4945c1795dbfd61f4e020d78ca81a6f4d1
2024-02-16 03:54:34 +00:00
Translation updater bot 11591f72cd Localisation updates from https://translatewiki.net.
Change-Id: I6fa8273a3bb51c75ec72e928d78d00a0ed66e137
2024-02-14 08:18:28 +01:00
jenkins-bot 882f3e5ee7 Merge "Revert "Accessors to find MWReferenceNode in the document"" 2024-02-13 14:51:09 +00:00
Esanders f7c8b63ed1 Revert "Accessors to find MWReferenceNode in the document"
This reverts commit 0566a495f3.

Reason for revert: Merged too soon, while discussion of the whole
approach is still ongoing.

Change-Id: I2d3d6455cd4ea12067e2020f6b41cfbb4672bbb5
2024-02-13 12:57:02 +00:00
jenkins-bot 49e3ab6595 Merge "Accessors to find MWReferenceNode in the document" 2024-02-12 15:55:17 +00:00
Translation updater bot a68be1ceda Localisation updates from https://translatewiki.net.
Change-Id: I65f69dd188a5745c2161492029dcac902a76bce9
2024-02-12 14:49:05 +01:00
Adam Wight 0566a495f3 Accessors to find MWReferenceNode in the document
These are provides as a replacement for internalList indexes.

Bug: T336417
Change-Id: Ifd3a1b667369074e2cefa4d70e4c090e91b010b5
2024-02-09 15:37:27 +01:00
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
Fomafix 87beb87ea5 Remove unnecessary $() callback
The hook 'wikiEditor.toolbarReady' gets fired after DOM ready.

Change-Id: Ic503c3dffcaa4301b3a3b2ab95fd3a5b4f8e7e88
2023-10-10 05:25:31 +00:00
Translation updater bot 9ff56c0175 Localisation updates from https://translatewiki.net.
Change-Id: I1942a2736cf31c0720dd3e633eea9396f4d324bf
2023-10-03 09:32:17 +02:00
Translation updater bot 2336daf3dd Localisation updates from https://translatewiki.net.
Change-Id: I7bbaa5105d3af0748ab1243af5302e66c8973e15
2023-10-02 10:56:59 +02:00
Translation updater bot b9ccbb932c Localisation updates from https://translatewiki.net.
Change-Id: I549b165a33cf5999c5b38284b06ba2df6846c440
2023-09-25 08:45:56 +02:00
Translation updater bot 156d1e5707 Localisation updates from https://translatewiki.net.
Change-Id: I1fdf8642bb0bf16f703b84e302616ddea98038d6
2023-09-19 09:25:07 +02:00
Translation updater bot 0ed8d6329c Localisation updates from https://translatewiki.net.
Change-Id: I08369b96674a8f977a368902b6bfe6387e65daa0
2023-09-18 08:42:41 +02:00
Translation updater bot 2c0dc4f796 Localisation updates from https://translatewiki.net.
Change-Id: Iae26c7664f075fad1e4281fd530e4db052b7c35a
2023-09-12 08:26:28 +02:00
Translation updater bot 1a5dc02ff4 Localisation updates from https://translatewiki.net.
Change-Id: I9197dd4057b5189315971446a0aadb948edf8426
2023-09-11 09:03:10 +02:00
Translation updater bot 1ecd366a73 Localisation updates from https://translatewiki.net.
Change-Id: I50df01bb5a9deffcb20b19c884fd5f3a96bce041
2023-09-06 08:41:30 +02:00
Translation updater bot 70b7bcaa21 Localisation updates from https://translatewiki.net.
Change-Id: Ic5bd89ed2b7ed1773a8de4f8e62894f42edf7a81
2023-09-04 08:43:08 +02:00
Translation updater bot 12764fc265 Localisation updates from https://translatewiki.net.
Change-Id: I13110416bbeee8744467efed0fc9df4cc81ed454
2023-09-01 09:02:32 +02:00
Translation updater bot cf70ab30cb Localisation updates from https://translatewiki.net.
Change-Id: Ib0e501155e7f8380cae133e711ab0751813c71e9
2023-08-30 08:43:52 +02:00
Translation updater bot 621cb1d801 Localisation updates from https://translatewiki.net.
Change-Id: I3e1c8867f0ff928fe9ff7799842011eebe57edc0
2023-08-29 08:27:57 +02:00
Translation updater bot d98c55dd11 Localisation updates from https://translatewiki.net.
Change-Id: I9b65d36187860fe16aaa83ac9d203966efb06252
2023-08-28 09:29:46 +02:00
Translation updater bot b68de12e69 Localisation updates from https://translatewiki.net.
Change-Id: I4d33204cd5b6df94d90e458271513e444e4e7d08
2023-08-24 09:48:53 +02:00
jenkins-bot a3f136cf7b Merge "Convert Cite extention to ES6" 2023-08-23 16:19:37 +00:00
mareikeheuer 1eb405eb54 Convert Cite extention to ES6
Bug: T343220
Change-Id: I769f0bfaa5af14d6ea4861ea738b44c98feb6193
2023-08-23 12:39:29 +00:00
Translation updater bot 9f74f74cbd Localisation updates from https://translatewiki.net.
Change-Id: I130c471228a9bc5eba16bdefa4a2c08fb3683b4c
2023-08-23 08:38:54 +02:00
Translation updater bot c82292634a Localisation updates from https://translatewiki.net.
Change-Id: I66daf1d98ea1bcffa2fe8adb63ac553d3d59fe41
2023-08-22 09:01:19 +02:00
Translation updater bot 411989a205 Localisation updates from https://translatewiki.net.
Change-Id: Idb27c1adffb0938b2c0f04c1576d48d4fa3dc3ed
2023-08-21 08:47:22 +02:00
Novem Linguae 339ba57786 Don't warn that reference list is uneditable
In articles with references, a reference list is generated. If you
try to visual edit the reference list, it displays a message "This
reference list is generated by a template, and for now can only be
edited in source mode." However it is actually editable now that
T54750 (Community Wishlist 2023 wish #2) is complete.

Bug: T54750
Change-Id: Id8115ae6045f371e4619c85aeb610fe78927d802
2023-08-18 20:46:41 -07:00
Translation updater bot e7a594cd35 Localisation updates from https://translatewiki.net.
Change-Id: I3dcf2223660bfd10a43dfce23eeb5660c3cb0d45
2023-08-18 09:07:42 +02:00
Translation updater bot f0e877a0c5 Localisation updates from https://translatewiki.net.
Change-Id: I1eeab58604b3920557065715a54f8d149882a8ad
2023-08-17 12:09:31 +02:00
Translation updater bot 4ec268d8c3 Localisation updates from https://translatewiki.net.
Change-Id: I2c05a4aa185ed1008a975ef09755e31e3ee7575d
2023-08-16 09:11:18 +02:00
Translation updater bot 13ea4e89fc Localisation updates from https://translatewiki.net.
Change-Id: I1f569f3fab61644744e0cdfc702bcf2ad4c556de
2023-08-11 08:59:42 +02:00
Translation updater bot 6476dde20e Localisation updates from https://translatewiki.net.
Change-Id: I25b70a269d0fd437b1066f38d7ef5d9ebd713820
2023-08-10 09:40:16 +02:00
Translation updater bot 18dfa26ee1 Localisation updates from https://translatewiki.net.
Change-Id: I360936597a0da7bf39115100a95c77435b2a4b8d
2023-08-09 09:14:43 +02:00
Translation updater bot a6c8f9be64 Localisation updates from https://translatewiki.net.
Change-Id: Ibf69b8414cfd13d1994fb4442158327dd8441638
2023-08-08 09:00:37 +02:00
Translation updater bot 3302f7191d Localisation updates from https://translatewiki.net.
Change-Id: Ida42b9050052350d4f23a9ba2cff8b68574ea6a6
2023-08-07 08:37:50 +02:00
Translation updater bot c7d27dd020 Localisation updates from https://translatewiki.net.
Change-Id: I48409a19a5c65ee62560096d1671f807be954181
2023-08-03 08:48:18 +02:00
Translation updater bot 995495eb6f Localisation updates from https://translatewiki.net.
Change-Id: Iecd50180af49cf669a2d2888427a76fcb22c3033
2023-08-02 09:03:40 +02:00
Translation updater bot c55dc43253 Localisation updates from https://translatewiki.net.
Change-Id: I734e69dac9ed65628ad13455892ecc9404a9afbb
2023-07-31 08:56:24 +02:00
Translation updater bot ef5d0a3e7e Localisation updates from https://translatewiki.net.
Change-Id: I0d49ac76485a1130e6c19310944ef6478b3b8686
2023-07-28 09:19:07 +02:00
Translation updater bot da0f53d4c2 Localisation updates from https://translatewiki.net.
Change-Id: I84bd82743e4ba5a0aa88f1b4e889305d4db79535
2023-07-24 09:36:47 +02:00
Translation updater bot 182401570e Localisation updates from https://translatewiki.net.
Change-Id: I4401790cf0e9fda4787e990f267f2290077dba66
2023-07-21 08:41:03 +02:00
Translation updater bot 3ff81498ed Localisation updates from https://translatewiki.net.
Change-Id: Id5362988556255ec20520eb262e090509a7f39de
2023-07-20 09:32:03 +02:00
Translation updater bot d7c22027ee Localisation updates from https://translatewiki.net.
Change-Id: Ica38b7dc843dbf8faeb3d12b5618b2fbb81b3b11
2023-07-18 09:49:14 +02:00
Translation updater bot cd2c578e29 Localisation updates from https://translatewiki.net.
Change-Id: I12b4e8d4e90c89dd6efd3c74f11c63029ace6941
2023-07-17 10:16:34 +02:00
Translation updater bot 6aff5b0828 Localisation updates from https://translatewiki.net.
Change-Id: Iee86fdbe9ea5e8df0eab763827146f1c765785d8
2023-07-14 09:32:36 +02:00
Subramanya Sastry a5b8640928 Rename ext.cite.style.css to ext.cite.parsoid.styles.css
ext.cite.style.css is very close to ext.cite.styles.css and is
often confusing.

In about 3 weeks (the current PC expiry time), we should be able to
get rid of the ext.cite.style module from extension.json after
removing all references to it from other repos and caches.

I don't see a reason to rename all the other language specific
CSS files since there is no room for being confused there.

Change-Id: I3a41f435b0cbe51f8c9a6dde8a9f6eb13a9879f7
2023-07-13 11:31:41 -05:00
Translation updater bot 4265152ea6 Localisation updates from https://translatewiki.net.
Change-Id: Id08669a1b1f850b0ced9b3b83e92100e6e032d45
2023-07-13 10:48:40 +02:00
Ed Sanders b2fd0aa4d1 Fix ContextItem documentation
* Be more specific about the type of context which a
  context item belongs to.
* Make grammar clearer.

Change-Id: I9bcc129766c3386582def0f346d6f175e54d6ff6
2023-07-10 14:33:24 +01:00
Translation updater bot d06b315b7c Localisation updates from https://translatewiki.net.
Change-Id: I2bbad9897d911b24a470cd0f49b9a44e1a653ff8
2023-07-10 09:37:11 +02:00
Jon Harald Søby 99370a77dd Fix message parsing
Some of the methods used for mw.message were incorrect, which could
potentially lead to double escaping.

This follows up I4bc60570012bcd8eab5ad32c5004d06b3af42798

Change-Id: Iceb819c8fa6c46c234fc79d1c81bd3252440269c
2023-07-05 01:40:58 +02:00
Translation updater bot 152abcbe1f Localisation updates from https://translatewiki.net.
Change-Id: Ia5be9d48e4e44dfad73df0396987142693ff459b
2023-07-03 10:14:41 +02:00
Jon Harald Søby 2ae345ca4b Remove use of autoMsg in favour of using mw.message directly
Bug: T154891
Change-Id: I4bc60570012bcd8eab5ad32c5004d06b3af42798
2023-06-30 01:33:25 +02:00
jenkins-bot 0a3240e217 Merge "Revert "Add extends warning to reference dialog"" 2023-06-29 16:58:33 +00:00
Awight 42e13cb3c3 Revert "Add extends warning to reference dialog"
This reverts commit da30b2b626.

Reason for revert: Caused a regression.  Feature is not enabled on public wikis so reverting is harmless for now.

Bug: T247922
Bug: T340757
Change-Id: I83434afaf1b76425bddb575dd724f462a247c83d
2023-06-29 16:36:47 +00:00
jenkins-bot 75c946c8d5 Merge "Move Cite-specific settings from WikiEditor" 2023-06-28 23:42:46 +00:00
Jon Harald Søby c66371b3d9 Move Cite-specific settings from WikiEditor
The WikiEditor extension has a button and some help text that
is only applicable if the Cite extension is enabled. Move
that (with some modifications) to the Cite extension instead.

Bug: T339973
Depends-On: I8256660f9c6886d6764b45735284e00308fc56e5
Change-Id: Ib3fdc897dd3330f69c5832003d4c3cb1e6dba2f3
2023-06-28 20:22:14 +02:00
Translation updater bot d8121c4b2c Localisation updates from https://translatewiki.net.
Change-Id: Ifc60a07ae9077e92f9653662a448525f25a84c15
2023-06-28 17:32:42 +02:00
Translation updater bot 72b94c9244 Localisation updates from https://translatewiki.net.
Change-Id: Ib0b74672ee6d359f11401d18e56387c7e1b45221
2023-06-26 12:38:21 +02:00
Translation updater bot 88e504647d Localisation updates from https://translatewiki.net.
Change-Id: I9030217a54e9bd7bc79a204f8281377ed73b7c69
2023-06-19 11:06:28 +02:00
Translation updater bot 6e1b2c8be8 Localisation updates from https://translatewiki.net.
Change-Id: Id77ec86541c52e8883a22a6aa585c5b0da61ef50
2023-06-14 13:06:17 +02:00
jenkins-bot 9bd0f969bb Merge "Display text of parent reference in VE popup" 2023-06-14 10:12:53 +00:00
jenkins-bot 87a1466782 Merge "Add extends warning to reference dialog" 2023-06-13 12:57:45 +00:00
Svantje Lilienthal eac4213cc9 Display text of parent reference in VE popup
This is a first demo that it is possible to get the text of the parent.
This is hidden behind a feature flag.
Next: see if the parent ref can be added to the rendering

Bug: T247922
Change-Id: Idd409f25b253a19c20ed8623737ecc49315587dc
2023-06-12 16:32:40 +00:00
Svantje Lilienthal da30b2b626 Add extends warning to reference dialog
To warn users when they are editing a sub-reference we
add a warning containing the text of the parent reference.
This is hidden behind a feature flag.

Bug: T247922
Change-Id: I3749683d8a18e502bf16e5bd5f2fe385581625be
2023-06-12 16:24:58 +00:00
Translation updater bot 1abb521be7 Localisation updates from https://translatewiki.net.
Change-Id: I885384031bcece55da8c85597e01214817baee09
2023-06-12 13:07:02 +02:00
Translation updater bot 994df7c0bf Localisation updates from https://translatewiki.net.
Change-Id: I5a83796515935ff06b282c15b0a742aac343fc1e
2023-06-09 09:13:04 +02:00
jenkins-bot 36f8dc85ae Merge "Fix inconsistent usage of lastIndexOf in VE reference code" 2023-06-06 21:27:19 +00:00
Svantje Lilienthal 3d4f0a933e Use message widget for reuse warning in reference dialog
* Use OOUI message widget to make code cleaner
* By default message is toggled off and only displayed when needed
* To prevent visible changes the message widget is slightly adapted:
 * Use black alert icon to prevent yellow default icon for warning messages
 * Remove bold text (in css)
 * Some padding to top and bottom
* Changes can easily be removed if message should be closer to the standard

Bug: T247922
Change-Id: I2296cd497c935ea4638650bdb4b3c833a71a6c6a
2023-06-06 15:07:51 +02:00
thiemowmde 341847a410 Fix inconsistent usage of lastIndexOf in VE reference code
I assume the code was using lastIndexOf as some kind of performance
optimization. Certain StackOverflow threads suggest it without going
into detail. It's not correct here. You can actually name a group
"mwReference/", which will result in the (valid) internal name
"mwReference/mwReference/". This works as expected with indexOf but
not with lastIndexOf.

Change-Id: I8e85ae5c11a74016c7720fcdb6ac6478431aaa8e
2023-06-06 13:37:25 +02:00
jenkins-bot eaa2228afa Merge "Tests: Convert more to template literals" 2023-06-05 22:26:41 +00:00
Translation updater bot f823468e1c Localisation updates from https://translatewiki.net.
Change-Id: I892f830cc96cd8b9a2b28d6b9fb97fbf1c8220dd
2023-06-05 08:40:27 +02:00
Translation updater bot 61ae890e2a Localisation updates from https://translatewiki.net.
Change-Id: I036398ae88af1bd3cf57a94ee1d78472b62d8fc1
2023-06-02 09:23:25 +02:00