diff --git a/CMakeLists.txt b/CMakeLists.txt index 08f836bbe..274730a00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,9 @@ endif() if(POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif() +if(POLICY CMP0058) + cmake_policy(SET CMP0058 NEW) # for ninja +endif() set(CMAKE_COLOR_MAKEFILE ON) @@ -59,6 +62,7 @@ if(WIN32) list(APPEND CMAKE_PREFIX_PATH "${WIN_EXTRA_LIBS_PATH}" "${WIN_EXTRA_LIBS_PATH}/SDL") # hints for FindSDL endif() +find_package(Qt5Core) find_package(Qt5Widgets) find_package(Qt5Xml) find_package(Qt5LinguistTools) @@ -66,11 +70,37 @@ find_package(Qt5PrintSupport) find_package(Qt5Multimedia) find_package(Qt5Svg) -if(Qt5Widgets_FOUND) - message(STATUS "Qt Version: ${Qt5Widgets_VERSION}") +if(Qt5Core_FOUND) + message(STATUS "Qt Version: ${Qt5Core_VERSION}") + + ### Get locations of Qt binary executables & libs (libs are for distros, not for linking) + # first set up some hints + get_target_property(QtCore_LOCATION Qt5::Core LOCATION) + get_filename_component(qt_core_path ${QtCore_LOCATION} PATH) + if(APPLE) + get_filename_component(qt_core_path "${qt_core_path}/.." ABSOLUTE) + endif() + + set(QT_LIB_DIR ${qt_core_path} CACHE PATH "Path to Qt libraries (.dll|.framework|.so).") + find_path(QT_BIN_DIR NAMES "qmake" "qmake.exe" HINTS "${CMAKE_PREFIX_PATH}/bin" "${qt_core_path}/../bin" "${qt_core_path}" DOC "Path to Qt binaries (qmake, lupdate, etc.).") + find_program(QT_QMAKE_EXECUTABLE qmake HINTS "${QT_BIN_DIR}" DOC "Location of qmake program.") + find_program(QT_LUPDATE_EXECUTABLE lupdate HINTS "${QT_BIN_DIR}" DOC "Location of Qt's 'lupdate' program for updating translation files.") + + # Try to find Qt translations + if(QT_QMAKE_EXECUTABLE) + execute_process( + COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_TRANSLATIONS + OUTPUT_VARIABLE qt_translations_hint + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() + find_path(QT_TRANSLATIONS_DIR NAMES "qt_en.qm" HINTS "${qt_translations_hint}" DOC "Path to prebuilt Qt translations (qt_*.qm).") + + ### Common definitions for the Qt-based apps list(APPEND APP_COMMON_DEFINES -DSIMU) list(APPEND APP_COMMON_DEFINES -DQXT_STATIC) list(APPEND APP_COMMON_DEFINES -DQT_USE_QSTRINGBUILDER) # more efficient QString construction using % operator + if(APP_CUSTOM_DBG_HANDLER) # provide full qDebug log context to our custom handler. This may also affect libsimulator, which is why it is here list(APPEND APP_COMMON_DEFINES -DQT_MESSAGELOGCONTEXT) @@ -84,6 +114,7 @@ if(Qt5Widgets_FOUND) else() list(APPEND APP_COMMON_DEFINES -DAPP_DBG_HANDLER_ENABLE=0) endif() + else() message(WARNING "Qt not found! Companion and Simulator builds disabled.") endif() @@ -97,7 +128,7 @@ if(NOT WIN32) endif() endif() -if(Qt5Widgets_FOUND OR FOX_FOUND) +if(Qt5Core_FOUND OR FOX_FOUND) set(SDL_BUILDING_LIBRARY YES) # this prevents FindSDL from appending SDLmain lib to the results, which we don't want find_package("SDL") if(SDL_FOUND) @@ -136,6 +167,6 @@ endif() add_subdirectory(${RADIO_SRC_DIRECTORY}) -if(Qt5Widgets_FOUND) +if(Qt5Core_FOUND) add_subdirectory(${COMPANION_SRC_DIRECTORY}) endif() diff --git a/cmake/FindLupdate.cmake b/cmake/FindLupdate.cmake deleted file mode 100644 index 0caf0ba30..000000000 --- a/cmake/FindLupdate.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# Locate lupdate binary from QT - -# This module defines -# LUPDATE_EXECUTABLE, where is QT lupdate -# LUPDATE_FOUND, if false, don't try to use lupdate - -FIND_PROGRAM( LUPDATE_EXECUTABLE - NAMES - lupdate lupdate-qt4 -) - -# if the program is found then we have it -IF( LUPDATE_EXECUTABLE ) - SET( LUPDATE_FOUND "YES" ) -ENDIF( LUPDATE_EXECUTABLE ) - -MARK_AS_ADVANCED( LUPDATE_EXECUTABLE ) diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index 65cfe06ba..16432924a 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -110,20 +110,52 @@ include_directories( ${COMPANION_SRC_DIRECTORY}/storage ) +############# Do macro replacements on input files ############# configure_file(${COMPANION_SRC_DIRECTORY}/version.h.in ${CMAKE_BINARY_DIR}/version.h @ONLY) -configure_file(${COMPANION_SRC_DIRECTORY}/translations.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc @ONLY) configure_file(${COMPANION_SRC_DIRECTORY}/companion.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop @ONLY) configure_file(${COMPANION_SRC_DIRECTORY}/simulator.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop @ONLY) -############# Supporting libraries ############### +############# Translations ############### -add_subdirectory(shared) -add_subdirectory(modeledit) -add_subdirectory(generaledit) -add_subdirectory(simulation) -add_subdirectory(storage) -add_subdirectory(thirdparty/qcustomplot) -add_subdirectory(thirdparty/qxtcommandoptions) +### Generate .qm files and assemble resource (qrc) file. + +# available Companion translations (src/translations/*.ts) +set(LANGUAGES cs de en es fi fr it pl sv zh_CN) +foreach(language ${LANGUAGES}) + list(APPEND companion_TS translations/companion_${language}.ts) +endforeach(language) +# .ts -> .qm +qt5_add_translation(companion_QM ${companion_TS}) + +# add Qt translations if found +if(QT_TRANSLATIONS_DIR) + # Some languages have all translations in one qt_*.qm file and others break them up into modules, in which case we need qt_base_*.qm + file(GLOB qtbase_QM "${QT_TRANSLATIONS_DIR}/qtbase_*.qm") + file(GLOB qt_QM "${QT_TRANSLATIONS_DIR}/qt_??.qm") # don't want to match "qt_help_*.qm" + list(APPEND qt_QM "${QT_TRANSLATIONS_DIR}/qt_zh_CN.qm" "${QT_TRANSLATIONS_DIR}/qt_zh_TW.qm") # exceptions not matched by the GLOB +else() + message(STATUS "QT_TRANSLATIONS_DIR not found, unable to package pre-built Qt translations with application.") +endif() + +set(TRANSLATIONS_QRC "${CMAKE_CURRENT_BINARY_DIR}/translations.qrc") + +# Dynamically create translations.qrc file (XML) from all collected translation files. +foreach(qm_file ${companion_QM} ${qt_QM} ${qtbase_QM}) + get_filename_component(qm_file_name ${qm_file} NAME) + # Add file with full path and file name (w/out path) as alias to be used in actual code + set(TRANSLATION_FILES_LIST "${TRANSLATION_FILES_LIST} ${qm_file}\n") +endforeach() +configure_file(${COMPANION_SRC_DIRECTORY}/translations.qrc.in ${TRANSLATIONS_QRC} @ONLY) + +### Add optional "translations" target for updating .ts files +if(QT_LUPDATE_EXECUTABLE) + add_custom_target(translations + WORKING_DIRECTORY ${COMPANION_SRC_DIRECTORY} + COMMAND ${QT_LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -no-obsolete -ts ${companion_TS} + ) +else() + message(STATUS "Qt lupdate not found, 'translations' target will not be availabe.") +endif() ############# Common lib ############### @@ -134,6 +166,7 @@ set(common_SRCS eeprominterface.cpp helpers.cpp radiodata.cpp + translations.cpp firmwares/er9x/er9xeeprom.cpp firmwares/er9x/er9xinterface.cpp firmwares/ersky9x/ersky9xeeprom.cpp @@ -152,23 +185,29 @@ set(common_MOC_HDRS set(common_RESOURCES companion.qrc - ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc + ${TRANSLATIONS_QRC} ) -set(LANGUAGES pl de fr es it sv cs fi zh) -foreach(language ${LANGUAGES}) - list(APPEND common_TS translations/companion_${language}.ts) -endforeach(language) - qt5_wrap_cpp(common_SRCS ${common_MOC_HDRS}) -qt5_add_translation(common_QM ${common_TS}) qt5_add_resources(common_RCC ${common_RESOURCES}) -add_custom_target(gen_qrc DEPENDS ${common_RCC} ${common_QM}) +#add_custom_target(gen_qrc DEPENDS ${common_RCC} ${companion_QM}) add_library(common ${common_SRCS} ${common_RCC}) qt5_use_modules(common Core Xml Widgets) target_link_libraries(common PRIVATE simulation) -add_dependencies(common gen_qrc) +#add_dependencies(common gen_qrc) + +set(CPN_COMMON_LIB common) + +############# Supporting libraries ############### + +add_subdirectory(shared) +add_subdirectory(modeledit) +add_subdirectory(generaledit) +add_subdirectory(simulation) +add_subdirectory(storage) +add_subdirectory(thirdparty/qcustomplot) +add_subdirectory(thirdparty/qxtcommandoptions) ############# Companion ############### @@ -259,15 +298,15 @@ set(companion_UIS ) if(WIN32) - list(APPEND companion_SRCS icon.rc) + set(icon_RC icon.rc) endif() qt5_wrap_ui(companion_SRCS ${companion_UIS}) qt5_wrap_cpp(companion_SRCS ${companion_MOC_HDRS}) -add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${companion_SRCS}) +add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${companion_SRCS} ${icon_RC}) qt5_use_modules(${COMPANION_NAME} Core Widgets Network) -target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit simulation common qcustomplot shared storage ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${WIN_LINK_LIBRARIES}) +target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit simulation ${CPN_COMMON_LIB} qcustomplot shared storage ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${WIN_LINK_LIBRARIES}) PrintTargetReport("${COMPANION_NAME}") @@ -275,25 +314,8 @@ PrintTargetReport("${COMPANION_NAME}") set(simu_SRCS simulator.cpp ) -if(WIN32) - list(APPEND simu_SRCS icon.rc) -endif() - -add_executable(${SIMULATOR_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${simu_SRCS}) -target_link_libraries(${SIMULATOR_NAME} PRIVATE simulation common storage qxtcommandoptions ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${WIN_LINK_LIBRARIES}) - -############# Translations #################### - -find_package(Lupdate) -if(LUPDATE_FOUND) - message(STATUS "Qt lupdate: " ${LUPDATE_EXECUTABLE}) - add_custom_target(translations - WORKING_DIRECTORY ${COMPANION_SRC_DIRECTORY} - COMMAND ${LUPDATE_EXECUTABLE} ${CMAKE_SOURCE_DIR} -no-obsolete -ts ${common_TS} - ) -else() - message(STATUS "Qt lupdate not found, 'translations' target will not be availabe.") -endif() +add_executable(${SIMULATOR_NAME} MACOSX_BUNDLE ${WIN_EXECUTABLE_TYPE} ${simu_SRCS} ${icon_RC}) +target_link_libraries(${SIMULATOR_NAME} PRIVATE simulation ${CPN_COMMON_LIB} storage qxtcommandoptions ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${WIN_LINK_LIBRARIES}) ############# Install #################### @@ -335,8 +357,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") elseif(WIN32) - get_target_property(QtCore_LOCATION Qt5::Core LOCATION) - get_filename_component(QT_DLL_DIR ${QtCore_LOCATION} PATH) + set(QT_DLL_DIR ${QT_LIB_DIR}) set(INSTALL_TEMP_QTDLL_FILES Qt5Core Qt5Gui Qt5Widgets Qt5Xml Qt5Network Qt5PrintSupport Qt5Multimedia Qt5Svg) set(INSTALL_TEMP_ICUDLL_FILES icudt54.dll icuin54.dll icuuc54.dll) if(CMAKE_BUILD_TYPE STREQUAL "Debug") @@ -415,7 +436,7 @@ if(WIN32) set(SYSDIR "$ENV{windir}/system32") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${COMPANION_NSI_IN_FILE} ${PROJECT_BINARY_DIR}/companion/companion.nsi @ONLY) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${SIMULATOR_NSI_IN_FILE} ${PROJECT_BINARY_DIR}/companion/simulator.nsi @ONLY) + #configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${SIMULATOR_NSI_IN_FILE} ${PROJECT_BINARY_DIR}/companion/simulator.nsi @ONLY) find_program(NSIS_EXE makensis.exe PATHS "C:/Program Files/NSIS" @@ -428,16 +449,16 @@ if(WIN32) DEPENDS companion simulator opentx-simulators ${PROJECT_BINARY_DIR}/companion/companion.nsi COMMENT "Companion Windows NSIS Installer") - add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/companion/simulator-install.exe - COMMAND "${NSIS_EXE}" ARGS ${PROJECT_BINARY_DIR}/companion/simulator.nsi - DEPENDS simulator ${PROJECT_BINARY_DIR}/companion/simulator.nsi - COMMENT "Simulator Windows NSIS Installer") +# add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/companion/simulator-install.exe +# COMMAND "${NSIS_EXE}" ARGS ${PROJECT_BINARY_DIR}/companion/simulator.nsi +# DEPENDS simulator ${PROJECT_BINARY_DIR}/companion/simulator.nsi +# COMMENT "Simulator Windows NSIS Installer") add_custom_target(installer DEPENDS ${PROJECT_BINARY_DIR}/companion/companion-windows.exe - DEPENDS ${PROJECT_BINARY_DIR}/companion/simulator-windows.exe +# DEPENDS ${PROJECT_BINARY_DIR}/companion/simulator-windows.exe SOURCES ${PROJECT_BINARY_DIR}/companion/companion.nsi - SOURCES ${PROJECT_BINARY_DIR}/companion/simulator.nsi +# SOURCES ${PROJECT_BINARY_DIR}/companion/simulator.nsi ) endif() @@ -507,11 +528,6 @@ IF(APPLE) install(PROGRAMS ${DFU_UTIL_ABSOLUTE_PATH} ${AVRDUDE_ABSOLUTE_PATH} DESTINATION ${companion_res_dir} COMPONENT Runtime) set(bundle_tools_path "\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/dfu-util;\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/avrdude") - # These needs to be relative to CMAKE_INSTALL_PREFIX - get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION) - get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH) - get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE) - # Include depencies (adding frameworks, fixing the embbeded libraries) # I get write errors without setting BU_CHMOD_BUNDLE_ITEMS even though it is # technically a hack (that is already is in the Bundle library ...) @@ -519,7 +535,7 @@ IF(APPLE) include(BundleUtilities) file(GLOB bundle_simulator_libs \"\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}\") set(BU_CHMOD_BUNDLE_ITEMS on) - fixup_bundle(\"${APPS}\" \"\${bundle_simulator_libs};${bundle_qt_libs};${bundle_tools_path}\" \"${QT_LIBRARY_DIR}\") + fixup_bundle(\"${APPS}\" \"\${bundle_simulator_libs};${bundle_qt_libs};${bundle_tools_path}\" \"${QT_LIB_DIR}\") file(RENAME \"\${CMAKE_INSTALL_PREFIX}/${COMPANION_NAME}.app\" \"\${CMAKE_INSTALL_PREFIX}/${COMPANION_OSX_APP_BUNDLE_NAME}.app\") " COMPONENT Runtime) endif() diff --git a/companion/src/companion.cpp b/companion/src/companion.cpp index 9bf411a48..d90e5d821 100644 --- a/companion/src/companion.cpp +++ b/companion/src/companion.cpp @@ -19,8 +19,6 @@ */ #include -#include -#include #include #if defined(JOYSTICKS) || defined(SIMU_AUDIO) #include @@ -33,6 +31,7 @@ #include "version.h" #include "appdata.h" #include "storage.h" +#include "translations.h" #ifdef __APPLE__ #include @@ -61,7 +60,6 @@ int main(int argc, char *argv[]) #endif Q_INIT_RESOURCE(companion); - Q_INIT_RESOURCE(translations); if (AppDebugMessageHandler::instance()) AppDebugMessageHandler::instance()->installAppMessageHandler(); @@ -81,17 +79,7 @@ int main(int argc, char *argv[]) app.setStyle(new MyProxyStyle); #endif - QTranslator companionTranslator; - companionTranslator.load(":/companion_" + g.locale()); - QTranslator qtTranslator; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QString qtfile = "qtbase_"; -#else - QString qtfile = "qt_"; -#endif - qtTranslator.load(qtfile + g.locale().left(2), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); - app.installTranslator(&companionTranslator); - app.installTranslator(&qtTranslator); + Translations::installTranslators(); // QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); diff --git a/companion/src/generaledit/CMakeLists.txt b/companion/src/generaledit/CMakeLists.txt index 0b959c968..897fa4097 100644 --- a/companion/src/generaledit/CMakeLists.txt +++ b/companion/src/generaledit/CMakeLists.txt @@ -23,9 +23,10 @@ foreach(name ${generaledit_NAMES}) set(generaledit_HDRS ${generaledit_HDRS} ${name}.h) set(generaledit_UIS ${generaledit_UIS} ${name}.ui) endforeach() - + qt5_wrap_ui(generaledit_SRCS ${generaledit_UIS}) qt5_wrap_cpp(generaledit_SRCS ${generaledit_HDRS}) add_library(generaledit ${generaledit_SRCS}) -qt5_use_modules(generaledit Widgets Xml Multimedia) \ No newline at end of file +qt5_use_modules(generaledit Widgets Xml Multimedia) +target_link_libraries(generaledit PRIVATE ${CPN_COMMON_LIB}) diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 0d4b5b9cd..5c8e40f7b 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -45,6 +45,8 @@ #include "radiointerface.h" #include "progressdialog.h" #include "storage.h" +#include "translations.h" + #include #include #include @@ -69,7 +71,16 @@ MainWindow::MainWindow(): downloadDialog_forWait(NULL), - checkForUpdatesState(0) + checkForUpdatesState(0), + fileMenu(NULL), + editMenu(NULL), + settingsMenu(NULL), + burnMenu(NULL), + helpMenu(NULL), + fileToolBar(NULL), + editToolBar(NULL), + burnToolBar(NULL), + helpToolBar(NULL) { mdiArea = new QMdiArea(this); mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); @@ -518,10 +529,37 @@ void MainWindow::closeEvent(QCloseEvent *event) } } +void MainWindow::changeEvent(QEvent * e) +{ + QMainWindow::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + retranslateUi(); + break; + default: + break; + } +} + +void MainWindow::retranslateUi() +{ + createActions(); + createMenus(); + createToolBars(); + QMessageBox::information(this, tr("Companion"), tr("Some text will not be translated until the next time you start Companion. Please note that some translations may not be complete.")); +} + void MainWindow::setLanguage(const QString & langString) { g.locale(langString); - QMessageBox::information(this, tr("Companion"), tr("The selected language will be used the next time you start Companion.")); + Translations::installTranslators(); +} + +void MainWindow::onLanguageChanged(QAction * act) +{ + QString lang = act->property("locale").toString(); + if (!lang.isNull()) + setLanguage(lang); } void MainWindow::setTheme(int index) @@ -530,20 +568,36 @@ void MainWindow::setTheme(int index) QMessageBox::information(this, tr("Companion"), tr("The new theme will be loaded the next time you start Companion.")); } +void MainWindow::onThemeChanged(QAction * act) +{ + bool ok; + int id = act->property("themeId").toInt(&ok); + if (ok && id >= 0 && id < 5) + setTheme(id); +} + void MainWindow::setIconThemeSize(int index) { g.iconSize(index); QMessageBox::information(this, tr("Companion"), tr("The icon size will be used the next time you start Companion.")); } +void MainWindow::onIconSizeChanged(QAction * act) +{ + bool ok; + int id = act->property("sizeId").toInt(&ok); + if (ok && id >= 0 && id < 4) + setIconThemeSize(id); +} + void MainWindow::newFile() { MdiChild * child = createMdiChild(); child->newFile(); - + if (IS_HORUS(getCurrentBoard())) { child->categoryAdd(); - } + } child->show(); } @@ -889,9 +943,6 @@ void MainWindow::updateMenus() compareAct->setEnabled(activeMdiChild()); updateRecentFileActions(); updateProfilesActions(); - updateLanguageActions(); - updateIconSizeActions(); - updateIconThemeActions(); setWindowTitle(tr("OpenTX Companion %1 - Radio: %2 - Profile: %3").arg(VERSION).arg(getCurrentFirmware()->getName()).arg(g.profile[g.id()].name())); } @@ -929,6 +980,7 @@ QAction * MainWindow::addAct(const QString & icon, const QString & sName, const if (slotObj == NULL) slotObj = this; connect(newAction, SIGNAL(triggered()), slotObj, slot); + actionsList.append(newAction); return newAction; } @@ -938,33 +990,46 @@ QAction * MainWindow::addAct(const QString & icon, const QString & sName, const return addAct(icon, sName, lName, QKeySequence::UnknownKey, slot); } -QAction * MainWindow::addAct(QActionGroup *aGroup, const QString & sName, const QString & lName, const char *slot) +QAction * MainWindow::addActToGroup(QActionGroup * aGroup, const QString & sName, const QString & lName, const char * propName, const QVariant & propValue, const QVariant & dfltValue) { - QAction *action = addAct("", sName, lName, QKeySequence::UnknownKey, slot); - action->setCheckable(true); - aGroup->addAction(action); - return action; + QAction * act = aGroup->addAction(sName); + act->setStatusTip(lName); + act->setCheckable(true); + if (propName) { + act->setProperty(propName, propValue); + if (propValue == dfltValue) + act->setChecked(true); + } + return act; } void MainWindow::createActions() { + foreach (QAction * act, actionsList) { + if (act) + act->deleteLater(); + } + actionsList.clear(); + separatorAct = new QAction(this); separatorAct->setSeparator(true); + actionsList.append(separatorAct); for (int i = 0; i < MAX_RECENT; ++i) { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); connect(recentFileActs[i], SIGNAL(triggered()), this, SLOT(openRecentFile())); + actionsList.append(recentFileActs[i]); } updateRecentFileActions(); QActionGroup *profilesAlignmentGroup = new QActionGroup(this); for (int i=0; isetVisible(false); profileActs[i]->setCheckable(true); - profilesAlignmentGroup->addAction(profileActs[i]); connect(profileActs[i], SIGNAL(triggered()), this, SLOT(loadProfile())); + actionsList.append(profileActs[i]); } updateProfilesActions(); @@ -977,36 +1042,6 @@ void MainWindow::createActions() copyAct = addAct("copy.png", tr("Copy Model"), tr("Copy current model to the clipboard"), QKeySequence::Copy, SLOT(copy())); pasteAct = addAct("paste.png", tr("Paste Model"), tr("Paste model from clipboard"), QKeySequence::Paste, SLOT(paste())); - QActionGroup *themeAlignGroup = new QActionGroup(this); - classicThemeAct = addAct( themeAlignGroup, tr("Classical"), tr("The classic companion9x icon theme"), SLOT(setClassicTheme())); - yericoThemeAct = addAct( themeAlignGroup, tr("Yerico"), tr("Yellow round honey sweet icon theme"), SLOT(setYericoTheme())); - monoThemeAct = addAct( themeAlignGroup, tr("Monochrome"), tr("A monochrome black icon theme"), SLOT(setMonochromeTheme())); - monoWhiteAct = addAct( themeAlignGroup, tr("MonoWhite"), tr("A monochrome white icon theme"), SLOT(setMonoWhiteTheme())); - monoBlueAct = addAct( themeAlignGroup, tr("MonoBlue"), tr("A monochrome blue icon theme"), SLOT(setMonoBlueTheme())); - - QActionGroup *iconAlignGroup = new QActionGroup(this); - smallIconAct = addAct( iconAlignGroup, tr("Small"), tr("Use small toolbar icons"), SLOT(setSmallIconThemeSize())); - normalIconAct = addAct( iconAlignGroup, tr("Normal"), tr("Use normal size toolbar icons"), SLOT(setNormalIconThemeSize())); - bigIconAct = addAct( iconAlignGroup, tr("Big"), tr("Use big toolbar icons"), SLOT(setBigIconThemeSize())); - hugeIconAct = addAct( iconAlignGroup, tr("Huge"), tr("Use huge toolbar icons"), SLOT(setHugeIconThemeSize())); - - QActionGroup *langAlignGroup = new QActionGroup(this); - sysLangAct = addAct( langAlignGroup, tr("System language"), tr("Use system language in menus"), SLOT(setSysLanguage())); - czechLangAct = addAct( langAlignGroup, tr("Czech"), tr("Use Czech in menus"), SLOT(setCZLanguage())); - germanLangAct = addAct( langAlignGroup, tr("German"), tr("Use German in menus"), SLOT(setDELanguage())); - englishLangAct = addAct( langAlignGroup, tr("English"), tr("Use English in menus"), SLOT(setENLanguage())); - finnishLangAct = addAct( langAlignGroup, tr("Finnish"), tr("Use Finnish in menus"), SLOT(setFILanguage())); - frenchLangAct = addAct( langAlignGroup, tr("French"), tr("Use French in menus"), SLOT(setFRLanguage())); - italianLangAct = addAct( langAlignGroup, tr("Italian"), tr("Use Italian in menus"), SLOT(setITLanguage())); -// hebrewLangAct = addAct( langAlignGroup, tr("Hebrew"), tr("Use Hebrew in menus"), SLOT(setHELanguage())); - polishLangAct = addAct( langAlignGroup, tr("Polish"), tr("Use Polish in menus"), SLOT(setPLLanguage())); -// portugueseLangAct = addAct( langAlignGroup, tr("Portuguese"), tr("Use Portuguese in menus"), SLOT(setPTLanguage())); - spanishLangAct = addAct( langAlignGroup, tr("Spanish"), tr("Use Spanish in menus"), SLOT(setESLanguage())); - swedishLangAct = addAct( langAlignGroup, tr("Swedish"), tr("Use Swedish in menus"), SLOT(setSELanguage())); -// russianLangAct = addAct( langAlignGroup, tr("Russian"), tr("Use Russian in menus"), SLOT(setRULanguage())); -// dutchLangAct = addAct( langAlignGroup, tr("Dutch"), tr("Use Dutch in menus"), SLOT(setNLLanguage())); - chineseLangAct = addAct( langAlignGroup, tr("Chinese"), tr("Use Chinese in menus"), SLOT(setCNLanguage())); - aboutAct = addAct("information.png", tr("About..."), tr("Show the application's About box"), SLOT(about())); printAct = addAct("print.png", tr("Print..."), tr("Print current model"), QKeySequence::Print, SLOT(print())); simulateAct = addAct("simulate.png", tr("Simulate..."), tr("Simulate current model"), QKeySequence(tr("Alt+S")), SLOT(simulate())); @@ -1038,23 +1073,42 @@ void MainWindow::createActions() printAct->setEnabled(false); } +QMenu * MainWindow::createLanguageMenu(QWidget * parent) +{ + QMenu * menu = new QMenu(tr("Set Menu Language"), parent); + QActionGroup * actGroup = new QActionGroup(menu); + QString lName; + + addActToGroup(actGroup, tr("System language"), tr("Use default system language."), "locale", QString(""), g.locale()); + foreach (const QString & lang, Translations::getAvailableTranslations()) { + QLocale locale(lang); + lName = locale.nativeLanguageName(); + addActToGroup(actGroup, lName.left(1).toUpper() % lName.mid(1), tr("Use %1 language (some translations may not be complete).").arg(lName), "locale", lang, g.locale()); + } + if (!actGroup->checkedAction()) + actGroup->actions().first()->setChecked(true); + + connect(actGroup, &QActionGroup::triggered, this, &MainWindow::onLanguageChanged); + menu->addActions(actGroup->actions()); + return menu; +} + void MainWindow::createMenus() { - QMenu *recentFileMenu = new QMenu(tr("Recent Files"), this); - QMenu *languageMenu = new QMenu(tr("Set Menu Language"), this); - QMenu *themeMenu = new QMenu(tr("Set Icon Theme"), this); - QMenu *iconThemeSizeMenu = new QMenu(tr("Set Icon Size"), this); + menuBar()->clear(); + if (fileMenu) { + fileMenu->deleteLater(); + } fileMenu = menuBar()->addMenu(tr("File")); - fileMenu->addAction(newAct); - fileMenu->addAction(openAct); - fileMenu->addAction(saveAct); - fileMenu->addAction(saveAsAct); - fileMenu->addMenu(recentFileMenu); + + QMenu *recentFileMenu = new QMenu(tr("Recent Files"), fileMenu); recentFileMenu->setIcon(CompanionIcon("recentdocument.png")); for (int i=0; iaddAction(recentFileActs[i]); } + + fileMenu->addMenu(recentFileMenu); fileMenu->addSeparator(); fileMenu->addAction(logsAct); fileMenu->addAction(fwPrefsAct); @@ -1066,46 +1120,50 @@ void MainWindow::createMenus() fileMenu->addSeparator(); fileMenu->addAction(exitAct); + if (editMenu) { + editMenu->deleteLater(); + } editMenu = menuBar()->addMenu(tr("Edit")); editMenu->addAction(cutAct); editMenu->addAction(copyAct); editMenu->addAction(pasteAct); + if (settingsMenu) { + settingsMenu->deleteLater(); + } settingsMenu = menuBar()->addMenu(tr("Settings")); - settingsMenu->addMenu(languageMenu); - languageMenu->addAction(sysLangAct); - languageMenu->addAction(englishLangAct); - languageMenu->addAction(czechLangAct); - languageMenu->addAction(germanLangAct); - languageMenu->addAction(finnishLangAct); - languageMenu->addAction(frenchLangAct); - languageMenu->addAction(italianLangAct); -// languageMenu->addAction(hebrewLangAct); - languageMenu->addAction(polishLangAct); -// languageMenu->addAction(portugueseLangAct); - languageMenu->addAction(spanishLangAct); - languageMenu->addAction(swedishLangAct); -// languageMenu->addAction(russianLangAct); -// languageMenu->addAction(dutchLangAct); - languageMenu->addAction(chineseLangAct); + QMenu *themeMenu = new QMenu(tr("Set Icon Theme"), settingsMenu); + QActionGroup * themeGroup = new QActionGroup(themeMenu); + addActToGroup(themeGroup, tr("Classical"), tr("The classic companion9x icon theme"), "themeId", 0, g.theme()); + addActToGroup(themeGroup, tr("Yerico"), tr("Yellow round honey sweet icon theme"), "themeId", 1, g.theme()); + addActToGroup(themeGroup, tr("Monochrome"), tr("A monochrome black icon theme"), "themeId", 3, g.theme()); + addActToGroup(themeGroup, tr("MonoBlue"), tr("A monochrome blue icon theme"), "themeId", 4, g.theme()); + addActToGroup(themeGroup, tr("MonoWhite"), tr("A monochrome white icon theme"), "themeId", 2, g.theme()); + connect(themeGroup, &QActionGroup::triggered, this, &MainWindow::onThemeChanged); + themeMenu->addActions(themeGroup->actions()); + + QMenu *iconThemeSizeMenu = new QMenu(tr("Set Icon Size"), settingsMenu); + QActionGroup * szGroup = new QActionGroup(iconThemeSizeMenu); + addActToGroup(szGroup, tr("Small"), tr("Use small toolbar icons"), "sizeId", 0, g.iconSize()); + addActToGroup(szGroup, tr("Normal"), tr("Use normal size toolbar icons"), "sizeId", 1, g.iconSize()); + addActToGroup(szGroup, tr("Big"), tr("Use big toolbar icons"), "sizeId", 2, g.iconSize()); + addActToGroup(szGroup, tr("Huge"), tr("Use huge toolbar icons"), "sizeId", 3, g.iconSize()); + connect(szGroup, &QActionGroup::triggered, this, &MainWindow::onIconSizeChanged); + iconThemeSizeMenu->addActions(szGroup->actions()); + + settingsMenu->addMenu(createLanguageMenu(settingsMenu)); settingsMenu->addMenu(themeMenu); - themeMenu->addAction(classicThemeAct); - themeMenu->addAction(yericoThemeAct); - themeMenu->addAction(monoThemeAct); - themeMenu->addAction(monoBlueAct); - themeMenu->addAction(monoWhiteAct); settingsMenu->addMenu(iconThemeSizeMenu); - iconThemeSizeMenu->addAction(smallIconAct); - iconThemeSizeMenu->addAction(normalIconAct); - iconThemeSizeMenu->addAction(bigIconAct); - iconThemeSizeMenu->addAction(hugeIconAct); settingsMenu->addSeparator(); settingsMenu->addAction(appPrefsAct); settingsMenu->addMenu(createProfilesMenu()); settingsMenu->addAction(editSplashAct); settingsMenu->addAction(burnConfigAct); + if (burnMenu) { + burnMenu->deleteLater(); + } burnMenu = menuBar()->addMenu(tr("Read/Write")); burnMenu->addAction(writeEepromAct); burnMenu->addAction(readEepromAct); @@ -1121,7 +1179,10 @@ void MainWindow::createMenus() burnMenu->addAction(burnFusesAct); burnMenu->addAction(burnListAct); } - menuBar()->addSeparator(); + + if (helpMenu) { + helpMenu->deleteLater(); + } helpMenu = menuBar()->addMenu(tr("Help")); helpMenu->addSeparator(); helpMenu->addAction(checkForUpdatesAct); @@ -1177,6 +1238,12 @@ void MainWindow::createToolBars() size=QSize(24,24); break; } + + if (fileToolBar) { + removeToolBar(fileToolBar); + fileToolBar->deleteLater(); + } + fileToolBar = addToolBar(tr("File")); fileToolBar->setIconSize(size); fileToolBar->setObjectName("File"); @@ -1215,6 +1282,11 @@ void MainWindow::createToolBars() fileToolBar->addAction(compareAct); fileToolBar->addAction(sdsyncAct); + if (editToolBar) { + removeToolBar(editToolBar); + editToolBar->deleteLater(); + } + editToolBar = addToolBar(tr("Edit")); editToolBar->setIconSize(size); editToolBar->setObjectName("Edit"); @@ -1222,6 +1294,11 @@ void MainWindow::createToolBars() editToolBar->addAction(copyAct); editToolBar->addAction(pasteAct); + if (burnToolBar) { + removeToolBar(burnToolBar); + burnToolBar->deleteLater(); + } + burnToolBar = new QToolBar(tr("Write")); addToolBar( Qt::LeftToolBarArea, burnToolBar ); burnToolBar->setIconSize(size); @@ -1237,6 +1314,11 @@ void MainWindow::createToolBars() burnToolBar->addSeparator(); burnToolBar->addAction(burnConfigAct); + if (helpToolBar) { + removeToolBar(helpToolBar); + helpToolBar->deleteLater(); + } + helpToolBar = addToolBar(tr("Help")); helpToolBar->setIconSize(size); helpToolBar->setObjectName("Help"); @@ -1295,63 +1377,6 @@ void MainWindow::updateRecentFileActions() } } -void MainWindow::updateIconSizeActions() -{ - switch (g.iconSize()) { - case 0: smallIconAct->setChecked(true); break; - case 1: normalIconAct->setChecked(true); break; - case 2: bigIconAct->setChecked(true); break; - case 3: hugeIconAct->setChecked(true); break; - } -} - -void MainWindow::updateLanguageActions() -{ - QString langId = g.locale(); - - if (langId=="") - sysLangAct->setChecked(true); - else if (langId=="cs_CZ") - czechLangAct->setChecked(true); - else if (langId=="de_DE") - germanLangAct->setChecked(true); - else if (langId=="en") - englishLangAct->setChecked(true); - else if (langId=="fi_FI") - finnishLangAct->setChecked(true); - else if (langId=="fr_FR") - frenchLangAct->setChecked(true); - else if (langId=="it_IT") - italianLangAct->setChecked(true); - // else if (langId=="he_IL") - // hebrewLangAct->setChecked(true); - else if (langId=="pl_PL") - polishLangAct->setChecked(true); - // else if (langId=="pt_PT") - // portugueseLangAct->setChecked(true); - else if (langId=="es_ES") - spanishLangAct->setChecked(true); - else if (langId=="sv_SE") - swedishLangAct->setChecked(true); - // else if (langId=="ru_RU") - // russianLangAct->setChecked(true); - // else if (langId=="nl_NL") - // dutchLangAct->setChecked(true); - else if (langId=="zh_CN") - chineseLangAct->setChecked(true); -} - -void MainWindow::updateIconThemeActions() -{ - switch (g.theme()) { - case 0: classicThemeAct->setChecked(true); break; - case 1: yericoThemeAct->setChecked(true); break; - case 2: monoWhiteAct->setChecked(true); break; - case 3: monoThemeAct->setChecked(true); break; - case 4: monoBlueAct->setChecked(true); break; - } -} - void MainWindow::updateProfilesActions() { for (int i=0; i actionsList; + QMenu *fileMenu; QMenu *editMenu; QMenu *settingsMenu; @@ -226,28 +213,6 @@ class MainWindow : public QMainWindow QAction *recentFileActs[MAX_RECENT]; QAction *profileActs[MAX_PROFILES]; QAction *createProfileAct; - QAction *classicThemeAct; - QAction *yericoThemeAct; - QAction *monoThemeAct; - QAction *monoBlueAct; - QAction *monoWhiteAct; - QAction *smallIconAct; - QAction *normalIconAct; - QAction *bigIconAct; - QAction *hugeIconAct; - - QAction *sysLangAct; - QAction *czechLangAct; - QAction *germanLangAct; - QAction *englishLangAct; - QAction *finnishLangAct; - QAction *frenchLangAct; - QAction *italianLangAct; - QAction *polishLangAct; - QAction *spanishLangAct; - QAction *swedishLangAct; - QAction *chineseLangAct; - QAction *openDocURLAct; }; diff --git a/companion/src/modeledit/CMakeLists.txt b/companion/src/modeledit/CMakeLists.txt index 20726bce9..73f9208e3 100644 --- a/companion/src/modeledit/CMakeLists.txt +++ b/companion/src/modeledit/CMakeLists.txt @@ -59,3 +59,4 @@ qt5_wrap_cpp(modeledit_SRCS ${modeledit_HDRS}) add_library(modeledit ${modeledit_SRCS}) qt5_use_modules(modeledit Widgets Xml Multimedia) +target_link_libraries(modeledit PRIVATE ${CPN_COMMON_LIB}) diff --git a/companion/src/simulator.cpp b/companion/src/simulator.cpp index d99a06313..b758bbff1 100644 --- a/companion/src/simulator.cpp +++ b/companion/src/simulator.cpp @@ -19,13 +19,9 @@ */ #include -#include -#include -#include #include #include #include -#include #if defined(JOYSTICKS) || defined(SIMU_AUDIO) #include #undef main @@ -41,6 +37,7 @@ #include "simulatorstartupdialog.h" #include "storage.h" #include "qxtcommandoptions.h" +#include "translations.h" #include "version.h" using namespace Simulator; @@ -83,7 +80,6 @@ int main(int argc, char *argv[]) #endif Q_INIT_RESOURCE(companion); - Q_INIT_RESOURCE(translations); if (AppDebugMessageHandler::instance()) AppDebugMessageHandler::instance()->installAppMessageHandler(); @@ -94,17 +90,7 @@ int main(int argc, char *argv[]) QString resultMsg; - QTranslator companionTranslator; - companionTranslator.load(":/companion_" + g.locale()); - QTranslator qtTranslator; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - QString qtfile = "qtbase_"; -#else - QString qtfile = "qt_"; -#endif - qtTranslator.load(qtfile + g.locale().left(2), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); - app.installTranslator(&companionTranslator); - app.installTranslator(&qtTranslator); + Translations::installTranslators(); #if defined(JOYSTICKS) || defined(SIMU_AUDIO) uint32_t sdlFlags = 0; diff --git a/companion/src/storage/CMakeLists.txt b/companion/src/storage/CMakeLists.txt index 76f940881..5b1aefb20 100644 --- a/companion/src/storage/CMakeLists.txt +++ b/companion/src/storage/CMakeLists.txt @@ -27,4 +27,5 @@ foreach(name ${storage_NAMES}) endforeach() add_library(storage ${storage_SRCS}) -target_link_libraries(storage Qt5::Core Qt5::Gui Qt5::Xml Qt5::Widgets) \ No newline at end of file +qt5_use_modules(storage Core Xml Widgets) +target_link_libraries(storage PRIVATE ${CPN_COMMON_LIB}) diff --git a/companion/src/translations.cpp b/companion/src/translations.cpp new file mode 100644 index 000000000..2bd75881c --- /dev/null +++ b/companion/src/translations.cpp @@ -0,0 +1,168 @@ +/* + * Copyright (C) OpenTX + * + * Based on code named + * th9x - http://code.google.com/p/th9x + * er9x - http://code.google.com/p/er9x + * gruvin9x - http://code.google.com/p/gruvin9x + * + * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html + * + * 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 "translations.h" +#include "appdata.h" + +#include +#include +#include +#include + +// List of available Companion translations +// todo: make dynamic eg. from directory listing +// todo: make locale name country-agnostic unless translation is specifically for a country (like zh_CN) +QStringList const Translations::getAvailableTranslations() +{ + static QStringList locales; + + if (!locales.size()) { + locales << "cs_CZ" + << "de_DE" + << "en" + << "es_ES" + << "fi_FI" + << "fr_FR" + //<< "he_IL" + << "it_IT" + //<< "nl_NL" + << "pl_PL" + //<< "pt_PT" + //<< "ru_RU" + << "sv_SE" + << "zh_CN" ; + } + return locales; +} + +QStringList const Translations::getAvailableLanguages() +{ + static QStringList languages; + if (!languages.size()) { + foreach (const QString & loc, getAvailableTranslations()) + languages.append(loc.left(2)); + } + return languages; +} + +QStringList const Translations::getTranslationPaths() +{ + // Look for translation files in the following locations, in order of priority + QStringList paths; + + // Prefer path set in environment variable, makes it possible to test/replace translations w/out rebuilding. + if (qEnvironmentVariableIsSet("OPENTX_APP_TRANSLATIONS_PATH") && QDir(qgetenv("OPENTX_APP_TRANSLATIONS_PATH").constData()).exists()) { + paths << qgetenv("OPENTX_APP_TRANSLATIONS_PATH").constData(); + } + // Try application subfolder first, also eg. to test/replace translations quickly. + paths << APP_TRANSLATIONS_FILE_PATH; + // Then the resource file + paths << APP_TRANSLATIONS_RESOURCE_PATH; + // Finally the system folder (more likely for Qt translations than Companion ones) + paths << QLibraryInfo::location(QLibraryInfo::TranslationsPath); + + return paths; +} + +void Translations::installTranslators() +{ + Q_INIT_RESOURCE(translations); + + static QList appTranslators; + + // Determine the locale + + QLocale locale; // defaults to system locale + if (!g.locale().isEmpty()) { + locale = QLocale(g.locale()); // reverts to "C" locale if invalid + if (locale.language() == QLocale::C) { + // reset + locale = QLocale::system(); + g.locale(""); + } + } + qDebug() << "Locale name:" << locale.name() << "language:" << locale.nativeLanguageName() << "country:" << locale.nativeCountryName(); + + // Remove any existing translators, this lets us re-translate w/out restart. + foreach (QTranslator * t, appTranslators) { + if (t) { + QCoreApplication::removeTranslator(t); + delete t; + } + } + appTranslators.clear(); + + /* Multiple translation files can be installed. + * Translations are searched for in the reverse order from which they were installed (last added is searched first). + * The search stops as soon as a translation containing a matching string is found. + */ + + // Look for translation files in several locations + QStringList tryPaths = getTranslationPaths(); + + // First try to install Qt translations for common GUI elements. + + QStringList qtFiles = QStringList() << "qt"; + // After Qt5.3 some translation files are broken up into modules. We only need "qtbase" for now. +#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + qtFiles << "qtbase"; +#endif + + foreach (const QString & qtfile, qtFiles) { + QTranslator * translator = new QTranslator(qApp); + if (tryLoadTranslator(translator, locale, qtfile, tryPaths)) { + appTranslators.append(translator); + } + else { + delete translator; + //qDebug() << "Could not find Qt translations for:" << locale.name() << "In file:" << qtfile << "Using paths:" << tryPaths; + } + } + + // Now try to install our custom translations if we support the current locale/language. + if (!getAvailableTranslations().contains(locale.name()) && !getAvailableLanguages().contains(locale.name().left(2))) + return; + + QTranslator * translator = new QTranslator(qApp); + if (tryLoadTranslator(translator, locale, "companion", tryPaths)) { + appTranslators.append(translator); + } + else { + delete translator; + qWarning() << "Could not find Companion translations for:" << locale.name() << "Using paths:" << tryPaths; + } +} + +bool Translations::tryLoadTranslator(QTranslator * t, const QLocale & locale, const QString & baseFile, const QStringList & paths) +{ + foreach (const QString & path, paths) { + if (t->load(locale, baseFile, "_", path)) { + if (QCoreApplication::installTranslator(t)) { + qDebug() << "Installed translation file" << baseFile << "from" << path << "for" << locale.name(); + return true; + } + else { + qWarning() << "Error installing translation file" << baseFile << "for:" << locale.name() << "from:" << path; + return false; + } + } + } + return false; +} diff --git a/companion/src/translations.h b/companion/src/translations.h new file mode 100644 index 000000000..0099317ed --- /dev/null +++ b/companion/src/translations.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) OpenTX + * + * Based on code named + * th9x - http://code.google.com/p/th9x + * er9x - http://code.google.com/p/er9x + * gruvin9x - http://code.google.com/p/gruvin9x + * + * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html + * + * 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. + */ + +#ifndef TRANSLATIONS_H +#define TRANSLATIONS_H + +#include + +// Where to find translation files? +// First any path in environment variable OPENTX_APP_TRANSLATIONS_PATH is used if it exists. + +// Default location for .qm files when NOT compiled into application (this is searched after OPENTX_APP_TRANSLATIONS_PATH). +#ifndef APP_TRANSLATIONS_FILE_PATH + #define APP_TRANSLATIONS_FILE_PATH QCoreApplication::applicationDirPath() % "/translations" +#endif +\ +// Default location for .qm files when compiled into application as a resource (this is searched after APP_TRANSLATIONS_FILE_PATH) . +#ifndef APP_TRANSLATIONS_RESOURCE_PATH + #define APP_TRANSLATIONS_RESOURCE_PATH ":/translations" +#endif + +class QLocale; +class QTranslator; + +class Translations +{ + public: + static QStringList const getTranslationPaths(); + static QStringList const getAvailableTranslations(); + static QStringList const getAvailableLanguages(); + + static void installTranslators(); + + protected: + static bool tryLoadTranslator(QTranslator * t, const QLocale & locale, const QString & baseFile, const QStringList & paths); +}; + +#endif // TRANSLATIONS_H diff --git a/companion/src/translations.qrc.in b/companion/src/translations.qrc.in index 975494eb8..6fc7f6a1f 100644 --- a/companion/src/translations.qrc.in +++ b/companion/src/translations.qrc.in @@ -1,13 +1,6 @@ - - - companion_cs.qm - companion_de.qm - companion_es.qm - companion_fi.qm - companion_fr.qm - companion_it.qm - companion_pl.qm - companion_sv.qm - companion_zh.qm - + + + +@TRANSLATION_FILES_LIST@ + diff --git a/companion/src/translations/companion_en.ts b/companion/src/translations/companion_en.ts new file mode 100644 index 000000000..e23bd7467 --- /dev/null +++ b/companion/src/translations/companion_en.ts @@ -0,0 +1,12395 @@ + + + + + AileronsPage + + + No + No + + + + Yes, controlled by a single channel + + + + + Yes, controlled by two channels + + + + + <br>First Aileron Channel: + + + + + Second Aileron Channel: + + + + + AirbrakesPage + + + No + + + + + Yes, controlled by a single channel + + + + + Yes, controlled by two channels + + + + + <br>First Airbrake Channel: + + + + + Second Airbrake Channel: + + + + + AppPreferencesDialog + + + Edit Settings + + + + + Radio Profile + + + + + Profile Name + + + + + Radio Type + + + + + Menu Language + + + + + Voice Language + + + + + Set voice language. +May be different from firmware language + + + + + Build Options + + + + + Splash Screen + + + + + Other Settings + + + + + SD Structure path + + + + + + The profile specific folder, if set, will override general Backup folder + + + + + Backup folder + + + + + If set it will override the application general setting + + + + + if set, will override general backup enable + + + + + + Enable automatic backup before writing firmware + + + + + General Settings + + + + + Default Stick Mode + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + Default Channel Order + + + + + <html><head/><body><p>Channel order</p><p><br/></p><p>Defines the order of the default mixes created on a new model.</p></body></html> + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Append version number to FW file name + + + + + Offer to write FW to Tx after download + + + + + Clear Image + + + + + Select Image + + + + + Remove Profile + + + + + + + + + Select Folder + + + + + Application Settings + + + + + Automatic check for Companion updates + + + + + Show splash screen when Companion starts + + + + + Automatic check for OpenTX firmware updates + + + + + Splash Screen Library + + + + + Files to keep + + + + + Google Earth Executable + + + + + User Splash Screens + + + + + Automatic Backup Folder + + + + + Use model wizard when creating a new model + + + + + Only show user splash images + + + + + Show user and companion splash images + + + + + Select Executable + + + + + Use OpenTX firmware nightly builds + + + + + Use Companion nightly builds + + + + + Simulator Settings + + + + + Calibrate + + + + + Blue + + + + + Green + + + + + Red + + + + + Orange + + + + + Yellow + + + + + Simulator capture folder + + + + + Only capture to clipboard + + + + + Enable + + + + + Joystick + + + + + Simulator BackLight + + + + + Remember simulator switch values + + + + + Simulator Volume Gain + + + + + My Radio + + + + + Select your snapshot folder + + + + + + No joysticks found + + + + + EMPTY: No radio settings stored in profile + + + + + AVAILABLE: Radio settings of unknown age + + + + + AVAILABLE: Radio settings stored %1 + + + + + Select your library folder + + + + + + Select your Models and Settings backup folder + + + + + Select Google Earth executable + + + + + Select the folder replicating your SD structure + + + + + Not possible to remove profile + + + + + The default profile can not be removed. + + + + + Open Image to load + + + + + Images (%1) + + + + + Channels + + + Name + + + + + Subtrim + + + + + Min + + + + + Max + + + + + Direction + + + + + Curve + + + + + PPM Center + + + + + Linear Subtrim + + + + + CH%1 + + + + + --- + + + + + INV + + + + + CompanionMacros + + + files + + + + + Radio and Models settings + + + + + CompareDialog + + + Compare Models + + + + + Drag first model here + + + + + Drag second model here + + + + + Close + + + + + Print + + + + + Print to file + + + + + No name + + + + + Print Document + + + + + Select PDF output file + + + + + ConclusionPage + + + OK, I understand. + + + + + ContributorsDialog + + + OpenTX Contributors + + + + + Main Developers + + + + + Other contributors + + + + + Companies and projects who have donated to OpenTX + + + + + People who have donated to OpenTX + + + + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) + + + + + OpenTX Blacklist + + + + + monthly + + + + + CopyProcess + + + + + Error + + + + + Write error + + + + + Cannot write %1 (reason: %2) + + + + + Cannot open %1 (reason: %2) + + + + + CurveGroup + + + Diff + + + + + Expo + + + + + Func + + + + + Curve + + + + + Curves + + + Curve name + + + + + Fixed X + + + + + Custom X + + + + + Lines + + + + + Smooth + + + + + + Curve type + + + + + Curve Creator + + + + + Y at X=0 + + + + + Y at X=100 + + + + + Both + + + + + x>0 + + + + + x<0 + + + + + Apply + + + + + Side + + + + + Y at X=-100 + + + + + Coefficient + + + + + Curve %1 + + + + + %1 points + + + + + Linear + + + + + Single Expo + + + + + Symmetrical f(x)=-f(-x) + + + + + Symmetrical f(x)=f(-x) + + + + + Editing curve %1 + + + + + Not enough free points in EEPROM to store the curve. + + + + + Copy + + + + + Paste + + + + + Clear + + + + + Clear all curves + + + + + Are you sure you want to reset curve %1? + + + + + Are you sure you want to reset all curves? + + + + + CustomFunctionsPanel + + + Switch + + + + + Action + + + + + Parameters + + + + + Enable + + + + + SF%1 + + + + + GF%1 + + + + + ON + + + + + Error + + + + + Unable to find sound file %1! + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + &Delete + + + + + Delete + + + + + CyclicPage + + + 90 + + + + + 120 + + + + + 120x + + + + + 140 + + + + + DebugOutput + + + Debug Output + + + + + <html><head/><body><p>Enable or disable the filter. If the button won't stay enabled, it is likely there is a syntax error in the Regular Expression entered.</p></body></html> + + + + + Filter: + + + + + <html><head/><body><p>Enter filter text here. Click the help/info button for details about using the filter. </p><p> +To <b>remove a remembered entry</b> from the filter list, first choose it, and then press <code>Shift-Delete</code> (or <code>Shift-Backspace</code>) key combination.</p></body></html> + + + + + Buffer: + + + + + Number of lines to keep in display. + + + + + Filter &Help + + + + + Show information about using the filter. + + + + + Word &Wrap + + + + + Toggle word wrapping on/off. + + + + + &Clear + + + + + Clear the output window of all text. + + + + + Enable &Filter + + + + + Turn the filter on/off. + + + + + <html><head><style>kbd {background-color: palette(alternate-base); font-size: large; white-space: nowrap;}</style></head><body><p>The filter supports two syntax types: basic matching with common wildcards as well as full Perl-style (<code>pcre</code>) Regular Expressions.</p><p>By default a filter will only show lines which match (<b>inclusive</b>). To make an <b>exclusive</b> filter which removes matching lines, prefix the filter expression with a <kbd>!</kbd> (exclamation mark).</p><p>To use <b>Regular Expressions</b> (RegEx), prefix the filter text with a <kbd>/</kbd> (slash) or <kbd>^</kbd> (up caret). <ul><li>Put the <kbd>/</kbd> or <kbd>^</kbd> after the exclusive <kbd>!</kbd> indicator if you're using one.</li><li>By default the match is case-sensitive. To make it insensitive, add the typical <kbd>/i</kbd> (slash i) operator at the end of your RegEx.</li><li>If you use a caret (^) to denote a RegEx, it will become part of the Reg. Ex. (that is, matches from start of line).</li><li>If the RegEx is invalid, the filter edit field should show a red border and you will not be able to enable the filter.</li><li>A useful resource for testing REs (with a full reference) can be found at <a href="http://www.regexr.com/">http://www.regexr.com/</a></li></ul></p><p>To use <b>basic matching</b> just type any text.<ul><li>Wildcards: <kbd>*</kbd> (asterisk) matches zero or more of any character(s), and <kbd>?</kbd> (question mark) matches any single character.</li><li>The match is always case-insensitive.</li><li>The match always starts from the beginning of a log line. To ignore characters at the start, use a leading <kbd>*</kbd> wildcard.</li><li>A trailing <kbd>*</kbd> is always implied (that is, matches anything to the end of the log line). To avoid this, use a RegEx.</li><li>You can match literal wildcard characters by prefixing them with a <kbd>\</kbd> (backslash) character (eg. "foo\*bar" matches "foo*bar").</li></ul></p><p>After <b>editing text</b>, press ENTER or TAB key (or click anywhere outside the box) to update the filter.</p><p>To <b>remove an entry</b> from the filter selector list, first choose it, and while in the line editor press <kbd>Shift-Delete</kbd> (or <kbd>Shift-Backspace</kbd>) key combination. The default filters cannot be removed. Up to 50 filters are stored.</p></body></html> + + + + + Debug Console Filter Help + + + + + EepromInterface + + + Possible causes for this: + + + + + - Eeprom is from a newer version of OpenTX + + + + + - Eeprom is not from OpenTX + + + + + - Eeprom is not from Th9X + + + + + - Eeprom is not from Gruvin9X + + + + + - Eeprom is not from ErSky9X + + + + + - Eeprom is not from Er9X + + + + + - Eeprom size is invalid + + + + + - Eeprom file system is invalid + + + + + - Eeprom is from a unknown board + + + + + - Eeprom is from the wrong board + + + + + - Eeprom backup not supported + + + + + - Something that couldn't be guessed, sorry + + + + + Warning: + + + + + + - Your radio probably uses a wrong firmware, + eeprom size is 4096 but only the first 2048 are used + + + + + - Your eeprom is from an old version of OpenTX, upgrading! + You should 'save as' to keep the old file as a backup. + + + + + Warnings! + + + + + ElevonsPage + + + <br>First Elevon Channel: + + + + + Second Elevon Channel: + + + + + ExpoDialog + + + Flight modes + + + + + Input name + + + + + + + GV + + + + + Source for the mixer. + + + + + Weight + + + + + Switch + + + + + Switch used to enable the line. +If blank then the input is considered to be "ON" all the time. + + + + + Stick Side + + + + + NEG + + + + + POS + + + + + ALL + + + + + Scale + + + + + Include Trim + + + + + No + + + + + Yes + + + + + Curve + + + + + Curve applied to the source. + + + + + Source + + + + + Line name + + + + + Offset + + + + + The source for the mixer + + + + + Edit %1 + + + + + Click to access popup menu + + + + + Clear All + + + + + Set All + + + + + Invert All + + + + + FblPage + + + Throttle Channel: + + + + + Yaw Channel: + + + + + Pitch Channel: + + + + + Roll Channel: + + + + + FirmwarePreferencesDialog + + + Downloads + + + + + Check for updates + + + + + Voice + + + + + Set voice language. +May be different from firmware language + + + + + Download Voice + + + + + Download FW + + + + + Firmware + + + + + Latest Download + + + + + FlapsPage + + + No + + + + + Yes, controlled by a single channel + + + + + Yes, controlled by two channels + + + + + <br>First Flap Channel: + + + + + Second Flap Channel: + + + + + FlashEEpromDialog + + + + Write Models and Settings to Radio + + + + + Load... + + + + + Current Profile + + + + + Allows Companion to write to older version of the firmware + + + + + Check Firmware compatibility + + + + + <html><head/><body><p>Saves a dated copy of your eeprom to the backup folder you specified in the Companion settings before writing the current model to the radio.</p></body></html> + + + + + Backup before Write + + + + + <html><head/><body><p>Modify calibration parameters using settings from current profile</p></body></html> + + + + + Patch calibration setting from profile + + + + + <html><head/><body><p>Modify HW parameters using settings from current profile</p></body></html> + + + + + Patch HW settings from profile + + + + + Cancel + + + + + Write to TX + + + + + Current profile: %1 + + + + + Choose Radio Backup file + + + + + + + Error + + + + + + + + Warning + + + + + Wrong radio calibration data in profile, Settings not patched + + + + + Wrong radio setting data in profile, Settings not patched + + + + + Cannot write file %1: +%2. + + + + + Error writing file %1: +%2. + + + + + The radio firmware belongs to another product family, check file and preferences! + + + + + The radio firmware is outdated, please upgrade! + + + + + Cannot check Models and Settings compatibility! Continue anyway? + + + + + FlashFirmwareDialog + + + Flash Firmware + + + + + Load... + + + + + Date & Time + + + + + Variant + + + + + Version + + + + + Use profile start screen + + + + + Use firmware start screen + + + + + Use library start screen + + + + + Use another start screen + + + + + Allows Companion to write to older version of the firmware + + + + + Check Hardware compatibility + + + + + Backup and restore Models and Settings + + + + + Cancel + + + + + Write to TX + + + + + Open Firmware File + + + + + + + Warning + + + + + %1 may not be a valid firmware file + + + + + + + + + Error + + + + + The firmware file is not valid. + + + + + There is no start screen image in the firmware file. + + + + + Profile image %1 is invalid. + + + + + Open image file to use as radio start screen + + + + + Images (%1) + + + + + Image could not be loaded from %1 + + + + + The library image could not be loaded + + + + + Splash image not found + + + + + Cannot save customized firmware + + + + + Write Firmware to Radio + + + + + + Firmware check failed + + + + + Could not check firmware from radio + + + + + New firmware is not compatible with the one currently installed! + + + + + Conversion failed + + + + + Cannot convert Models and Settings for use with this firmware, original data will be used + + + + + Restore failed + + + + + Could not restore Models and Settings to Radio. The models and settings data file can be found at: %1 + + + + + Flashing done + + + + + FlashProcess + + + Executable %1 not found + + + + + Writing... + + + + + Reading... + + + + + Verifying... + + + + + unknown + + + + + ie: OpenTX for 9X board or OpenTX for 9XR board + + + + + ie: OpenTX for M128 / 9X board or OpenTX for 9XR board with M128 chip + + + + + ie: OpenTX for Gruvin9X board + + + + + Your radio uses a %1 CPU!!! + +Please check advanced burn options to set the correct cpu type. + + + + + Your radio uses a %1 CPU!!! + +Please select an appropriate firmware type to program it. + + + + + +You are currently using: + %1 + + + + + Your radio does not seem connected to USB or the driver is not installed!!! + +Please use ZADIG to properly install the driver. + + + + + Your radio does not seem connected to USB or the driver is not initialized!!!. + + + + + Flashing done (exit code = %1) + + + + + Flashing done with errors + + + + + FUSES: Low=%1 High=%2 Ext=%3 + + + + + FlightMode + + + Fade In + + + + + Fade Out + + + + + Name + + + + + Switch + + + + + FlightModePanel + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + Popup enabled + + + + + &Clear + + + + + Clear + + + + + Clear all current Flight Mode properties? + + + + + FlightModesPanel + + + Flight Mode %1 + + + + + (%1) + + + + + (default) + + + + + FlybarSelectionPage + + + Has Flybar + + + + + Flybarless + + + + + Flybar: + + + + + FusesDialog + + + Fuses + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Reads the current fuses in the AVR controller.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Proper states for </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">AtMega 64 </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse not set: 0E, 81, FF</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse set: 0E, 89, FF</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Proper states for AtMega 2560 :</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse not set: D7, 11, FC</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse set: D7, 19, FC</span></p></body></html> + + + + + Read Fuses + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">Reset Fuses</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Fuses in the AVR tell it how to behave. Pressing this button sets the fuses to the default parameters needed in the FW. These parameters are different for stock and 4.1 MB, please verify you selected the appropriate processor type in preferences.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This button also sets the &quot;EEPROM protect&quot; Fuse.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This prevents erasing of the EEPROM when the flash memory is written.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">WARNING</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Setting fuses can lead to problems and even a total lockout from your controller. Do this only if you know what you are doing.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">When in doubt consult either the project's page or the 9xforum (http://9xforums.com/forum/)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">If you do get locked out - google lookup for &quot;dealing with Fuse Bricks&quot;.</span></p></body></html> + + + + + Reset Fuses +EEPROM - PROTECT + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">Reset Fuses</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Fuses in the AVR tell it how to behave. Pressing this button sets the fuses to the default parameters needed in the </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">FW. These parameters are different for stock and 4.1 MB, please verify you selected the appropriate processor type in preferences.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This button also clears the &quot;EEPROM protect&quot; Fuse.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This causes erasing of the EEPROM when the flash memory is written.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">WARNING</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Setting fuses can lead to problems and even a total lockout from your controller. Do this only if you know what you are doing.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">When in doubt consult either the project's page or the 9xforum (http://9xforums.com/forum/)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">If you do get locked out - google lookup for &quot;dealing with Fuse Bricks&quot;.</span></p></body></html> + + + + + Reset Fuses +EEPROM - DELETE + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; text-decoration: underline;">WARNING</span></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changing the fuses can mess up your radio.</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Proceed only if you know what you are doing.</p></body></html> + + + + + + Reset Radio Fuses + + + + + Read Fuses from Radio + + + + + GeneralEdit + + + Radio settings + + + + + Retrieve calib. and hw settings from profile + + + + + Store calib. and hw settings in selected profile + + + + + General settings used throught the transmitter. +These will be relevant for all models in the same EEPROM. + + + + + Setup + + + + + Global Functions + + + + + Trainer + + + + + Hardware + + + + + Calibration + + + + + + + Warning + + + + + Wrong data in profile, radio calibration was not retrieved + + + + + Wrong data in profile, Switch/pot config not retrieved + + + + + Wrong data in profile, hw related parameters were not retrieved + + + + + Do you want to store calibration in %1 profile<br>overwriting existing calibration? + + + + + Calibration and HW parameters saved. + + + + + GeneralSetup + + + Form + + + + + Readonly Unlock + + + + + SC + + + + + SE + + + + + SA + + + + + SF + + + + + SH + + + + + SD + + + + + SB + + + + + SG + + + + + Stick reverse + + + + + Country Code + + + + + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. + + + + + FAI Mode + + + + + Automatically adjust the radio's clock if a GPS is connected to telemetry. + + + + + Adjust RTC + + + + + Speaker Volume + + + + + + Hz + + + + + Vario pitch at max + + + + + Backlight Switch + + + + + Color 1 + + + + + Color 2 + + + + + Sound Mode + + + + + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. + + + + + sec + + + + + Backlight color + + + + + Speaker Pitch (spkr only) + + + + + Beeper + + + + + Speaker + + + + + BeeperVoice + + + + + SpeakerVoice + + + + + Beep volume + + + + + Wav volume + + + + + Vario volume + + + + + Background volume + + + + + + ms + + + + + Backlight flash on alarm + + + + + Vario pitch at zero + + + + + Vario repeat at zero + + + + + Backlight Auto OFF after + + + + + This is the switch selectrion for turning on the backlight (if installed). + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">LCD Screen Contrast</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Values can be 20-45</span></p></body></html> + + + + + RotEnc Navigation + + + + + Backlight Brightness + + + + + America + + + + + Japan + + + + + Europe + + + + + Voice Language + + + + + Timeshift from UTC + + + + + Backlight OFF Brightness + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + <html><head/><body><p>Channel order</p><p><br/></p><p>Defines the order of the default mixes created on a new model.</p></body></html> + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Stick Mode + + + + + Metric + + + + + Imperial + + + + + Default Channel Order + + + + + GPS Coordinates + + + + + Min + + + + + + v + + + + + Max + + + + + Low Memory Warning + + + + + Inactivity Timer + + + + + Show Splash Screen on Startup + + + + + Contrast + + + + + Battery Meter Range + + + + + Haptic Strength + + + + + LCD Display Type + + + + + "No Sound" Warning + + + + + Battery Warning + + + + + Haptic Length + + + + + MAVLink Baud Rate + + + + + + Quiet + + + + + Only Alarms + + + + + + No Keys + + + + + + All + + + + + Battery warning voltage. +This is the threashhold where the battery warning sounds. + +Acceptable values are 5v..10v + + + + + Standard + + + + + Optrex + + + + + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. + + + + + min + + + + + + Show splash screen on startup + + + + + --- + + + + + 2s + + + + + 3s + + + + + 4s + + + + + 6s + + + + + 8s + + + + + 10s + + + + + 15s + + + + + 4800 Baud + + + + + 9600 Baud + + + + + 14400 Baud + + + + + 19200 Baud + + + + + 38400 Baud + + + + + 57600 Baud + + + + + 76800 Baud + + + + + 115200 Baud + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> + + + + + + X-Short + + + + + + Short + + + + + + Normal + + + + + + Long + + + + + + X-Long + + + + + hh° (N/S) mm' ss''.dd + + + + + NMEA + + + + + Play Delay (switch mid position) + + + + + Measurement Units + + + + + Haptic Mode + + + + + Beeper Length + + + + + Beeper Mode + + + + + Beeper volume + +0 - Quiet. No beeps at all. +1 - No Keys. Normal beeps but menu keys do not beep. +2 - Normal. +3 - Loud. +4 - Extra loud. + + + + + Alarms Only + + + + + GeneralSetupPanel + + + If you enable FAI, you loose the vario, the play functions, the telemetry screen. +This function cannot be disabled by the radio. +Are you sure ? + + + + + GyroPage + + + No + + + + + Yes, controled by a switch + + + + + Yes, controlled by a pot + + + + + Hardware + + + Form + + + + + SQ + + + + + SR + + + + + LS2 + + + + + SP + + + + + SO + + + + + S4 + + + + + RS + + + + + SB + + + + + PPM 2 + + + + + + + + + + + + + + Beeper volume + +0 - Quiet. No beeps at all. +1 - No Keys. Normal beeps but menu keys do not beep. +2 - Normal. +3 - Loud. +4 - Extra loud. + + + + + OFF + + + + + S-Port Mirror + + + + + Telemetry + + + + + SBUS Trainer + + + + + Debug + + + + + Rud + + + + + PPM 3 + + + + + S1 + + + + + S2 + + + + + S3 + + + + + PPM 1 + + + + + Serial Port + + + + + v + + + + + PPM Multiplier + + + + + Current Offset + + + + + PPM 4 + + + + + SA + + + + + Ele + + + + + Ail + + + + + Thr + + + + + SC + + + + + LS + + + + + SD + + + + + Battery Offset + + + + + SE + + + + + SF + + + + + SG + + + + + SH + + + + + SI + + + + + SJ + + + + + SK + + + + + SL + + + + + SM + + + + + SN + + + + + RS2 + + + + + Bluetooth + + + + + ADC Filter + + + + + HardwarePanel + + + + + None + + + + + 2 Positions Toggle + + + + + 2 Positions + + + + + 3 Positions + + + + + Pot with detent + + + + + Multipos switch + + + + + Pot without detent + + + + + Slider with detent + + + + + Heli + + + Off + + + + + 120 + + + + + 120X + + + + + 140 + + + + + 90 + + + + + Invert Elevator + + + + + Invert Aileron + + + + + Invert Collective + + + + + Long. cyc + + + + + Invert + + + + + Swash Ring + + + + + Swash Type + + + + + Lateral cyc + + + + + Collective + + + + + HeliPage + + + Throttle Channel: + + + + + Yaw Channel: + + + + + Pitch Channel: + + + + + Roll Channel: + + + + + InputsPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear All Inputs + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + + + + + Ctrl+A + + + + + &Edit + + + + + Enter + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Function + + + + + V1 + + + + + V2 + + + + + AND Switch + + + + + Duration + + + + + Delay + + + + + L%1 + + + + + + (instant) + + + + + (infinite) + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + &Delete + + + + + Delete + + + + + LogsDialog + + + Companion Log Viewer + + + + + Fly sessions + + + + + Zoom + + + + + X + + + + + Y + + + + + Reset + + + + + Filename + + + + + Open LogFile + + + + + Telemetry logs + + + + + Time (hh:mm:ss) + + + + + Plot Title Change + + + + + New plot title: + + + + + Axis Label Change + + + + + New axis label: + + + + + Graph Name Change + + + + + New graph name: + + + + + Error: no GPS data not found + + + + + The column containing GPS coordinates must be named "GPS". + +The columns for altitude "GAlt" and for speed "GSpd" are optional + + + + + Error + + + + + Cannot write file %1: +%2. + + + + + Cursor A: %1 m + + + + + Cursor B: %1 m + + + + + Time delta: %1 + + + + + Climb rate: %1 m/s + + + + + Select your log file + + + + + Available fields + + + + + The selected logfile contains %1 invalid lines out of %2 total lines + + + + + total duration + + + + + duration + + + + + (L1) + + + + + (R1) + + + + + (L2) + + + + + (R2) + + + + + MainWindow + + + + File loaded + + + + + Display previous warning again at startup ? + + + + + Checking for updates + + + + + Unable to check for updates. + + + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + + Save As + + + + + Executable (*.exe) + + + + + New release available + + + + + A new release of Companion is available, please check the OpenTX website! + + + + + + No updates available at this time. + + + + + Would you like to launch the installer? + + + + + + Error + + + + + Error opening file %1: +%2. + + + + + Not enough flash available on this board for all the selected options + + + + + Compilation server temporary failure, try later + + + + + Compilation server too busy, try later + + + + + Compilation error + + + + + Invalid firmware + + + + + Invalid board + + + + + Invalid language + + + + + Unknown server failure, try later + + + + + Do you want to write the firmware to the radio now ? + + + + + Firmware %1 does not seem to have ever been downloaded. +Release %2 is available. +Do you want to download it now? + +We recommend you view the release notes using the button below to learn about any changes that may be important to you. + + + + + + Yes + + + + + + No + + + + + + Release Notes + + + + + + Do you want to download release %1 now ? + + + + + A new version of %1 firmware is available: + - current is %2 + - newer is %3 + +Do you want to download it now? + +We recommend you view the release notes using the button below to learn about any changes that may be important to you. + + + + + Ignore this release %1? + + + + + + + Companion + + + + + The selected language will be used the next time you start Companion. + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + + + Open Models and Settings file + + + + + + File saved + + + + + + Synchronize SD + + + + + Firmware updates + + + + + Current firmware does not provide release notes informations. + + + + + + Read Firmware from Radio + + + + + + Read Models and Settings from Radio + + + + + Models and Settings read + + + + + + This function is not yet implemented + + + + + Save Radio Backup to File + + + + + Read Radio Firmware to File + + + + + OpenTX Home Page: <a href='%1'>%1</a> + + + + + The OpenTX Companion project was originally forked from <a href='%1'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Copyright OpenTX Team + + + + + About Companion + + + + + OpenTX Companion %1 - Radio: %2 - Profile: %3 + + + + + New + + + + + Create a new Models and Settings file + + + + + Open... + + + + + Save + + + + + + Save Models and Settings file + + + + + Save As... + + + + + Exit + + + + + Exit the application + + + + + Cut Model + + + + + Cut current model to the clipboard + + + + + Copy Model + + + + + Copy current model to the clipboard + + + + + Paste Model + + + + + Paste model from clipboard + + + + + Classical + + + + + The classic companion9x icon theme + + + + + Yerico + + + + + Yellow round honey sweet icon theme + + + + + Monochrome + + + + + A monochrome black icon theme + + + + + MonoWhite + + + + + A monochrome white icon theme + + + + + MonoBlue + + + + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Normal + + + + + Use normal size toolbar icons + + + + + Big + + + + + Use big toolbar icons + + + + + Huge + + + + + Use huge toolbar icons + + + + + System language + + + + + Use system language in menus + + + + + Czech + + + + + Use Czech in menus + + + + + German + + + + + Use German in menus + + + + + English + + + + + Use English in menus + + + + + Finnish + + + + + Use Finnish in menus + + + + + French + + + + + Use French in menus + + + + + Italian + + + + + Use Italian in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Spanish + + + + + Use Spanish in menus + + + + + Swedish + + + + + Use Swedish in menus + + + + + Chinese + + + + + Use Chinese in menus + + + + + About... + + + + + Show the application's About box + + + + + Print... + + + + + Print current model + + + + + Simulate... + + + + + Simulate current model + + + + + Alt+S + + + + + Load Backup... + + + + + Load backup from file + + + + + View Log File... + + + + + Open and view log file + + + + + Settings... + + + + + Edit Settings + + + + + Download... + + + + + Download firmware and voice files + + + + + Check for Updates... + + + + + Check OpenTX and Companion updates + + + + + Companion Changes... + + + + + Show Companion change log + + + + + Firmware Changes... + + + + + Show firmware change log + + + + + Compare Models... + + + + + Compare models + + + + + Edit Radio Splash Image... + + + + + Edit the splash image of your Radio + + + + + List programmers... + + + + + List available programmers + + + + + Fuses... + + + + + Show fuses dialog + + + + + Read firmware from Radio + + + + + Write Firmware to Radio + + + + + Write firmware to Radio + + + + + Add Radio Profile + + + + + Create a new Radio Setting Profile + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + Write Models and Settings To Radio + + + + + Write Models and Settings to Radio + + + + + Read Models and Settings From Radio + + + + + Configure Communications... + + + + + Configure software for communicating with the Radio + + + + + Write Backup to Radio + + + + + Write Backup from file to Radio + + + + + Backup Radio to File + + + + + Save a complete backup file of all settings and model data in the Radio + + + + + Contributors... + + + + + A tribute to those who have contributed to OpenTX and Companion + + + + + SD card synchronization + + + + + Recent Files + + + + + Set Menu Language + + + + + Set Icon Theme + + + + + Set Icon Size + + + + + + File + + + + + + Edit + + + + + Settings + + + + + Read/Write + + + + + + Help + + + + + + Radio Profile + + + + + Recent Models+Settings + + + + + Show recent Models+Settings documents + + + + + Show the list of radio profiles + + + + + Write + + + + + Ready + + + + + %2 + + + + + New Radio + + + + + MdiChild + + + Radio settings + + + + + Simulate Tx + + + + + Delete selected models? + + + + + Cannot delete default model. + + + + + &Edit + + + + + &Restore from backup + + + + + &Model Wizard + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + + &Paste + + + + + + Ctrl+V + + + + + D&uplicate + + + + + Ctrl+U + + + + + Move to Category + + + + + &Use as default + + + + + P&rint model + + + + + Ctrl+P + + + + + &Simulate model + + + + + Alt+S + + + + + &Add model + + + + + &Rename category + + + + + &Delete category + + + + + &Add category + + + + + Models and settings will be automatically converted. +If that is not what you intended, please close the file +and choose the correct radio type/profile before reopening it. + + + + + Do you want to overwrite radio general settings? + + + + + You are pasting on an not empty model, are you sure? + + + + + free bytes + + + + + + Companion + + + + + This category is not empty! + + + + + New model + + + + + Editing model %1: + + + + + + + + + + + Error + + + + + + + + Save As + + + + + %1 has been modified. +Do you want to save your changes? + + + + + Unable to find Horus radio SD card! + + + + + Models and Settings written + + + + + Cannot write temporary file! + + + + + Open backup Models and Settings file + + + + + Unable to find file %1! + + + + + Error opening file %1: +%2. + + + + + Error reading file %1: +%2. + + + + + Invalid binary backup File %1 + + + + + Warning + + + + + MixerDialog + + + Dialog + + + + + Delay + + + + + Slow + + + + + Up + + + + + Down + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; text-decoration: underline;">Delay ans Slow</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These values control the speed and delay of the output of the mix. </p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Delay is not zero the actuation of the mix will be delayed by the specified amount of seconds.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Slow is not zero then the speed of the mix will be set by the value specified -&gt; the value states the number of seconds it takes to transit from -100 to 100.</p></body></html> + + + + + Include Trim + + + + + Offset + + + + + Weight + + + + + Name + + + + + Source + + + + + Multiplex + + + + + Warning + + + + + The curve used by the mix + + + + + Include DR/Expo + + + + + Flight modes + + + + + Switch + + + + + Mixer warning. +Setting this value will cause a beep to be emmitted when this value is active. + + + + + OFF + + + + + 1 Beep + + + + + 2 Beep + + + + + 3 Beep + + + + + No + + + + + Yes + + + + + + + GV + + + + + + + + The source for the mixer + + + + + Multiplexer + +This determines how mixer values are added. + +"+" means the value of the current mix is added to the previous mixes in the same channel. +"*" means the value of the current mix is amultiplied with the previous mixes in the same channel. +"R" means the value replaces the previous values. If the switch is off the value will be ignored. + + + + + ADD + + + + + MULTIPLY + + + + + REPLACE + + + + + Curve + + + + + Switch used by the mix. +If blank then the mix is considered to be "ON" all the time. + + + + + DEST -> CH%1 + + + + + Click to access popup menu + + + + + Clear All + + + + + Set All + + + + + Invert All + + + + + MixesPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear Mixes + + + + + Not enough available mixers! + + + + + Delete Selected Mixes? + + + + + &Add + + + + + Ctrl+A + + + + + &Edit + + + + + Enter + + + + + &Toggle highlight + + + + + Ctrl+T + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + C&ut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Mixes? + + + + + Really clear all the mixes? + + + + + ModelEdit + + + Dialog + + + + + Simulate + + + + + Setup + + + + + Heli + + + + + Flight Modes + + + + + Inputs + + + + + Mixes + + + + + Outputs + + + + + Curves + + + + + Logical Switches + + + + + Special Functions + + + + + Telemetry + + + + + ModelPrinter + + + %1 bytes + + + + + CH%1 + + + + + Exponential + + + + + Extra Fine + + + + + Fine + + + + + Medium + + + + + Coarse + + + + + Unknown + + + + + Enabled + + + + + Disabled + + + + + %1, Channels(%2-%3), PPM delay(%4usec), Pulse polarity(%5) + + + + + %1, Channels(%2-%3) + + + + + Receiver number(%1) + + + + + radio Protocol %1, subType %2, option value %3 + + + + + Slave/Jack + + + + + Master/SBUS Module + + + + + Master/CPPM Module + + + + + Master/SBUS in battery compartment + + + + + Master/Jack + + + + + 90 + + + + + 120 + + + + + 120X + + + + + 140 + + + + + + Off + + + + + Rudder + + + + + Elevator + + + + + Throttle + + + + + Aileron + + + + + Name(%1) + + + + + Persistent + + + + + MinuteBeep + + + + + CountDown(Beeps) + + + + + CountDown(Voice) + + + + + CountDown(Haptic) + + + + + + + + FM%1 + + + + + FM%1%2 + + + + + FM%1+%2 + + + + + [I%1] + + + + + Input%1 + + + + + Weight + + + + + Switch + + + + + + NoTrim + + + + + + Offset(%1) + + + + + Weight(%1) + + + + + Switch(%1) + + + + + No DR/Expo + + + + + Delay(u%1:d%2) + + + + + Slow(u%1:d%2) + + + + + Warn(%1) + + + + + Disabled in all flight modes + + + + + Flight modes(%1) + + + + + Flight mode(%1) + + + + + Edge(%1, [%2:%3]) + + + + + instant + + + + + Sticky(%1, %2) + + + + + Timer(%1, %2) + + + + + Duration(%1s) + + + + + Delay(%1s) + + + + + Custom + + + + + Standard + + + + + ModelSelectionPage + + + Plane + + + + + Multirotor + + + + + Helicopter + + + + + Model Name: + + + + + Model Type: + + + + + ModelsListWidget + + + No free slot available, cannot duplicate + + + + + Module + + + Start + + + + + CH + + + + + SubType + + + + + Polarity + + + + + Negative + + + + + Positive + + + + + Antenna + + + + + Internal + + + + + Ext. + Int. + + + + + Output type + + + + + Open Drain + + + + + Push Pull + + + + + Option value + + + + + Channels + + + + + Receiver No. + + + + + Bind on startup + + + + + Low Power + + + + + PPM delay + + + + + us + + + + + PPM Frame Length + + + + + ms + + + + + Protocol + + + + + Multi Radio Protocol + + + + + Failsafe Mode + + + + + Not set + + + + + Hold + + + + + Custom + + + + + No Pulses + + + + + Receiver + + + + + Trainer Mode + + + + + Master/Jack + + + + + Slave/Jack + + + + + Master/SBUS Module + + + + + Master/CPPM Module + + + + + Master/SBUS in battery compartment + + + + + Failsafe Positions + + + + + Show values in: + + + + + % + abbreviation for percent + + + + + μs + abbreviation for microseconds + + + + + ModulePanel + + + Trainer Port + + + + + Internal Radio System + + + + + External Radio Module + + + + + + Radio System + + + + + Extra Radio System + + + + + Value + + + + + Hold + + + + + No Pulse + + + + + MultiModelPrinter + + + General Model Settings + + + + + Name: + + + + + EEprom Size: + + + + + Timer%1: + + + + + Module%1: + + + + + Module: + + + + + Trainer port: + + + + + Throttle Trim: + + + + + Trim Increment: + + + + + Center Beep: + + + + + Helicopter Setup + + + + + Swash Type: + + + + + Swash Ring: + + + + + Input + + + + + Weight + + + + + Long. cyc + + + + + Lateral cyc + + + + + Collective + + + + + Flight modes + + + + + + Flight mode + + + + + Switch + + + + + Fade IN + + + + + Fade OUT + + + + + + FM%1 + + + + + + GV%1 + + + + + RE%1 + + + + + Limits + + + + + Channel + + + + + Name + + + + + + Offset + + + + + Min + + + + + Max + + + + + Invert + + + + + Global Variables + + + + + Inputs + + + + + Mixers + + + + + CV%1 + + + + + Curves + + + + + L%1 + + + + + Logical Switches + + + + + SF%1 + + + + + Special Functions + + + + + Telemetry Settings + + + + + Analogs + + + + + Unit + + + + + Scale + + + + + A%1 + + + + + RSSI Alarms + + + + + Low Alarm + + + + + Critical Alarm + + + + + MultirotorPage + + + Throttle Channel: + + + + + Yaw Channel: + + + + + Pitch Channel: + + + + + Roll Channel: + + + + + OptionsPage + + + Throttle Cut + + + + + Throttle Timer + + + + + Flight Timer + + + + + PrintDialog + + + Close + + + + + Print + + + + + Print to file + + + + + Print Document + + + + + Select PDF output file + + + + + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) + + + + + ProgressDialog + + + Flash Firmware + + + + + Close + + + + + ProgressWidget + + + Form + + + + + Show Details + + + + + QObject + + + Left Horizontal + + + + + Left Vertical + + + + + Right Vertical + + + + + Right Horizontal + + + + + Aux. 1 + + + + + Aux. 2 + + + + + + Unknown + + + + + FW: %1 + + + + + Pict: %1 + + + + + Profile image + + + + + Conversion error on field %1 + + + + + + -GV%1 + + + + + + + GV%1 + + + + + + + + + + + V + + + + + + A + + + + + mA + + + + + kts + + + + + + m/s + + + + + + + km/h + + + + + + + mph + + + + + + + m + + + + + f + + + + + + °C + + + + + °F + + + + + + % + + + + + + mAh + + + + + + W + + + + + mW + + + + + dB + + + + + rpms + + + + + + g + + + + + + ° + + + + + Rad + + + + + hours + + + + + minutes + + + + + seconds + + + + + + s + + + + + ft + + + + + h:m + + + + + m:s + + + + + h:m:s + + + + + + + REa + + + + + + + REb + + + + + TrmR + + + + + TrmE + + + + + TrmT + + + + + TrmA + + + + + Trm5 + + + + + Trm6 + + + + + + Batt + + + + + + Time + + + + + + + Timer1 + + + + + + + Timer2 + + + + + + + Timer3 + + + + + SWR + + + + + RSSI Tx + + + + + RSSI Rx + + + + + A1 + + + + + A2 + + + + + A3 + + + + + A4 + + + + + Alt + + + + + Rpm + + + + + Fuel + + + + + T1 + + + + + T2 + + + + + Speed + + + + + Dist + + + + + GPS Alt + + + + + Cell + + + + + Cells + + + + + Vfas + + + + + Curr + + + + + Cnsp + + + + + Powr + + + + + AccX + + + + + AccY + + + + + AccZ + + + + + Hdg + + + + + VSpd + + + + + AirSpeed + + + + + dTE + + + + + A1- + + + + + A2- + + + + + A3- + + + + + A4- + + + + + Alt- + + + + + Alt+ + + + + + Rpm+ + + + + + T1+ + + + + + T2+ + + + + + Speed+ + + + + + Dist+ + + + + + AirSpeed+ + + + + + Cell- + + + + + Cells- + + + + + Vfas- + + + + + Curr+ + + + + + Powr+ + + + + + ACC + + + + + GPS Time + + + + + + + + ---- + + + + + [I%1] + + + + + LUA%1%2 + + + + + MAX + + + + + + L%1 + + + + + CYC%1 + + + + + TR%1 + + + + + CH%1 + + + + + FM0 + + + + + FM1 + + + + + FM2 + + + + + FM3 + + + + + FM4 + + + + + FM5 + + + + + FM6 + + + + + FM7 + + + + + FM8 + + + + + RudTrim Left + + + + + RudTrim Right + + + + + EleTrim Down + + + + + EleTrim Up + + + + + ThrTrim Down + + + + + ThrTrim Up + + + + + AilTrim Left + + + + + AilTrim Right + + + + + Trim 5 Down + + + + + Trim 5 Up + + + + + Trim 6 Down + + + + + Trim 6 Up + + + + + + + OFF + + + + + + + ON + + + + + THs + + + + + TH% + + + + + THt + + + + + One + + + + + ??? + + + + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + + + + --- + + + + + a>x + + + + + a<x + + + + + |a|>x + + + + + |a|<x + + + + + AND + + + + + OR + + + + + XOR + + + + + a=b + + + + + a!=b + + + + + a>b + + + + + a<b + + + + + a>=b + + + + + a<=b + + + + + d>=x + + + + + |d|>=x + + + + + a=x + + + + + a~x + + + + + Timer + + + + + Sticky + + + + + Edge + + + + + Override %1 + + + + + Trainer + + + + + Trainer RUD + + + + + Trainer ELE + + + + + Trainer THR + + + + + Trainer AIL + + + + + Instant Trim + + + + + Play Sound + + + + + Haptic + + + + + Reset + + + + + Set Timer %1 + + + + + Vario + + + + + Play Track + + + + + Play Both + + + + + Play Value + + + + + Play Script + + + + + SD Logs + + + + + Volume + + + + + Backlight + + + + + Screenshot + + + + + Background Music + + + + + Background Music Pause + + + + + Adjust GV%1 + + + + + SetFailsafe Int. Module + + + + + SetFailsafe Ext. Module + + + + + RangeCheck Int. Module + + + + + RangeCheck Ext. Module + + + + + Bind Int. Module + + + + + Bind Ext. Module + + + + + Flight + + + + + Telemetry + + + + + Rotary Encoder + + + + + + + <font color=red><b>Inconsistent parameter</b></font> + + + + + Value + + + + + Decr: + + + + + Incr: + + + + + played once, not during startup + + + + + repeat(%1s) + + + + + DISABLED + + + + + INV + + + + + NOR + + + + + Switch + + + + + Switch + + + + + cannot be exported on this board! + + + + + Source %1 cannot be exported on this board! + + + + + OpenTX only accepts %1 points in all curves + + + + + OpenTx only accepts %1 points in all curves + + + + + + + + + + OpenTX on this board doesn't accept this function + + + + + OpenTX doesn't accept this telemetry protocol + + + + + OpenTX doesn't allow this number of channels + + + + + + + OpenTX doesn't accept this radio protocol + + + + + Unknown error + + + + + ... plus %1 errors + + + + + + + + + + + Error + + + + + Cannot write radio settings + + + + + Cannot write model %1 + + + + + + Rud + + + + + + Ele + + + + + + Thr + + + + + + Ail + + + + + + P1 + + + + + + P2 + + + + + + P3 + + + + + F1 + + + + + F2 + + + + + F3 + + + + + F4 + + + + + + + S1 + + + + + + + S2 + + + + + + + LS + + + + + + + RS + + + + + S3 + + + + + 6P + + + + + L1 + + + + + L2 + + + + + JSx + + + + + JSy + + + + + Channel values displayed in us + + + + + No OverrideCH functions available + + + + + Possibility to enable FAI MODE (no telemetry) at field + + + + + FAI MODE (no telemetry) always enabled + + + + + Support for the DIY-Multiprotocol-TX-Module + + + + + Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015 + + + + + Disable HELI menu and cyclic mix support + + + + + Disable Global variables + + + + + Support for Lua model scripts + + + + + Enable Lua compiler + + + + + Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader) + + + + + Instead of Joystick emulation, USB connection is Command Line Interface + + + + + + Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views + + + + + + Support for PPM internal module hack + + + + + + + + + + + + + + + Use alternative SQT5 font + + + + + ST7565P LCD or compatible + + + + + ST7565R LCD or compatible + + + + + ERC12864FSF LCD + + + + + ST7920 LCD + + + + + KS108 LCD + + + + + + Support for frsky telemetry mod + + + + + Support for telemetry easy board + + + + + + Support for jeti telemetry mod + + + + + + Support for receiving ardupilot data + + + + + + Support for receiving NMEA data + + + + + + Support for MAVLINK devices + + + + + Rotary Encoder use in menus navigation + + + + + + + + + + + Pots use in menus navigation + + + + + + + + + Support for DSM2 modules + + + + + Support for DSM2 modules using ppm instead of true serial + + + + + FrSky Taranis X9D+ + + + + + FrSky Taranis X9D + + + + + Haptic module installed + + + + + FrSky Taranis X9E + + + + + Confirmation before radio shutdown + + + + + Horus gimbals installed (Hall sensors) + + + + + FrSky Taranis X7 + + + + + FrSky Horus + + + + + Use ONLY with first DEV pcb version + + + + + Turnigy 9XR-PRO + + + + + + + Enable HELI menu and cyclic mix support + + + + + + + + + + + + + Enable TEMPLATES menu + + + + + + + + + + + + + No flight modes + + + + + + + + + + + + + Global variables + + + + + + + + + + + + + In model setup menus automatically set source by moving the control + + + + + + + + + + + + + In model setup menus automatically set switch by moving the control + + + + + + + + + + + + + No graphical check boxes and sliders + + + + + + + + + + + + + Battery graph + + + + + + + + + + + + + Don't use bold font for highlighting active items + + + + + + + Bluetooth interface + + + + + Turnigy 9XR with m128 chip + + + + + + + + + + Enable heli menu and cyclic mix support + + + + + + + + No splash screen + + + + + + + + + + Disable curves menus + + + + + + + + + Support for radio modified with regular speaker + + + + + + + + + + Used if you have modified your radio with voice mode + + + + + + + + + Used if you have modified your radio with haptic mode + + + + + + + + + + PPM center adjustment in limits + + + + + + + + + + Symetrical Limits + + + + + + + + Enable the throttle trace in Statistics + + + + + + + + + EEprom write Progress bar + + + + + + + + + + Imperial units + + + + + Turnigy 9XR + + + + + + No Winged Shadow How High support + + + + + + No vario support + + + + + + No GPS support + + + + + + No gauges in the custom telemetry screen + + + + + + Add support for reversing stick inputs (e.g. needed for FrSky gimbals) + + + + + 9X with stock board + + + + + + SmartieParts 2.2 Backlight support + + + + + + + + + + Enable resetting values by pressing up and down at the same time + + + + + EEprom write progress bar + + + + + Allow compensating for offset errors in FrSky FAS current sensors + + + + + 9X with stock board and m128 chip + + + + + 9X with AR9X board + + + + + 9X with Sky9x board + + + + + 9X with Gruvin9x board + + + + + + Support for SD memory card + + + + + + Support of FrSky PXX protocol + + + + + DIY MEGA2560 radio + + + + + Power management by soft-off circuitry + + + + + Negative span + + + + + Mid value + + + + + Positive span + + + + + Keys + + + + + Sticks + + + + + Keys + Sticks + + + + + English + + + + + Dutch + + + + + French + + + + + Italian + + + + + German + + + + + Czech + + + + + Slovak + + + + + Spanish + + + + + Polish + + + + + Portuguese + + + + + Swedish + + + + + Hungarian + + + + + No + + + + + RotEnc A + + + + + Rot Enc B + + + + + Rot Enc C + + + + + Rot Enc D + + + + + Rot Enc E + + + + + Rud Trim + + + + + Ele Trim + + + + + Thr Trim + + + + + Ail Trim + + + + + Rot Enc + + + + + !Flight mode %1 + + + + + Flight mode %1 + + + + + Own value + + + + + Flight mode %1 value + + + + + -GV%1 (%2) + + + + + GV%1 (%2) + + + + + Yellow + + + + + Orange + + + + + Red + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + FrSky Sensor Hub + + + + + None + + + + + Imperial + + + + + Metric + + + + + Warning + + + + + Simulator for this firmware is not yet available + + + + + + Uknown error during Simulator startup. + + + + + Simulator Error + + + + + Data Load Error + + + + + Error occurred while starting simulator. + + + + + + + + + Synchronization error + + + + + No SD directory configured! + + + + + No Radio connected! + + + + + GV + + + + + Played once, not during startup + + + + + No repeat + + + + + %1s + + + + + Value + + + + + Source + + + + + GVAR + + + + + Increment + + + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + THR + + + + + -%1 + + + + + + Models + + + + + + The directory '%1' doesn't exist! + + + + + Create '%1' failed + + + + + Copy '%1' to '%2' failed + + + + + Open '%1' failed + + + + + Write '%1' failed + + + + + Positive + + + + + Negative + + + + + Cannot write file %1: +%2. + + + + + Companion + + + + + <b><u>WARNING!</u></b><br>This will reset the fuses of %1 to the factory settings.<br>Writing fuses can mess up your radio.<br>Do this only if you are sure they are wrong!<br>Are you sure you want to continue? + + + + + + Could not delete temporary file: %1 + + + + + Unable to find Horus radio SD card! + + + + + Select a data file + + + + + Select Data Directory + + + + + Select SD Card Image Folder + + + + + Available profiles: + + + + + ID: + + + + + Name: + + + + + Available radios: + + + + + WARNING: couldn't initialize SDL: +%1 + + + + + ERROR: No simulator libraries available. + + + + + Radio profile ID or Name to use for simulator. + + + + + Radio type to simulate (usually defined in profile). + + + + + show this help text + + + + + Usage: simulator [OPTION]... [EEPROM.BIN FILE OR DATA FOLDER] + + + + + Options: + + + + + ERROR: Couldn't start simulator, missing radio/profile/data file/folder. + Profile ID: [%1]; Radio ID: [%2]; +Data File: [%3] + + + + + ERROR: Radio profile or simulator firmware not found. +Profile ID: [%1]; Radio ID: [%2] + + + + + Error reading %1: %2 + + + + + Cannot save EEPROM + + + + + + Cannot open file %1: +%2. + + + + + + + Error writing file %1: +%2. + + + + + Invalid binary EEPROM file %1 + + + + + Can't extract RADIO/radio.bin + + + + + Can't extract RADIO/models.txt + + + + + Can't extract %1 + + + + + Unable to open %1: %2 + + + + + Invalid EEPROM file %1 + + + + + Invalid EEPROM File %1 + + + + + + Error opening file %1: +%2. + + + + + Error opening OTX archive %1 + + + + + Error initializing OTX archive writer + + + + + Error creating OTX file %1: +%2. + + + + + Error creating OTX archive + + + + + Error adding %1 to OTX archive + + + + + Error opening file %1 in write mode: +%2. + + + + + Unable to find file %1! + + + + + Thank you for upgrading to OpenTX 2.0. This is a major upgrade that adds and modifies a lot of things, so please make sure that you read release notes carefully to learn about the changes, and thoroughly check each of your models for proper function. + +The OpenTX Team. + + + + + QxtCommandOptions + + + sets the application GUI style + + + + + sets the application stylesheet + + + + + restores the application from an earlier session + + + + + displays debugging information about widgets + + + + + use right-to-left layout + + + + + never grab the mouse or keyboard + + + + + grab the mouse/keyboard even in a debugger + + + + + run in synchronous mode for debugging + + + + + use Direct3D by default + + + + + sets the X11 display + + + + + sets the geometry of the first window + + + + + sets the default font + + + + + sets the default background color + + + + + sets the default foreground color + + + + + sets the default button color + + + + + sets the application name + + + + + sets the application title + + + + + sets the X11 visual type + + + + + limit the number of colors on an 8-bit display + + + + + use a private color map + + + + + sets the input method server + + + + + disable the X Input Method + + + + + sets the style used by the input method + + + + + + option "%1" not found + + + + + Short options cannot have optional parameters + + + + + positional() called before parse() + + + + + unrecognized() called before parse() + + + + + count() called before parse() + + + + + value() called before parse() + + + + + parameters() called before parse() + + + + + unrecognized parameters: + + + + + %1 requires a parameter + + + + + RadioKnobWidget + + + Right-double-click to reset to center. + + + + + RadioNotFoundDialog + + + No Radio Found + + + + + <html><head/><body><p>No Radio was found!</p><p>Make sure that you hold the lower trim buttons towards the center while you turn it on.</p><p>Then connect the USB wire.</p><p><span style=" font-family:'arial,sans-serif'; font-size:13px; font-style:italic; color:#222222; background-color:#ffffff;">Note: if you have a Taranis that has not had the firmware upgraded to 2.0 then this version of Companion will not work.</span></p></body></html> + + + + + OK + + + + + RadioOutputsWidget + + + Form + + + + + View: + + + + + Logical Switches + + + + + Global Variables + + + + + Channel Outputs + + + + + L +o +g +i +c + + + + + G +l +o +b +a +l + + + + + C +h +a +n +n +e +l +s + + + + + RadioSwitchWidget + + + Latch/unlatch the momentary switch. + + + + + ReleaseNotesDialog + + + Companion Release Notes + + + + + ReleaseNotesFirmwareDialog + + + OpenTX Release Notes + + + + + RudderPage + + + No + + + + + Yes + + + + + <br>Rudder Channel: + + + + + Setup + + + Timer 1 + + + + + Top LCD Timer + + + + + Model Image + + + + + Warnings + + + + + Switch Warnings + + + + + Pot Warnings + + + + + OFF + + + + + Manual + + + + + Auto + + + + + Model + + + + + Center beep + + + + + Extended Trims + + + + + Display Checklist + + + + + Extended Limits + + + + + Reverse throttle operation. +If this is checked the throttle will be reversed. Idle will be forward, trim will also be reversed and the throttle warning will be reversed as well. + + + + + + + Reverse Throttle + + + + + Throttle Trim Idle Only + + + + + Throttle Warning + + + + + Exponential + + + + + Extra Fine + + + + + Fine + + + + + Medium + + + + + Coarse + + + + + Never + + + + + On change + + + + + Always + + + + + Global Functions + + + + + Throttle Source + + + + + Trim Step + + + + + Trims Display + + + + + Timer 2 + + + + + Timer 3 + + + + + SetupPanel + + + Timer %1 + + + + + SimpleTailPage + + + Elevator Channel: + + + + + SimulatedUIWidget + + + screenshot + Simulator LCD screenshot file name prefix + + + + + ENTER + + + + + PG-UP + + + + + PG-DN + + + + + DEL + + + + + BKSP + + + + + ESC + + + + + INS + + + + + <font size=+3>+</font> + + + + + <font size=+3>-</font> + + + + + <font size=+3>&larr;</font> + + + + + <font size=+3>&rarr;</font> + + + + + <font size=+3>&uarr;</font> + + + + + <font size=+3>&darr;</font> + + + + + <font size=+3>&#x2686;</font> + + + + + <font size=+3>&#x21b6;</font> + + + + + <font size=+3>&#x21b7;</font> + + + + + <font size=+3>&#x21c6;</font> + + + + + + <font size=+3>&#x21d3;</font> + + + + + <font size=+3>&#x21d1;</font> + + + + + <font size=+3>&#x21d5;</font> + + + + + <img src='qrc:/images/simulator/icons/svg/mouse.svg' width=20 height=18 /> + + + + + <img src='qrc:/images/simulator/icons/svg/arrow_click.svg' width=18 height=18 /> + + + + + <pre>[ MENU ]</pre> + + + + + <pre>[ PAGE ]</pre> + + + + + <pre>[ EXIT ]</pre> + + + + + <pre>[ ENT ]</pre> + + + + + <pre>[ UP ]</pre> + + + + + <pre>[ DN ]</pre> + + + + + <pre>[ <font size=+2>+</font> ]</pre> + + + + + <pre>[ <font size=+2>-</font> ]</pre> + + + + + <pre>[ PgUp ]</pre> + + + + + <pre>[ PgDn ]</pre> + + + + + <pre>[ MDL ]</pre> + + + + + <pre>[ RTN ]</pre> + + + + + <pre>[ SYS ]</pre> + + + + + <pre>[ TELE ]</pre> + + + + + <font size=+3>&#x2261;</font> + + + + + SimulatedUIWidget9X + + + + | + + + + + SimulatorMainWindow + + + OpenTx Simulator + + + + + View + + + + + Radio Window + + + + + Reload... + + + + + Tools + + + + + Toolbar + + + + + Reload Lua Scripts + + + + + Reload the Lua environment on the simulated radio. + + + + + F7 + + + + + Reload Radio Data + + + + + Reload all radio data without restarting the simulator. + + + + + F9 + + + + + Key Mapping + + + + + Show keyboard maping reference. + + + + + F1 + + + + + Joystick Settings + + + + + Open joystick configuration settings dialog. + + + + + F3 + + + + + LCD Screenshot + + + + + Save a screenshot of the current simulated LCD screen. + + + + + F8 + + + + + Dock In Main Window + + + + + Show the radio in the main window or as a separate "floating" window. + + + + + Menu Bar + + + + + Show or hide the top menu bar. + + + + + Alt+M + + + + + Constrain Width + + + + + Set radio widget width to be a fixed size. + + + + + Constrain Height + + + + + Set radio widget height to be a fixed size. + + + + + ERROR: Failed to create simulator interface, possibly missing or bad library. + + + + + Alt+T + + + + + Radio Outputs + + + + + F2 + + + + + Telemetry Simulator + + + + + F4 + + + + + Trainer Simulator + + + + + F5 + + + + + Debug Output + + + + + F6 + + + + + <b>Simulator Controls:</b> + + + + + <tr><th>Key/Mouse</th><th>Action</th></tr> + note: must match html layout of each table row (keyTemplate). + + + + + <tr><td><kbd>%1</kbd></td><td>%2</td></tr> + note: must match html layout of help text table header. + + + + + Simulator Help + + + + + SimulatorStartupDialog + + + OpenTX Simulator - Startup Options + + + + + Simulator Startup Options: + + + + + Radio Profile: + + + + + Existing radio profiles are shown here.<br /> +Create or edit profiles using the Companion application. + + + + + Radio Type: + + + + + Existing radio simulators are shown here.<br /> +The radio type specified in the selected profile is used by default. + + + + + Data Source: + + + + + Data File: + + + + + Data Folder: + + + + + SD Image Path: + + + + + Radio data (.bin/.eeprom/.otx) image file to use. A new file with a default image will be created if necessary.<br /> +<b>NOTE</b>: any existing EEPROM data incompatible with the selected radio type may be overwritten! + + + + + Select data file... + + + + + + + ... + + + + + Directory containing RADIO and MODELS folders to use.<br /> +New folder(s) with default radio/model will be created here if necessary. + + + + + Select data folder... + + + + + Directory containing the SD card image to use.<br/> +The default is configured in the chosen Radio Profile. + + + + + Select SD card image folder... + + + + + Select which of the data sources (File/Folder/SD Card) you would like to start the simulator with. + + + + + File + + + + + Folder + + + + + SD Path + + + + + All files (*.*) + + + + + SimulatorWidget + + + Companion Simulator + + + + + Radio Simulator (%1) + + + + + Could not determine startup data source. + + + + + Could not load data, possibly wrong format. + + + + + Data Load Error + + + + + Invalid startup data provided. Plese specify a proper file/path. + + + + + Simulator Startup Error + + + + + Error saving data: could open file for writing: '%1' + + + + + Error saving data: could not get data from simulator interface. + + + + + An unexpected error occurred while attempting to save radio data to file '%1'. + + + + + Data Save Error + + + + + Warning + + + + + Cannot open joystick, joystick disabled + + + + + Radio firmware error: %1 + + + + + - Flight Mode %1 (#%2) + + + + + SliderWidget + + + Right-double-click to reset to center. + + + + + SplashLibraryDialog + + + + ... + + + + + Splash Library - page %1 of %2 + + + + + Warning + + + + + Invalid image in library %1 + + + + + Information + + + + + No valid image found in library, check your settings + + + + + StandardPage + + + Channel %1 + + + + + SyncProcess + + + %1/%2 files + + + + + Create directory %1 + + + + + + Copy %1 to %2 + + + + + Write %1 + + + + + TailPage + + + Rudder Channel: + + + + + Elevator Channel: + + + + + Only one channel still available!<br>You probably should configure your model without using the wizard. + + + + + TailSelectionPage + + + Elevator and Rudder + + + + + Only Elevator + + + + + V-tail + + + + + Tail Type: + + + + + Telemetry + + + Protocol + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + Alarm 2 + + + + + RSSI + + + + + A1 + + + + + A2 + + + + + Sink Max + + + + + Climb Max + + + + + Sink Min + + + + + Climb Min + + + + + Center Silent + + + + + Vario limits + + + + + Vario source + + + + + Altimetry + + + + + Altitude source + + + + + Volts source + + + + + Top Bar + + + + + Volt source + + + + + Current source + + + + + Blades + + + + + mAh count + + + + + mAh + + + + + A + + + + + FAS Offset + + + + + Persistent mAh + + + + + Various + + + + + Serial Protocol + + + + + None + + + + + FrSky Sensor Hub + + + + + Sensors + + + + + Disable multi sensor handling + + + + + TelemetryAnalog + + + Unit + + + + + Max Value + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + + < + + + + + + > + + + + + Alarm 2 + + + + + Offset + + + + + Volts (V) + + + + + Amps (A) + + + + + Speed (m/s or ft/s) + + + + + Raw (-) + + + + + Speed (km/h or miles/h) + + + + + Meters (m or ft) + + + + + Temp (°) + + + + + Fuel (%) + + + + + mAmps (mA) + + + + + Range + + + + + TelemetryCustomScreen + + + Custom Screen Type + + + + + Min + + + + + Source + + + + + Gauge + + + + + Max + + + + + None + + + + + Numbers + + + + + Bars + + + + + Script + + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + FrSky S.PORT + + + + + FrSky D + + + + + FrSky D (cable) + + + + + Low Alarm + + + + + Critical Alarm + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + Alti + + + + + Alti+ + + + + + VSpeed + + + + + + + A1 + + + + + + + A2 + + + + + + A3 + + + + + + A4 + + + + + + FAS + + + + + Cells + + + + + --- + + + + + TelemetrySensor + + + Form + + + + + Custom + + + + + Calculated + + + + + Id + + + + + Instance + + + + + Add + + + + + Average + + + + + Min + + + + + Max + + + + + Multiply + + + + + Totalize + + + + + Cell + + + + + Consumption + + + + + Dist + + + + + Cells Sensor : + + + + + + + + + + + + --- + + + + + GPS Sensor : + + + + + Alt. Sensor : + + + + + Sensor : + + + + + Raw (-) + + + + + V + + + + + A + + + + + mA + + + + + kt + + + + + m/s + + + + + ft/s + + + + + km/h + + + + + mph + + + + + m + + + + + ft + + + + + °C + + + + + °F + + + + + % + + + + + mAh + + + + + W + + + + + mW + + + + + dBm + + + + + RPM + + + + + g + + + + + ° + + + + + Rad + + + + + mL + + + + + US fl.Oz. + + + + + Precision + + + + + Ratio + + + + + Blades + + + + + Offset + + + + + Multiplier + + + + + Auto Offset + + + + + Filter + + + + + Persistent + + + + + Positive + + + + + Logs + + + + + TelemetrySensorPanel + + + Lowest + + + + + Cell %1 + + + + + Highest + + + + + Delta + + + + + TelemetrySimulator + + + Telemetry Simulator + + + + + When enabled, sends any non-blank values as simulated telemetry data. + + + + + Simulate + + + + + Replay SD Log File + + + + + Replay rate + + + + + Load + + + + + |> + + + + + <| + + + + + > + + + + + <- + + + + + X + + + + + Row # +Timestamp + + + + + 1/5x + + + + + 5x + + + + + No Log File Currently Loaded + + + + + SWR + + + + + A2 + + + + + + + V / ratio + + + + + Db + + + + + RxBt + + + + + A1 + + + + + + + + + + + + + + + + + <html><head/><body><p><br/></p></body></html> + + + + + Tmp1 + + + + + A3 + + + + + A4 + + + + + RSSI + + + + + Tmp2 + + + + + + RPM + + + + + Fuel + + + + + °C + + + + + ml + + + + + Deg. C + + + + + % + + + + + + Meters + + + + + Alt + + + + + VSpd + + + + + m/s + + + + + Fuel Qty + + + + + + km/h + + + + + VFAS + + + + + Hdg + + + + + ASpd + + + + + + + G + + + + + GPS + + + + + Lat,Lon +(dec.deg.) + + + + + AccX + + + + + dd-MM-yyyy +hh:mm:ss + + + + + Date + + + + + Amps + + + + + AccZ + + + + + GAlt + + + + + + Volts + + + + + Cels + + + + + Curr + + + + + AccY + + + + + GSpd + + + + + Degrees + + + + + Log File + + + + + LOG Files (*.csv) + + + + + ERROR - invalid file + + + + + Templates + + + Simple 4-CH + + + + + T-Cut + + + + + Sticky T-Cut + + + + + V-Tail + + + + + Elevon\Delta + + + + + Heli Setup + + + + + Heli Setup with gyro gain control + + + + + Gyro gain control + + + + + Heli Setup (Futaba's channel assignment style) + + + + + Heli Setup with gyro gain control (Futaba's channel assignment style) + + + + + Gyro gain control (Futaba's channel assignment style) + + + + + Servo Test + + + + + MultiCopter + + + + + Use Model Config Wizard + + + + + Apply Template? + + + + + Apply template "%1"? + + + + + + + + + + + RUD + + + + + + + + + + + + + + ELE + + + + + + + THR + + + + + + + + + + + + AIL + + + + + + + + AIL2 + + + + + + + + ELE2 + + + + + + + + + + FLAPS + + + + + + + + + + FLAP%1 + + + + + + + + PITCH + + + + + + + + + + + + GYRO + + + + + + SPOIL + + + + + + SPOIL%1 + + + + + + RUD2 + + + + + + Clear Mixes? + + + + + Really clear existing mixes on CH6? + + + + + Really clear existing mixes on CH5? + + + + + ThrottlePage + + + Yes + + + + + No + + + + + <br>Throttle Channel: + + + + + Timer + + + Countdown + + + + + Minute Call + + + + + TimerPanel + + + Silent + + + + + Beeps + + + + + Voice + + + + + Haptic + + + + + Not persistent + + + + + Persistent (flight) + + + + + Persistent (manual reset) + + + + + Trainer + + + Form + + + + + Mode + + + + + Input + + + + + Weight + + + + + Rud + + + + + + + + + + + + Beeper volume + +0 - Quiet. No beeps at all. +1 - No Keys. Normal beeps but menu keys do not beep. +2 - Normal. +3 - Loud. +4 - Extra loud. + + + + + + + + Off + + + + + + + + += (Sum) + + + + + + + + := (Replace) + + + + + + + + chn1 + + + + + + + + chn2 + + + + + + + + chn3 + + + + + + + + chn4 + + + + + Ele + + + + + Thr + + + + + Ail + + + + + TrainerSimulator + + + Trainer simulator + + + + + TreeModel + + + Index + + + + + Name + + + + + Size + + + + + VTailPage + + + First Tail Channel: + + + + + Second Tail Channel: + + + + + VirtualJoystickWidget + + + Hld Y + + + + + Hold Vertical stick position. + + + + + Fix Y + + + + + Prevent Vertical movement of stick. + + + + + Fix X + + + + + Prevent Horizontal movement of stick. + + + + + Hld X + + + + + Hold Horizontal stick position. + + + + + WingtypeSelectionPage + + + Standard Wing + + + + + Flying Wing / Deltawing + + + + + WizardDialog + + + Model Wizard + + + + + Model Type + + + + + Enter model name and model type. + + + + + Throttle + + + + + Has your model got a motor or an engine? + + + + + Wing Type + + + + + Is your model a flying wing/deltawing or has it a standard wing configuration? + + + + + Ailerons + + + + + Has your model got ailerons? + + + + + Flaps + + + + + Has your model got flaps? + + + + + Airbrakes + + + + + Has your model got airbrakes? + + + + + Flying-wing / Delta-wing + + + + + Select the elevons channels + + + + + Rudder + + + + + Does your model have a rudder? + + + + + Tail Type + + + + + Select which type of tail your model is equiped with. + + + + + + Tail + + + + + + Select channels for tail control. + + + + + V-Tail + + + + + Select elevator channel. + + + + + Cyclic + + + + + Which type of swash control is installed in your helicopter? + + + + + Tail Gyro + + + + + Has your helicopter got an adjustable gyro for the tail? + + + + + Rotor Type + + + + + Has your helicopter got a flybar? + + + + + + Helicopter + + + + + + Select the controls for your helicopter + + + + + Multirotor + + + + + Select the control channels for your multirotor + + + + + Model Options + + + + + Select additional options + + + + + Save Changes + + + + + Manually check the direction of each control surface and reverse any channels that make controls move in the wrong direction. Remove the propeller/propellers before you try to control your model for the first time.<br>Please note that continuing removes all old model settings! + + + + + Enter a name for your model and select model type. + + + + + Select the receiver channel that is connected to your ESC or throttle servo.<br><br>Throttle - Spektrum: CH1, Futaba: CH3 + + + + + Most aircraft have a main wing and a tail with control surfaces. Flying wings and delta winged aircraft only have a single wing. The main control surface on a standard wing controls the roll of the aircraft. This surface is called an aileron.<br>The control surface of a delta wing controls both roll and pitch. This surface is called an elevon. + + + + + Models use one or two channels to control the ailerons.<br>A so called Y-cable can be used to connect a single receiver channel to two separate aileron servos. If your servos are connected by a Y-cable you should select the single-servo option.<br><br>Aileron - Spektrum: CH2, Futaba: CH1 + + + + + This wizard assumes that your flaps are controlled by a switch. If your flaps are controlled by a potentiometer you can change that manually later. + + + + + Air brakes are used to reduce the speed of advanced sail planes.<br>They are very uncommon on other types of planes. + + + + + Models use two channels to control the elevons.<br>Select these two channels + + + + + Select the receiver channel that is connected to your rudder.<br><br>Rudder - Spektrum: CH4, Futaba: CH4 + + + + + Select the tail type of your plane. + + + + + + Select the Rudder and Elevator channels.<br><br>Rudder - Spektrum: CH4, Futaba: CH4<br>Elevator - Spektrum: CH3, Futaba: CH2 + + + + + Select the Elevator channel.<br><br>Elevator - Spektrum: CH3, Futaba: CH2 + + + + + + + + + + + TBD. + + + + + Select the control channels for your multirotor.<br><br>Throttle - Spektrum: CH1, Futaba: CH3<br>Yaw - Spektrum: CH4, Futaba: CH4<br>Pitch - Spektrum: CH3, Futaba: CH2<br>Roll - Spektrum: CH2, Futaba: CH1 + + + + + There is no help available for the current page. + + + + + Model Wizard Help + + + + + WizardPrinter + + + Plane + + + + + Multicopter + + + + + Helicopter + + + + + Model Name: + + + + + Model Type: + + + + + Options: + + + + + Channel %1: + + + + + burnConfigDialog + + + Programmer Configuration + + + + + + Location of sam-ba executable + + + + + + + + The location of the AVRDUDE executable. + + + + + DFU-Util Location + + + + + Location of AVRDUDE executable + + + + + + + Use this button to browse and look for the AVRDUDE executable file. + + + + + + + Browse... + + + + + Programmer + + + + + Programmer used for communicating with the controller. +Please consult the programmer's documentation and the AVRDUDE documentation to select the appropriate programmer. + + + + + List all available programmers. + + + + + List Available + + + + + + Extra arguments that will be passed to AVRDUDE on every call + + + + + + Extra arguments used in AVRDUDE. +This can be used for providing extra information to AVRDUDE. + +Please only use this if you know what you are doing. There are no error checks and you could cripple your controller. + + + + + Extra Arguments + + + + + Show AVRDUDE help + + + + + Show Help + + + + + Communication port to the programmer. + + + + + + + Port + + + + + AVRDUDE Location + + + + + MCU + + + + + + CPU of your TX + + + + + + CPU present on your 9x radio +Should be m64 for stock radios +m2560 for v4.1 boards + + + + + at91sam3s8-9xr + + + + + SAM-BA Location + + + + + ARM MCU + + + + + sam-ba serial port + + + + + Alternate device + + + + + Use advanced controls + + + + + DFU-UTIL Configuration + + + + + SAM-BA Configuration + + + + + AVRDUDE Configuration + + + + + + + Select Location + + + + + List available programmers + + + + + Avrdude help + + + + + Companion + + + + + <b><u>WARNING!</u></b><br>Normally CPU type is automatically selected according to the chosen firmware.<br>If you change the CPU type the resulting eeprom could be inconsistent. + + + + + customizeSplashDialog + + + Transmitter Splash Screen Editor + + + + + + Invert + + + + + + Open Splash Library + + + + + + + + ... + + + + + + Load Profile + + + + + + Load FW + + + + + + Load Pict + + + + + + Save + + + + + Open Firmware File + + + + + + + + Error + + + + + Can not load embedded image from firmware file %1. + + + + + Open Image to load + + + + + Images (%1) + + + + + Cannot load the image file %1. + + + + + Cannot load profile image %1. + + + + + Cannot load the library image %1. + + + + + File Saved + + + + + The image was saved to the file %1 + + + + + Image Refresh Error + + + + + Failed to refresh image from file %1 + + + + + File Save Error + + + + + Failed to write image to %1 + + + + + downloadDialog + + + Downloading: + + + + + Unable to save the file %1: %2. + + + + + Companion + + + + + Download failed: %1. + + + + + joystickDialog + + + Configure Joystick + + + + + Ch2 + + + + + Ch1 + + + + + Ch4 + + + + + Ch6 + + + + + Ch3 + + + + + Ch5 + + + + + Ch7 + + + + + Ch8 + + + + + Instructions + + + + + Enable + + + + + Cancel + + + + + Back + + + + + Start + + + + + Ok + + + + + Not Assigned + + + + + Stick + + + + + Knob/Slider %1 + + + + + No joysticks found + + + + + Error + + + + + Cannot open joystick. + + + + + Press the Start button to start the stick range calibration procedure. +You may change the channel assignments or inversion at any time. + + + + + Move sticks and pots in every direction making full movement +Press Next when finished + + + + + Next + + + + + Place sticks and pots in middle position. +Press Next when done + + + + + Map joystick channels to controls using comboboxes. +Press Next when done. + + + + + Check inversion checkbox to if necessary to reverse direction. +Press Next when done. + + + + + Press OK to save configuration +Press Cancel to abort joystick calibration without saving. + + + + + Warning + + + + + Calibration not complete, save anyway? + + + + + preferencesDialog + + + Preferences + + + + + Simu BackLight + + + + + Simulator capture folder + + + + + Joystick + + + + + Remember simulator switches + + + + + Enable + + + + + Use clipboard only + + + + + Calibrate + + + + + Blue + + + + + Green + + + + + Red + + + + + Orange + + + + + Yellow + + + + + + Open Folder + + + + + Personal splash library + + + + + Include companion splashes + + + + + Only user defined splashes + + + + + Splash library behaviour + + + + + Custom TX splash screen + + + + + Open Image + + + + + + ... + + + + + Invert Pixels + + + + diff --git a/companion/src/translations/companion_zh.ts b/companion/src/translations/companion_zh_CN.ts similarity index 100% rename from companion/src/translations/companion_zh.ts rename to companion/src/translations/companion_zh_CN.ts