Skip to content

Fix 倒霉 incorrectly converting to 倒黴 in S→T conversion#1094

Merged
frankslin merged 2 commits intomasterfrom
copilot/fix-translation-issue-dao-mei
Apr 11, 2026
Merged

Fix 倒霉 incorrectly converting to 倒黴 in S→T conversion#1094
frankslin merged 2 commits intomasterfrom
copilot/fix-translation-issue-dao-mei

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

The character-level mapping 霉→黴 in STCharacters.txt causes "倒霉" (unlucky) to incorrectly become "倒黴". The 霉 in 倒霉 derives from 楣 (lintel), not 黴 (mold), so it should remain unchanged.

  • data/dictionary/STPhrases.txt: Add 倒霉→倒霉 phrase-level entry to override the character-level conversion
  • test/testcases/testcases.json: Add test case covering s2t, s2tw, s2twp, s2hk

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • releases.bazel.build
    • Triggering command: /usr/local/lib/node_modules/@bazel/bazelisk/bazelisk-linux_amd64 /usr/local/lib/node_modules/@bazel/bazelisk/bazelisk-linux_amd64 test --test_output=errors //data/dictionary:dictionary_test (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 11, 2026 that may be closed by this pull request
Add 倒霉→倒霉 entry to STPhrases.txt so the phrase-level match
overrides the character-level 霉→黴 mapping. The word 倒霉 (unlucky)
should not be converted since 霉 here is not the traditional 黴 (mold).

Add test case to verify all S→T variants keep 倒霉 unchanged.

Agent-Logs-Url: https://github.com/BYVoid/OpenCC/sessions/540cdb84-8557-41d7-8a04-41743a1caee4

Co-authored-by: frankslin <748873+frankslin@users.noreply.github.com>
@frankslin frankslin marked this pull request as ready for review April 11, 2026 16:39
Copilot AI changed the title [WIP] Fix incorrect translation for 倒霉 to 倒黴 Fix 倒霉 incorrectly converting to 倒黴 in S→T conversion Apr 11, 2026
Copilot AI requested a review from frankslin April 11, 2026 16:39
@frankslin frankslin merged commit 4d7f2f1 into master Apr 11, 2026
32 of 33 checks passed
@frankslin frankslin deleted the copilot/fix-translation-issue-dao-mei branch April 11, 2026 16:41
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.

倒霉 incorrectly translates into 倒黴

2 participants