Commit graph

1253 commits

Author SHA1 Message Date
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
Ed Sanders b7024b6668 Tests: Convert more to template literals
Change-Id: I68da55d32ee9ac6c09439c04a7d7ed71c5bafd29
2023-06-01 15:51:43 +01:00
Translation updater bot a54a251e1e Localisation updates from https://translatewiki.net.
Change-Id: I333c57a82638de816a39946de8b8b49e5f143041
2023-06-01 08:42:56 +02:00
jenkins-bot c9fb272bdf Merge "Converter tests: Use template literals to make HTML more legible" 2023-05-31 23:50:12 +00:00
Ed Sanders 18b0b91f50 Converter tests: Use template literals to make HTML more legible
Depends-On: Iee8184dd6524b6dc12d19ac79761f6bd15990297
Change-Id: Ie5fd3f180dd2f7882ec10477117f4b0cdee374ad
2023-05-31 17:28:30 +01:00
jenkins-bot 04fd532292 Merge "Add a test for "extends" round-tripping" 2023-05-31 08:33:23 +00:00
Adam Wight 00eede66f0 Add a test for "extends" round-tripping
Bug: T247922
Change-Id: Iaf8417814aa264fbeca0ad139c1a5f073ea10e8b
2023-05-31 08:15:17 +00:00
Translation updater bot 4dffe6d8e3 Localisation updates from https://translatewiki.net.
Change-Id: I268098cba51f1cfbb580e9e5ff970ef06c9e69a6
2023-05-31 08:19:55 +02:00
jenkins-bot fc1e14cae7 Merge "Adding extendsRef to reference model" 2023-05-30 10:20:55 +00:00
Svantje Lilienthal 227b50d964 Adding extendsRef to reference model
* reads the new attribute extends from wikitext
* saves it into the reference model
* adds a message to the VE popup of an extension as a first demo
* tests will be added in a separate patch

Bug: T247922
Change-Id: If4d309c4678022642f39e21565950dc45e557d47
2023-05-30 11:56:47 +02:00
Translation updater bot 4070b9b54f Localisation updates from https://translatewiki.net.
Change-Id: If4234742ebf1ffd76c97ac3a51d4b5ff184af66c
2023-05-29 09:58:47 +02:00
jenkins-bot 1d4997560f Merge "Register a HelpCompletionAction group alias for cite" 2023-05-24 17:51:48 +00:00
Ed Sanders dca26d905d Disable mw-body-content clearfix in reflist
Bug: T337415
Change-Id: Ic94414a4b0e483b6f8945525d07ae7cbcb42045c
2023-05-24 17:22:28 +01:00
David Lynch 03bac936be Register a HelpCompletionAction group alias for cite
Bug: T66905
Depends-On: I7bc614c81ae3fc1e16d8fffd9f733186bdc9c472
Change-Id: I4a0242386bb595e04a9d72a8efcff9e8949260d4
2023-05-24 15:42:36 +00:00
jenkins-bot dc243e48aa Merge "Streamline/minimize duplicate code in reference node classes" 2023-05-23 14:09:22 +00:00
thiemowmde edcb4ddd0b Streamline/minimize duplicate code in reference node classes
E.g. reducing indention and utilizing convenient jQuery features.

Change-Id: I08fe9d4a09630042b28fc5e35cab4460be44a0d9
2023-05-23 10:54:56 +00:00
Ed Sanders d107f3d5a8 Fix ref list click-to-edit on mobile
On mobile, the first action is always 'mobileActions', so
ignore it.

Bug: T54750
Change-Id: I06e3f6225bf7a185680d89dee5b204a19a7a4fd7
2023-05-22 18:22:05 +01:00
Translation updater bot b8af25b157 Localisation updates from https://translatewiki.net.
Change-Id: I46e1d6e57aafc5081a838bbc4bc10261e922f2c7
2023-05-22 08:45:03 +02:00
jenkins-bot c9abd842a5 Merge "Add missing space to reference list rendering" 2023-05-20 10:29:49 +00:00
Ed Sanders 744cbdb56b Launch reference editors from ve.ce.MWReferencesListNode
Bug: T54750
Depends-On: I502358a3229fbda44950f7f7513548d49d25e0c9
Change-Id: Idea26ffbc5ee859f6ad9456029af4180226c1a07
2023-05-17 16:05:02 +00:00
jenkins-bot 2ab7c55748 Merge "Render reference list on first load in idle callback" 2023-05-17 14:01:02 +00:00
Ed Sanders 8587e445a1 Render reference list on first load in idle callback
This means the reference list is always in sync with the model's
understanding of which references are available to edit.

