NL TTS as copy of EN as per new info on #6108.

This commit is contained in:
Kilrah
2018-08-19 11:43:04 +02:00
parent d3d5e6f215
commit 9df21ceb6e
4 changed files with 30 additions and 13 deletions
+2 -2
View File
@@ -325,8 +325,8 @@ void GeneralSetupPanel::populateBacklightCB()
void GeneralSetupPanel::populateVoiceLangCB() void GeneralSetupPanel::populateVoiceLangCB()
{ {
QComboBox * b = ui->voiceLang_CB; QComboBox * b = ui->voiceLang_CB;
QString strings[] = { tr("English"), tr("French"), tr("Italian"), tr("German"), tr("Czech"), tr("Slovak"), tr("Spanish"), tr("Polish"), tr("Portuguese"), tr("Russian"), tr("Swedish"), tr("Hungarian"), NULL}; QString strings[] = { tr("English"), tr("Dutch"), tr("French"), tr("Italian"), tr("German"), tr("Czech"), tr("Slovak"), tr("Spanish"), tr("Polish"), tr("Portuguese"), tr("Russian"), tr("Swedish"), tr("Hungarian"), NULL};
QString langcode[] = { "en", "fr", "it", "de", "cz", "sk", "es", "pl", "pt", "ru", "se", "hu", NULL}; QString langcode[] = { "en", "nl","fr", "it", "de", "cz", "sk", "es", "pl", "pt", "ru", "se", "hu", NULL};
b->clear(); b->clear();
for (int i=0; strings[i]!=NULL; i++) { for (int i=0; strings[i]!=NULL; i++) {
+1 -1
View File
@@ -3,7 +3,7 @@ include(Bitmaps)
set(PCB_TYPES X7 XLITE X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X) set(PCB_TYPES X7 XLITE X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X)
set(GUI_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL) set(GUI_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL)
set(TTS_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU RU) set(TTS_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL RU)
set(PCB "X9D+" CACHE STRING "Radio type, one of: ${PCB_TYPES}") set(PCB "X9D+" CACHE STRING "Radio type, one of: ${PCB_TYPES}")
set_property(CACHE PCB PROPERTY STRINGS ${PCB_TYPES}) set_property(CACHE PCB PROPERTY STRINGS ${PCB_TYPES})
+6 -4
View File
@@ -766,17 +766,18 @@ extern const char STR_BLCOLOR[];
extern uint8_t currentLanguagePackIdx; extern uint8_t currentLanguagePackIdx;
extern const LanguagePack czLanguagePack; extern const LanguagePack czLanguagePack;
extern const LanguagePack deLanguagePack;
extern const LanguagePack enLanguagePack; extern const LanguagePack enLanguagePack;
extern const LanguagePack esLanguagePack; extern const LanguagePack esLanguagePack;
extern const LanguagePack frLanguagePack; extern const LanguagePack frLanguagePack;
extern const LanguagePack deLanguagePack; extern const LanguagePack huLanguagePack;
extern const LanguagePack itLanguagePack; extern const LanguagePack itLanguagePack;
extern const LanguagePack nlLanguagePack;
extern const LanguagePack plLanguagePack; extern const LanguagePack plLanguagePack;
extern const LanguagePack ptLanguagePack; extern const LanguagePack ptLanguagePack;
extern const LanguagePack skLanguagePack;
extern const LanguagePack seLanguagePack;
extern const LanguagePack huLanguagePack;
extern const LanguagePack ruLanguagePack; extern const LanguagePack ruLanguagePack;
extern const LanguagePack seLanguagePack;
extern const LanguagePack skLanguagePack;
extern const LanguagePack * const languagePacks[]; extern const LanguagePack * const languagePacks[];
#if defined(LANGUAGE_PACKS_DEFINITION) #if defined(LANGUAGE_PACKS_DEFINITION)
const LanguagePack * const languagePacks[] = { const LanguagePack * const languagePacks[] = {
@@ -788,6 +789,7 @@ extern const char STR_BLCOLOR[];
&frLanguagePack, &frLanguagePack,
&huLanguagePack, &huLanguagePack,
&itLanguagePack, &itLanguagePack,
&nlLanguagePack,
&plLanguagePack, &plLanguagePack,
&ptLanguagePack, &ptLanguagePack,
&ruLanguagePack, &ruLanguagePack,
+21 -6
View File
@@ -1,8 +1,21 @@
/* /*
* Authors (alphabetical order) * Authors (alphabetical order)
* - Andre Bernet <bernet.andre@gmail.com> * - Andre Bernet <bernet.andre@gmail.com>
* - Andreas Weitl
* - Bertrand Songis <bsongis@gmail.com> * - Bertrand Songis <bsongis@gmail.com>
* - Jean-Pierre van Melis * - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
* - Cameron Weeks <th9xer@gmail.com>
* - Erez Raviv
* - Gabriel Birkus
* - Jean-Pierre Parisy
* - Karl Szmutny
* - Michael Blandford
* - Michal Hlavinka
* - Pat Mackenzie
* - Philip Moss
* - Rob Thomson
* - Romolo Manfredini <romolo.manfredini@gmail.com>
* - Thomas Husterer
* *
* opentx is based on code named * opentx is based on code named
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
@@ -21,6 +34,8 @@
* *
*/ */
// NOTE: This file is identical to the EN version
#include "opentx.h" #include "opentx.h"
enum DutchPrompts { enum DutchPrompts {
@@ -32,13 +47,13 @@ enum DutchPrompts {
NL_PROMPT_MINUS = NL_PROMPT_NUMBERS_BASE+111, NL_PROMPT_MINUS = NL_PROMPT_NUMBERS_BASE+111,
NL_PROMPT_POINT = NL_PROMPT_NUMBERS_BASE+112, NL_PROMPT_POINT = NL_PROMPT_NUMBERS_BASE+112,
NL_PROMPT_UNITS_BASE = 113, NL_PROMPT_UNITS_BASE = 113,
NL_PROMPT_POINT_BASE = 165, //.0 - .9 NL_PROMPT_POINT_BASE = 167, //.0 - .9
}; };
#define NL_PUSH_UNIT_PROMPT(u, p) nl_pushUnitPrompt((u), (p), id) #define NL_PUSH_UNIT_PROMPT(u, p) nl_pushUnitPrompt((u), (p), id)
I18N_PLAY_FUNCTION(nl, pushUnitPrompt, uint8_t unitprompt, int16_t number) I18N_PLAY_FUNCTION(nl, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{ {
if (number == 1) if (number == 1)
PUSH_UNIT_PROMPT(unitprompt, 0); PUSH_UNIT_PROMPT(unitprompt, 0);
@@ -59,7 +74,7 @@ I18N_PLAY_FUNCTION(nl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (mode == 2) { if (mode == 2) {
number /= 10; number /= 10;
} }
div_t qr = div(number, 10); div_t qr = div((int)number, 10);
if (qr.rem) { if (qr.rem) {
PLAY_NUMBER(qr.quot, 0, 0); PLAY_NUMBER(qr.quot, 0, 0);
PUSH_NUMBER_PROMPT(NL_PROMPT_POINT_BASE + qr.rem); PUSH_NUMBER_PROMPT(NL_PROMPT_POINT_BASE + qr.rem);
@@ -75,7 +90,6 @@ I18N_PLAY_FUNCTION(nl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number >= 1000) { if (number >= 1000) {
PLAY_NUMBER(number / 1000, 0, 0); PLAY_NUMBER(number / 1000, 0, 0);
PUSH_NUMBER_PROMPT(NL_PROMPT_THOUSAND); PUSH_NUMBER_PROMPT(NL_PROMPT_THOUSAND);
number %= 1000; number %= 1000;
if (number == 0) if (number == 0)
number = -1; number = -1;
@@ -120,10 +134,11 @@ I18N_PLAY_FUNCTION(nl, playDuration, int seconds PLAY_DURATION_ATT)
if (seconds > 0) if (seconds > 0)
PUSH_NUMBER_PROMPT(NL_PROMPT_AND); PUSH_NUMBER_PROMPT(NL_PROMPT_AND);
} }
if (seconds > 0) { if (seconds > 0) {
PLAY_NUMBER(seconds, UNIT_SECONDS, 0); PLAY_NUMBER(seconds, UNIT_SECONDS, 0);
} }
} }
LANGUAGE_PACK_DECLARE(nl, "Nederlands"); LANGUAGE_PACK_DECLARE(nl, "Dutch");