An intent on a currency symbol is ignored when a number follows

Abierto
#986 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust, xml, yaml

Línea de trabajo

Start with the currency rule in SharedRules/general.yaml and trace how its match and DefinitionValue(*[1], 'Speech', 'CurrencySymbols') handle the intent attribute. Compare the existing output for the provided MathML examples, including both mi and mo, with the intended speech; decide how the currency word should be ordered with the number. Done means the symbol's intent is preserved when a number follows and the output is verified for both element types.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

<math><mi intent="peso">$</mi><mn>200</mn></math>

This reads "200 dollars" (Spanish: "200 dólares"); the author's intent is lost. Alone, <mi intent="peso">$</mi> reads "peso". The same happens with <mo intent="peso">.

The currency rule in SharedRules/general.yaml matches on the text of *[1] (DefinitionValue(*[1], 'Speech', 'CurrencySymbols')), so it still fires after the intent has renamed the element. Adding *[1][self::m:mi or self::m:mo] to its match makes the intent win. It then reads "peso 200", in the written order, so maybe it would be better to use the intent name as the currency word ("200 pesos").

This matters in Latin America, where $ is usually the local peso.

Lenguaje dominante
Rust
Estrellas
131
Forks
97
Merge medio
21 h 45 min
PR fusionados (30 d)
95

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de daisy/MathCAT

Todos los issues de daisy/MathCAT

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.