An exception is left in if there are no references in the model
at all, as will be the case on he.wiki, as all references are
template generated. In this case we continue to use the Parsoid
DOM, so that there is a static rendering of the reference list.

Bug: T336865
Change-Id: Iaf1089c9de532e7749c9cb70a9e697917955dca8
2023-05-17 13:34:15 +00:00
thiemowmde e4e1a38e1e Add missing space to reference list rendering
Minimal test case:
 <ref name=a>a</ref>
 <ref name=a/>
 <references/>

This renders as "1. ↑ 1.0 1.1 a" in both the legacy parser as well
as Parsoid. The moment you start editing this in VisualEditor the
space before "a" disappears. This patch fixes this inconsistency.

Change-Id: Idfea1a445fc98a0433640b4f706fafcc4e236c18
2023-05-16 15:43:16 +00:00
Translation updater bot 46a2205f5f Localisation updates from https://translatewiki.net.
Change-Id: Id06f53e8ab8d0b70388cf155419f84e493bdcf9d
2023-05-16 08:18:33 +02:00
jenkins-bot fd8db433a6 Merge "Fix empty previews in reference reuse dialog" 2023-05-11 09:43:54 +00:00
Translation updater bot 79c3edaa3e Localisation updates from https://translatewiki.net.
Change-Id: If653baf2bc9e95fddc85f7e9e1dc693e32a10831
2023-05-11 09:13:41 +02:00
thiemowmde 889c2ea011 Fix empty previews in reference reuse dialog
This fixes a minor inconsistency: A reference that comes from a
template and is already reused outside of the template is only
partially available to VE, and previewed with a warning message
because of this:

"This reference is defined in a template or other generated block,
and for now can only be previewed in source mode."

This was missing in the reuse dialog.

Note this patch is not meant to make any design decision, but to use
the existing design consistently.

You can test this with and without the Citoid extension. It works in
both cases.

Bug: T336372
Change-Id: I962cf111b1882bcd736f1090ca17d2b176495d2f
2023-05-10 13:03:24 +00:00
jenkins-bot d886cbd70f Merge "Migrate CiteVisualEditorModule to a virtual file callback" 2023-05-10 04:57:57 +00:00
Translation updater bot d6fbd0cc11 Localisation updates from https://translatewiki.net.
Change-Id: Ic98e2df23aabe41eb558fc8028334309661d2367
2023-05-05 10:38:10 +02:00
Tim Starling 5315297f38 Migrate CiteVisualEditorModule to a virtual file callback
Depends-On: I97d61b5793159cea365740e0563f7b733e0f16de
Bug: T47514
Change-Id: Iabfbb6751707813b7ec68f49b35441ab5dbb5622
2023-05-05 16:25:14 +10:00
Translation updater bot b81e7bd0c5 Localisation updates from https://translatewiki.net.
Change-Id: I01c920c74716fc99c2d36de87239a65a15173df9
2023-05-01 09:57:21 +02:00
thiemowmde 2a8fdf3d81 Hide wrong "this reference is used 0 times" in citation dialog
This fixes a minor regression introduced in Ib003b8a. The problem is
that undefined is not equal to anything in JavaScript, and not smaller
than 2 either.

Bug: T241885
Bug: T335410
Change-Id: Ia6deb291d923b88a08ceac8fbc0efb682e14f358
2023-04-26 16:42:08 +02:00
Translation updater bot ad830cce16 Localisation updates from https://translatewiki.net.
Change-Id: Ibc776022544a8f73e77735dc1256135598fb676c
2023-04-25 08:47:26 +02:00
Translation updater bot 3c902a8f34 Localisation updates from https://translatewiki.net.
Change-Id: Ifb96b94e80763ea5e5e7d9f3582ca835f5a17823
2023-04-24 09:15:43 +02:00
jenkins-bot 23d7c3d3bf Merge "Fix wrong "this reference is used twice" in VisualEditor" 2023-04-17 06:40:44 +00:00
Ed Sanders ec88bde672 Drop IE CSS hacks
IE is no longer supported

Change-Id: I27901e87301a4ce0993f789913c83d151f264562
2023-04-12 16:33:23 +01:00
thiemowmde ce63522726 Fix wrong "this reference is used twice" in VisualEditor
This patch also updates a second place that does almost the same.

That other place also excludes placeholders. We intentionally don't
do this in this new place.

