Skip to content

Fix BRAILLE_MAINLAND dropping the -iong final - #387

Open
amalsaidov wants to merge 1 commit into
mozillazg:developfrom
amalsaidov:fix-braille-iong
Open

amalsaidov wants to merge 1 commit into
mozillazg:developfrom
amalsaidov:fix-braille-iong

Conversation

@amalsaidov

Copy link
Copy Markdown

PR 描述

Style.BRAILLE_MAINLAND / Style.BRAILLE_MAINLAND_TONE mis-renders every -iong / yong syllable.

In BRAILLE_MAINLAND_REPLACE, the normalization rule ong -> ung runs before the dedicated iong -> ⠹ rule. So an -iong final is rewritten step by step:

iong -> iung  (ong -> ung)
     -> vng   (iu -> v)
     -> veng  ([iuv]n -> [iuv]en)
     -> v⠼    (eng -> ⠼)

The iong -> ⠹ and ong -> ⠲ rules become dead code, and the syllable ends up with the -eng cell U+283C plus a stray medial instead of the dedicated -iong cell U+2839 (dots-1456) defined by the Mainland Chinese Braille standard.

Examples (before -> after):

han before after (correct)
穷 qióng ⠅⠬⠼ ⠅⠹
用 yòng ⠬⠼ ⠹
熊 xióng ⠓⠬⠼ ⠓⠹

Fix

Remove the redundant ong -> ung normalization rule. Plain -ong syllables are unaffected — they are still handled directly by the existing ong -> ⠲ rule (e.g. 中 ⠌⠲, 东 ⠙⠲), which matches the standard. This unblocks the already-present iong -> ⠹ rule.

待办事项

  • 符合代码规范
  • 单元测试(新增 穷/用/熊 的回归用例,全部 1030 条测试通过)
  • 文档

P.S. 以 develop 为目标分支。

The 'ong' -> 'ung' normalization rule ran before the 'iong' -> cell
rule, so every -iong/yong syllable was rewritten through
iong -> iung -> v + eng and emitted the -eng cell (U+283C) plus a stray
medial, instead of the dedicated -iong cell U+2839 (dots-1456).

Removing the redundant 'ong' -> 'ung' rule lets '穷' render as ⠅⠹ and
'用' as ⠹. Plain -ong syllables are unaffected: they are still handled
by the direct 'ong' -> ⠲ rule, matching the Mainland Chinese Braille
standard.
@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 70f9c082-e491-4ab5-afe4-cfd33dd327eb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

1 participant