Skip to content

Commit 4a9ad8a

Browse files
committed
Translate & compress some repl messages
1 parent c310a61 commit 4a9ad8a

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

lib/utils/pyexec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ STATIC int pyexec_raw_repl_process_char(int c) {
370370
}
371371
goto reset;
372372
}
373-
mp_hal_stdout_tx_str("raw REPL; CTRL-B to exit\r\n");
373+
serial_write_compressed(translate("raw REPL; CTRL-B to exit\n"));
374374
goto reset;
375375
} else if (c == CHAR_CTRL_B) {
376376
// change to friendly REPL
@@ -469,7 +469,7 @@ STATIC int pyexec_friendly_repl_process_char(int c) {
469469
return PYEXEC_FORCED_EXIT;
470470
} else if (ret == CHAR_CTRL_E) {
471471
// paste mode
472-
mp_hal_stdout_tx_str("\r\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\r\n=== ");
472+
serial_write_compressed(translate("\npaste mode; Ctrl-C to cancel, Ctrl-D to finish\n=== "));
473473
vstr_reset(MP_STATE_VM(repl_line));
474474
repl.paste_mode = true;
475475
return 0;
@@ -545,7 +545,7 @@ int pyexec_raw_repl(void) {
545545
vstr_init(&line, 32);
546546

547547
raw_repl_reset:
548-
mp_hal_stdout_tx_str("raw REPL; CTRL-B to exit\r\n");
548+
serial_write_compressed(translate("raw REPL; CTRL-B to exit\n"));
549549

550550
for (;;) {
551551
vstr_reset(&line);

locale/circuitpython.pot

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ msgid ""
3535
"https://github.com/adafruit/circuitpython/issues\n"
3636
msgstr ""
3737

38+
#: lib/utils/pyexec.c
39+
msgid ""
40+
"\n"
41+
"paste mode; Ctrl-C to cancel, Ctrl-D to finish\n"
42+
"=== "
43+
msgstr ""
44+
3845
#: py/obj.c
3946
msgid " File \"%q\""
4047
msgstr ""
@@ -1392,7 +1399,8 @@ msgstr ""
13921399
#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c
13931400
#: ports/raspberrypi/common-hal/busio/I2C.c
13941401
#: ports/raspberrypi/common-hal/busio/SPI.c
1395-
#: ports/raspberrypi/common-hal/busio/UART.c
1402+
#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c
1403+
#: shared-bindings/busio/UART.c
13961404
msgid "Invalid pins"
13971405
msgstr ""
13981406

@@ -3915,8 +3923,10 @@ msgstr ""
39153923
#: ports/esp32s2/boards/adafruit_funhouse/mpconfigboard.h
39163924
#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
39173925
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
3926+
#: ports/esp32s2/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h
39183927
#: ports/esp32s2/boards/artisense_rd00/mpconfigboard.h
39193928
#: ports/esp32s2/boards/atmegazero_esp32s2/mpconfigboard.h
3929+
#: ports/esp32s2/boards/crumpspace_crumps2/mpconfigboard.h
39203930
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
39213931
#: ports/esp32s2/boards/espressif_kaluga_1.3/mpconfigboard.h
39223932
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3933,6 +3943,7 @@ msgstr ""
39333943
#: ports/esp32s2/boards/morpheans_morphesp-240/mpconfigboard.h
39343944
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
39353945
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h
3946+
#: ports/esp32s2/boards/odt_pixelwing_esp32_s2/mpconfigboard.h
39363947
#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h
39373948
#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
39383949
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
@@ -3969,6 +3980,10 @@ msgstr ""
39693980
msgid "queue overflow"
39703981
msgstr ""
39713982

3983+
#: lib/utils/pyexec.c
3984+
msgid "raw REPL; CTRL-B to exit\n"
3985+
msgstr ""
3986+
39723987
#: py/parse.c
39733988
msgid "raw f-strings are not implemented"
39743989
msgstr ""

0 commit comments

Comments
 (0)