diff --git a/src/Makefile b/src/Makefile index 593023af2..32aa824f3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -652,7 +652,7 @@ TARGET = opentx # List C++ source files here. (C dependencies are automatically generated.) ifeq ($(PCB), $(filter $(PCB), SKY9X TARANIS)) - TTS_SRC = translations/tts_en.cpp translations/tts_fr.cpp translations/tts_it.cpp + TTS_SRC = translations/tts_de.cpp translations/tts_en.cpp translations/tts_fr.cpp translations/tts_it.cpp else STD_TTS_SRC = translations/tts_$(shell sh -c "echo $(TTS) | tr '[:upper:]' '[:lower:]'").cpp TTS_SRC = $(shell sh -c "if test -f $(STD_TTS_SRC); then echo $(STD_TTS_SRC); else echo translations/tts_en.cpp; fi") diff --git a/src/gui/menu_general.cpp b/src/gui/menu_general.cpp index 6b6e94d22..4b47c1ffa 100644 --- a/src/gui/menu_general.cpp +++ b/src/gui/menu_general.cpp @@ -43,11 +43,13 @@ const pm_uchar sticks[] PROGMEM = { #if defined(CPUARM) extern LanguagePack enLanguagePack; extern LanguagePack frLanguagePack; +extern LanguagePack deLanguagePack; extern LanguagePack itLanguagePack; LanguagePack * languagePacks[] = { // alphabetical order &enLanguagePack, &frLanguagePack, + &deLanguagePack, &itLanguagePack, NULL }; @@ -496,7 +498,7 @@ void menuGeneralSetup(uint8_t event) #if defined(CPUARM) case ITEM_SETUP_LANGUAGE: - lcd_putsLeft(y, PSTR("Language")); + lcd_putsLeft(y, PSTR("Voice Language")); lcd_putsAtt(RADIO_SETUP_2ND_COLUMN, y, currentLanguagePack->name, attr); if (attr) { currentLanguagePackIdx = checkIncDec(event, currentLanguagePackIdx, 0, DIM(languagePacks)-2, EE_GENERAL); diff --git a/src/translations/tts_de.cpp b/src/translations/tts_de.cpp index 50eb94e39..34ade62a6 100644 --- a/src/translations/tts_de.cpp +++ b/src/translations/tts_de.cpp @@ -25,71 +25,71 @@ #include "../opentx.h" enum GermanPrompts { - PROMPT_NUMBERS_BASE = 0, - PROMPT_NULL = PROMPT_NUMBERS_BASE+0, - PROMPT_HUNDERT = PROMPT_NUMBERS_BASE+100, - PROMPT_TAUSEND = PROMPT_NUMBERS_BASE+101, - PROMPT_COMMA = 102, - PROMPT_UND, - PROMPT_MINUS, - PROMPT_UHR, - PROMPT_MINUTE, - PROMPT_MINUTEN, - PROMPT_SECUNDE, - PROMPT_SECUNDEN, + DE_PROMPT_NUMBERS_BASE = 0, + DE_PROMPT_NULL = DE_PROMPT_NUMBERS_BASE+0, + DE_PROMPT_HUNDERT = DE_PROMPT_NUMBERS_BASE+100, + DE_PROMPT_TAUSEND = DE_PROMPT_NUMBERS_BASE+101, + DE_PROMPT_COMMA = 102, + DE_PROMPT_UND, + DE_PROMPT_MINUS, + DE_PROMPT_UHR, + DE_PROMPT_MINUTE, + DE_PROMPT_MINUTEN, + DE_PROMPT_SECUNDE, + DE_PROMPT_SECUNDEN, - PROMPT_UNITS_BASE = 110, - PROMPT_VOLTS = PROMPT_UNITS_BASE+UNIT_VOLTS, - PROMPT_AMPS = PROMPT_UNITS_BASE+UNIT_AMPS, - PROMPT_METERS_PER_SECOND = PROMPT_UNITS_BASE+UNIT_METERS_PER_SECOND, - PROMPT_SPARE1 = PROMPT_UNITS_BASE+UNIT_RAW, - PROMPT_KMH = PROMPT_UNITS_BASE+UNIT_KMH, - PROMPT_METERS = PROMPT_UNITS_BASE+UNIT_METERS, - PROMPT_DEGREES = PROMPT_UNITS_BASE+UNIT_DEGREES, - PROMPT_PERCENT = PROMPT_UNITS_BASE+UNIT_PERCENT, - PROMPT_MILLIAMPS = PROMPT_UNITS_BASE+UNIT_MILLIAMPS, - PROMPT_MAH = PROMPT_UNITS_BASE+UNIT_MAH, - PROMPT_WATTS = PROMPT_UNITS_BASE+UNIT_WATTS, - PROMPT_FEET = PROMPT_UNITS_BASE+UNIT_FEET, - PROMPT_KTS = PROMPT_UNITS_BASE+UNIT_KTS, - PROMPT_HOURS = PROMPT_UNITS_BASE+UNIT_HOURS, - PROMPT_MINUTES = PROMPT_UNITS_BASE+UNIT_MINUTES, - PROMPT_SECONDS = PROMPT_UNITS_BASE+UNIT_SECONDS, - PROMPT_RPMS = PROMPT_UNITS_BASE+UNIT_RPMS, - PROMPT_G= PROMPT_UNITS_BASE+UNIT_G, + DE_PROMPT_UNITS_BASE = 110, + DE_PROMPT_VOLTS = DE_PROMPT_UNITS_BASE+UNIT_VOLTS, + DE_PROMPT_AMPS = DE_PROMPT_UNITS_BASE+UNIT_AMPS, + DE_PROMPT_METERS_PER_SECOND = DE_PROMPT_UNITS_BASE+UNIT_METERS_PER_SECOND, + DE_PROMPT_SPARE1 = DE_PROMPT_UNITS_BASE+UNIT_RAW, + DE_PROMPT_KMH = DE_PROMPT_UNITS_BASE+UNIT_KMH, + DE_PROMPT_METERS = DE_PROMPT_UNITS_BASE+UNIT_METERS, + DE_PROMPT_DEGREES = DE_PROMPT_UNITS_BASE+UNIT_DEGREES, + DE_PROMPT_PERCENT = DE_PROMPT_UNITS_BASE+UNIT_PERCENT, + DE_PROMPT_MILLIAMPS = DE_PROMPT_UNITS_BASE+UNIT_MILLIAMPS, + DE_PROMPT_MAH = DE_PROMPT_UNITS_BASE+UNIT_MAH, + DE_PROMPT_WATTS = DE_PROMPT_UNITS_BASE+UNIT_WATTS, + DE_PROMPT_FEET = DE_PROMPT_UNITS_BASE+UNIT_FEET, + DE_PROMPT_KTS = DE_PROMPT_UNITS_BASE+UNIT_KTS, + DE_PROMPT_HOURS = DE_PROMPT_UNITS_BASE+UNIT_HOURS, + DE_PROMPT_MINUTES = DE_PROMPT_UNITS_BASE+UNIT_MINUTES, + DE_PROMPT_SECONDS = DE_PROMPT_UNITS_BASE+UNIT_SECONDS, + DE_PROMPT_RPMS = DE_PROMPT_UNITS_BASE+UNIT_RPMS, + DE_PROMPT_G= DE_PROMPT_UNITS_BASE+UNIT_G, - PROMPT_LABELS_BASE = 128, - PROMPT_TIMER1 = PROMPT_LABELS_BASE+TELEM_TM1, - PROMPT_TIMER2 = PROMPT_LABELS_BASE+TELEM_TM2, - PROMPT_RSSI_TX = PROMPT_LABELS_BASE+TELEM_RSSI_TX, - PROMPT_RSSI_RX = PROMPT_LABELS_BASE+TELEM_RSSI_RX, - PROMPT_A1 = PROMPT_LABELS_BASE+TELEM_A1, - PROMPT_A2 = PROMPT_LABELS_BASE+TELEM_A2, - PROMPT_ALTITUDE = PROMPT_LABELS_BASE+TELEM_ALT, - PROMPT_RPM = PROMPT_LABELS_BASE+TELEM_RPM, - PROMPT_ESSENCE = PROMPT_LABELS_BASE+TELEM_FUEL, - PROMPT_T1 = PROMPT_LABELS_BASE+TELEM_T1, - PROMPT_T2 = PROMPT_LABELS_BASE+TELEM_T2, - PROMPT_VITESSE = PROMPT_LABELS_BASE+TELEM_SPEED, - PROMPT_DISTANCE = PROMPT_LABELS_BASE+TELEM_DIST, - PROMPT_GPSALTITUDE = PROMPT_LABELS_BASE+TELEM_GPSALT, - PROMPT_ELEMENTS_LIPO = PROMPT_LABELS_BASE+TELEM_CELL, - PROMPT_TOTAL_LIPO = PROMPT_LABELS_BASE+TELEM_CELLS_SUM, - PROMPT_VFAS = PROMPT_LABELS_BASE+TELEM_VFAS, - PROMPT_COURANT = PROMPT_LABELS_BASE+TELEM_CURRENT, - PROMPT_CONSOMMATION = PROMPT_LABELS_BASE+TELEM_CONSUMPTION, - PROMPT_PUISSANCE = PROMPT_LABELS_BASE+TELEM_POWER, - PROMPT_ACCELx = PROMPT_LABELS_BASE+TELEM_ACCx, - PROMPT_ACCELy = PROMPT_LABELS_BASE+TELEM_ACCy, - PROMPT_ACCELz = PROMPT_LABELS_BASE+TELEM_ACCz, - PROMPT_HDG = PROMPT_LABELS_BASE+TELEM_HDG, - PROMPT_VARIO = PROMPT_LABELS_BASE+TELEM_VSPD, + DE_PROMPT_LABELS_BASE = 128, + DE_PROMPT_TIMER1 = DE_PROMPT_LABELS_BASE+TELEM_TM1, + DE_PROMPT_TIMER2 = DE_PROMPT_LABELS_BASE+TELEM_TM2, + DE_PROMPT_RSSI_TX = DE_PROMPT_LABELS_BASE+TELEM_RSSI_TX, + DE_PROMPT_RSSI_RX = DE_PROMPT_LABELS_BASE+TELEM_RSSI_RX, + DE_PROMPT_A1 = DE_PROMPT_LABELS_BASE+TELEM_A1, + DE_PROMPT_A2 = DE_PROMPT_LABELS_BASE+TELEM_A2, + DE_PROMPT_ALTITUDE = DE_PROMPT_LABELS_BASE+TELEM_ALT, + DE_PROMPT_RPM = DE_PROMPT_LABELS_BASE+TELEM_RPM, + DE_PROMPT_ESSENCE = DE_PROMPT_LABELS_BASE+TELEM_FUEL, + DE_PROMPT_T1 = DE_PROMPT_LABELS_BASE+TELEM_T1, + DE_PROMPT_T2 = DE_PROMPT_LABELS_BASE+TELEM_T2, + DE_PROMPT_VITESSE = DE_PROMPT_LABELS_BASE+TELEM_SPEED, + DE_PROMPT_DISTANCE = DE_PROMPT_LABELS_BASE+TELEM_DIST, + DE_PROMPT_GPSALTITUDE = DE_PROMPT_LABELS_BASE+TELEM_GPSALT, + DE_PROMPT_ELEMENTS_LIPO = DE_PROMPT_LABELS_BASE+TELEM_CELL, + DE_PROMPT_TOTAL_LIPO = DE_PROMPT_LABELS_BASE+TELEM_CELLS_SUM, + DE_PROMPT_VFAS = DE_PROMPT_LABELS_BASE+TELEM_VFAS, + DE_PROMPT_COURANT = DE_PROMPT_LABELS_BASE+TELEM_CURRENT, + DE_PROMPT_CONSOMMATION = DE_PROMPT_LABELS_BASE+TELEM_CONSUMPTION, + DE_PROMPT_PUISSANCE = DE_PROMPT_LABELS_BASE+TELEM_POWER, + DE_PROMPT_ACCELx = DE_PROMPT_LABELS_BASE+TELEM_ACCx, + DE_PROMPT_ACCELy = DE_PROMPT_LABELS_BASE+TELEM_ACCy, + DE_PROMPT_ACCELz = DE_PROMPT_LABELS_BASE+TELEM_ACCz, + DE_PROMPT_HDG = DE_PROMPT_LABELS_BASE+TELEM_HDG, + DE_PROMPT_VARIO = DE_PROMPT_LABELS_BASE+TELEM_VSPD, }; #if defined(VOICE) -PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) +I18N_PLAY_FUNCTION(de, playNumber, getvalue_t number, uint8_t unit, uint8_t att) { /* if digit >= 1000000000: temp_digit, digit = divmod(digit, 1000000000) @@ -102,7 +102,7 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) */ if (number < 0) { - PUSH_NUMBER_PROMPT(PROMPT_MINUS); + PUSH_NUMBER_PROMPT(DE_PROMPT_MINUS); number = -number; } @@ -122,9 +122,9 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) div_t qr = div(number, (mode == 1 ? 10 : 100)); if (qr.rem > 0) { PLAY_NUMBER(qr.quot, 0, 0); - PUSH_NUMBER_PROMPT(PROMPT_COMMA); + PUSH_NUMBER_PROMPT(DE_PROMPT_COMMA); if (mode==2 && qr.rem < 10) - PUSH_NUMBER_PROMPT(PROMPT_NULL); + PUSH_NUMBER_PROMPT(DE_PROMPT_NULL); PLAY_NUMBER(qr.rem, unit, 0); } else { @@ -136,9 +136,9 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) if (number >= 1000) { if (number >= 1100) { PLAY_NUMBER(number / 1000, 0, 0); - PUSH_NUMBER_PROMPT(PROMPT_TAUSEND); + PUSH_NUMBER_PROMPT(DE_PROMPT_TAUSEND); } else { - PUSH_NUMBER_PROMPT(PROMPT_TAUSEND); + PUSH_NUMBER_PROMPT(DE_PROMPT_TAUSEND); } number %= 1000; if (number == 0) @@ -146,23 +146,23 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) } if (number >= 100) { if (number >= 200) - PUSH_NUMBER_PROMPT(PROMPT_NULL + number/100); - PUSH_NUMBER_PROMPT(PROMPT_HUNDERT); + PUSH_NUMBER_PROMPT(DE_PROMPT_NULL + number/100); + PUSH_NUMBER_PROMPT(DE_PROMPT_HUNDERT); number %= 100; if (number == 0) number = -1; } - PUSH_NUMBER_PROMPT(PROMPT_NULL+number); + PUSH_NUMBER_PROMPT(DE_PROMPT_NULL+number); if (unit) { - PUSH_NUMBER_PROMPT(PROMPT_UNITS_BASE+unit-1); + PUSH_NUMBER_PROMPT(DE_PROMPT_UNITS_BASE+unit-1); } } -PLAY_FUNCTION(playDuration, int16_t seconds) +I18N_PLAY_FUNCTION(de, playDuration, int16_t seconds) { if (seconds < 0) { - PUSH_NUMBER_PROMPT(PROMPT_MINUS); + PUSH_NUMBER_PROMPT(DE_PROMPT_MINUS); seconds = -seconds; } @@ -171,7 +171,7 @@ PLAY_FUNCTION(playDuration, int16_t seconds) seconds %= 3600; if (tmp > 0) { PLAY_NUMBER(tmp, 0, 0); - PUSH_NUMBER_PROMPT(PROMPT_UHR); + PUSH_NUMBER_PROMPT(DE_PROMPT_UHR); } tmp = seconds / 60; @@ -179,18 +179,20 @@ PLAY_FUNCTION(playDuration, int16_t seconds) if (tmp > 0 || ore >0) { PLAY_NUMBER(tmp, 0, 0); if (tmp != 1) { - PUSH_NUMBER_PROMPT(PROMPT_MINUTEN); + PUSH_NUMBER_PROMPT(DE_PROMPT_MINUTEN); } else { - PUSH_NUMBER_PROMPT(PROMPT_MINUTE); + PUSH_NUMBER_PROMPT(DE_PROMPT_MINUTE); } - PUSH_NUMBER_PROMPT(PROMPT_UND); + PUSH_NUMBER_PROMPT(DE_PROMPT_UND); } PLAY_NUMBER(seconds, 0, 0); if (seconds != 1) { - PUSH_NUMBER_PROMPT(PROMPT_SECUNDEN); + PUSH_NUMBER_PROMPT(DE_PROMPT_SECUNDEN); } else { - PUSH_NUMBER_PROMPT(PROMPT_SECUNDE); + PUSH_NUMBER_PROMPT(DE_PROMPT_SECUNDE); } } +LANGUAGE_PACK_DECLARE(de, "german"); + #endif