More translations

This commit is contained in:
Bertrand Songis
2019-05-10 15:59:47 +02:00
parent f7f6d7e0db
commit b73cb31f11
21 changed files with 257 additions and 23 deletions
@@ -107,7 +107,7 @@ void menuModelModuleOptions(event_t event)
moduleState[g_moduleIdx].mode = MODULE_MODE_NORMAL;
if (reusableBuffer.hardwareAndSettings.moduleSettingsDirty) {
abortPopMenu();
POPUP_CONFIRMATION("Update TX options?", onTxOptionsUpdateConfirm);
POPUP_CONFIRMATION(STR_UPDATE_TX_OPTIONS, onTxOptionsUpdateConfirm);
}
else {
return;
@@ -132,7 +132,7 @@ void menuModelModuleOptions(event_t event)
}
int8_t sub = menuVerticalPosition;
lcdDrawTextAlignedLeft(0, "Module options");
lcdDrawTextAlignedLeft(0, STR_MODULE_OPTIONS);
lcdDrawText(lcdLastRightPos + 3, 0, PXX2modulesModels[modelId]);
lcdInvertLine(0);
@@ -150,7 +150,7 @@ void menuModelModuleOptions(event_t event)
switch (i) {
case ITEM_MODULE_SETTINGS_RF_PROTOCOL:
lcdDrawText(0, y, "RF Protocol");
lcdDrawText(0, y, STR_RF_PROTOCOL);
lcdDrawTextAtIndex(RECEIVER_OPTIONS_2ND_COLUMN, y, STR_XJT_PROTOCOLS, reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol + 1, attr);
if (attr) {
reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol = checkIncDec(event, reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol, RF_PROTO_X16, RF_PROTO_LAST, 0, nullptr);
@@ -168,7 +168,7 @@ void menuModelModuleOptions(event_t event)
break;
case ITEM_MODULE_SETTINGS_POWER:
lcdDrawText(0, y, "Power");
lcdDrawText(0, y, STR_POWER);
lcdDrawNumber(RECEIVER_OPTIONS_2ND_COLUMN, y, reusableBuffer.hardwareAndSettings.moduleSettings.txPower, attr);
lcdDrawText(lcdNextPos, y, "dBm(");
drawPower(lcdNextPos, y, reusableBuffer.hardwareAndSettings.moduleSettings.txPower);
@@ -184,12 +184,12 @@ void menuModelModuleOptions(event_t event)
}
}
else {
lcdDrawCenteredText(LCD_H/2, "No TX options");
lcdDrawCenteredText(LCD_H/2, STR_NO_TX_OPTIONS);
s_editMode = 0;
}
}
else {
lcdDrawCenteredText(LCD_H/2, "Waiting for TX...");
lcdDrawCenteredText(LCD_H/2, STR_WAITING_FOR_TX);
s_editMode = 0;
}
}
@@ -70,7 +70,7 @@ void menuModelReceiverOptions(event_t event)
moduleState[g_moduleIdx].mode = MODULE_MODE_NORMAL;
if (reusableBuffer.hardwareAndSettings.receiverSettings.dirty) {
abortPopMenu();
POPUP_CONFIRMATION("Update RX options?", onRxOptionsUpdateConfirm);
POPUP_CONFIRMATION(STR_UPDATE_RX_OPTIONS, onRxOptionsUpdateConfirm);
}
else {
return;
@@ -123,7 +123,7 @@ void menuModelReceiverOptions(event_t event)
if (pin < reusableBuffer.hardwareAndSettings.receiverSettings.outputsCount) {
uint8_t channel = g_model.moduleData[g_moduleIdx].channelsStart + reusableBuffer.hardwareAndSettings.receiverSettings.outputsMapping[pin];
int32_t channelValue = channelOutputs[channel];
lcdDrawText(0, y, "Pin");
lcdDrawText(0, y, STR_PIN);
lcdDrawNumber(lcdLastRightPos + 1, y, pin + 1);
putsChn(7 * FW, y, channel + 1, attr);
@@ -151,6 +151,6 @@ void menuModelReceiverOptions(event_t event)
}
}
else {
lcdDrawCenteredText(LCD_H/2, "Waiting for RX...");
lcdDrawCenteredText(LCD_H/2, STR_WAITING_FOR_RX);
}
}
+2 -2
View File
@@ -35,7 +35,7 @@ void menuRadioDiagAnalogs(event_t event)
coord_t y = MENU_HEADER_HEIGHT + 1;
lcdDrawTextAlignedLeft(y, STICKS_PWM_ENABLED() ? "PWM Sticks/Pots/Sliders" : "Sticks/Pots/Sliders");
lcdDrawTextAlignedLeft(y, STICKS_PWM_ENABLED() ? STR_PWM_STICKS_POTS_SLIDERS : STR_STICKS_POTS_SLIDERS);
for (uint8_t i=0; i<NUM_STICKS+NUM_POTS+NUM_SLIDERS; i++) {
uint8_t x;
@@ -54,7 +54,7 @@ void menuRadioDiagAnalogs(event_t event)
#if defined(GYRO)
y += FH;
lcdDrawTextAlignedLeft(y, "Gyro");
lcdDrawTextAlignedLeft(y, STR_GYRO);
y += FH;
uint8_t x = INDENT_WIDTH;
lcdDrawText(x, y, "X:");
+1 -1
View File
@@ -331,7 +331,7 @@ void menuRadioHardware(event_t event)
#if defined(STM32)
case ITEM_RADIO_HARDWARE_RTC_BATTERY:
lcdDrawTextAlignedLeft(y, "RTC Batt");
lcdDrawTextAlignedLeft(y, STR_RTC_BATT);
putsVolts(HW_SETTINGS_COLUMN2, y, vbattRTC, PREC2|LEFT);
break;
#endif
+1 -1
View File
@@ -219,7 +219,7 @@ void menuRadioVersion(event_t event)
#endif
#if defined(PXX2)
lcdDrawText(INDENT_WIDTH, y, BUTTON("Modules / RX version"), menuVerticalPosition == ITEM_RADIO_MODULES_VERSION ? INVERS : 0);
lcdDrawText(INDENT_WIDTH, y, BUTTON(TR_MODULES_RX_VERSION), menuVerticalPosition == ITEM_RADIO_MODULES_VERSION ? INVERS : 0);
y += FH;
if (menuVerticalPosition == ITEM_RADIO_MODULES_VERSION && event == EVT_KEY_BREAK(KEY_ENTER)) {
s_editMode = EDIT_SELECT_FIELD;
@@ -98,7 +98,7 @@ bool menuModelModuleOptions(event_t event)
moduleState[g_moduleIdx].mode = MODULE_MODE_NORMAL;
if (reusableBuffer.hardwareAndSettings.moduleSettingsDirty) {
abortPopMenu();
POPUP_CONFIRMATION("Update TX options?", onTxOptionsUpdateConfirm);
POPUP_CONFIRMATION(STR_UPDATE_TX_OPTIONS, onTxOptionsUpdateConfirm);
}
else {
return true;
@@ -138,7 +138,7 @@ bool menuModelModuleOptions(event_t event)
switch (i) {
case ITEM_MODULE_SETTINGS_RF_PROTOCOL:
lcdDrawText(MENUS_MARGIN_LEFT, y, "RF Protocol");
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_RF_PROTOCOL);
lcdDrawTextAtIndex(RECEIVER_OPTIONS_2ND_COLUMN, y, STR_XJT_PROTOCOLS, reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol + 1, attr);
if (attr) {
reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol = checkIncDec(event, reusableBuffer.hardwareAndSettings.moduleSettings.rfProtocol, RF_PROTO_X16, RF_PROTO_LAST, 0, nullptr);
@@ -149,7 +149,7 @@ bool menuModelModuleOptions(event_t event)
break;
case ITEM_MODULE_SETTINGS_EXTERNAL_ANTENNA:
lcdDrawText(MENUS_MARGIN_LEFT, y, "Ext. antenna");
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_EXT_ANTENNA);
reusableBuffer.hardwareAndSettings.moduleSettings.externalAntenna = editCheckBox(reusableBuffer.hardwareAndSettings.moduleSettings.externalAntenna, RECEIVER_OPTIONS_2ND_COLUMN, y, attr, event);
if (attr && checkIncDec_Ret) {
reusableBuffer.hardwareAndSettings.moduleSettingsDirty = true;
@@ -157,7 +157,7 @@ bool menuModelModuleOptions(event_t event)
break;
case ITEM_MODULE_SETTINGS_POWER:
lcdDrawText(MENUS_MARGIN_LEFT, y, "Power");
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_POWER);
lcdDrawNumber(RECEIVER_OPTIONS_2ND_COLUMN, y, reusableBuffer.hardwareAndSettings.moduleSettings.txPower, attr);
lcdDrawText(lcdNextPos, y, "dBm(");
drawPower(lcdNextPos, y, reusableBuffer.hardwareAndSettings.moduleSettings.txPower);
@@ -173,7 +173,7 @@ bool menuModelModuleOptions(event_t event)
}
}
else {
lcdDrawCenteredText(LCD_H/2, "Waiting for TX...");
lcdDrawCenteredText(LCD_H/2, STR_WAITING_FOR_TX);
}
return true;
}
@@ -70,7 +70,7 @@ bool menuModelReceiverOptions(event_t event)
moduleState[g_moduleIdx].mode = MODULE_MODE_NORMAL;
if (reusableBuffer.hardwareAndSettings.receiverSettings.dirty) {
abortPopMenu();
POPUP_CONFIRMATION("Update RX options?", onRxOptionsUpdateConfirm);
POPUP_CONFIRMATION(STR_UPDATE_RX_OPTIONS, onRxOptionsUpdateConfirm);
}
else {
return true;
+4 -4
View File
@@ -65,16 +65,16 @@ bool menuRadioTools(event_t event)
uint8_t menu_index = 0;
if (isModuleOptionAvailable(reusableBuffer.hardwareAndSettings.modules[INTERNAL_MODULE].information.modelID, MODULE_OPTION_SPECTRUM_ANALYSER))
addRadioTool(menu_index++, "Spectrum (INT)", menuRadioSpectrumAnalyser, INTERNAL_MODULE);
addRadioTool(menu_index++, STR_SPECTRUM_ANALYSER_INT, menuRadioSpectrumAnalyser, INTERNAL_MODULE);
if (isModuleOptionAvailable(reusableBuffer.hardwareAndSettings.modules[INTERNAL_MODULE].information.modelID, MODULE_OPTION_POWER_METER))
addRadioTool(menu_index++, "Power Meter (INT)", menuRadioPowerMeter, INTERNAL_MODULE);
addRadioTool(menu_index++, STR_POWER_METER_INT, menuRadioPowerMeter, INTERNAL_MODULE);
if (isModuleOptionAvailable(reusableBuffer.hardwareAndSettings.modules[EXTERNAL_MODULE].information.modelID, MODULE_OPTION_SPECTRUM_ANALYSER))
addRadioTool(menu_index++, "Spectrum (EXT)", menuRadioSpectrumAnalyser, EXTERNAL_MODULE);
addRadioTool(menu_index++, STR_SPECTRUM_ANALYSER_EXT, menuRadioSpectrumAnalyser, EXTERNAL_MODULE);
if (isModuleOptionAvailable(reusableBuffer.hardwareAndSettings.modules[EXTERNAL_MODULE].information.modelID, MODULE_OPTION_POWER_METER))
addRadioTool(menu_index++, "Power Meter (EXT)", menuRadioPowerMeter, EXTERNAL_MODULE);
addRadioTool(menu_index++, STR_POWER_METER_EXT, menuRadioPowerMeter, EXTERNAL_MODULE);
return true;
}