mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 13:25:20 +03:00
Nederlands added
This commit is contained in:
parent
8c2b963395
commit
d0bee7d666
8 changed files with 1377 additions and 19 deletions
|
@ -89,26 +89,27 @@ class OpenTxFirmware: public Firmware {
|
||||||
Firmware(id, name, board, new OpenTxEepromInterface(board))
|
Firmware(id, name, board, new OpenTxEepromInterface(board))
|
||||||
{
|
{
|
||||||
addLanguage("en");
|
addLanguage("en");
|
||||||
|
addLanguage("cz");
|
||||||
|
addLanguage("de");
|
||||||
|
addLanguage("es");
|
||||||
addLanguage("fr");
|
addLanguage("fr");
|
||||||
addLanguage("it");
|
addLanguage("it");
|
||||||
addLanguage("de");
|
addLanguage("nl");
|
||||||
addLanguage("se");
|
|
||||||
addLanguage("cz");
|
|
||||||
addLanguage("es");
|
|
||||||
addLanguage("pl");
|
addLanguage("pl");
|
||||||
addLanguage("pt");
|
addLanguage("pt");
|
||||||
|
addLanguage("se");
|
||||||
|
|
||||||
addTTSLanguage("en");
|
addTTSLanguage("en");
|
||||||
addTTSLanguage("fr");
|
|
||||||
addTTSLanguage("it");
|
|
||||||
addTTSLanguage("de");
|
|
||||||
addTTSLanguage("se");
|
|
||||||
addTTSLanguage("cz");
|
addTTSLanguage("cz");
|
||||||
addTTSLanguage("sk");
|
addTTSLanguage("es");
|
||||||
|
addTTSLanguage("fr");
|
||||||
|
addTTSLanguage("hu");
|
||||||
|
addTTSLanguage("it");
|
||||||
|
addTTSLanguage("nl");
|
||||||
addTTSLanguage("pl");
|
addTTSLanguage("pl");
|
||||||
addTTSLanguage("pt");
|
addTTSLanguage("pt");
|
||||||
addTTSLanguage("es");
|
addTTSLanguage("se");
|
||||||
addTTSLanguage("hu");
|
addTTSLanguage("sk");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Firmware * getFirmwareVariant(const QString & id);
|
virtual Firmware * getFirmwareVariant(const QString & id);
|
||||||
|
|
|
@ -265,13 +265,14 @@ namespace NAMESPACE {
|
||||||
#include "radio/src/translations/tts_cz.cpp"
|
#include "radio/src/translations/tts_cz.cpp"
|
||||||
#include "radio/src/translations/tts_de.cpp"
|
#include "radio/src/translations/tts_de.cpp"
|
||||||
#include "radio/src/translations/tts_es.cpp"
|
#include "radio/src/translations/tts_es.cpp"
|
||||||
#include "radio/src/translations/tts_se.cpp"
|
|
||||||
#include "radio/src/translations/tts_it.cpp"
|
|
||||||
#include "radio/src/translations/tts_fr.cpp"
|
#include "radio/src/translations/tts_fr.cpp"
|
||||||
#include "radio/src/translations/tts_pt.cpp"
|
|
||||||
#include "radio/src/translations/tts_sk.cpp"
|
|
||||||
#include "radio/src/translations/tts_pl.cpp"
|
|
||||||
#include "radio/src/translations/tts_hu.cpp"
|
#include "radio/src/translations/tts_hu.cpp"
|
||||||
|
#include "radio/src/translations/tts_it.cpp"
|
||||||
|
#include "radio/src/translations/tts_nl.cpp"
|
||||||
|
#include "radio/src/translations/tts_pl.cpp"
|
||||||
|
#include "radio/src/translations/tts_pt.cpp"
|
||||||
|
#include "radio/src/translations/tts_se.cpp"
|
||||||
|
#include "radio/src/translations/tts_sk.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LUA)
|
#if defined(LUA)
|
||||||
|
|
|
@ -238,7 +238,7 @@ TX_CADDY = NO
|
||||||
IRPROTOS = NO
|
IRPROTOS = NO
|
||||||
|
|
||||||
# TRANSLATIONS
|
# TRANSLATIONS
|
||||||
# Values = cz, de, en, fi, fr, it, se, es, pl, pt
|
# Values = cz, de, en, fi, fr, it, se, es, pl, pt, nl
|
||||||
TRANSLATIONS = EN
|
TRANSLATIONS = EN
|
||||||
|
|
||||||
# TTS
|
# TTS
|
||||||
|
@ -1043,7 +1043,7 @@ TARGET = opentx
|
||||||
|
|
||||||
# List C++ source files here. (C dependencies are automatically generated.)
|
# List C++ source files here. (C dependencies are automatically generated.)
|
||||||
ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO TARANIS))
|
ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO TARANIS))
|
||||||
TTS_SRC = translations/tts_cz.cpp translations/tts_de.cpp translations/tts_en.cpp translations/tts_es.cpp translations/tts_fr.cpp translations/tts_it.cpp translations/tts_pt.cpp translations/tts_sk.cpp translations/tts_se.cpp translations/tts_pl.cpp translations/tts_hu.cpp
|
TTS_SRC = translations/tts_cz.cpp translations/tts_de.cpp translations/tts_en.cpp translations/tts_es.cpp translations/tts_fr.cpp translations/tts_it.cpp translations/tts_nl.cpp translations/tts_pt.cpp translations/tts_sk.cpp translations/tts_se.cpp translations/tts_pl.cpp translations/tts_hu.cpp
|
||||||
else
|
else
|
||||||
STD_TTS_SRC = translations/tts_$(shell sh -c "echo $(TTS) | tr '[:upper:]' '[:lower:]'").cpp
|
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")
|
TTS_SRC = $(shell sh -c "if test -f $(STD_TTS_SRC); then echo $(STD_TTS_SRC); else echo translations/tts_en.cpp; fi")
|
||||||
|
@ -1451,7 +1451,7 @@ bootloader.lbm:
|
||||||
mv bootflash4.lbm $@
|
mv bootflash4.lbm $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
tra: translations/en.h translations/cz.h translations/de.h translations/es.h translations/fi.h translations/fr.h translations/it.h translations/pl.h translations/pt.h translations/se.h
|
tra: translations/en.h translations/cz.h translations/de.h translations/es.h translations/fi.h translations/fr.h translations/it.h translations/nl.h translations/pl.h translations/pt.h translations/se.h
|
||||||
lbm: fonts bitmaps
|
lbm: fonts bitmaps
|
||||||
|
|
||||||
elf: $(TARGET).elf
|
elf: $(TARGET).elf
|
||||||
|
@ -1509,6 +1509,11 @@ translations/it.h: translations/it.h.txt
|
||||||
@echo "Create Italian language specific header files"
|
@echo "Create Italian language specific header files"
|
||||||
$(TRANSLATE) translations/it.h.txt translations/it.h it
|
$(TRANSLATE) translations/it.h.txt translations/it.h it
|
||||||
|
|
||||||
|
translations/nl.h: translations/nl.h.txt
|
||||||
|
@echo
|
||||||
|
@echo "Create Nederlands language specific header files"
|
||||||
|
$(TRANSLATE) translations/nl.h.txt translations/nl.h nl
|
||||||
|
|
||||||
translations/pl.h: translations/pl.h.txt
|
translations/pl.h: translations/pl.h.txt
|
||||||
@echo
|
@echo
|
||||||
@echo "Create Polish language specific header files"
|
@echo "Create Polish language specific header files"
|
||||||
|
|
|
@ -42,6 +42,7 @@ extern LP_CONST LanguagePack esLanguagePack;
|
||||||
extern LP_CONST LanguagePack frLanguagePack;
|
extern LP_CONST LanguagePack frLanguagePack;
|
||||||
extern LP_CONST LanguagePack deLanguagePack;
|
extern LP_CONST LanguagePack deLanguagePack;
|
||||||
extern LP_CONST LanguagePack itLanguagePack;
|
extern LP_CONST LanguagePack itLanguagePack;
|
||||||
|
extern LP_CONST LanguagePack nlLanguagePack;
|
||||||
extern LP_CONST LanguagePack plLanguagePack;
|
extern LP_CONST LanguagePack plLanguagePack;
|
||||||
extern LP_CONST LanguagePack ptLanguagePack;
|
extern LP_CONST LanguagePack ptLanguagePack;
|
||||||
extern LP_CONST LanguagePack skLanguagePack;
|
extern LP_CONST LanguagePack skLanguagePack;
|
||||||
|
@ -57,6 +58,7 @@ const LanguagePack * LP_CONST languagePacks[] = {
|
||||||
&frLanguagePack,
|
&frLanguagePack,
|
||||||
&huLanguagePack,
|
&huLanguagePack,
|
||||||
&itLanguagePack,
|
&itLanguagePack,
|
||||||
|
&nlLanguagePack,
|
||||||
&plLanguagePack,
|
&plLanguagePack,
|
||||||
&ptLanguagePack,
|
&ptLanguagePack,
|
||||||
&seLanguagePack,
|
&seLanguagePack,
|
||||||
|
|
1
radio/src/translations/.gitignore
vendored
1
radio/src/translations/.gitignore
vendored
|
@ -5,6 +5,7 @@
|
||||||
/fi.h
|
/fi.h
|
||||||
/fr.h
|
/fr.h
|
||||||
/it.h
|
/it.h
|
||||||
|
/nl.h
|
||||||
/pl.h
|
/pl.h
|
||||||
/pt.h
|
/pt.h
|
||||||
/se.h
|
/se.h
|
||||||
|
|
1121
radio/src/translations/nl.h.txt
Executable file
1121
radio/src/translations/nl.h.txt
Executable file
File diff suppressed because it is too large
Load diff
225
radio/src/translations/tts_nl.cpp
Executable file
225
radio/src/translations/tts_nl.cpp
Executable file
|
@ -0,0 +1,225 @@
|
||||||
|
/*
|
||||||
|
* Authors (alphabetical order)
|
||||||
|
* - Andre Bernet <bernet.andre@gmail.com>
|
||||||
|
* - Bertrand Songis <bsongis@gmail.com>
|
||||||
|
* - Jean-Pierre van Melis
|
||||||
|
*
|
||||||
|
* opentx is based on code named
|
||||||
|
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||||
|
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||||
|
* and the original (and ongoing) project by
|
||||||
|
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../opentx.h"
|
||||||
|
|
||||||
|
enum DutchPrompts {
|
||||||
|
NL_PROMPT_NUMBERS_BASE = 0,
|
||||||
|
NL_PROMPT_ZERO = NL_PROMPT_NUMBERS_BASE+0, //02-99
|
||||||
|
NL_PROMPT_HUNDRED = NL_PROMPT_NUMBERS_BASE+100, //100,200 .. 900
|
||||||
|
NL_PROMPT_THOUSAND = NL_PROMPT_NUMBERS_BASE+109, //1000
|
||||||
|
NL_PROMPT_AND = NL_PROMPT_NUMBERS_BASE+110,
|
||||||
|
NL_PROMPT_MINUS = NL_PROMPT_NUMBERS_BASE+111,
|
||||||
|
NL_PROMPT_POINT = NL_PROMPT_NUMBERS_BASE+112,
|
||||||
|
NL_PROMPT_UNITS_BASE = 113,
|
||||||
|
NL_PROMPT_POINT_BASE = 165, //.0 - .9
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(VOICE)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(CPUARM)
|
||||||
|
#define NL_PUSH_UNIT_PROMPT(p, u) en_pushUnitPrompt((p), (u), id)
|
||||||
|
#else
|
||||||
|
#define NL_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
I18N_PLAY_FUNCTION(nl, pushUnitPrompt, int16_t number, uint8_t unitprompt)
|
||||||
|
{
|
||||||
|
if (number == 1)
|
||||||
|
PUSH_NUMBER_PROMPT(unitprompt);
|
||||||
|
else
|
||||||
|
PUSH_NUMBER_PROMPT(unitprompt+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
I18N_PLAY_FUNCTION(nl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (number < 0) {
|
||||||
|
PUSH_NUMBER_PROMPT(NL_PROMPT_MINUS);
|
||||||
|
number = -number;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined(CPUARM)
|
||||||
|
if (unit) {
|
||||||
|
unit--;
|
||||||
|
convertUnit(number, unit);
|
||||||
|
if (IS_IMPERIAL_ENABLE()) {
|
||||||
|
if (unit == UNIT_DIST) {
|
||||||
|
unit = UNIT_FEET;
|
||||||
|
}
|
||||||
|
if (unit == UNIT_SPEED) {
|
||||||
|
unit = UNIT_KTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unit++;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int8_t mode = MODE(att);
|
||||||
|
if (mode > 0) {
|
||||||
|
#if defined(CPUARM)
|
||||||
|
if (mode == 2) {
|
||||||
|
number /= 10;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
// we assume that we are PREC1
|
||||||
|
#endif
|
||||||
|
div_t qr = div(number, 10);
|
||||||
|
if (qr.rem) {
|
||||||
|
PLAY_NUMBER(qr.quot, 0, 0);
|
||||||
|
PUSH_NUMBER_PROMPT(NL_PROMPT_POINT_BASE + qr.rem);
|
||||||
|
number = -1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
number = qr.quot;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int16_t tmp = number;
|
||||||
|
|
||||||
|
if (number >= 1000) {
|
||||||
|
|
||||||
|
PLAY_NUMBER(number / 1000, 0, 0);
|
||||||
|
|
||||||
|
|
||||||
|
PUSH_NUMBER_PROMPT(NL_PROMPT_THOUSAND);
|
||||||
|
|
||||||
|
number %= 1000;
|
||||||
|
if (number == 0)
|
||||||
|
number = -1;
|
||||||
|
}
|
||||||
|
if (number >= 100) {
|
||||||
|
|
||||||
|
PUSH_NUMBER_PROMPT(NL_PROMPT_HUNDRED + (number/100)-1);
|
||||||
|
|
||||||
|
number %= 100;
|
||||||
|
if (number == 0)
|
||||||
|
number = -1;
|
||||||
|
}
|
||||||
|
if (number >= 0) {
|
||||||
|
PUSH_NUMBER_PROMPT(NL_PROMPT_ZERO + number);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (unit) {
|
||||||
|
NL_PUSH_UNIT_PROMPT(tmp, NL_PROMPT_UNITS_BASE + unit*2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
I18N_PLAY_FUNCTION(nl, playDuration, int seconds PLAY_DURATION_ATT)
|
||||||
|
{
|
||||||
|
if (seconds == 0) {
|
||||||
|
PLAY_NUMBER(seconds, 0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (seconds < 0) {
|
||||||
|
PUSH_NUMBER_PROMPT(NL_PROMPT_MINUS);
|
||||||
|
seconds = -seconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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) {
|
||||||
|
PLAY_NUMBER(tmp, UNIT_MINUTES, 0);
|
||||||
|
if (seconds > 0)
|
||||||
|
|
||||||
|
PUSH_NUMBER_PROMPT(NL_PROMPT_AND);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (seconds > 0) {
|
||||||
|
PLAY_NUMBER(seconds, UNIT_SECONDS, 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LANGUAGE_PACK_DECLARE(nl, "Nederlands");
|
||||||
|
|
||||||
|
#endif
|
|
@ -109,6 +109,8 @@ translations = {'cz': [('\\200', u'á'),
|
||||||
|
|
||||||
'en': [],
|
'en': [],
|
||||||
|
|
||||||
|
'nl': [],
|
||||||
|
|
||||||
'all': [('\\306', u'Δ'),
|
'all': [('\\306', u'Δ'),
|
||||||
('\\173', u'~'),
|
('\\173', u'~'),
|
||||||
('\\036', u'\\n'),
|
('\\036', u'\\n'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue