Skip to content

Move localization into an ini file#463

Merged
ligenxxxx merged 15 commits intohd-zero:mainfrom
Master92:l10n_ini
Dec 24, 2024
Merged

Move localization into an ini file#463
ligenxxxx merged 15 commits intohd-zero:mainfrom
Master92:l10n_ini

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
@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.

@Master92 Master92 deleted the l10n_ini branch October 31, 2025 08:27
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