Commit graph

314 commits

Author SHA1 Message Date
jenkins-bot 56f63a0bba Merge "CodeMirrorWikiEditor: use new icon and add text to toggle button" 2024-08-27 04:10:54 +00:00
Translation updater bot 7660ca42fb
Localisation updates from https://translatewiki.net.
Change-Id: Ife2adcbae823e4e83151ffa25ea630e49c7f096b
2024-08-26 09:21:53 +02:00
Translation updater bot a921171236
Localisation updates from https://translatewiki.net.
Change-Id: Ic80bf56c8809a2cd13beaf405c251fc5eacff4dc
2024-08-20 09:42:01 +02:00
Translation updater bot 84c9051241
Localisation updates from https://translatewiki.net.
Change-Id: Iad21458855117c703abd5a10edaebbad69e568cf
2024-08-19 09:22:41 +02:00
Translation updater bot 76daceca00
Localisation updates from https://translatewiki.net.
Change-Id: I4afa253d54f04fc2cc1ac078aa3153adb3696b39
2024-08-14 09:22:15 +02:00
Translation updater bot 601809c398
Localisation updates from https://translatewiki.net.
Change-Id: Ie18f6ee98278aa546985c465449c29286bf68932
2024-08-13 09:50:22 +02:00
MusikAnimal 27b6aaebcc CodeMirrorWikiEditor: use new icon and add text to toggle button
For years, users have complained that the CodeMirror toggle button is
confusing and concealed. The icon looked too similar to the edit icon,
when it was supposed to be a highlighter. The new icon is similar but
has a highlighted line to help clarify what it is. We also now have the
text 'Syntax' accompanying the icon. Translators are instructed to try
to be brief to conserve space in the toolbar. "Syntax highlighting" is
the full correct term, and remains the text for the button's tooltip.

The new icon is ~0.3KB uncompressed, just meeting performance guidelines
for using @embed <https://w.wiki/AsPW>. This is also only temporary until the icon is upstreamed in Codex/OOUI.

New icon courtesy of Thiemo Kreuz (WMDE)

A corresponding change for the 2017 editor will follow I15453b33e7.

Bug: T174145
Change-Id: Ib6dbfc261214ed6672c1a54738e3401fa2f5d262
2024-08-09 06:08:33 +00:00
Translation updater bot f7d64fd0ee
Localisation updates from https://translatewiki.net.
Change-Id: I9c6f2b49bf726d8c51e0e90de14c6d9a78a92b9d
2024-08-06 09:46:18 +02:00
Translation updater bot e4581a0709
Localisation updates from https://translatewiki.net.
Change-Id: Ieebb12aee6a8be9a67c81d3af95b0bd4e81227e3
2024-07-29 09:26:16 +02:00
Translation updater bot 999382fd16
Localisation updates from https://translatewiki.net.
Change-Id: Iecc5ff3b0f6c6fad86812e1557bcf4249f308085
2024-07-18 09:22:26 +02:00
Translation updater bot e229edaf75
Localisation updates from https://translatewiki.net.
Change-Id: I1ec995a128047fc153a26b08463aab1b37e2f394
2024-07-16 09:39:20 +02:00
Translation updater bot 3c741fd43c Localisation updates from https://translatewiki.net.
Change-Id: Ie9f17ba7a7f7417fb7cd5ee42aeadd777721554e
2024-06-10 09:54:59 +02:00
Translation updater bot a21aa79e2d Localisation updates from https://translatewiki.net.
Change-Id: Ibcc25f7b10ec183fd83c14f459a9f0e62006bcd7
2024-05-20 09:24:50 +02:00
Translation updater bot 2e3aac9a1e Localisation updates from https://translatewiki.net.
Change-Id: I91c6d789d652e152d42ba5567e54b71107b4453c
2024-05-13 09:26:46 +02:00
Translation updater bot 4fa142e4dd Localisation updates from https://translatewiki.net.
Change-Id: I35c6955ba5ce0117e383b2d1b136922e49e34f86
2024-05-06 09:25:18 +02:00
Translation updater bot 566e17ac8a Localisation updates from https://translatewiki.net.
Change-Id: Ib24099130aa32f4017ca59dd79c7ab484b882130
2024-05-02 09:19:15 +02:00
Translation updater bot ee5b0ee87e Localisation updates from https://translatewiki.net.
Change-Id: I3d4b3a559c8ba593036a34cad86a958d54b8fb3f
2024-04-29 09:22:59 +02:00
Translation updater bot eee5093270 Localisation updates from https://translatewiki.net.
Change-Id: Ibc5f11ccd67a5bcd5afdcaa45978055cf47d7665
2024-04-26 09:47:51 +02:00
Translation updater bot ca6eb17ffe Localisation updates from https://translatewiki.net.
Change-Id: Ibf686ea7289ef5882b17cb5c63e982117364b2ed
2024-04-24 09:18:31 +02:00
Translation updater bot f466cbebd4 Localisation updates from https://translatewiki.net.
Change-Id: Ib2d60417bfa879138eb97f149d8436fbd1e6266a
2024-04-22 09:27:54 +02:00
Translation updater bot 0173293326 Localisation updates from https://translatewiki.net.
Change-Id: I4bf5892bd44a3217c75565e775e46b75c27c58f5
2024-04-18 09:20:11 +02:00
Translation updater bot 7f57f704b3 Localisation updates from https://translatewiki.net.
Change-Id: I29043a70e4a58c8412f4dbc8cd61ff4505ef8a86
2024-04-15 09:27:42 +02:00
Translation updater bot b9463a0271 Localisation updates from https://translatewiki.net.
Change-Id: I8dd26764e698ff6d39f29b26e106cabc2b8fbb72
2024-04-12 09:41:43 +02:00
MusikAnimal f3f46d8e05 CM6: Add syntax highlighting preference for users without WikiEditor
This adds the `ext.CodeMirror.v6.init` ResourceLoader module which
allows use of CodeMirror on `#wpTextbox1` without the use of WikiEditor
(the 'usebetatoolbar' preference). In order for users to opt-in to using
CodeMirror, we make the existing 'usecodemirror' option into a visible
preference. In addition, with two preferences related to CodeMirror, we
group them under a new heading 'Syntax highlighting'. More preferences
may be added later to this section following T359498.

