Skip to content

Fix zh-TW emoji picker showing Simplified Chinese labels - #265

Merged
ruibaby merged 1 commit into
mainfrom
fix/emoji-picker-zh-tw
Nov 7, 2026
Merged

ruibaby merged 1 commit into
mainfrom
fix/emoji-picker-zh-tw

Conversation

@ruibaby

@ruibaby ruibaby commented Nov 7, 2026

Copy link
Copy Markdown
Member

Problem

In v3.4.0, the emoji picker showed Simplified Chinese (zh-CN) labels for visitors whose locale is zh-TW, because the locale map pointed zh-TW at the same emoji-mart translation object as zh-CN.

@emoji-mart/data does not ship a Traditional Chinese translation (only zh.json), so zh-TW needs its own locale object.

Fixes #261.

Changes

  • Add an independent Traditional Chinese locale object (zhTW) and map zh-TW to it in emoji-button.ts.
  • Add a browser regression test that opens the emoji picker with language=zh-TW and asserts the search placeholder and category labels are Traditional Chinese.

Reproduction

  1. Set the browser language (or the widget's language cookie) to zh-TW.
  2. Open the emoji picker in a comment editor.
  3. Before this fix, the picker shows Simplified Chinese labels such as 搜索 and 表情与角色.

Verification

After the fix, the same steps show 搜尋 and 表情與角色.

  • pnpm test — 35 files / 186 tests passed
  • pnpm build — passed
  • The new regression test fails against the previous zh-TW mapping and passes with the fix.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T13:24:12.331136Z 827a63e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ruibaby
ruibaby merged commit f6e177a into main Nov 7, 2026
2 checks passed
@ruibaby
ruibaby deleted the fix/emoji-picker-zh-tw branch November 7, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zh-TW 的 emoji 选择器显示简体中文(zh-CN)翻译而非繁体中文

1 participant