Bug: T241885
Change-Id: Ib003b8a7bbe247db6f7da0a4efcfd4e5967fd033
2023-04-12 15:19:11 +02:00
thiemowmde 4ac067c0fa Fix broken selector in MWReferenceNode.less
This issue was introduced in I7a8ec9f. I tried to understand what this
does but can't see an effect. The behavior and appearence seems to be
identical with and without this code. In case it turns out this is dead
code (e.g. not needed any more with our current browser requirements)
it should be removed. Otherwise the selector fixed.

Change-Id: I0bfae951aa4543c528dd7e04c00a0e978f1ce49e
2023-04-11 20:39:51 +02:00
Translation updater bot 545491a21f Localisation updates from https://translatewiki.net.
Change-Id: Iefcf05de017e0fa4d10b81414051e1aae8efc22d
2023-04-10 09:20:22 +02:00
Translation updater bot faa8173d40 Localisation updates from https://translatewiki.net.
Change-Id: Ie541a2a6701a64d712245e959a2acfdb142e618e
2023-04-03 09:17:11 +02:00
Ed Sanders 9b9eccc21b ve-cite: Simplify LESS files with nesting
Change-Id: I7a8ec9fceb3563a4561afd95e18a5667a363a1ab
2023-03-28 11:06:14 +00:00
Ed Sanders ca9ef93409 ve-cite: Convert .css files to .less
Change-Id: If831c23721cc2c3ec3cc17d4cd9c9533a0aa4cb4
2023-03-27 15:01:45 +01:00
Translation updater bot dc1d15cb64 Localisation updates from https://translatewiki.net.
Change-Id: I9f17e5ed55e38d8774997449b20364f6d479ec52
2023-03-15 08:49:26 +01:00
Subramanya Sastry 8d93818fc8 Use double-colon for pseudo-elements
* Linting rule has been fixed to accept these now.

Change-Id: I51d866ec18c9e1d675f43b3c60f3ad874bba041e
2023-03-14 16:49:10 -04:00
Subramanya Sastry fc0a239887 Document Parsoid's differing HTML for follows
* Add a file-level comment in the cite tests file.
* Document the CSS rule that hides the Parsoid HTML.

Change-Id: I27dc6d5f6ab09b67e28ce88a2e13bf2d1a13e9c0
2023-03-13 14:38:30 -05:00
jenkins-bot 6b286ab789 Merge "Update output of diff test" 2023-03-10 16:45:56 +00:00
Translation updater bot b398619d3c Localisation updates from https://translatewiki.net.
Change-Id: Ie2803c8e16f7bd3fc468ce0849045486f399e333
2023-03-09 09:04:13 +01:00
jenkins-bot 664607022e Merge "Add small gap between reference body and re-use warning" 2023-03-08 16:27:53 +00:00
jenkins-bot ba3130a9f7 Merge "ve-cite: Show $originalRefList even if there are no refs in the model" 2023-03-08 16:18:11 +00:00
Ed Sanders bae4a409a5 Update output of diff test
For I93a88abc8e9ecf38992b396c151215781057a6f4.

Change-Id: Ia743b0c37bbd33b95dd4824018ae59fbb6e45c3e
2023-03-08 15:52:02 +00:00
Translation updater bot 245ac89794 Localisation updates from https://translatewiki.net.
Change-Id: Ic43c1fcefcb5910b79df4bbded97deb3a2e5158b
2023-02-28 08:28:33 +01:00
Translation updater bot 02603baca4 Localisation updates from https://translatewiki.net.
Change-Id: I0b5e779399c9dec3bdca537407e747b4f4cf9790
2023-02-27 08:27:14 +01:00
Translation updater bot 33d72f78f0 Localisation updates from https://translatewiki.net.
Change-Id: I02eb5002c1b152b1f1bf9918f96046783cd43160
2023-02-24 08:59:25 +01:00
thiemowmde fd90304b23 Make auto-generated reference names like name=":0" visible in VE
This is a prerequisite before any work related to T52568 (being able
to manually name references in VisualEditor) can start.

Why these names should not be hidden:
* We don't know if the name is actually part of the auto-generated
  sequence in the current article or copy-pasted from somewhere else.
* Manually given names that start with a colon are currently hidden
  even if they are unrelated to the auto-generated sequence.
* The information is highly relevant for users switching between VE
  and wikitext. Especially when a reference is used multiple times
  the relevant wikitext can be as short as <ref name=":0" />. The
  literally only information in this case is the number.

Since these numbers are still more technical than anything we make
them very dim to emphasize the contrast to non-numeric names.

