1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 00:05:17 +03:00

Improve spanish timer speech

This commit is contained in:
3djc 2018-10-04 17:13:00 +02:00
parent b97696624f
commit 3faa7e10d0
2 changed files with 7 additions and 12 deletions

View file

@ -168,11 +168,9 @@ I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT)
seconds = -seconds; seconds = -seconds;
} }
uint8_t ore = 0;
uint8_t tmp = seconds / 3600; uint8_t tmp = seconds / 3600;
seconds %= 3600; seconds %= 3600;
if (tmp > 0 || IS_PLAY_TIME()) { if (tmp > 0 || IS_PLAY_TIME()) {
ore = tmp;
if (tmp > 1) { if (tmp > 1) {
PLAY_NUMBER(tmp, 0, 0); PLAY_NUMBER(tmp, 0, 0);
PUSH_UNIT_PROMPT(UNIT_HOURS, 1); PUSH_UNIT_PROMPT(UNIT_HOURS, 1);
@ -185,18 +183,15 @@ I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT)
tmp = seconds / 60; tmp = seconds / 60;
seconds %= 60; seconds %= 60;
if (tmp > 0 || ore >0) { if (tmp > 0 ) {
if (tmp != 1) { if (tmp != 1) {
PLAY_NUMBER(tmp, 0, 0); PLAY_NUMBER(tmp, 0, 0);
PUSH_UNIT_PROMPT(UNIT_MINUTES, 1); PUSH_UNIT_PROMPT(UNIT_MINUTES, 1);
} }
else { else {
PUSH_NUMBER_PROMPT(ES_PROMPT_UNA); PUSH_NUMBER_PROMPT(ES_PROMPT_UN);
PUSH_UNIT_PROMPT(UNIT_MINUTES, 0); PUSH_UNIT_PROMPT(UNIT_MINUTES, 0);
} }
if (seconds > 0) {
PUSH_NUMBER_PROMPT(ES_PROMPT_Y);
}
} }
if (seconds > 0) { if (seconds > 0) {
@ -205,7 +200,7 @@ I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT)
PUSH_UNIT_PROMPT(UNIT_SECONDS, 1); PUSH_UNIT_PROMPT(UNIT_SECONDS, 1);
} }
else { else {
PUSH_NUMBER_PROMPT(ES_PROMPT_UNA); PUSH_NUMBER_PROMPT(ES_PROMPT_UN);
PUSH_UNIT_PROMPT(UNIT_SECONDS, 0); PUSH_UNIT_PROMPT(UNIT_SECONDS, 0);
} }
} }

View file

@ -45,9 +45,9 @@ for i, (s, f) in enumerate([("Voltio","volt0"),
("radianes ", "rad0"), ("radianes ", "rad0"),
("mililitro", "ml0"), ("mililitro", "ml0"),
("onzas", "founce0"), ("onzas", "founce0"),
("horas", "hour0"), ("hora", "hour0"), ("horas", "hour1"),
("minutos", "minute0"), ("minuto", "minute0"), ("minutos", "minute1"),
("segundos", "second0"), ("segundo", "second0"), ("segundos", "second1"),
]): ]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 122 + i))) systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 122 + i)))
for s, f, a in [("me tienes abandonada", "inactiv", 486), for s, f, a in [("me tienes abandonada", "inactiv", 486),
@ -110,4 +110,4 @@ for i, (s, f) in enumerate([("tren arriba.", "gearup"),
("fase de vuelo 8", "fltmd8"), ("fase de vuelo 8", "fltmd8"),
("fase de vuelo 9", "fltmd9"), ("fase de vuelo 9", "fltmd9"),
]): ]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i))) sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))