Page MenuHomePhabricator

Auto-conversion between zh-hans & zh-hant in <syntaxhighlight> elements
Open, In Progress, MediumPublic

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 <source></source>, maybe you can try
<source>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</source>
It's really crazy= =

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:59 PM
bzimport added a project: SyntaxHighlight.
bzimport set Reference to bz32943.
bzimport added a subscriber: Unknown Object (MLST).

(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.

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),

(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.

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?

(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.

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.EditedApr 12 2016, 12:49 AM
Arthur2e5 updated the task description. (Show Details)
Arthur2e5 added a subscriber: Arthur2e5.

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">?)

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.

This comment was removed by Arthur2e5.

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

good idea!

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

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

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

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

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

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 PM
Winston_Sung claimed this task.

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

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

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

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

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

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

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

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

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

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

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 added a subscriber: Func.

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

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

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

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

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

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

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

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

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

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

@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.

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 AM

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

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

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

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