GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Edit Task
  • Edit Related Tasks...
  • Create Subtask
  • Edit Parent Tasks
  • Edit Subtasks
  • Merge Duplicates In
  • Close As Duplicate
  • Edit Commits
  • Edit Mocks
  • Mute Notifications
  • Protect as security issue
  • SyntaxHighlight
  • (Backlog)
  • I18n

This view

  • Original page
  • New address

GeezerVison is showing phabricator.wikimedia.org — T34943 Auto-conversion between zh-hans & zh-hant in <syntaxhighlight> elements

Page MenuHomePhabricator
Log In
Create Task
Maniphest T34943

Auto-conversion between zh-hans & zh-hant in <syntaxhighlight> elements
Open, MediumPublicFeature
Actions

  • Edit Task
  • Edit Related Tasks...
  • Create Subtask
  • Edit Parent Tasks
  • Edit Subtasks
  • Merge Duplicates In
  • Close As Duplicate
  • Edit Related Objects...
  • Edit Commits
  • Edit Mocks
  • Mute Notifications
  • Protect as security issue
Assigned To
None
Authored By
• bzimport
Dec 10 2011, 5:54 AM2011-12-10 05:54:00 (UTC+0)
Project Tags
  • SyntaxHighlight (Backlog)
  • I18n (Script & term conversion)
  • Chinese-Sites (Extensions/Skins)
  • Patch-For-Review
  • MediaWiki-Language-converter (Extensions/Skins)
Referenced Files
None
Subscribers
Aklapper
Arthur2e5
Diskdance
Ericliu1912
Func
jayvdb
KD_Hsueh
View All 16 Subscribers

Description

Author: carivx

Description:
In zh-wiki, there are auto-conversion between zh-hans and zh-hant, but it's unavailable for the text (especially for the comment part) in <syntaxhighlight></syntaxhighlight>...


Version: unspecified
Severity: normal

The other problem is that line-wrapping is also unavailable for the text in <syntaxhighlight></syntaxhighlight>, maybe you can try
<syntaxhighlight>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</syntaxhighlight>
It's really crazy= =

Details

Reference
bz32943
Related Changes in Gerrit:
SubjectAuthorRepoBranchLines +/-
Apply LanguageConverter on some type of elements in syntaxhighlight tagFuncmediawiki/extensions/SyntaxHighlight_GeSHimaster+40 -0
SyntaxHighlight: Add language conversion support using LanguageConverterWinston Sungmediawiki/extensions/SyntaxHighlight_GeSHimaster+83 -1
Customize query in gerrit

Related Objects
Search...

  • Task Graph
  • Mentions
  • Duplicates
StatusSubtypeAssignedTask
OpenFeatureNoneT34943 Auto-conversion between zh-hans & zh-hant in <syntaxhighlight> elements
OpenBUG REPORTNoneT302158 Language conversion fixes in extensions using LanguageConverter are leaking conversion rules outside extension tags
Mentioned In
T354236: Consider introduce a better syntax for enabling language variant conversion in <pre> and <code> tags
T170916: 希望source、展开模板及消息页面能够开启自动繁简转换
Mentioned Here
T353090: <syntaxhighlight inline> should escape LanguageConverter by default
T160696: Provide a way of running language converter on syntaxhighlight-tagged code samples
T170916: 希望source、展开模板及消息页面能够开启自动繁简转换
Duplicates Merged Here
T281024: CodeMirror: Support highlighting for language conversion tags -{}-
T160696: Provide a way of running language converter on syntaxhighlight-tagged code samples
T170916: 希望source、展开模板及消息页面能够开启自动繁简转换

Event Timeline

• bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:59 PM2014-11-21 23:59:47 (UTC+0)
• bzimport added a project: SyntaxHighlight.
• bzimport set Reference to bz32943.
• bzimport added a subscriber: Unknown Object (MLST).
• bzimport created this task.Dec 10 2011, 5:54 AM2011-12-10 05:54:00 (UTC+0)
MarkAHershberger added a comment.Dec 14 2011, 4:18 AM2011-12-14 04:18:30 (UTC+0)
Comment Actions

