Skip to content

ja: navigate.yaml stopped speaking English, and now uses Japanese word order - #20

Closed
yasumorishima wants to merge 1 commit into
jafrom
ja-navigate-rest
Closed

yasumorishima wants to merge 1 commit into
jafrom
ja-navigate-rest

Conversation

@yasumorishima

@yasumorishima yasumorishima commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Three of the Japanese navigation announcements were still in the shape en gives them, and one of them was reading English out loud.

$Move2D held an English literal. The variable is set to 'in', 'out of', 'end of' or 'start of' — those four and nothing else in this file — and both into-or-out-of-* rules emitted it with x: "$Move2D", straight from en where that is already English. Zooming into x squared announced:

ズーム イン; in 底; x        ← the "in" is spoken as English
ズーム イン; 底 に入る; x     ← now

Japanese also wants it after the part it applies to, so the mapping (に入る / から出る / の終わり / の始め) is emitted after the part name instead of in front of it.

Undo named the verb first. 元に戻す ズームイン is "undo zoom in" word for word; Japanese names what is being undone and then 元に戻す.

before after
元に戻す ズームイン ズームイン を 元に戻す
元に戻す ズームアウト ズームアウト を 元に戻す
元に戻す ズームインを最大 最大までのズームイン を 元に戻す
元に戻す 左に移動 左に移動 を 元に戻す

The placemarkers had the same order. 読み上げ プレースホルダー 3 is "read placeholder 3". They now name the placeholder and its number first and take the particle the matching move command already uses — を 読み上げ, を 説明, に 移動 — which is the pattern daisy#752 set up for the move commands. セット becomes 設定, the ordinary Japanese for setting a value.

プレースホルダー 3 を 設定; x の 2 乗 プラス 1
プレースホルダー 3 を 読み上げ; x の 2 乗 プラス 1

# audit-ignore on four rules. Reordering the children is the point of the change, so those four rules diverge from en by construction. Without the marker the rule-difference count goes 30 → 34, and I lean on that count in every PR as evidence that nothing was broken. I put the marker at the end of the - name: line: it is the position that works today, and the one 170 of the 298 markers under Rules/Languages already use. daisy#742 is deciding which position becomes canonical — if it moves, these move with the rest.

One promotion that is not a rewrite. 底 / 上付き文字 / 下付き文字 go to T:, checked against en's base / superscript / subscript. Worth a note while I was in there: in en those four lines have phrase(...) hints that disagree with the values they annotate (then: [t: "pre-subscript"] # phrase(x with 'subscript' 2)), and the condition comment above them reads the other way round from what the XPath selects. The values look right and the comments look stale, so ja follows the values, which are what is spoken.

Checks. audit-translations ja: untranslated text 3447 → 3436 — the 8 lines this rewrites plus those 3 promotions; rule differences 30 → 30; missing, extra and definition counts unchanged at 0. Baseline measured on upstream/ja at the same time.

Tests. Four in navigate.rs, with a helper that compares the whole announcement instead of stopping at the first pause, since none of these three is a command prefix. The existing prefix tests are untouched.

This does not conflict with daisy#772: they touch different files, and I merged both orders locally to check.

Summary by CodeRabbit

  • Accessibility
    • Improved Japanese navigation announcements to follow natural Japanese grammar and word order.
    • Updated messages for moving into and out of notation, placemarkers, setting locations, and undoing navigation actions.
  • Tests
    • Added coverage for complete Japanese navigation announcements, including two-dimensional notation, undo actions, and placemarkers.

…d order

Three of the navigation announcements were still in the shape en gives them.

- The 2D move announcements spoke $Move2D as it stands, and that variable holds
  an English literal: 'in', 'out of', 'end of', 'start of'. Zooming into x
  squared said "ズーム イン; in 底; x", with the "in" read out in English. Those
  four are the only values this file ever sets, so the two rules that emit it
  now map them (に入る / から出る / の終わり / の始め) and say them after the part
  they apply to, which is where Japanese wants them: "ズーム イン; 底 に入る; x".
- Undo named the verb first: 元に戻す ズームイン is "undo zoom in" word for word.
  Japanese names what is being undone first, ズームイン を 元に戻す.
- The placemarker announcements had the same order -- 読み上げ プレースホルダー 3
  for "read placeholder 3". They now name the placeholder and its number first
  and then take the particle the matching move command already uses (を 読み上げ,
  を 説明, に 移動), the pattern daisy#752 set up. セット becomes 設定, the ordinary
  Japanese for setting a value.

The four rules whose children are reordered carry `# audit-ignore`. The
divergence from en is the point of the change, and without the marker the rule
difference count goes 30 -> 34 and stops being usable as evidence that a PR did
not break the rules. The marker sits at the end of the `- name:` line: that is
the position that works today, and the one 170 of the 298 markers under
Rules/Languages already use. (daisy#742 is deciding which position becomes canonical;
if it moves, these move with the rest.)

This also promotes 底 / 上付き文字 / 下付き文字 to T:, checked against en's base /
superscript / subscript. In en the `phrase(...)` hints on those lines and the
values they annotate do not agree with each other; ja follows the values, which
are what is actually spoken.

audit-translations ja: untranslated text 3447 -> 3436, which is the 8 lines this
changes plus those 3 promotions; rule differences 30 -> 30; missing, extra and
definition counts unchanged at 0.

Tests: four in navigate.rs, with a helper that compares the whole announcement
rather than the command prefix, since none of these three is a prefix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XzNYYoiVRzKGnDEWTJnuHh
@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d6544670-afee-40fd-b62c-a62139307c0d

📥 Commits

Reviewing files that changed from the base of the PR and between 052f8f8 and 3b837d6.

📒 Files selected for processing (2)
  • Rules/Languages/ja/navigate.yaml
  • tests/Languages/ja/navigate.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Japanese navigation rules now place targets before movement and action phrases. Undo messages use Japanese action-first wording. Tests now compare complete speech for notation movement, undo, and placemarker commands.

Changes

Japanese navigation speech

Layer / File(s) Summary
Japanese speech rule updates
Rules/Languages/ja/navigate.yaml
Movement phrases now follow notation part names. Undo messages use を 元に戻す. Placemarkers and their actions now use placeholder-first ordering.
Full announcement test coverage
tests/Languages/ja/navigate.rs
The tests add full-speech assertions for notation movement, undo, and placemarker announcements.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 3b837

The Japanese navigation wording changes are covered by matching full-announcement tests, with no actionable merge risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: replacing English navigation phrases with Japanese translations and applying Japanese word order.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

Comment @coderabbitai help to get the list of available commands.

@yasumorishima

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@yasumorishima

Copy link
Copy Markdown
Owner Author

Preflight only; the upstream PR is daisy#773.

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