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
Merged

Conversation

ulfhedlund
Copy link
Contributor

Fixes #3309

Summary of changes:
Added translations for curve types used in Inputs and Mixes (TR_VCURVETYPE).
Languages with active translators have been properly translated.

@pfeerick pfeerick self-assigned this Mar 8, 2023
@pfeerick pfeerick force-pushed the translated_curve_types branch from f03c24d to 4d34941 Compare March 8, 2023 01:13
Copy link
Member

@pfeerick pfeerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now - yet another hard-coded string brought out to be translated :)

@pfeerick pfeerick added this to the 2.9 milestone Mar 8, 2023
@pfeerick pfeerick merged commit a416548 into EdgeTX:main Mar 8, 2023
@ulfhedlund
Copy link
Contributor Author

There are a few hard-coded strings left but they are quite specialised (yaml, cli, afhds3) so I think they can be left as is.

@ulfhedlund ulfhedlund deleted the translated_curve_types branch March 8, 2023 07:36
@pfeerick
Copy link
Member

pfeerick commented Mar 8, 2023

Yup, but bit by bit we are removing them. And there is the untranslated.h header which can be used for any other strings that get moved out.

@ulfhedlund
Copy link
Contributor Author

ulfhedlund commented Mar 8, 2023

Would it be useful if I looked into other possible translations, or rather those that could be moved to untranslated.h?
I have attached a file with some findings after a quick search in radio .cpp files. With some guidance what to move and what to leave I could make an effort. If you want me to.

untranslated.txt

@pfeerick
Copy link
Member

pfeerick commented Mar 8, 2023

It becomes a double-edged sword between having to look at a separate file to find out what is in a variable, and it not all being in one place. I generally agree with the list you said leave as-is ... maybe with the exception of *variants on the radio_version.cpp pages simply because it's duplicated, and I do wonder if RGBChars and HSVChars want translating so they can be changed for CN/JP/TW, if not others.

I think these are candidates for full translation

afhds3.cpp:280:static const char* const moduleStateText[]
flysky_settings.cpp:110:static const char* _rf_power[]

This would have been a candidate but is only used internally, so not worth moving

sdcard_yaml.cpp:370:static const char _wrongExtentionError[]

This one can't be changed as it describes what gets written to the theme file... maybe that can be changed when it gets ported over to using the built in yaml parsing (unless the names used in the theme manage UI come from somewhere else again)...

theme_manager.cpp:27:static const char *colorNames[COLOR_COUNT]

Ones like this are just annoying but probably need to stay as they are for now at least.

frsky_sport.cpp:202:... static const char * const RXS_STATUS[]
frsky_pxx2.cpp:35:static const char * const PXX2ModulesNames[]
frsky_pxx2.cpp:60:static const char * const PXX2ReceiversNames[]

I don't know about the other guys, but I use the DRY (don't repeat yourself) rule in looking at this... ie. they don't belong where they are if the same thing is repeated multiple times. And in some cases, like with the initial afhds3 and flysky_settings strings... the translation just wasn't prepared because it's annoying ;)

If you think you can do anything with this, that would be appreciated, and as always more than happy to help if you get stuck with anything.

@ulfhedlund
Copy link
Contributor Author

ulfhedlund commented Mar 9, 2023

I think I can work with this. But before I start , pls let me know if I understand your comments correctly:

// full translation
// ----------------------
./radio/src/gui/colorlcd/color_editor.cpp:29:static const char RGBChars[MAX_BARS] = { "R", "G", "B" };
./radio/src/gui/colorlcd/color_editor.cpp:30:static const char HSVChars[MAX_BARS] = { "H", "S", "V" };
./radio/src/gui/colorlcd/flysky_settings.cpp:110:static const char
_rf_power[] = {"Default", "High"};
./radio/src/gui/colorlcd/special_functions.cpp:437:static const char
_failsafe_module[] = {"Int.", "Ext.",};
./radio/src/pulses/afhds3.cpp:280:static const char* const moduleStateText[] = {"Not ready","HW Error","Binding" ...

// move to untranslated.h
// ----------------------------------
./radio/src/gui/colorlcd/flysky_settings.cpp:34:static const char* _afhds3_region[] = {"CE", "FCC"};
./radio/src/gui/common/stdlcd/radio_version.cpp:196:static const char * variants[] = {"FCC", "EU", "FLEX"};
./radio/src/gui/colorlcd/radio_version.cpp:244:static const char *variants[] = {"FCC", "EU", "FLEX"};

@ulfhedlund
Copy link
Contributor Author

@pfeerick - I am struggling with this and due to limited understanding of the code I haven't managed to translate anything else than:
./radio/src/gui/colorlcd/flysky_settings.cpp:110:static const char _rf_power[] = {"Default", "High"};
./radio/src/pulses/afhds3.cpp:280:static const char* const moduleStateText[] = {"Not ready","HW Error","Binding" ...

So all in all two new translated strings and three strings moved to untranslated.h is what I can do. Probably easy to do for you software developers but not for me.

Is it worth going ahead with this or should I drop it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Curve types not translated in Inputs or Mixes
2 participants