Skip to content

fix: 控制台 should remain unchanged across all conversion modes#1090

Open
Copilot wants to merge 1 commit intomasterfrom
copilot/update-console-conversion-rule
Open

fix: 控制台 should remain unchanged across all conversion modes#1090
Copilot wants to merge 1 commit intomasterfrom
copilot/update-console-conversion-rule

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

「控制台」was being converted to「控制檯」by an STPhrases rule, but「控制台」is the correct and preferred form — it should never be converted in any direction.

Changes

  • data/dictionary/STPhrases.txt: Replace 控制台 → 控制檯 with identity mapping 控制台 → 控制台, blocking the character-level 台 → 臺 fallback in all s2* modes
  • data/dictionary/HKVariantsRevPhrases.txt: Add identity entry 控制台 → 控制台 to suppress hk2t's 台 → 臺 rule (derived from HKVariants: 臺 → 台 reversed)
  • test/testcases/testcases.json: Add console_stays_unchanged test covering all 12 conversion modes (s2t, s2tw, s2twp, s2hk, t2s, t2tw, t2hk, tw2s, tw2sp, tw2t, hk2s, hk2t)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91b01ce7b0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

懸巖 懸巖
懸巖峭壁 懸巖峭壁
懸胄 懸冑
控制台 控制台
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict 控制台 identity to standalone hk2t use

Adding 控制台 控制台 here makes hk2t treat any 控制台* prefix as a fixed phrase, not just the standalone noun. With max-match segmentation (src/MaxMatchSegmentation.cpp) and dictionary priority (HKVariantsRevPhrases before HKVariantsRev), the 台 -> 臺 character conversion is skipped inside that segment, so strings like 控制台北 now remain 控制台北 instead of converting to 控制臺北. This introduces a conversion-accuracy regression for longer phrases that start with 控制台.

Useful? React with 👍 / 👎.

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.

2 participants