WiP: String arrays for translations

DE, EN, FI, FR are done, now we need all the other languages
This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent db684893e2
commit 56bec5ca3a
21 changed files with 3369 additions and 2547 deletions
+1 -2
View File
@@ -223,8 +223,7 @@ void drawCurveRef(BitmapBuffer * dc, coord_t x, coord_t y, const CurveRef & curv
void drawStickName(BitmapBuffer * dc, coord_t x, coord_t y, uint8_t idx, LcdFlags att)
{
uint8_t length = STR_VSRCRAW[0];
dc->drawSizedText(x, y, STR_VSRCRAW+2+length*(idx+1), length-1, att);
dc->drawText(x, y, STR_VSRCRAW[idx]+1, att);
}
void drawModelName(BitmapBuffer * dc, coord_t x, coord_t y, char * name, uint8_t id, LcdFlags att)
+1 -1
View File
@@ -244,7 +244,7 @@ class BindChoiceMenu : public Menu
class TrChoice : public Choice
{
public:
TrChoice(FormGroup *parent, const rect_t &rect, const char *values, int vmin,
TrChoice(FormGroup *parent, const rect_t &rect, const char **values, int vmin,
int vmax, std::function<int()> getValue,
std::function<void(int)> setValue = nullptr,
bool *menuOpen = nullptr) :
+4 -5
View File
@@ -502,12 +502,11 @@ void RadioSetupPage::build(FormWindow * window)
new StaticText(window, grid.getLabelSlot(), STR_RXCHANNELORD, 0, COLOR_THEME_PRIMARY1); // RAET->AETR
choice = new Choice(window, grid.getFieldSlot(), 0, 4*3*2 - 1, GET_SET_DEFAULT(g_eeGeneral.templateSetup));
choice->setTextHandler([](uint8_t value) {
char s[5];
for (uint8_t i=0; i<4; i++) {
s[i] = STR_RETA123[channelOrder(value, i + 1)];
std::string s;
for (uint8_t i = 0; i < 4; i++) {
s += std::string(STR_RETA123[channelOrder(value, i + 1)]);
}
s[4] = '\0';
return std::string(s);
return s;
});
grid.nextLine();
+5 -1
View File
@@ -417,6 +417,10 @@ static constexpr coord_t col1 = 20;
static constexpr coord_t col2 = (LCD_W - 100) / 3 + col1;
static constexpr coord_t col3 = ((LCD_W - 100) / 3) * 2 + col1 + 20;
static const char* _failsafe_module[] = {
"Ext.", "Int.",
};
class SpecialFunctionButton : public Button
{
public:
@@ -529,7 +533,7 @@ class SpecialFunctionButton : public Button
break;
case FUNC_SET_FAILSAFE:
dc->drawTextAtIndex(col1, line2, "\004Int.Ext.", CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
dc->drawTextAtIndex(col1, line2, _failsafe_module, CFN_PARAM(cfn), COLOR_THEME_SECONDARY1);
break;
case FUNC_PLAY_VALUE: