Currency: some symbols aren't recognized as `mo`, and "200 €" in one `mn` is singular
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- accessibility, backend
Línea de trabajo
Start with src/canonicalize.rs and inspect the fixed currency symbol list and the handling of symbols inside mn tokens. Then trace the currency rules and UnitNumber behavior for the English and Spanish examples, and find the related tests before changing anything. Done means the listed symbol and amount cases produce the expected speech, with the decimal question resolved by the relevant behavior and tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found while checking Spanish currencies (examples in English unless noted).
1. Symbols missing from is_currency_symbol. src/canonicalize.rs has a fixed list, so ¥, ₲, ₽ and ₴ written as <mo> aren't treated as currency:
| input | speech | expected |
|---|---|---|
<mo>¥</mo><mn>200</mn> |
yen 200 | 200 yen |
<mn>200</mn><mo>¥</mo> |
200 yen | 200 yen (es: 200 yenes) |
<mo>₲</mo><mn>200</mn> |
guaranis 200 | 200 guaranis |
<mo>₽</mo><mn>200</mn> |
₽ 200 | 200 rubles |
With <mi> they work when the language lists them in CurrencySymbols. Maybe is_currency_symbol could use the language's CurrencySymbols instead of a fixed list; otherwise, adding ¥ ₲ ₽ ₴ would cover these.
2. Amount and symbol in one mn. <mn>200 €</mn> is split into <mn>200 </mn> <mi>€</mi>: an extra invisible times at the start and a trailing space in the number. Then the currency rules don't match:
| input | en | es |
|---|---|---|
<mn>200 €</mn> |
200 euros | 200 euro |
<mn>1 €</mn> |
1 euros | 1 euro (should be "un euro") |
<mn>€200</mn> |
200 euros | 200 euros |
3. A small question. <mn>1,0</mn><mo>€</mo> in Spanish says "un euro"; with decimals Spanish normally uses the plural ("1,0 euros"), as English does ("1.0 euros"). Is UnitNumber meant to treat 1,0 as "one"?
- Lenguaje dominante
- Rust
- Estrellas
- 131
- Forks
- 97
- Merge medio
- 21 h 45 min
- PR fusionados (30 d)
- 95
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de daisy/MathCAT
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
Todos los issues de daisy/MathCAT
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ElectronicWave/Elemental#252 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dekobon/big-code-analysis#1887 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
area:mcp effort:low P5 source:agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
jlcodes99/cockpit-tools#3103 ·
Los mantenedores suelen responder en 2 días