Bug: T52568
Bug: T92432
Change-Id: I65cb6998cb5f8659cd9043f3d4aaeac1c5f69da8
2023-02-23 12:28:02 +01:00
jenkins-bot d1ed02e21d Merge "Fix icon of re-use reference tool" 2023-02-22 17:58:49 +00:00
Ed Sanders 59d900d951 ve-cite: Show $originalRefList even if there are no refs in the model
This original use case at T187495 is for he.wiki, where it is likely
that all the references are defined in templates, so the model
will always be empty, even though $originalRefList is populated.

Change-Id: Ia2785a20bf82ab97466276a57936bc9299e1cabe
2023-02-22 17:19:22 +00:00
Translation updater bot d190578c9c Localisation updates from https://translatewiki.net.
Change-Id: I3e7da01af17e7aa9dca3344cd89277fa67072549
2023-02-20 09:46:06 +01:00
Subramanya Sastry fa1cb6c6cd Parsoid CSS: Remove list-style-type styles added in e5a8b3ec
I copied these from the visualdiffing repo, but I may have
over-generalized these from some wiki that might have customized
this to all wikis. enwiki doesn't use this, for example.

In any case, this styling should be left to individual wikis.
similar to the argument in 8412fb64 where I removed CSS rules
for standard refgroups as overreach.

Change-Id: Ie37408d7a92af88e39e345eb464c6fa2210d57e3
2023-02-13 22:18:45 -06:00
Translation updater bot 88bbaba129 Localisation updates from https://translatewiki.net.
Change-Id: I7f37d8bb63a41c98f845e4c21e06a88223b3649c
2023-02-13 08:29:40 +01:00
Ed Sanders f292da4254 Fix icon of re-use reference tool
Also update documentation in qqq.json with newer icon names.

Change-Id: I3cefe65c78e9438a7d29fbcd436ffad043d500e2
2023-02-11 14:07:01 +00:00
Subramanya Sastry eee7a43d77 Parsoid CSS: Use more W3C-supported counter types
* This ensures that Safari can also render these counter styles
  since Safari doesn't support @counter-style CSS rules yet.

Change-Id: Ib104a6d22197037bae0c58766d3363176022add3
2023-02-08 13:20:47 -06:00
jenkins-bot 6427249c8b Merge "Parsoid CSS: mw-ref-linkback counter inits to -1, not 0" 2023-02-08 16:19:36 +00:00
jenkins-bot 951a5f4a34 Merge "Parsoid CSS: Remove default rendering for "standard" ref groups" 2023-02-08 16:18:30 +00:00
Translation updater bot 5cd7fa82a0 Localisation updates from https://translatewiki.net.
Change-Id: Idce3d50dfbd235dafede1c6238da70335415e21e
2023-02-08 08:39:25 +01:00
Subramanya Sastry b9400d1bf0 Parsoid CSS: mw-ref-linkback counter inits to -1, not 0
* This has always been a bug but was hidden because enwiki
  uses lower-alpha custom rendering and so we never noticed it
  when we tested this on enwiki.

* Fixing the default gets rid of the need to override this for
  every single language that defined a non-decimal counter.

* This also eliminates the need for some rules where the overrides
  were identical to the baseline definitions (counter-type is
  decimal and separator is '.').

Bug: T86782
Bug: T156350
Change-Id: I51f8a06c80bb897b66a0978b117fbc5560efd6cb
2023-02-07 20:59:23 -06:00
Subramanya Sastry 8412fb6406 Parsoid CSS: Remove default rendering for "standard" ref groups
* This was obviously a mistake for 'decimal' since the previous CSS
  would have rendered refs with the "decimal" group and refs without
  any group identically making it hard to distinguish between the
  two ref types.

* But, not all wikis define custom messages for these "standard"
  ref groups. So, by providing default rendering for these, we would
  need custom overrides for wikis that didn't define them (the vast
  majority). Instead, for wikis that define them, define wiki-specific
  CSS for these groups that can be added to their Common.css pages.

* Discovered as I set about trying to update CSS on wikis and my
  test wikitext with different groups were rendering decimal groups
  differently and I had no custom CSS for it anywhere.

Bug: T86782
Change-Id: I5598580e96eead94bb09574b2af5cef3ce4241c5
2023-02-07 20:45:29 -06:00
jenkins-bot b85fcb759c Merge "Mark config parameter as optional in context classes" 2023-02-02 17:08:53 +00:00
Translation updater bot 466f5331b1 Localisation updates from https://translatewiki.net.
Change-Id: Ie72e35230204399a3b2668dd2ef86ed5584595e4
2023-01-30 08:29:23 +01:00
Translation updater bot bfd01b97fe Localisation updates from https://translatewiki.net.
Change-Id: I744faafaa4a4824e1ae9ece7cef7e36a341452c9
2023-01-26 08:50:53 +01:00
Bartosz Dziewoński a845923a65 Specify document base URLs in more test cases
Depends-On: I0e301bef38d97fa2234aa901c787360d9fbde8a3
Change-Id: I07a8c097dba0f5572c0aedf4febdf1434063ea6f
2023-01-22 16:00:09 +01:00
jenkins-bot 0771532b25 Merge "Remove 'origTitle' in tests" 2023-01-09 18:50:12 +00:00
Translation updater bot 8c50157d78 Localisation updates from https://translatewiki.net.
Change-Id: I31fa4326793e8ea398af83fb2c6db03b5a5756cf
2023-01-09 09:25:43 +01:00
Subramanya Sastry d044c0c166 Parsoid CSS counters: Use child selectors instead of descendent selectors
In both cases:
(a) ref counter display for .mw-ref sups
(b) backlink labels in the references section for multiple named refs
the a-tags are direct children of the <sup>/<span> tag.

The child selectors are more precise. I am not really sure why we
went with descendant selectors in the first place.

Bug: T156350
Change-Id: If5be7cd14de40c2372f27ae5e2f32671c0a4e20c
2023-01-09 01:28:34 +00:00
Subramanya Sastry ea4c16c037 Ensure Parsoid's linkback ref CSS counters are properly incremented
* Turned out there were 2 counters defined on references li nodes.
* One was added as part of the extends functionality added by WMDE's
  book referenceing project.
* The other one was added as part of Parsoid's Cite CSS work.
* Since the counter increments were defined separately and applied
  to the same node, only one of the increments would apply.
  This breaks counter rendering on wikis where custom wiki-specific
  rules aren't defined in that wiki's Mediawiki:Common.css
* Discovered after running visual diff tests after ad919e37
  was deployed.

Change-Id: I826faac3564d63b8a4fbd80015fd5cc8f0069b7a
2023-01-07 19:36:55 -06:00
eranroz fef36c2da9 Remove lower-alpha hack
Lower-alpha is enwiki/community specific preference and as such should
be defined in Common.css of that wiki.

Bug: T326467

Change-Id: I1c254031185b130de90fad2410a21533e8c3ba96
Signed-off-by: eranroz <eranroz89@gmail.com>
2023-01-07 12:37:09 +02:00
Translation updater bot c42c4b88f1 Localisation updates from https://translatewiki.net.
Change-Id: I8d9b60ed936428cc9d79cb0ed5526f1f468ecd36
2022-12-29 10:01:01 +01:00
Bartosz Dziewoński c0746c7fa8 Remove 'origTitle' in tests
Depends-On: I0ad0a655380eb2fb29b5ac01e2e399ac550ce34a
Bug: T325766
Change-Id: Ib5c33aceb9430aba49c692552b54427e64a787f3
2022-12-22 17:57:41 +00:00
Bartosz Dziewoński b89db98b7a Use more realistic fake data in test cases
Change-Id: Ie5a30fe254bd69db4f8fe363baeb926282897d00
2022-12-22 10:47:15 +00:00
Translation updater bot ccaaec68f0 Localisation updates from https://translatewiki.net.
Change-Id: I8bf6a0f67c44f1e66580fcbd93b58f560b955cad
2022-12-21 09:14:24 +01:00
Translation updater bot 8013badd20 Localisation updates from https://translatewiki.net.
Change-Id: I3e4071ba144218f06ffc988ba0e66cdbf310626b
2022-12-19 09:03:36 +01:00
Translation updater bot 560e8a74e9 Localisation updates from https://translatewiki.net.
Change-Id: I3f9e9943956ed972003fc1c55296dba72a6341fa
2022-12-15 11:35:20 +01:00
Translation updater bot 5ac0d123f6 Localisation updates from https://translatewiki.net.
Change-Id: I2fd3796f7762743252982796ff9b861d181910b7
2022-12-13 08:16:41 +01:00
jenkins-bot 04427c2886 Merge "Parsoid CSS: Add (script-generated) language-specific counters" 2022-12-12 16:34:04 +00:00
jenkins-bot 6b6804e695 Merge "Parsoid CSS: Don't make enwiki's default the default for all languages" 2022-12-12 16:34:02 +00:00
Translation updater bot e94f6060fe Localisation updates from https://translatewiki.net.
Change-Id: I4d0c5f3f49d15ae98c64a037b7238dd28c1bc0d3
2022-12-01 08:15:07 +01:00
Translation updater bot eaf1c8d8c0 Localisation updates from https://translatewiki.net.
Change-Id: I83ad0d014dc01687256e1cd0c3ce3f6327dd9862
2022-11-21 08:15:32 +01:00
Subramanya Sastry ad919e3730 Parsoid CSS: Add (script-generated) language-specific counters
* These files were generated with the script in
  I3623e42d4cad7975813892a8f0f7765b74a638c5

* These styles mimic the behavior of Language::formatNumNoSeparators
  and Language::localizeSeparators used by a couple of methods.

  ReferencesFormatter:referencesFormatEntryNumericBacklinkLabel
  calls ReferenceMessageLocalizer::localizeDigits which calls
  that core Language method.

  FootnoteMarkFormatter::linkRef calls localizeDigits as well.

  - '.reference a*' CSS rules mimic linkRef localization
  - 'span[rel="mw:referencedBy" ]*' rule mimics localization
     of referencesFormatEntryNumericBacklinkLabel

* Overrode all hand-crafted language CSS files from previous
  patches. The content of some of those hand-crafted CSS files
  will end up in those wikipedia's Common.css -- specifically
  for es, fr, sv wikipedias.

  sv and es have non-canonical formatting strings that aren't
  handled by the script right now and so leaving them behind.

  I need to look at fr output more carefully, so leaving that
  behind as well. But the generated ones are more accurate when
  combined with the wiki-specific CSS files genreated by the other
  script that processes site messages.

* Some files could potentially be removed by looking at
  language fallback chains, but the redundancy is not a
  problem for now.

* Tweak the resource loader script to use "_" instead of "-"
  when looking for a resource file.

Bug: T156350
Change-Id: I000b4538bf2be681b85df5813efed083458a4281
2022-11-18 11:50:20 -06:00
Subramanya Sastry 8cfad38705 Parsoid CSS: Don't make enwiki's default the default for all languages
* The default formatting for linkbacks for multiple named refs is
  determined by the "cite_references_link_many_format" message.
  It is only defined in en.json as "<sup>[[$1|$2]]</sup>". $2 is
  the output of referencesFormatEntryNumericBacklinkLabel.

  So, change the default Parsoid CSS rule to match that.

* But, since we have shipped Parsoid CSS all this while with the enwiki
  default, temporarily add "ext.cite.style.en.json" with that enwiki
  default so that on deploy, enwiki citations in VE continue to display
  as before.

Change-Id: I6f4b0e25189284ad0950977752739e7dc2951fec
2022-11-18 11:43:50 -06:00
Bartosz Dziewoński 731b162d4e Undo use of .reference instead of .mw-ref in CSS counter rules
When these styles are loaded on a normal MediaWiki page containing
output from the old parser, they cause references to be duplicated.
Use .mw-ref for now, which is only present in Parsoid output.

This partially reverts d6705eb3f8.

Bug: T323343
Change-Id: I6f2d43a060bea7aa175bed80f1be2c3d8a4924b0
2022-11-18 15:56:53 +00:00
Bartosz Dziewoński 14bb8d8fa1 VE: Use <sup> instead of <span> in CE HTML
Parsoid now uses <sup> tags instead of <span>.
We already changed it in DM HTML a long time ago
(see ve.dm.MWReferenceNode.static.toDomElements).

Bug: T323343
Change-Id: If04a8bd36e0bb0c31e5f60ae54cb54f13fa65720
2022-11-18 13:11:23 +01:00
Translation updater bot 24c3102fa6 Localisation updates from https://translatewiki.net.
Change-Id: I9f58b7d79190b7801d01f30b6207fc266b5285b5
2022-11-18 09:17:44 +01:00
Translation updater bot 83158b3505 Localisation updates from https://translatewiki.net.
Change-Id: I7e93ffd351034791727ac0f86160722235c5e9d5
2022-11-17 08:26:39 +01:00
Translation updater bot 5e5949a539 Localisation updates from https://translatewiki.net.
Change-Id: Ia319e88d1c5cee3c7d7334ebe9fa97a836682e9e
2022-11-07 08:33:35 +01:00
Subramanya Sastry 47a622c001 Parsoid CSS: Fix counters needed for ol.mw-references
* Some wikis need a X.Y style numbering where X is the
  counter for the reference number in the list (mw-references),
  and Y is the named-ref counter (mw-ref-linkback).

