Translate & compress some repl messages

This commit is contained in:
Jeff Epler 2021-08-23 20:00:21 -05:00
parent c310a618e8
commit 4a9ad8a942
2 changed files with 19 additions and 4 deletions

View File

@ -370,7 +370,7 @@ STATIC int pyexec_raw_repl_process_char(int c) {
} }
goto reset; goto reset;
} }
mp_hal_stdout_tx_str("raw REPL; CTRL-B to exit\r\n"); serial_write_compressed(translate("raw REPL; CTRL-B to exit\n"));
goto reset; goto reset;
} else if (c == CHAR_CTRL_B) { } else if (c == CHAR_CTRL_B) {
// change to friendly REPL // change to friendly REPL
@ -469,7 +469,7 @@ STATIC int pyexec_friendly_repl_process_char(int c) {
return PYEXEC_FORCED_EXIT; return PYEXEC_FORCED_EXIT;
} else if (ret == CHAR_CTRL_E) { } else if (ret == CHAR_CTRL_E) {
// paste mode // paste mode
mp_hal_stdout_tx_str("\r\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\r\n=== "); serial_write_compressed(translate("\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\n=== "));
vstr_reset(MP_STATE_VM(repl_line)); vstr_reset(MP_STATE_VM(repl_line));
repl.paste_mode = true; repl.paste_mode = true;
return 0; return 0;
@ -545,7 +545,7 @@ int pyexec_raw_repl(void) {
vstr_init(&line, 32); vstr_init(&line, 32);
raw_repl_reset: raw_repl_reset:
mp_hal_stdout_tx_str("raw REPL; CTRL-B to exit\r\n"); serial_write_compressed(translate("raw REPL; CTRL-B to exit\n"));
for (;;) { for (;;) {
vstr_reset(&line); vstr_reset(&line);

View File

@ -35,6 +35,13 @@ msgid ""
"https://github.com/adafruit/circuitpython/issues\n" "https://github.com/adafruit/circuitpython/issues\n"
msgstr "" msgstr ""
#: lib/utils/pyexec.c
msgid ""
"\n"
"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n"
"=== "
msgstr ""
#: py/obj.c #: py/obj.c
msgid " File \"%q\"" msgid " File \"%q\""
msgstr "" msgstr ""
@ -1392,7 +1399,8 @@ msgstr ""
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c
#: ports/raspberrypi/common-hal/busio/SPI.c #: ports/raspberrypi/common-hal/busio/SPI.c
#: ports/raspberrypi/common-hal/busio/UART.c #: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c
#: shared-bindings/busio/UART.c
msgid "Invalid pins" msgid "Invalid pins"
msgstr "" msgstr ""
@ -3915,8 +3923,10 @@ msgstr ""
#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h #: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h
#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h #: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h
#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@ -3933,6 +3943,7 @@ msgstr ""
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h #: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h
#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h
#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
@ -3969,6 +3980,10 @@ msgstr ""
msgid "queue overflow" msgid "queue overflow"
msgstr "" msgstr ""
#: lib/utils/pyexec.c
msgid "raw REPL; CTRL-B to exit\n"
msgstr ""
#: py/parse.c #: py/parse.c
msgid "raw f-strings are not implemented" msgid "raw f-strings are not implemented"
msgstr "" msgstr ""