Navigation fails on a currency before the amount ($3)

オープン 初心者向け
#1,008 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust, yaml

調査の方向性

SharedRules/general.yaml の currency ルールから始め、そのリテラルモードの動作をスペイン語の currency-after ルールと比較してください。提案されたリテラルモードの条件を、列挙された言語ルールに一貫して適用し、その後 cargo test を実行してください。ナビゲーションで通貨記号と金額に到達でき、完全な音声読み上げは変わらない状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

ZoomIn or MoveNext on <math><mi>$</mi><mn>3</mn></math> gives an error:

Internal error: With en/ClearSpeak in Enhanced mode, can't ZoomIn from expression with id '…'

The currency rule in SharedRules/general.yaml reorders the speech ("3 dollars") and speaks the word from CurrencySymbols instead of *[1], so navigation can't find the $ in it. The same rule is in de, es, fr, hu, ja, pl and pt.

Proposed fix: don't use the rule in literal mode (navigation), as Spanish already does for currency-after:

-  match: "count(*)=3 and DefinitionValue(*[1], 'Speech', 'CurrencySymbols') != '' and *[3][self::m:mn]"
+  match: "count(*)=3 and DefinitionValue(*[1], 'Speech', 'CurrencySymbols') != '' and *[3][self::m:mn] and not(ancestor-or-self::*[contains(@data-intent-property, ':literal:')])"

With it (en): ZoomIn → "dollar", MoveNext → "3"; $3 + $2 → "3 dollars", "plus"; \frac{$5}{kg} → "in numerator; 5 dollars". The full reading doesn't change ("3 dollars"), and cargo test passes. Spanish has this fix in the es-more-currencies PR.

主要言語
Rust
スター
131
フォーク
97
平均マージ
21時間 45分
マージ済み PR(30日)
95

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

daisy/MathCAT のほかの issue

daisy/MathCAT の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。