@@ -147,7 +147,7 @@ STATIC supervisor_allocation *allocate_pystack(safe_mode_t safe_mode) {
147
147
if (pystack ) {
148
148
return pystack ;
149
149
}
150
- serial_write_compressed (translate ("Invalid CIRCUITPY_PYSTACK_SIZE\n" ));
150
+ serial_write_compressed (MP_ERROR_TEXT ("Invalid CIRCUITPY_PYSTACK_SIZE\n" ));
151
151
}
152
152
#endif
153
153
return allocate_memory (CIRCUITPY_PYSTACK_SIZE , false, false);
@@ -243,7 +243,7 @@ void supervisor_execution_status(void) {
243
243
exception != NULL ) {
244
244
mp_printf (& mp_plat_print , "%d@%s %q" , _exec_result .exception_line , _exec_result .exception_filename , exception -> base .type -> name );
245
245
} else {
246
- serial_write_compressed (translate ("Done" ));
246
+ serial_write_compressed (MP_ERROR_TEXT ("Done" ));
247
247
}
248
248
}
249
249
#endif
@@ -275,7 +275,7 @@ STATIC bool maybe_run_list(const char *const *filenames, size_t n_filenames) {
275
275
return false;
276
276
}
277
277
mp_hal_stdout_tx_str (_current_executing_filename );
278
- serial_write_compressed (translate (" output:\n" ));
278
+ serial_write_compressed (MP_ERROR_TEXT (" output:\n" ));
279
279
280
280
#if CIRCUITPY_STATUS_BAR
281
281
supervisor_status_bar_update ();
@@ -393,12 +393,12 @@ STATIC void cleanup_after_vm(supervisor_allocation *heap, supervisor_allocation
393
393
STATIC void print_code_py_status_message (safe_mode_t safe_mode ) {
394
394
if (autoreload_is_enabled ()) {
395
395
serial_write_compressed (
396
- translate ("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n" ));
396
+ MP_ERROR_TEXT ("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n" ));
397
397
} else {
398
- serial_write_compressed (translate ("Auto-reload is off.\n" ));
398
+ serial_write_compressed (MP_ERROR_TEXT ("Auto-reload is off.\n" ));
399
399
}
400
400
if (safe_mode != SAFE_MODE_NONE ) {
401
- serial_write_compressed (translate ("Running in safe mode! Not running saved code.\n" ));
401
+ serial_write_compressed (MP_ERROR_TEXT ("Running in safe mode! Not running saved code.\n" ));
402
402
}
403
403
}
404
404
@@ -463,7 +463,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
463
463
found_main = maybe_run_list (filenames , MP_ARRAY_SIZE (filenames ));
464
464
if (!found_main ) {
465
465
serial_write (info -> filename );
466
- serial_write_compressed (translate (" not found.\n" ));
466
+ serial_write_compressed (MP_ERROR_TEXT (" not found.\n" ));
467
467
}
468
468
}
469
469
}
@@ -476,7 +476,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
476
476
if (!found_main ) {
477
477
found_main = maybe_run_list (double_extension_filenames , MP_ARRAY_SIZE (double_extension_filenames ));
478
478
if (found_main ) {
479
- serial_write_compressed (translate ("WARNING: Your code filename has two extensions\n" ));
479
+ serial_write_compressed (MP_ERROR_TEXT ("WARNING: Your code filename has two extensions\n" ));
480
480
}
481
481
}
482
482
#else
@@ -487,9 +487,9 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
487
487
// Print done before resetting everything so that we get the message over
488
488
// BLE before it is reset and we have a delay before reconnect.
489
489
if ((_exec_result .return_code & PYEXEC_RELOAD ) && supervisor_get_run_reason () == RUN_REASON_AUTO_RELOAD ) {
490
- serial_write_compressed (translate ("\nCode stopped by auto-reload. Reloading soon.\n" ));
490
+ serial_write_compressed (MP_ERROR_TEXT ("\nCode stopped by auto-reload. Reloading soon.\n" ));
491
491
} else {
492
- serial_write_compressed (translate ("\nCode done running.\n" ));
492
+ serial_write_compressed (MP_ERROR_TEXT ("\nCode done running.\n" ));
493
493
}
494
494
495
495
@@ -610,7 +610,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
610
610
// sleep.
611
611
#if CIRCUITPY_ALARM
612
612
if (fake_sleeping && common_hal_alarm_woken_from_sleep ()) {
613
- serial_write_compressed (translate ("Woken up by alarm.\n" ));
613
+ serial_write_compressed (MP_ERROR_TEXT ("Woken up by alarm.\n" ));
614
614
supervisor_set_run_reason (RUN_REASON_STARTUP );
615
615
skip_repl = true;
616
616
break ;
@@ -628,7 +628,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
628
628
printed_safe_mode_message = true;
629
629
}
630
630
serial_write ("\r\n" );
631
- serial_write_compressed (translate ("Press any key to enter the REPL. Use CTRL-D to reload.\n" ));
631
+ serial_write_compressed (MP_ERROR_TEXT ("Press any key to enter the REPL. Use CTRL-D to reload.\n" ));
632
632
printed_press_any_key = true;
633
633
}
634
634
if (!serial_connected ()) {
@@ -673,7 +673,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
673
673
// Does not return.
674
674
} else {
675
675
serial_write_compressed (
676
- translate ("Pretending to deep sleep until alarm, CTRL-C or file write.\n" ));
676
+ MP_ERROR_TEXT ("Pretending to deep sleep until alarm, CTRL-C or file write.\n" ));
677
677
fake_sleeping = true;
678
678
}
679
679
} else {
@@ -856,9 +856,9 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
856
856
#if CIRCUITPY_MICROCONTROLLER && COMMON_HAL_MCU_PROCESSOR_UID_LENGTH > 0
857
857
uint8_t raw_id [COMMON_HAL_MCU_PROCESSOR_UID_LENGTH ];
858
858
common_hal_mcu_processor_get_uid (raw_id );
859
- mp_cprintf (& mp_plat_print , translate ("UID:" ));
859
+ mp_cprintf (& mp_plat_print , MP_ERROR_TEXT ("UID:" ));
860
860
for (size_t i = 0 ; i < COMMON_HAL_MCU_PROCESSOR_UID_LENGTH ; i ++ ) {
861
- mp_cprintf (& mp_plat_print , translate ("%02X" ), raw_id [i ]);
861
+ mp_cprintf (& mp_plat_print , MP_ERROR_TEXT ("%02X" ), raw_id [i ]);
862
862
}
863
863
mp_printf (& mp_plat_print , "\n" );
864
864
port_boot_info ();
@@ -1116,7 +1116,7 @@ int __attribute__((used)) main(void) {
1116
1116
}
1117
1117
if (exit_code == PYEXEC_FORCED_EXIT ) {
1118
1118
if (!simulate_reset ) {
1119
- serial_write_compressed (translate ("soft reboot\n" ));
1119
+ serial_write_compressed (MP_ERROR_TEXT ("soft reboot\n" ));
1120
1120
}
1121
1121
simulate_reset = false;
1122
1122
if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL ) {
0 commit comments