Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translated curve types #3319

Merged
merged 14 commits into from
Mar 8, 2023
4 changes: 1 addition & 3 deletions radio/src/gui/colorlcd/curve_param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

#define SET_DIRTY() storageDirty(EE_MODEL)

static const char* _curve_type[] = {"Diff", "Expo", "Func", "Cstm"};

void CurveParam::LongPressHandler(void* data)
{
int8_t* value = (int8_t*)data;
Expand All @@ -55,7 +53,7 @@ CurveParam::CurveParam(Window* parent, const rect_t& rect, CurveRef* ref,
lv_obj_set_style_flex_cross_place(lvobj, LV_FLEX_ALIGN_CENTER, 0);
lv_obj_set_size(lvobj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);

new Choice(this, rect_t{}, _curve_type, 0, CURVE_REF_CUSTOM,
new Choice(this, rect_t{}, STR_VCURVETYPE, 0, CURVE_REF_CUSTOM,
GET_DEFAULT(ref->type), [=](int32_t newValue) {
ref->type = newValue;
ref->value = 0;
Expand Down
4 changes: 1 addition & 3 deletions radio/src/gui/common/stdlcd/model_curves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ void menuModelCurvesAll(event_t event)
}
}

static const char* _curve_types[] = {"Diff","Expo","Func","Cstm"};

void editCurveRef(coord_t x, coord_t y, CurveRef & curve, event_t event, LcdFlags flags)
{
coord_t x1 = x;
Expand All @@ -127,7 +125,7 @@ void editCurveRef(coord_t x, coord_t y, CurveRef & curve, event_t event, LcdFlag
flags1 = 0;
}

lcdDrawTextAtIndex(x1, y, _curve_types, curve.type, flags1);
lcdDrawTextAtIndex(x1, y, STR_VCURVETYPE, curve.type, flags1);

if (active && menuHorizontalPosition==0) {
CHECK_INCDEC_MODELVAR_ZERO(event, curve.type, CURVE_REF_CUSTOM);
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ISTR(VTRIMINC);
ISTR(VDISPLAYTRIMS);
ISTR(RETA123);
ISTR(VBLMODE);
ISTR(VCURVETYPE);
ISTR(VCURVEFUNC);
ISTR(VMLTPX);
ISTR(VMLTPX2);
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ extern const char* const STR_RETA123[];
extern const char* const STR_TIMER_DIR[];

extern const char* const STR_VBLMODE[];
extern const char* const STR_VCURVETYPE[];
extern const char* const STR_VCURVEFUNC[];
extern const char* const STR_VMLTPX[];
extern const char* const STR_VMLTPX2[];
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/cn.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
#else
#define TR_RETA123 "R","E","T","A","1","2","3"
#endif
#define TR_VCURVETYPE "单边","指数","函数","自定义"

#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "相加","相乘","替换"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/cz.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
#else
#define TR_RETA123 "S","V","P","K","1","2","3"
#endif
#define TR_VCURVETYPE "Diff","Expo","Funk","Vlas"

#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Sečíst","Násobit","Zaměnit"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/da.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
#else
#define TR_RETA123 "S","H","G","K","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Funk","Egen"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Læg til","Gange","Erstat"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/de.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
#else
#define TR_RETA123 "S","H","G","Q","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Funk","Ind."
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Addiere","Multipl.","Ersetze"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/en.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
#else
#define TR_RETA123 "R","E","T","A","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Func","Cstm"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Add","Multiply","Replace"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/es.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#else
#define TR_RETA123 "R","E","T","A","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Func","Cstm"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Añadir","Multipl.","Cambiar"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/fi.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
#else
#define TR_RETA123 "R","E","T","A","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Func","Cstm"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Lisää","Kerro","Korvaa"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
#else
#define TR_RETA123 "D","P","G","A","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Fonct","Perso."
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX TR("Ajoute","Additionner"),TR("Multipl.","Multiplier"),TR("Remplace","Remplacer")
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/it.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
#define TR_RETA123 "D","E","M","A","1","2","3"
#endif


#define TR_VCURVETYPE "Diff","Espo","Funz","Pers"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Add.","Molt.","Sost."
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/jp.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#else
#define TR_RETA123 "R","E","T","A","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Func","Cstm"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "加算","乗算","置換"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
#else
#define TR_RETA123 "R","E","T","A","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Func","Cstm"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Add","Multiply","Replace"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/pl.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#else
#define TR_RETA123 "K","W","G","L","1","2","3"
#endif

#define TR_VCURVETYPE "Diff","Expo","Func","Cstm"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Dodaj","Mnóż","Zastąp"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/pt.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
#define TR_RETA123 "L","P","M","A","1","2","3"
#endif


#define TR_VCURVETYPE "Diff","Expo","Func","Cstm"
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
#define TR_VMLTPX "Adicionar","Multipl.","Trocar"
#define TR_VMLTPX2 "+=","*=",":="
Expand Down
Loading