Commit graph

3940 commits

Author SHA1 Message Date
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
Translation updater bot 768d492b61 Localisation updates from https://translatewiki.net.
Change-Id: I351a29e995c922ac2764d6449f66b06139da9e8f
2023-02-03 08:47:23 +01: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 5258191f6e Localisation updates from https://translatewiki.net.
Change-Id: Ibea8dc3f8f0df6dbdcede368349c876f36d0eacb
2023-01-27 08:35:49 +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
Translation updater bot 30d02d99ac Localisation updates from https://translatewiki.net.
Change-Id: Ie79348824713b6e7b14f50f270f7e09143f36375
2023-01-17 08:07:02 +01:00
Peter Wangai ec5f77e840 selenium: Remove webdriverio npm package from the Cite extension
The `webdriverio` package does not need to be an explicit dependency.
It is a dependency of `@wdio/cli`.

Bug: T325059
Change-Id: I16501b07145641d15671e43561e258df2d5a3457
2023-01-11 15:15:29 +03:00
Translation updater bot ff32593b73 Localisation updates from https://translatewiki.net.
Change-Id: I533d5633e9f60f8d13289903bb8a5b2bf4c280c5
2023-01-11 09:01:23 +01:00
Translation updater bot 68ffe543d5 Localisation updates from https://translatewiki.net.
Change-Id: Icf539e9cd3be8578a443240359d10cbf0885efe9
2023-01-10 08:24:16 +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 bfa8df9e2c Localisation updates from https://translatewiki.net.
Change-Id: I24273ca182f249fd39ac956b09b7bad068066894
2023-01-03 08:20:16 +01:00
Bartek Łukawski 780f9e1439 Highlight markup inside <references> in CodeMirror
See also: 9fd55c5f38
Bug: T294546
Change-Id: I55747e89242f0b53ec1f41c86c3523ad545e8470
2023-01-02 19:21:06 +00:00
Translation updater bot c42c4b88f1 Localisation updates from https://translatewiki.net.
Change-Id: I8d9b60ed936428cc9d79cb0ed5526f1f468ecd36
2022-12-29 10:01:01 +01:00
Translation updater bot b5b311cfee Localisation updates from https://translatewiki.net.
Change-Id: I6ff34e3836537f5f4fe3710bc0f8169629f857e7
2022-12-26 09:09:19 +01:00
Translation updater bot d9b2934262 Localisation updates from https://translatewiki.net.
Change-Id: I5c01f5c81480703ee8f962321685badacb59fd12
2022-12-23 09:05:52 +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
jenkins-bot 7019e585a3 Merge "Add 'ext.cite.ux-enhancements to mobile pages" 2022-12-15 13:59:35 +00: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 c731b812b2 Localisation updates from https://translatewiki.net.
Change-Id: I2ee933b62bc08cb0148f039664b2a8a63bb3f151
2022-12-09 08:45:32 +01:00
Jon Robson 27baae7766 Add 'ext.cite.ux-enhancements to mobile pages
This code is being silently removed from mobile pages.
This code is never utilized on mobile because a reference
drawer shows on references click so no back link is necessary,
however given the size of the code, it doesn't seem like a good
idea to split the parser for this, so we should just add it.

In future perhaps the reference drawer feature in Minerva could be
moved to this module.

Bug: T324723
Change-Id: Ib49dcd647df765524887b4f3cc4bd0ccdb5b5ff0
2022-12-08 10:03:32 -08: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 85989ffd29 Localisation updates from https://translatewiki.net.
Change-Id: I7aac85fe495483f8c75e3ed0491c56b2bec72063
2022-11-29 08:58:16 +01:00
Translation updater bot fbd7e4fddf Localisation updates from https://translatewiki.net.
Change-Id: I087a083a61f37729a14b8c00f5c3a0d19a5d44b9
2022-11-28 08:49:14 +01:00
Translation updater bot 2e5d500299 Localisation updates from https://translatewiki.net.
Change-Id: Iab28243444f08eb2b1a318429bce6d2e2dd3d1f2
2022-11-22 08:33:18 +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
libraryupgrader 9db10f4d83 build: Updating grunt-stylelint to 0.18.0
Change-Id: Id0d84e5ce4d647555acd44b29eded948fddf5ce1
2022-11-13 02:20:15 +00:00
Translation updater bot 2d1c7f8d01 Localisation updates from https://translatewiki.net.
Change-Id: I5f3f9d3d9920f193776e56f050c92cc7e2efd28f
2022-11-10 08:11:46 +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
Translation updater bot 0fde755d8c Localisation updates from https://translatewiki.net.
Change-Id: Ib6ec43181c4c9ea2c6df4f2cf2bb4601342a0430
2022-11-02 08:37:47 +01:00