Alvin Wong
460d48fafb
Reduce code duplication
2021-04-13 18:30:27 +08:00
Alvin Wong
07fb8adb7f
Impl. initial translation strings compression
2021-04-12 19:57:29 +08:00
Alvin Wong
2f2575c0b7
Refactor make_translation.py to split parsing and writing
2021-04-12 17:20:19 +08:00
Alvin Wong
570fa16d44
Some refactoring of make_translation.py
2021-04-11 00:05:06 +08:00
Alvin Wong
d53245f8a3
Simplify some Python code
2021-04-10 19:40:33 +08:00
Alvin Wong
f86629657a
Fix python type hints
...
(Checked using mypy)
2021-04-10 02:24:25 +08:00
Alvin Wong
b17e49f54f
Do suffix merging for translations
...
The size savings are very negligible but I implemented it anyway.
2021-04-10 00:44:48 +08:00
Alvin Wong
4061a35b6f
Refactor make_translation bytes escaping
...
- Change font table to store bytes instead of escape sequences
- Add function to convert bytes to escape sequences
- Update tests
2021-04-09 23:04:38 +08:00
Alvin Wong
880920da96
Change TranslationStrings to pointer
2021-04-09 22:22:19 +08:00
Alvin Wong
7d6d7d11c0
Put translation str indices into a struct
2021-04-09 17:20:24 +08:00
Alvin Wong
82620c685d
Change translation strs to be stored in one block
2021-04-09 14:45:33 +08:00
Ben V. Brown
d9100d1625
add black
2021-04-05 19:15:02 +10:00
Alvin Wong
dd1801925b
Change menu text to use whole screen msg format
2021-04-05 16:40:36 +08:00
Alvin Wong
e01361ddde
Add messageWarn translation definition type
2021-04-05 16:40:31 +08:00
Alvin Wong
55fa5c95e4
Change SettingsShortNames to use one string
...
This unifies its behaviour with SettingsMenuEntries.
2021-04-05 15:48:06 +08:00
Ryan Jarvis
513728a1d1
Cleanup make_translation.py (PEP8, Python3, etc.)
2021-04-03 17:19:36 -07:00
Alvin Wong
c549c77aaf
Refactor: Use enum to index settings descriptions
2021-03-24 23:58:45 +08:00
Alvin Wong
f1d4ec007e
Reorganize font table of CJK languages
...
Move all CJK symbols to the end of the font table so we can skip the
filler for the CJK symbols in the small font table to save space.
2021-03-21 18:15:58 +08:00
Alvin Wong
55f3a8e0ed
Make font encoding use all byte seq. possible
2021-03-20 15:36:39 +08:00
Ben V. Brown
bdfe9e9ee8
Merge branch 'master' into extend-font-encoding
2021-03-17 21:17:17 +11:00
Ben V. Brown
f831b74e57
Cleanup security warnings
2021-03-17 21:12:45 +11:00
Ben V. Brown
c07b621daf
Rough pass
2021-03-16 21:24:22 +11:00
Ben V. Brown
483581b3f2
Make translations exit if symbol missing
2021-03-16 20:45:02 +11:00
Thomas Weißschuh
cd4c122493
make_translation.py: only use bdflib when necessary
2021-03-02 00:01:25 +01:00
Alvin Wong
47692024c5
Impl. CJK support with zh-TW and yue-HK translations
...
Also add support for generating font table using the WenQuanYi Bitmap
Song font.
2021-02-07 00:10:38 +08:00
Thomas Weißschuh
15e51f9faa
Generate per-language translation sources ( #806 )
...
This generates dedicates Translation.cpp files for translation language
and derives all language-specific data from them.
The Makefile is extended to also take care of generating these source
files.
This allows reuse of nearly all object files between builds of different
languages for the same model and regenerating the translation sources if
necessary.
This speeds up the release builds and the normal write-compile-cycle
considerably.
It also eliminates miscompilations when manually building different
languages.
2021-02-02 19:44:34 +11:00
Ben V. Brown
84eafbc1ff
make Gen folder if not exists
2021-01-17 09:49:27 +11:00
Ben V. Brown
184b2c909f
./workspace/TS100 -> ./source/
2021-01-17 09:43:55 +11:00
Ben V. Brown
c067b02cf0
.
2021-01-17 09:19:47 +11:00
Thomas Weißschuh
884a830d62
TS100: move translation generation to Makefile
...
Translation.cpp is now automatically regenerated when necessary.
This frees the developer from having to remember to execute build.sh
after the translations have changed.
Translation.cpp has been moved from Core/Src/ to the new Core/Gen/ as
otherwise it would end up twice in SOURCE, once through the source
discovery and once through the explicit entry.
2021-01-16 12:25:03 +01:00