2 * Authors (alphabetical order)
3 * - Andre Bernet <bernet.andre@gmail.com>
5 * - Bertrand Songis <bsongis@gmail.com>
6 * - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
7 * - Cameron Weeks <th9xer@gmail.com>
10 * - Jean-Pierre Parisy
18 * - Romolo Manfredini <romolo.manfredini@gmail.com>
21 * opentx is based on code named
22 * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
23 * er9x by Erez Raviv: http://code.google.com/p/er9x/,
24 * and the original (and ongoing) project by
25 * Thomas Husterer, th9x: http://code.google.com/p/th9x/
27 * This program is free software; you can redistribute it and/or modify
28 * it under the terms of the GNU General Public License version 2 as
29 * published by the Free Software Foundation.
31 * This program is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
41 SK_PROMPT_NUMBERS_BASE
= 0,
42 SK_PROMPT_NULA
= SK_PROMPT_NUMBERS_BASE
+0, //0-99
43 SK_PROMPT_STO
= SK_PROMPT_NUMBERS_BASE
+100, //100,200 .. 900
44 SK_PROMPT_TISIC
= SK_PROMPT_NUMBERS_BASE
+109, //1000
45 SK_PROMPT_DVETISIC
= SK_PROMPT_NUMBERS_BASE
+110,
46 SK_PROMPT_JEDEN
= SK_PROMPT_NUMBERS_BASE
+111,
47 SK_PROMPT_JEDNO
= SK_PROMPT_NUMBERS_BASE
+112,
48 SK_PROMPT_DVE
= SK_PROMPT_NUMBERS_BASE
+113,
49 SK_PROMPT_CELA
= SK_PROMPT_NUMBERS_BASE
+114,
50 SK_PROMPT_CELE
= SK_PROMPT_NUMBERS_BASE
+115,
51 SK_PROMPT_CELYCH
= SK_PROMPT_NUMBERS_BASE
+116,
52 SK_PROMPT_MINUS
= SK_PROMPT_NUMBERS_BASE
+117,
54 SK_PROMPT_UNITS_BASE
= 118, //(jeden)volt,(dva)volty,(pet)voltu,(desetina)voltu
59 #define SK_PUSH_UNIT_PROMPT(u, p) sk_pushUnitPrompt((u), (p), id)
65 I18N_PLAY_FUNCTION(sk
, pushUnitPrompt
, uint8_t unitprompt
, int16_t number
)
68 PUSH_UNIT_PROMPT(unitprompt
, 0);
69 else if (number
> 1 && number
< 5)
70 PUSH_UNIT_PROMPT(unitprompt
, 1);
72 PUSH_UNIT_PROMPT(unitprompt
, 2);
75 I18N_PLAY_FUNCTION(sk
, playNumber
, getvalue_t number
, uint8_t unit
, uint8_t att
)
79 PUSH_NUMBER_PROMPT(SK_PROMPT_MINUS
);
84 int8_t mode
= MODE(att
);
89 div_t qr
= div((int)number
, 10);
91 PLAY_NUMBER(qr
.quot
, 0, ZENSKY
);
93 PUSH_NUMBER_PROMPT(SK_PROMPT_CELA
);
95 SK_PUSH_UNIT_PROMPT(SK_PROMPT_CELA
, qr
.quot
);
96 PLAY_NUMBER(qr
.rem
, 0, ZENSKY
);
97 PUSH_NUMBER_PROMPT(SK_PROMPT_UNITS_BASE
+((unit
-1)*4)+3);
105 int16_t tmp
= number
;
130 if ((number
== 1) && (att
== MUZSKY
)) {
131 PUSH_NUMBER_PROMPT(SK_PROMPT_JEDEN
);
135 if ((number
== 1) && (att
== STREDNI
)) {
136 PUSH_NUMBER_PROMPT(SK_PROMPT_JEDNO
);
140 if ((number
== 2) && ((att
== ZENSKY
) || (att
== STREDNI
))) {
141 PUSH_NUMBER_PROMPT(SK_PROMPT_DVE
);
145 if (number
>= 1000) {
147 PLAY_NUMBER(number
/ 1000, 0, 0);
148 if (number
>= 2000 && number
< 3000)
149 PUSH_NUMBER_PROMPT(SK_PROMPT_DVETISIC
);
151 PUSH_NUMBER_PROMPT(SK_PROMPT_TISIC
);
158 PUSH_NUMBER_PROMPT(SK_PROMPT_STO
+ (number
/100)-1);
165 PUSH_NUMBER_PROMPT(SK_PROMPT_NULA
+number
);
169 SK_PUSH_UNIT_PROMPT(unit
, tmp
);
173 I18N_PLAY_FUNCTION(sk
, playDuration
, int seconds PLAY_DURATION_ATT
)
176 PUSH_NUMBER_PROMPT(SK_PROMPT_MINUS
);
180 uint8_t tmp
= seconds
/ 3600;
182 if (tmp
> 0 || IS_PLAY_TIME()) {
183 PLAY_NUMBER(tmp
, UNIT_HOURS
, ZENSKY
);
189 PLAY_NUMBER(tmp
, UNIT_MINUTES
, ZENSKY
);
193 PLAY_NUMBER(seconds
, UNIT_SECONDS
, ZENSKY
);
197 LANGUAGE_PACK_DECLARE(sk
, "Slovak");