Skip to content

Commit c333acd

Browse files
authored
Merge pull request #4589 from hugodahl/feature/Remove-MicroPython-mention-in-error-messages
Make error messages platform agnostic
2 parents 0365755 + 36f3897 commit c333acd

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

locale/circuitpython.pot

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ msgid "Attempt to allocate %d blocks"
438438
msgstr ""
439439

440440
#: supervisor/shared/safe_mode.c
441-
msgid "Attempted heap allocation when MicroPython VM not running."
441+
msgid "Attempted heap allocation when VM not running."
442442
msgstr ""
443443

444444
#: shared-bindings/wifi/Radio.c
@@ -1008,6 +1008,10 @@ msgstr ""
10081008
msgid "Failed to write internal flash."
10091009
msgstr ""
10101010

1011+
#: supervisor/shared/safe_mode.c
1012+
msgid "Fatal error."
1013+
msgstr ""
1014+
10111015
#: py/moduerrno.c
10121016
msgid "File exists"
10131017
msgstr ""
@@ -1398,14 +1402,6 @@ msgstr ""
13981402
msgid "Messages limited to 8 bytes"
13991403
msgstr ""
14001404

1401-
#: supervisor/shared/safe_mode.c
1402-
msgid "MicroPython NLR jump failed. Likely memory corruption."
1403-
msgstr ""
1404-
1405-
#: supervisor/shared/safe_mode.c
1406-
msgid "MicroPython fatal error."
1407-
msgstr ""
1408-
14091405
#: shared-bindings/audiobusio/PDMIn.c
14101406
msgid "Microphone startup delay must be in range 0.0 to 1.0"
14111407
msgstr ""
@@ -1457,6 +1453,10 @@ msgstr ""
14571453
msgid "Must use a multiple of 6 rgb pins, not %d"
14581454
msgstr ""
14591455

1456+
#: supervisor/shared/safe_mode.c
1457+
msgid "NLR jump failed. Likely memory corruption."
1458+
msgstr ""
1459+
14601460
#: ports/esp32s2/common-hal/nvm/ByteArray.c
14611461
msgid "NVS Error"
14621462
msgstr ""
@@ -3194,6 +3194,10 @@ msgstr ""
31943194
msgid "invalid cert"
31953195
msgstr ""
31963196

3197+
#: py/compile.c
3198+
msgid "invalid decorator"
3199+
msgstr ""
3200+
31973201
#: extmod/uos_dupterm.c
31983202
msgid "invalid dupterm index"
31993203
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)