(In reply to comment #0)

The other problem is that line-wrapping is also unavailable for the text in
<source></source>, maybe you can try

This is expected behavior.

• bzimport added a comment.Dec 14 2011, 1:15 PM2011-12-14 13:15:10 (UTC+0)
Comment Actions

carivx wrote:

(In reply to comment #1)

(In reply to comment #0)

The other problem is that line-wrapping is also unavailable for the text in
<source></source>, maybe you can try

This is expected behavior.

Er...That's right, I used a bad example= = I just mean line-wrapping is necessary when the comment is too long (usually seen in zhwiki),

MarkAHershberger added a comment.Dec 14 2011, 3:39 PM2011-12-14 15:39:16 (UTC+0)
Comment Actions

(In reply to comment #2)

Er...That's right, I used a bad example= = I just mean line-wrapping is
necessary when the comment is too long (usually seen in zhwiki),

Even if there were spaces, you would see that this is expected behavior. This is how the underlying html treats <pre> tags. See for example: [[User:MarkAHershberger/Bug32943]].

If you just want comments to wrap, then that is a separate bug. Please open a new bug for that.

• bzimport added a comment.Dec 17 2011, 2:37 PM2011-12-17 14:37:17 (UTC+0)
Comment Actions

carivx wrote:

(In reply to comment #3)

(In reply to comment #2)

Er...That's right, I used a bad example= = I just mean line-wrapping is
necessary when the comment is too long (usually seen in zhwiki),

Even if there were spaces, you would see that this is expected behavior. This
is how the underlying html treats <pre> tags. See for example:
[[User:MarkAHershberger/Bug32943]].

If you just want comments to wrap, then that is a separate bug. Please open a
new bug for that.

That's my fault= = And thank you for your notice; )
But I find that I cannot modify the description of this bug : ( Or can I divide it into 2 posts?

MarkAHershberger added a comment.Dec 21 2011, 2:23 AM2011-12-21 02:23:10 (UTC+0)
Comment Actions

(In reply to comment #4)

(In reply to comment #3)

If you just want comments to wrap, then that is a separate bug. Please open a
new bug for that.

But I find that I cannot modify the description of this bug : ( Or can I divide
it into 2 posts?

Just create a new bug with the wrapping comments issue. That should take care of it.

jayvdb added a project: I18n.Dec 12 2015, 9:44 PM2015-12-12 21:44:19 (UTC+0)
jayvdb subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 12 2015, 9:44 PM2015-12-12 21:44:19 (UTC+0)
Shizhao added a subtask: T125033: [DO NOT USE] Chinese Wikimedia projects (tracking) [superseded by #Chinese-Sites].Jan 28 2016, 2:19 AM2016-01-28 02:19:24 (UTC+0)
Liuxinyu970226 removed a subtask: T125033: [DO NOT USE] Chinese Wikimedia projects (tracking) [superseded by #Chinese-Sites].Jan 28 2016, 4:01 AM2016-01-28 04:01:49 (UTC+0)
Liuxinyu970226 added a parent task: T125033: [DO NOT USE] Chinese Wikimedia projects (tracking) [superseded by #Chinese-Sites].
Arthur2e5 renamed this task from Auto-translation between zh-hans & zh-hant in <source> elements to Auto-conversion between zh-hans & zh-hant in <source> elements.Edited · Apr 12 2016, 12:49 AM2016-04-12 00:49:10 (UTC+0)
Arthur2e5 updated the task description. (Show Details)
Arthur2e5 subscribed.
Comment Actions

It would be great to see conversions between zh variants in comments since zh.wp uses code examples for explanation extensively. So +1 to the bug...

It should be made optional though (<source zhconv="false">?)

Liuxinyu970226 subscribed.May 22 2016, 1:38 AM2016-05-22 01:38:55 (UTC+0)
Aklapper added a project: Chinese-Sites.Dec 21 2016, 9:59 AM2016-12-21 09:59:01 (UTC+0)
Aklapper removed a parent task: T125033: [DO NOT USE] Chinese Wikimedia projects (tracking) [superseded by #Chinese-Sites].Dec 21 2016, 10:03 AM2016-12-21 10:03:03 (UTC+0)
zhuyifei1999 moved this task from Backlog to Extensions/Skins on the Chinese-Sites board.Dec 21 2016, 8:08 PM2016-12-21 20:08:14 (UTC+0)
Liuxinyu970226 mentioned this in T170916: 希望source、展开模板及消息页面能够开启自动繁简转换.Jul 18 2017, 10:42 AM2017-07-18 10:42:26 (UTC+0)
zhuyifei1999 merged tasks: T170916: 希望source、展开模板及消息页面能够开启自动繁简转换, T160696: Provide a way of running language converter on syntaxhighlight-tagged code samples.Jul 18 2017, 11:19 AM2017-07-18 11:19:36 (UTC+0)
zhuyifei1999 added subscribers: SolidBlock, Nemo_bis, Stang, zhuyifei1999.
Arthur2e5 added a comment.Edited · Jul 18 2017, 1:54 PM2017-07-18 13:54:17 (UTC+0)
Comment Actions

As for T170916, I personally don't believe that nowiki fails conversion. The pre part can be worked around with the good ol' -{}- hack mentioned in T160696 (and the docs in https://mediawiki.org/wiki/Writing_systems/Syntax#Exception). The rest of T170916 should not be merged, as it additionally requests auto conversion of MediaWiki: message pages. In fact, T170916 should be refined and reduced into just the MW messages and unmerged.

For highly subjective reasons, I am against the direction the T160696/T34943 merger is done due to the quality of the initial comment. But we can edit and manually merge that.

Arthur2e5 added a comment.Jul 18 2017, 1:55 PM2017-07-18 13:55:50 (UTC+0)
This comment was removed by Arthur2e5.
MarkAHershberger unsubscribed.Jul 18 2017, 7:48 PM2017-07-18 19:48:01 (UTC+0)
Shizhao subscribed.Jul 19 2017, 1:54 AM2017-07-19 01:54:39 (UTC+0)
Comment Actions

It should be made optional though (<source zhconv="false">?)

good idea!

Amire80 moved this task from Untriaged to Script & term conversion on the I18n board.Feb 4 2018, 10:46 AM2018-02-04 10:46:16 (UTC+0)
Winston_Sung subscribed.Jul 7 2021, 7:20 PM2021-07-07 19:20:08 (UTC+0)
gerritbot added a comment.Feb 15 2022, 3:30 PM2022-02-15 15:30:22 (UTC+0)
Comment Actions

Change 762760 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/SyntaxHighlight_GeSHi@master] Add langconv argument for LanguageConverter on syntaxhighlight

https://gerrit.wikimedia.org/r/762760

gerritbot added a project: Patch-For-Review.Feb 15 2022, 3:30 PM2022-02-15 15:30:23 (UTC+0)
PatchDemoBot added a comment.Feb 15 2022, 4:07 PM2022-02-15 16:07:23 (UTC+0)
Comment Actions

Test wiki created on Patch demo by Winston Sung using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/f81bf4e2d0/w/

PatchDemoBot added a comment.Feb 15 2022, 4:33 PM2022-02-15 16:33:01 (UTC+0)
Comment Actions

Test wiki on Patch demo by Winston Sung using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/f81bf4e2d0/w/

PatchDemoBot added a comment.Feb 15 2022, 4:35 PM2022-02-15 16:35:12 (UTC+0)
Comment Actions

Test wiki created on Patch demo by Winston Sung using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/701deeead6/w/

Winston_Sung changed the task status from Open to In Progress.Feb 15 2022, 4:36 PM2022-02-15 16:36:49 (UTC+0)
Winston_Sung claimed this task.
PatchDemoBot added a comment.Feb 15 2022, 4:47 PM2022-02-15 16:47:23 (UTC+0)
Comment Actions

Test wiki created on Patch demo by Winston Sung using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/2d693b7302/w/

PatchDemoBot added a comment.Feb 15 2022, 4:53 PM2022-02-15 16:53:45 (UTC+0)
Comment Actions

Test wiki on Patch demo by Winston Sung using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/2d693b7302/w/

PatchDemoBot added a comment.Feb 16 2022, 4:54 AM2022-02-16 04:54:23 (UTC+0)
Comment Actions

Test wiki on Patch demo by Winston Sung using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/701deeead6/w/

PatchDemoBot added a comment.Feb 16 2022, 5:03 AM2022-02-16 05:03:01 (UTC+0)
Comment Actions

Test wiki created on Patch demo by Winston Sung using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/6986bcd9ad/w/

PatchDemoBot added a comment.Feb 16 2022, 6:00 AM2022-02-16 06:00:57 (UTC+0)
Comment Actions

Test wiki on Patch demo by Winston Sung using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/6986bcd9ad/w/

gerritbot added a comment.Feb 19 2022, 11:15 AM2022-02-19 11:15:13 (UTC+0)
Comment Actions

Change 763740 had a related patch set uploaded (by Func; author: Func):

[mediawiki/extensions/SyntaxHighlight_GeSHi@master] Apply LanguageConverter on some type of elements in syntaxhighlight tag

https://gerrit.wikimedia.org/r/763740

Func removed Winston_Sung as the assignee of this task.Feb 19 2022, 11:32 AM2022-02-19 11:32:43 (UTC+0)
Func subscribed.
Comment Actions

To be fair, don't claim this task now :)

gerritbot added a comment.Feb 19 2022, 12:32 PM2022-02-19 12:32:23 (UTC+0)
Comment Actions

Change 762760 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/SyntaxHighlight_GeSHi@master] Add language conversion support using LanguageConverter on syntaxhighlight

https://gerrit.wikimedia.org/r/762760

PatchDemoBot added a comment.Feb 19 2022, 12:54 PM2022-02-19 12:54:45 (UTC+0)
Comment Actions

Test wiki created on Patch demo by Winston Sung using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/f39fb53fde/w/

PatchDemoBot added a comment.Feb 19 2022, 1:09 PM2022-02-19 13:09:01 (UTC+0)
Comment Actions

Test wiki created on Patch demo by Winston Sung using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/6000f5e71f/w/

PatchDemoBot added a comment.Feb 19 2022, 2:02 PM2022-02-19 14:02:48 (UTC+0)
Comment Actions

Test wiki on Patch demo by Winston Sung using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/6000f5e71f/w/

PatchDemoBot added a comment.Feb 19 2022, 2:04 PM2022-02-19 14:04:47 (UTC+0)
Comment Actions

Test wiki created on Patch demo by Winston Sung using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/48f0b19eb2/w/

Func added a comment.Feb 19 2022, 2:11 PM2022-02-19 14:11:16 (UTC+0)
Comment Actions

@Winston_Sung Please don't create patch demos frequently, or at least don't let it emit messages to the task. You can post a comment yourself and edit it once links are updated.

Winston_Sung added a comment.Feb 19 2022, 2:14 PM2022-02-19 14:14:47 (UTC+0)
Comment Actions

Sorry for that.

Winston_Sung added a project: MediaWiki-Language-converter.Feb 19 2022, 4:34 PM2022-02-19 16:34:36 (UTC+0)
SunAfterRain renamed this task from Auto-conversion between zh-hans & zh-hant in <source> elements to Auto-conversion between zh-hans & zh-hant in <syntaxhighlight> elements.Feb 20 2022, 12:25 AM2022-02-20 00:25:24 (UTC+0)
PatchDemoBot added a comment.Feb 21 2022, 2:43 PM2022-02-21 14:43:16 (UTC+0)
Comment Actions

Test wiki on Patch demo by Winston Sung using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/48f0b19eb2/w/

PatchDemoBot added a comment.May 22 2022, 4:31 PM2022-05-22 16:31:56 (UTC+0)
Comment Actions

Test wiki on Patch demo by Winston Sung using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/f39fb53fde/w/

Restricted Application added a subscriber: Ericliu1912. · View Herald TranscriptMay 22 2022, 4:32 PM2022-05-22 16:32:02 (UTC+0)
Stang merged a task: T281024: CodeMirror: Support highlighting for language conversion tags -{}-.Jul 17 2022, 1:15 AM2022-07-17 01:15:01 (UTC+0)
Stang added subscribers: Diskdance, SunAfterRain.
Diskdance updated the task description. (Show Details)Jul 17 2022, 5:55 AM2022-07-17 05:55:57 (UTC+0)
Winston_Sung updated the task description. (Show Details)Oct 9 2022, 11:15 AM2022-10-09 11:15:34 (UTC+0)
Winston_Sung updated the task description. (Show Details)
Winston_Sung changed the task status from In Progress to Open.Feb 4 2023, 11:20 AM2023-02-04 11:20:51 (UTC+0)
Shizhao changed the subtype of this task from "Task" to "Feature Request".Feb 21 2023, 2:55 AM2023-02-21 02:55:51 (UTC+0)
Winston_Sung moved this task from Backlog to Extensions/Skins on the MediaWiki-Language-converter board.Mar 18 2023, 4:13 AM2023-03-18 04:13:54 (UTC+0)
Winston_Sung added a comment.Dec 10 2023, 4:00 AM2023-12-10 04:00:57 (UTC+0)
Comment Actions

We now need to consider T353090: <syntaxhighlight inline> should escape LanguageConverter by default .

Diskdance mentioned this in T354236: Consider introduce a better syntax for enabling language variant conversion in <pre> and <code> tags.Jan 3 2024, 5:19 AM2024-01-03 05:19:10 (UTC+0)
KD_Hsueh subscribed.May 31 2026, 11:59 PM2026-05-31 23:59:27 (UTC+0)
Comment Actions
在T353090#11970397中,@KD_Hsueh写道:

I found in the parser tests (L114) that inline syntaxhighlight outputs <code class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr">…</code>, which means LC won't automatically skip it the way it does for a plain <code>.
Block syntaxhighlight outputs <div class="mw-highlight ..."><pre>...</pre></div> so it'll be skipped by LC.

Log In to Comment
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.