Commit Graph

17044 Commits

Author SHA1 Message Date
Jeff Epler 08ed09acc6 makeqstrdata: don't print "compression incrased length" messages
This check as implemented is misleading, because it compares the
compressed size in bytes (including the length indication) with the source
string length in Unicode code points.  For English this is approximately
fair, but for Japanese this is quite unfair and produces an excess of
"increased length" messages.

This message might have existed for one of two reasons:
 * to alert to an improperly function huffman compression
 * to call attention to a need for a "string is stored uncompressed" case
We know by now that the huffman compression is functioning as designed and
effective in general.

Just to be on the safe side, I did some back-of-the-envelope estimates.
I considered these three replacements for "the true source string size, in bytes":
+    decompressed_len_utf8 = len(decompressed.encode('utf-8'))
+    decompressed_len_utf16 = len(decompressed.encode('utf-16be'))
+    decompressed_len_bitsize = ((1+len(decompressed)) * math.ceil(math.log(1+len(values), 2)) + 7) // 8

The third counts how many bits each character requires (fewer than 128
characters in the source character set = 7, fewer than 256 = 8, fewer than 512
= 9, etc, adding a string-terminating value) and is in some way representative
of the best way we would be able to store "uncompressed strings".  The Japanese
translation (largest as of writing) has just a few strings which increase by
this metric.  However, the amount of loss due to expansion in those cases is
outweighed by the cost of adding 1 bit per string to indicate whether it's
compressed or not.  For instance, in the BOARD=trinket_m0 TRANSLATION=ja build
the loss is 47 bytes over 300 strings.  Adding 1 bit to each of 300 strings will
cost about 37 bytes, leaving just 5 Thumb instructions to implement the code to
check and decode "uncompressed" strings in order to break even.
2020-08-16 20:50:48 -05:00
hexthat d27a1aca18
Update zh_Latn_pinyin.po
fixed some “ to "
2020-08-16 18:18:36 -07:00
hexthat ddd79a2483
Update zh_Latn_pinyin.po
add translations
2020-08-16 16:33:03 -07:00
Jeff Epler 7604114b47
Merge pull request #3287 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-08-16 08:25:14 -05:00
Wellington Terumi Uemura 4074915779
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (776 of 776 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-08-16 04:25:23 +02:00
Jeff Epler da89c30498
Merge pull request #3285 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-08-15 21:25:14 -05:00
sommersoft e0fd85bc45 build.yml: more texlive/latex dependencies 2020-08-15 16:24:21 -05:00
sommersoft 6e67c4f7d4 build.yml: ensure 'latexmk' is installed 2020-08-15 14:42:12 -05:00
sommersoft 97415fc604 .readthedocs.yml: add directive for RTD to build a pdf version of the docs 2020-08-15 14:30:12 -05:00
sommersoft 670b6ebecc build.yml: add doc building test for latex/pdf 2020-08-15 14:29:38 -05:00
sommersoft ffffccf7a0 docs/rstjinja.py: add jinja processing for building latex (pdf) docs 2020-08-15 14:29:09 -05:00
Hosted Weblate 6e3ac5adc8
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-08-15 21:12:28 +02:00
Dan Halbert 41be0fdd81
Merge pull request #3283 from jepler/fix-weblate-conflict
Fix weblate conflict
2020-08-15 15:12:21 -04:00
Dan Halbert ef40f83f99 Remove event handler before setting it to NULL 2020-08-15 14:39:53 -04:00
Jeff Epler ac15726e13 Merge remote-tracking branch 'weblate/main' into origin/main 2020-08-15 10:12:02 -05:00
Jeff Epler 4296aa262e locale: Fix percent-space in several translations 2020-08-15 10:04:51 -05:00
Dan Halbert cf0f3d70b5 SPIM3 buffer must be in first 64kB of RAM 2020-08-15 10:31:56 -04:00
Lucian Copeland 7078c63062 Add missing Neopixel pin definition 2020-08-14 16:58:24 -04:00
Lucian Copeland 0fc730bc5a Expand PulseOut API, debug cleanup 2020-08-14 16:36:02 -04:00
Lucian Copeland 88fcc19e24 Add PulseIn 2020-08-14 15:30:48 -04:00
Lucian Copeland f9512983ff Add PulseOut 2020-08-14 12:21:41 -04:00
Dan Halbert 98469322b7
Merge pull request #3276 from xiongyihui/main
support to change ble mac address
2020-08-14 11:14:36 -04:00
Dan Halbert e81fa3d181 make translate 2020-08-14 09:37:09 -04:00
Yihui Xiong 52990a332d fix 2020-08-14 17:48:15 +08:00
Scott Shawcroft ff5902f9f8
Merge branch 'main' into pixelbuf-iterable 2020-08-13 11:55:51 -07:00
Dan Halbert a28d0f6c80
Merge pull request #3273 from jepler/ja-firmware-size
Squeeze firmwares to fit the new ja translation
2020-08-13 12:19:28 -04:00
Dan Halbert 329f4fb2e6
Update mpconfigboard.mk
The stm boards default to `-O2`. Changing to `-Os` brings it back to ~43kB (!) free even for ja.
2020-08-13 10:09:46 -04:00
Jeff Epler 42b860e91a stm: meowbit_v121: remove _pixelbuf to fit ja translation 2020-08-13 07:49:45 -05:00
Yihui Xiong e7da652711 able to change ble mac address 2020-08-13 16:54:29 +08:00
Jeff Epler 239c8ff87f metro_m0_express: put back audiobusio
this now fits locally (though it's very close to capacity);
let's see what the CI says.

```
make BOARD=metro_m0_express clean && make BOARD=metro_m0_express  TRANSLATION=ja
...
253448 bytes used, 248 bytes free in flash firmware space out of 253696 bytes (247.75kB).
```
2020-08-12 19:11:33 -05:00
Scott Shawcroft 7ffa2a103c
Merge pull request #3269 from jepler/sharpdisplay-v2
Sharp Memory Display displayio support (v2)
2020-08-12 16:53:09 -07:00
Jeff Epler aa0b4f7045 cpx_display: Put back AUDIOBUSIO, take away ROTARYIO
AUDIOBUSIO is needed for the on-board mic using PDMIn
2020-08-12 16:17:48 -05:00
Jeff Epler ea8e9b8cef metro_m0_express: Put back GAMEPAD, take away AUDIOBUSIO
Dan notes that this is more frequently the solution we've chosen
2020-08-12 16:17:13 -05:00
Jeff Epler 299894025a stringcar_m0_express: make ja translation fit 2020-08-12 13:47:10 -05:00
Jeff Epler f08ee0db20 itsybitsy_m0_express: make ja translation fit again 2020-08-12 13:44:00 -05:00
Jeff Epler 7bd42244c9 snekboard: make ja translation fit 2020-08-12 13:34:36 -05:00
Jeff Epler 45f6bc1f3e serpente: make ja translation fit 2020-08-12 13:32:08 -05:00
Jeff Epler 36bfbaae69 feather_radiofruit_zigbee: make ja translation fit 2020-08-12 13:28:30 -05:00
Jeff Epler 58a1361d3e Merge remote-tracking branch 'origin/main' into ja-firmware-size 2020-08-12 13:26:12 -05:00
Jeff Epler 195c0ea986 sharpdisplay: Make PARTIAL_UPDATES unconditional 2020-08-12 13:01:43 -05:00
Jeff Epler 06f6cd067d nrf: Improve commenting about disabled warnings 2020-08-12 12:59:48 -05:00
Jeff Epler d61f66d173
Update shared-module/framebufferio/FramebufferDisplay.h
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2020-08-12 12:50:08 -05:00
Jeff Epler 813dcd1b73 trinket_m0_haxpress: make ja translation fit 2020-08-12 12:44:17 -05:00
Jeff Epler 88f222f1a1 metro_m0_express: make ja translation fit 2020-08-12 12:38:17 -05:00
Jeff Epler ba91023fff itsybitsy_m0_express: make ja translation fit 2020-08-12 12:35:29 -05:00
Jeff Epler 6b9f7c9047 hallowing_m0_express: make ja translation fit 2020-08-12 12:29:30 -05:00
Jeff Epler 58afda342d feather_m0_supersized: make ja translation fit 2020-08-12 11:53:34 -05:00
Jeff Epler 27c2eb1869 feather_m0_express: make ja translation fit 2020-08-12 11:51:56 -05:00
Jeff Epler 8865e4ca97 circuitplayground_express_displayio: make ja translation fit 2020-08-12 11:46:52 -05:00
Jeff Epler f3748fe20d circuitbrains_basic_m0: Use optimization flags to let ja translation fit 2020-08-12 11:46:31 -05:00