When WikiEditor is not enabled, the layout of the action=edit page has
the textarea as a sibling to other visible content, like `.editOptions`.
Because of this, we can't simply append the CodeMirror DOM to the parent
like we were before, as that would put the visible editor beneath the
edit summary, Publish button, etc. Instead we rework the CodeMirror to
first add a wrapper around the textarea and use that as the parent. This
way, `.cm-editor` is always in the same place in the DOM as the native
textarea.

Line wrapping and focus/blur events are also moved to CodeMirror, as
these are needed when not using WikiEditor.

Bug: T190108
Change-Id: I4bc069e0d398aa7088e4f50bbd0ddda458b289c3
2024-04-09 22:05:20 -04:00
Translation updater bot 10c9a9ee6f Localisation updates from https://translatewiki.net.
Change-Id: Iacc861a52585392f96dc9aaa56a5b92b06d37df3
2024-04-05 09:37:45 +02:00
Translation updater bot 3c8f71eb13 Localisation updates from https://translatewiki.net.
Change-Id: I057abb784eb7ae660a0e4d8e00312be235e9ab11
2024-03-25 08:35:35 +01:00
Translation updater bot f1e81a55e2 Localisation updates from https://translatewiki.net.
Change-Id: I8caa4be9f54644bfa1c2a03d5701afde1d9fdc42
2024-03-22 08:43:51 +01:00
Translation updater bot d9ec236217 Localisation updates from https://translatewiki.net.
Change-Id: Idc883aa4cbc25c3b82026257e2ee25ac8ec11aa6
2024-03-18 08:30:34 +01:00
Translation updater bot 9b01891916 Localisation updates from https://translatewiki.net.
Change-Id: Ibe1f917f664fb1f6adfda1b689a110771867b55e
2024-03-12 08:24:09 +01:00
Translation updater bot e578597263 Localisation updates from https://translatewiki.net.
Change-Id: I3130f67228f31701a7fa1e193566647e9fe520ad
2024-03-11 08:26:33 +01:00
Translation updater bot 9696056dfe Localisation updates from https://translatewiki.net.
Change-Id: Iab371c59161a0f585d71cffe9232692152699098
2024-03-08 08:22:43 +01:00
jenkins-bot 985f2991e5 Merge "CodeMirror 6 template folding" 2024-03-08 02:38:43 +00:00
Translation updater bot dda2606d3a Localisation updates from https://translatewiki.net.
Change-Id: I17b34d8855bfe7930a6e0c9a8d9e6910c22c020c
2024-03-07 08:48:12 +01:00
bhsd 506d998767 CodeMirror 6 template folding
This patch adds an icon displayed above the cursor inside a template. By clicking it, the template parameters become hidden and replaced by three dots, while the template name remains visible. Clicking the dots will unfold the template. New key bindings include fold (Ctrl-Shift-[/Cmd-Alt-[), unfold (Ctrl-Shift-]/Cmd-Alt-]) and unfoldAll (Ctrl-Alt-]).