* Rather than have the mw-references counter be defined for
  specific languages, it is useful to have defined for all
  wikis and use it where needed.

* Not sure why the ol.mw-references reset the mw-ref-linkback
  counter. It needed to be reset for every item.

* While at it, made a couple CSS rules in kn and fa be more
  specific so it is clearly what they are used for.

Change-Id: I6dd35303f134cc4996e134867ecc2c0db7a5411f
2022-11-04 10:17:09 -05:00
Translation updater bot ae70af75ad Localisation updates from https://translatewiki.net.
Change-Id: I1eef1bba32cb6ff3b5c5653e6a816b9ebb7f91aa
2022-11-04 09:02:03 +01:00
Subramanya Sastry 08263ecad5 Tweak CSS defaults to handle Cite_references_link_many_sep properly
* The default separator (' ') should be set up as an :after selector
  and individiual wikis that define the _many_sep and/or _many_and
  messages can override this appropriately.

* Update frwiki overrides accordingly. It has an additional <sup>
  in the Cite_references_link_many message. frwiki also defines the
  Cite_references_link_many_and message.

Change-Id: Ia9ce6ac8eaa5b8386d4a586c620959465da73ef1
2022-11-02 18:48:17 -05:00
Subramanya Sastry b588a548bf Parsoid CSS: Add language specific overrides for es, hu, it, sv
* These styles are biased towards Wikipedia.

Bug: T156350
Change-Id: I417c9182fad7dcab85bdca48d4043cd65cd06ca1
2022-11-01 15:45:32 -05:00
Subramanya Sastry d6705eb3f8 Parsoid CSS: Migrate to using .reference instead of .mw-ref
* As part of T265930, in order to reduce the CSS rules that needed
  to be added, we started using the .reference class that the
  original Cite implementation uses.

* Let us migrate styles to using that original class as well.

* Since Parsoid emits a <sup>, we no longer need some of the
  CSS rules on .reference. With the class name change, the
  other rules are duplicates since we inherit the rules from
  ext.cite.styles.css. This effectively eliminated all CSS
  rules for ".reference" from ext.cite.style.css

* Admins on wikis will get the following guidance:
  - where similar styles apply to legacy output and Parsoid output,
    use the .reference class in Commons.css
  - where specific styles apply to Parsoid output but not legacy,
    use the .mw-ref class in Commons.css

* Once we have fully migrated all wikis to Parsoid output, we can
  migrate all the ".mw-ref" rules to ".reference". We then stop
  emitting the ".mw-ref" class in Parsoid output.

Change-Id: I5a8c540dc5b045ffff8c280262595f5281cd167d
2022-11-01 15:43:16 -05:00
Translation updater bot 30a3cb2737 Localisation updates from https://translatewiki.net.
Change-Id: Id717073d71df9469c6a32127ebf1fe2670fbdb2e
2022-11-01 08:51:34 +01:00
Translation updater bot be3432202f Localisation updates from https://translatewiki.net.
Change-Id: Ide0a0d079b900fb3714ce683c9d42a3d5046fdf6
2022-10-31 09:45:26 +01:00
jenkins-bot 46366167e5 Merge "Restore styling for cite warnings" 2022-10-24 20:52:50 +00:00
mainframe98 b6e5601eb1 Restore styling for cite warnings
This broke as a result of T280766.

Bug: T321450
Change-Id: I4673b769612b280dde1943d79aa16dcd7d6a8052
2022-10-24 18:14:19 +00:00
Translation updater bot 16c6aeb54d Localisation updates from https://translatewiki.net.
Change-Id: If27620aea637c88c337e19580fee03f7be445bfe
2022-10-24 08:22:19 +02:00
jenkins-bot ba468aaf14 Merge "Add language specific CSS overrides for a few languages" 2022-10-22 03:27:48 +00:00
jenkins-bot 0668beac76 Merge "Parsoid CSS: Update default styles to reduce needed overrides" 2022-10-22 03:27:46 +00:00
Subramanya Sastry 3736e6fa15 Add language specific CSS overrides for a few languages
* This patch adds styles for fr, kn, nb as an experiment.
  Newer patches will add for other languages.

* These styles are based on wikipedia rendering and other
  projects in these languages may need to add overrides in
  their Mediawiki:Common.css page.

