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

Move localization into an ini file #463

Merged
merged 15 commits into from
Dec 24, 2024
Merged

Conversation

Master92
Copy link
Contributor

@Master92 Master92 commented Dec 3, 2024

As discussed in #452, I went ahead and moved the Simplified Chinese localization to an external ini-file.

This change opens the door for future additional localizations. All that has to be done is adding the localization ini-file and a single line in language.c, declaring the new language.
Of course, a configuration combo box has to be re-introduced as well, but that's only a one-time change.

I tested memory usage in the emulator and it seems fine. The results were acquired with:

struct mallinfo mi = mallinfo();
LOGD("Total heap size: %d bytes", mi.arena);
LOGD("Free heap space: %d bytes", mi.fordblks);

gathering the following results:

Previous:
Total heap size: 135168 bytes
Free heap space: 133792 bytes

New:
Total heap size: 135168 bytes
Free heap space: 103120 bytes

@ligenxxxx ligenxxxx merged commit d9fab43 into hd-zero:main Dec 24, 2024
1 check passed
@ligenxxxx
Copy link
Member

image
image
Firmware cannot be parsed correctly, maybe it has something to do with the space at the end of the string?

@ligenxxxx
Copy link
Member

ligenxxxx commented Jan 22, 2025

I also found that ini does not support \n. I can use string concatenation to solve it.

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

Successfully merging this pull request may close these issues.

2 participants