Bug: T30684
Change-Id: I631fe0ecf21d0a80306bd40d66d22478a1aefe58
2024-03-07 13:47:47 +08:00
Translation updater bot 6b3c480f02 Localisation updates from https://translatewiki.net.
Change-Id: Ib2ea3432f11878c67facd2d430478e5469632607
2024-03-04 08:23:06 +01:00
Translation updater bot 2f4917dfd7 Localisation updates from https://translatewiki.net.
Change-Id: I15076c6940e5def9f1663e7000ec65a538846f56
2024-03-01 08:32:46 +01:00
Translation updater bot 734f9a386b Localisation updates from https://translatewiki.net.
Change-Id: I64825d7fd6613a52ec05cca28c65cd8c9d8701df
2024-02-26 08:35:40 +01:00
Translation updater bot 2696e69570 Localisation updates from https://translatewiki.net.
Change-Id: I44dbf8cd5420e6eff38c6bcba24451e0c70e597c
2024-02-20 08:38:14 +01:00
Translation updater bot 74d7847358 Localisation updates from https://translatewiki.net.
Change-Id: If4ec7835d8ee076f665c0e112d1e6d257dfb281f
2024-02-19 08:39:50 +01:00
Translation updater bot 39783e901e Localisation updates from https://translatewiki.net.
Change-Id: Iefd780f09b6dac93a0b9bbba5f66ccddc4ebba1d
2024-02-15 13:27:47 +01:00
jenkins-bot de95ad10d9 Merge "CodeMirror: highlight special characters and non-breaking spaces" 2024-02-14 10:59:00 +00:00
jenkins-bot be693cde3c Merge "CodeMirror 6: localize search dialog" 2024-02-14 10:24:17 +00:00
MusikAnimal 75f5c9b2be CodeMirror: highlight special characters and non-breaking spaces
The highlightSpecialChars() should act mostly identical to CM5. An
example is the soft hyphen (U+00AD). These are highlighted as a red dot
because they are non-printable characters.

The i18n may seem like overkill, but CM6 would otherwise actually print
the same message in plain English and without a way to localize it.

Per request at T181677, we also highlight non-breaking space and the
narrow non-breaking space. These are shown as a faint gray dot, to match
CM6's highlightWhiteSpace() extension. That extension isn't used here
because it would also highlight normal spaces, which we don't want.

Bug: T181677
Change-Id: Iac1a8cf78e4cd0a27abc917f4b70bdfbaf86252a
2024-02-13 14:57:06 -05:00
MusikAnimal 5a07eb35db CodeMirror 6: localize search dialog
As of this patch, these should be the only messages used by us that live
in the CodeMirror library. More may be added later as new features
are added. We load all translations as a default CodeMirror extension
given the small cost and importance of localization.

German translations from the CodeMirror docs:
https://codemirror.net/examples/translate/

Also add a note in the README about the search dialog.

Bug: T317243
Change-Id: Iba40bcaf197ed48166ce4cdcc4f48177fc8d07f3
2024-02-13 14:56:23 -05:00
Translation updater bot 62f60d5a1f Localisation updates from https://translatewiki.net.
Change-Id: I28d92a5021097f21ba5b68f08cb525b3aa04fa5e
2024-02-12 14:49:09 +01:00
Translation updater bot 398200b2cd Localisation updates from https://translatewiki.net.
Change-Id: Ic0bbd40b440e91c86f7309527013f4e2c574b925
2024-02-08 09:14:46 +01:00
Translation updater bot 59d83e4c9c Localisation updates from https://translatewiki.net.
Change-Id: I7c3e32d463db80e6b0a81ab00289ce0d339e0f8d
2023-11-13 08:40:33 +01:00
Translation updater bot 4fcc732610 Localisation updates from https://translatewiki.net.
Change-Id: I026dd80f0b248f6a4ca6c5402efe7c22daee30fe
2023-10-27 09:19:41 +02:00
Translation updater bot 8e5e2170c3 Localisation updates from https://translatewiki.net.
Change-Id: I0ddca034e25562f029baf532a3b6f7b3634a4122
2023-09-12 08:26:32 +02:00
Translation updater bot 36b9492ced Localisation updates from https://translatewiki.net.
Change-Id: Ia33b3c9b598b181424e9b7385efa735cb997390c
2023-08-29 08:27:59 +02:00