Commit Graph

44 Commits

Author SHA1 Message Date
Ben V. Brown
a3cecb852c Update make_translation.py 2022-02-06 12:33:22 +11:00
Christian Rahl
05f38b096c Add new debug menu item to view raw hall effect sensor output. 2022-01-22 19:33:24 -05:00
Devnol
ac769c109a Fix some half height glyphs
Signed-off-by: Devnol <pgkoutsoumanis@gmail.com>
2021-11-20 18:58:58 +02:00
Ben V. Brown
73b6ca28f2 Generate power names 2021-09-26 07:58:19 +10:00
Ben V. Brown
c2593763a0 Expand Names 2021-09-25 10:43:09 +10:00
Ben V. Brown
7dad28a41e Expand python code to auto-generate the array of names 2021-09-25 10:38:09 +10:00
discip
69d8d14e0c Update make_translation.py 2021-09-25 00:25:43 +02:00
Ben V. Brown
f6382cf7cb Building multi-lang 2021-09-12 14:50:39 +10:00
Ben V. Brown
17e82105b1 Give all languages a unique ID 2021-09-12 14:47:44 +10:00
alvinhochun
1a0b542ae6 [RFC] Multi-language firmware (second try) (#941)
* Impl. sectioned font table in firmware

* make_translation.py: Extract build_symbol_conversion_table function

* Put translation indices and strings in a struct

* Move translation objcopy step to Python

* Impl. multi-language firmware demo

* Impl. strings-compressed multi-lang firmware demo

* Add font compression to multi-lang demo

* Refactor Makefile a bit

* Fix rules for make < 4.3

* Add more multi-lang groups

* Add Pinecil multi-lang CI build

* Add lzfx compression license text

* Remote multi-language demo group

* Fix build after merge

* Import code from BriefLZ

* Change brieflz for our use case

* Change compression to use brieflz

* Remove lzfx code

* Update license file for brieflz

* Exclude brieflz files from format check

* Add BriefLZ test
2021-04-30 18:51:13 +10:00
Alvin Wong
fadb25273e Impl. font compression demo 2021-04-17 05:18:19 +08:00
Alvin Wong
6f4f4d9733 Move string compression to Python
... so that the script can know its uncompressed size and calculate the
appropriate buffer size.
2021-04-16 17:55:30 +08:00
Alvin Wong
cf154114d7 Change translation defs to specify fonts to use 2021-04-15 14:32:09 +08:00
Alvin Wong
e601b762b0 Change font table in Python to use bytes literals 2021-04-15 14:32:09 +08:00
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