Closed impeeza closed 9 months ago
@solosky Thank you so much for the challenge to modify the code of settings_scene_language.c to use a for
function to the generation of Language selection options.
To me a C
ignorant was fun to learn the basics to be able to get a working code.
I hope the proposed code is relatively clean and easy to understand, I don put commentaries because I really don't know your style and do not want to be pushing or rude.
Please review the code and let me to know what do you think about it.
By the way took me 100 versions of the file to get the proposed one 🤣, I know I am a bad programmer 👅; I started totally blind about the C
code but now I know a little bit, Thanks a lot.
Basically my approach was using the global language
definition on language.h
and language.c
and using a simple for use the language
variable def to populate the settings language selection sub-menu. Then use the same values for the change of language.
Tested selecting all languages and changing them, even returning from the selection with the back menu to not change the language, and worked fine to me.
I don't know if the order change of the definitions of language variables on the language.h
and language.c
files could generate some confusion on existing devices, because I think if someone have the language 1
(English) on their Settings.bin
file once update to the new firmware with the new order, the language becomes (繁體中文(臺灣)), what do you think?
Hi, thank your contribution on this PR. It looks fatastic, and implemented what did I suggested! I am very appricate your learning jonery on C language and you finally did it!!
Regarding your order issue, the short anwser is your are correct, change the enum defination order will cause wrong language display if update to new firmware.
So, please revert the language order change to avoid that issue.
Created the https://github.com/solosky/pixl.js/pull/176 hope this work fine for you.
closing this PR
docs\en\05+5-translation.md
Reverting to last one, because now
fw\application\src\app\settings\scene\settings_scene_language.c
is independent to add/remove/modify language definitions.fw\application\src\app\settings\scene\settings_scene_language.c
Remove the need of manually add languages here, most of the code changed to automatized one.
Language Order
Due to the automation of
fw\application\src\app\settings\scene\settings_scene_language.c
now the order of the languages on the settings menu selection are dependent to the order of the definitions of the variable on thefw\application\src\i18n\language.c
andfw\application\src\i18n\language.h
files.