Bug: T156350
Change-Id: If0d78e0fd4174c0563cb4b98d8c5efe9a1428673
2022-10-20 22:03:48 -05:00
Subramanya Sastry e5a8b3ec5f Parsoid CSS: Update default styles to reduce needed overrides
* Most wikis seem to either use lower-alpha or seem to use
  use language-specific custom numbers. decimal usage is lower
  and is better used as CSS override on those wikis.

Change-Id: I3e4c3e7b96ab5a9704fe700f62154e51930c975a
2022-10-20 21:33:05 -05:00
Translation updater bot f8cd1311c0 Localisation updates from https://translatewiki.net.
Change-Id: I6c8fd5fe85ef2d9f01cc3d37b0e0b4eba562cf9b
2022-10-20 08:31:02 +02:00
Translation updater bot 6c24ea3560 Localisation updates from https://translatewiki.net.
Change-Id: I7d915d246519b1edc1466fc7dc42aea9a993558b
2022-10-17 08:20:40 +02:00
Translation updater bot 9859d07429 Localisation updates from https://translatewiki.net.
Change-Id: Iefc40e68e83f48c9379cc53d0788f4d9508b3463
2022-10-14 08:41:21 +02:00
Translation updater bot ef4dd425bc Localisation updates from https://translatewiki.net.
Change-Id: I4cbb7e9ea4adb1b90380de89e2edce2c42e75e95
2022-10-13 08:08:16 +02:00
Translation updater bot 405ec15ab3 Localisation updates from https://translatewiki.net.
Change-Id: Ib3d9ffca8214dca525e38362e7aee9310a86cb8b
2022-09-27 08:31:52 +02:00
Translation updater bot 69fd353fe2 Localisation updates from https://translatewiki.net.
Change-Id: I59135ec6581d8a4972540f0077608c355cb9fca5
2022-09-26 08:14:48 +02:00
Translation updater bot e58a6f070a Localisation updates from https://translatewiki.net.
Change-Id: Ie9fd4625eca952cb50cea2f4c1bde5436e27ffa7
2022-09-23 08:28:42 +02:00
Translation updater bot 287b38927c Localisation updates from https://translatewiki.net.
Change-Id: I05c29c9567cc184668c9ec7dd21902ae0b936b4c
2022-09-19 08:24:09 +02:00
Translation updater bot 8230c0f8ba Localisation updates from https://translatewiki.net.
Change-Id: I06b418357090b496c677d9068cd3e5f6b73ce32d
2022-09-14 10:31:21 +02:00
Translation updater bot 851bb6c712 Localisation updates from https://translatewiki.net.
Change-Id: I7ceceedea1f25c44a26074592fbbe5cf050ab938
2022-09-13 09:25:44 +02:00
Translation updater bot 95dac62e63 Localisation updates from https://translatewiki.net.
Change-Id: Ic02c6028c58845eb8e1a7333d95433ee94f8e868
2022-09-09 10:09:43 +02:00
Translation updater bot 3ba21b2e1d Localisation updates from https://translatewiki.net.
Change-Id: If8fedc03b3367596765c4dcbb0ca1749f116b823
2022-09-07 09:54:25 +02:00
Translation updater bot e843751ef6 Localisation updates from https://translatewiki.net.
Change-Id: I26d6b5159da04a4e3e2933ffbf5c20047dd0ad0d
2022-09-05 10:10:08 +02:00
Translation updater bot dd6bd89224 Localisation updates from https://translatewiki.net.
Change-Id: Ia452e01700dd013b146ceb4a7dc7f92ec577ac9d
2022-08-31 09:34:52 +02:00
Translation updater bot 0d70d5a04c Localisation updates from https://translatewiki.net.
Change-Id: Id25442ec77be05f63133c29b9a22f980e6a076ed
2022-08-29 09:13:32 +02:00
Translation updater bot 71f3c02bfb Localisation updates from https://translatewiki.net.
Change-Id: Iadaad991539c753fbed211b60abda4a59ff2626f
2022-08-26 08:22:27 +02:00
Translation updater bot ac82007f55 Localisation updates from https://translatewiki.net.
Change-Id: Ia83a23cb09a9775880ed610ec7540a9e25e05df3
2022-08-25 08:25:45 +02:00
Isabelle Hurbain-Palatin b21aca1d06 Allow multivalued rel attributes
This patch is probably not necessary per se, because Cite creates and
controls the mw:referencedBy rel attributes, but it popped up in my code
search, it is technically more correct and it doesn't hurt.

Bug: T315209
Change-Id: Ie796c8a69988c6a546a15d998028c0e6f4c5b2e9
2022-08-22 15:02:40 +02:00