mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 21:05:26 +03:00
Fix translation for audio files (#4889)
Switch the time mechanic to english one (may not be perfect, but current italian is not working at all)
This commit is contained in:
parent
96ccb4cb3f
commit
efe53eb034
2 changed files with 19 additions and 50 deletions
|
@ -179,63 +179,32 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
|
||||
I18N_PLAY_FUNCTION(it, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds == 0) {
|
||||
PLAY_NUMBER(seconds, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_MENO);
|
||||
seconds = -seconds;
|
||||
}
|
||||
|
||||
uint8_t ore = 0;
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS, 0);
|
||||
}
|
||||
|
||||
tmp = seconds / 60;
|
||||
seconds %= 60;
|
||||
if (tmp > 0) {
|
||||
ore=tmp;
|
||||
if (tmp > 1 || IS_PLAY_TIME()) {
|
||||
#if defined(CPUARM)
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS, 0);
|
||||
#else
|
||||
PLAY_NUMBER(tmp, 0, 0);
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_ORE);
|
||||
} else {
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_UN);
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_ORA);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (seconds>0) {
|
||||
tmp = seconds / 60;
|
||||
seconds %= 60;
|
||||
if (tmp>0 && seconds==0 && ore>0) {
|
||||
PLAY_NUMBER(tmp, UNIT_MINUTES, 0);
|
||||
if (seconds > 0)
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_E);
|
||||
}
|
||||
if (tmp > 0) {
|
||||
if (tmp != 1) {
|
||||
#if defined(CPUARM)
|
||||
PLAY_NUMBER(tmp, UNIT_MINUTES, 0);
|
||||
#else
|
||||
PLAY_NUMBER(tmp, 0, 0);
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_MINUTI);
|
||||
} else {
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_UN);
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_MINUTO);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if ((tmp>0 || ore>0) && seconds>0) {
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_E);
|
||||
}
|
||||
}
|
||||
if (seconds != 0 || (ore==0 && tmp==0)) {
|
||||
if (seconds != 1) {
|
||||
#if defined(CPUARM)
|
||||
PLAY_NUMBER(tmp, UNIT_SECONDS, 0);
|
||||
#else
|
||||
PLAY_NUMBER(seconds, 0, 0);
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_SECONDI);
|
||||
} else {
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_UN);
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_SECONDO);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (seconds > 0) {
|
||||
PLAY_NUMBER(seconds, UNIT_SECONDS, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,9 +37,9 @@ for i, (s, f) in enumerate([(u"volt", "volt0"),
|
|||
(u"radian", "rad0"), ("radians", "rad1"),
|
||||
(u"millilitro", "m10"), ("millilitri", "m11"),
|
||||
(u"oncia", "founce0"), ("once", "founce1"),
|
||||
(u"hour", "hour0"), ("hours", "hour1"),
|
||||
(u"minute", "minute0"), ("minutes", "minute1"),
|
||||
(u"second", "second0"), ("seconds", "second1"),
|
||||
(u"ora", "hour0"), ("ore", "hour1"),
|
||||
(u"minuto", "minute0"), ("minuti", "minute1"),
|
||||
(u"secondo", "second0"), ("secondi", "second1"),
|
||||
]):
|
||||
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 113 + i)))
|
||||
for s, f, a in [(u"radio inattiva controllare", "inactiv", 486),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue