Jump to content

User talk:Winston Sung

Add topic
From mediawiki.org

Welcome

[edit]

Welcome to MediaWiki.org!

Yes, welcome! This site is dedicated to documenting the MediaWiki software, the software behind many wikis, including that of Wikipedia and the Wikimedia Foundation projects.
Please, take a look at the following pages. They might prove useful to you as a newcomer here:

If you have any questions, please ask me on my talk page. Once again, welcome, and I hope you quickly feel comfortable here, and find this site useful documentation of the MediaWiki software.

Thanks!

-- Liuxinyu970226 (talk) 14:19, 16 June 2018 (UTC)Reply

2024-01-03: Top volunteer code contributors - thank you and a question

[edit]

Hi! I'm Selena Deckelmann, CPTO at the Wikimedia Foundation. I'm reaching out to our top volunteer code contributors -- thank you so much for your contributions! Would you be open to a real time chat, voice or video call in the next few weeks? I would love to hear more about your volunteer work, or any questions or recommendations you have for me or the WMF more broadly. Let me know! SDeckelmann-WMF (talk) 22:37, 3 January 2024 (UTC)Reply

Appreviate that.
However, it's sad that I don't have much time in the coming weeks for voice or video call.
Real time chats are still welcome. -- Winston Sung (talk) 02:22, 12 January 2024 (UTC)Reply

2025-07-31: 会自动转换的字也需要LC zh吗?

[edit]

您好,我最近看到阁下在更新一个翻译的时候也顺便把“请参阅$1。”的转换版放进了{{LC zh }}。这令在下有丝疑惑。即便不这么做的活,百科的翻译系统不是也可以自动转换这几个字的吗?是有我不知道的用这个的原因吗? Aaron Liu (talk) 21:51, 31 July 2025 (UTC)Reply

这是因为同时要尽量保持翻译记忆(translation memory)一致以让译文建议尽量一致(不要有的是简体有的是繁体),又要让跨页面语言嵌入(transclusion)的时候尽量避免转换问题(包含避免让转换标记直接被解析器当纯文本显示出来)。 -- Winston Sung (talk) 05:30, 1 August 2025 (UTC)Reply
不好意思,在下还是不太明白。LC zh会如何促进翻译记忆呢?既然译文会被自动转换,译文内部的不一致会带来什么不良后果呢?我明白跨页面语言嵌入会带来各种各样的问题(包括阁下说的多个变体共存在同一页上的问题),不过在我目前为止的印象中,跨页面语言嵌入是很很不常见的。在下无知请多多指教。 Aaron Liu (talk) 16:03, 2 August 2025 (UTC)Reply
範例1:MediaWiki/zh-hansMediaWiki/zh-hantMediaWiki/zh-hk的頁面語言都是en,但是嵌入的模板頁面語言是zh,這時候就無法透過語言轉換器正常轉換。
範例2:User:Vipuser/Translation的頁面語言是en,但是嵌入的模板頁面語言是zh,這時候就無法透過語言轉換器正常轉換。
範例3:比起有的譯文單元用字符串数组有的譯文單元用字串陣列,讓譯文建議統一建議{{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 字符串数组|zh-hant = 字串陣列}}顯然是目前能夠避免只有一種變體正常顯示用詞的最佳workaround方案。
範例5:目前LC zh模板已經支援章節標題錨點別名了,用任何一種變體的錨點都能正常定位,比如本話題的#2025-07-31: 会自动转换的字也需要LC zh吗?#2025-07-31: 會自動轉換的字也需要LC zh嗎?
範例6:本站的站點語言是en,各類搜尋功能只對原始碼所寫的變體起作用。
範例7:最新公布的message bundle因為使用frame:preprocess,還是需要傳入語言標籤參數至LC zh才能正常切換到對應的變體文字。
為什麼LC zh實質上是workaound以及其他負面影響:翻譯記憶/譯文建議會顯示在其他使用zh做為備援語言的語言(例如cdoganhaknan),目前已經發生在這些語言因為來自zh的譯文建議而誤用LC zh模板的案例。
希望以上能夠解答你的疑問。 -- Winston Sung (talk) 16:57, 2 August 2025 (UTC)Reply

2025-08-01: 标题中LC zh的追踪分类问题

[edit]

我注意到有些页面标题,因为有多馀的旧参数,所以追踪分类链接(in纯文字)就直接显示在标题上了,

-- AromaTake Talk 06:27, 1 August 2025 (UTC)Reply

有注意到需要清理,有先清理一些页面了。 -- Winston Sung (talk) 06:35, 1 August 2025 (UTC)Reply
应该已经全部清理完成了。 -- Winston Sung (talk) 17:00, 2 August 2025 (UTC)Reply

2025-12-03: word-separator使用ZWSP的原因

[edit]

我发现有时从diff页面复制用户名时带上的ZWSP是来自translatewiki:MediaWiki:Word-separator/zh-hans。好奇问问为什么不留空而是放入ZWSP,是什么页面一定需要这种换行机会吗? Srapoj (talk) 22:01, 3 December 2025 (UTC)Reply

自行透過Chrome/Chromium網頁瀏覽器的開發人員工具修改以下HTML(將ZWSP移除)便可見到當時為何要使用ZWSP以避免嚴重跑版。
(Chrome/Chromium瀏覽器無法正常換行,Firefox瀏覽器能正常換行。)
-- Winston Sung (talk) 06:45, 4 December 2025 (UTC)Reply
感觉像是chromium的bug,但没能力继续研究。该处comma-separator (phab:T303509)的顿号(、U+3001)属于UAX14的line breaking class CL,但不知道怎么继续查,或许能通过现成的WPT test case找到他们的工单。
但是有word-separator的例子吗?虽说看了一下mediawiki core里调用该message的地方通常用的是escaped模式,我猜因此没法放‎<wbr>之类的。如果不能改CSS的话确实只能用这种方法插入换行机会。 Srapoj (talk) 02:36, 7 December 2025 (UTC)Reply