Change audio generation files accordingly (#3717)

* Change audio generation files accordingly
New way of working :

units files are ALWAYS named in english based on the names in audio_arm.cpp names.
multiple form (singular, plural(s) are ammended with 0 to 4 suffix, according to languages rules. example : meter1.wav for first form of plural of meter unit,. This filename needs to be the same for all languages (in their respective directories of course)

* Care for gruin9x

* Better form

* Other languages

* Cosmetics
This commit is contained in:
3djc
2016-08-24 23:43:56 +02:00
committed by Bertrand Songis
parent b69c2aa41c
commit 9d9fdf81b4
21 changed files with 699 additions and 414 deletions
+35 -5
View File
@@ -62,6 +62,28 @@ enum ItalianPrompts {
};
#if defined(VOICE)
#if defined(CPUARM)
#define IT_PUSH_UNIT_PROMPT(p, u) it_pushUnitPrompt((p), (u), id)
#else
#define IT_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#endif
I18N_PLAY_FUNCTION(it, pushUnitPrompt, int16_t number, uint8_t unitprompt)
{
#if defined(CPUARM)
if (number == 1)
PUSH_UNIT_PROMPT(unitprompt, 0);
else
PUSH_UNIT_PROMPT(unitprompt, 1);
#else
unitprompt = IT_PROMPT_UNITS_BASE + unitprompt*2;
if (number == 1)
PUSH_NUMBER_PROMPT(unitprompt);
else
PUSH_NUMBER_PROMPT(unitprompt+1);
#endif
}
I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
{
@@ -151,11 +173,7 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
}
}
if (unit) {
if (orignumber == 1) {
PUSH_NUMBER_PROMPT(IT_PROMPT_UNITS_BASE+(unit*2));
} else {
PUSH_NUMBER_PROMPT(IT_PROMPT_UNITS_BASE+(unit*2)+1);
}
IT_PUSH_UNIT_PROMPT(orignumber, unit);
}
}
@@ -172,11 +190,15 @@ I18N_PLAY_FUNCTION(it, playDuration, int seconds PLAY_DURATION_ATT)
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) {
@@ -187,11 +209,15 @@ I18N_PLAY_FUNCTION(it, playDuration, int seconds PLAY_DURATION_ATT)
}
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) {
@@ -200,11 +226,15 @@ I18N_PLAY_FUNCTION(it, playDuration, int seconds PLAY_DURATION_ATT)
}
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
}
}
}