Skip to content

Commit 36f3897

Browse files
committed
Make error messages platform agnostic
Remove mentions of 'MicroPython' in error messages as they could lead to confusion in lesser-experienced users
1 parent 7471e97 commit 36f3897

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

locale/circuitpython.pot

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ msgid "Attempt to allocate %d blocks"
434434
msgstr ""
435435

436436
#: supervisor/shared/safe_mode.c
437-
msgid "Attempted heap allocation when MicroPython VM not running."
437+
msgid "Attempted heap allocation when VM not running."
438438
msgstr ""
439439

440440
#: shared-bindings/wifi/Radio.c
@@ -999,6 +999,10 @@ msgstr ""
999999
msgid "Failed to write internal flash."
10001000
msgstr ""
10011001

1002+
#: supervisor/shared/safe_mode.c
1003+
msgid "Fatal error."
1004+
msgstr ""
1005+
10021006
#: py/moduerrno.c
10031007
msgid "File exists"
10041008
msgstr ""
@@ -1171,6 +1175,7 @@ msgstr ""
11711175

11721176
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
11731177
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
1178+
#: ports/mimxrt10xx/common-hal/busio/UART.c
11741179
msgid "Invalid %q pin"
11751180
msgstr ""
11761181

@@ -1386,14 +1391,6 @@ msgstr ""
13861391
msgid "Messages limited to 8 bytes"
13871392
msgstr ""
13881393

1389-
#: supervisor/shared/safe_mode.c
1390-
msgid "MicroPython NLR jump failed. Likely memory corruption."
1391-
msgstr ""
1392-
1393-
#: supervisor/shared/safe_mode.c
1394-
msgid "MicroPython fatal error."
1395-
msgstr ""
1396-
13971394
#: shared-bindings/audiobusio/PDMIn.c
13981395
msgid "Microphone startup delay must be in range 0.0 to 1.0"
13991396
msgstr ""
@@ -1445,6 +1442,10 @@ msgstr ""
14451442
msgid "Must use a multiple of 6 rgb pins, not %d"
14461443
msgstr ""
14471444

1445+
#: supervisor/shared/safe_mode.c
1446+
msgid "NLR jump failed. Likely memory corruption."
1447+
msgstr ""
1448+
14481449
#: ports/esp32s2/common-hal/nvm/ByteArray.c
14491450
msgid "NVS Error"
14501451
msgstr ""
@@ -1877,7 +1878,7 @@ msgstr ""
18771878
msgid "Read-only filesystem"
18781879
msgstr ""
18791880

1880-
#: shared-module/bitmaptools/__init__.c shared-module/displayio/Bitmap.c
1881+
#: shared-module/displayio/Bitmap.c
18811882
msgid "Read-only object"
18821883
msgstr ""
18831884

@@ -1952,14 +1953,6 @@ msgstr ""
19521953
msgid "Scan already in progess. Stop with stop_scan."
19531954
msgstr ""
19541955

1955-
#: ports/mimxrt10xx/common-hal/busio/UART.c
1956-
msgid "Selected CTS pin not valid"
1957-
msgstr ""
1958-
1959-
#: ports/mimxrt10xx/common-hal/busio/UART.c
1960-
msgid "Selected RTS pin not valid"
1961-
msgstr ""
1962-
19631956
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
19641957
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
19651958
msgid "Serializer in use"
@@ -3193,6 +3186,10 @@ msgstr ""
31933186
msgid "invalid cert"
31943187
msgstr ""
31953188

3189+
#: py/compile.c
3190+
msgid "invalid decorator"
3191+
msgstr ""
3192+
31963193
#: extmod/uos_dupterm.c
31973194
msgid "invalid dupterm index"
31983195
msgstr ""

py/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ STATIC bool compile_built_in_decorator(compiler_t *comp, int name_len, mp_parse_
768768
}
769769

770770
if (name_len != 2) {
771-
compile_syntax_error(comp, name_nodes[0], translate("invalid micropython decorator"));
771+
compile_syntax_error(comp, name_nodes[0], translate("invalid decorator"));
772772
return true;
773773
}
774774

supervisor/shared/safe_mode.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ void print_safe_mode_message(safe_mode_t reason) {
170170
serial_write_compressed(translate("Crash into the HardFault_Handler."));
171171
return;
172172
case MICROPY_NLR_JUMP_FAIL:
173-
serial_write_compressed(translate("MicroPython NLR jump failed. Likely memory corruption."));
173+
serial_write_compressed(translate("NLR jump failed. Likely memory corruption."));
174174
return;
175175
case MICROPY_FATAL_ERROR:
176-
serial_write_compressed(translate("MicroPython fatal error."));
176+
serial_write_compressed(translate("Fatal error."));
177177
break;
178178
case GC_ALLOC_OUTSIDE_VM:
179-
serial_write_compressed(translate("Attempted heap allocation when MicroPython VM not running."));
179+
serial_write_compressed(translate("Attempted heap allocation when VM not running."));
180180
break;
181181
#ifdef SOFTDEVICE_PRESENT
182182
// defined in ports/nrf/bluetooth/bluetooth_common.mk

0 commit comments

Comments
 (0)