Skip to content

Commit 60755cc

Browse files
committed
straggling translate()s that my glob missed
1 parent 918944e commit 60755cc

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

locale/circuitpython.pot

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2958,6 +2958,10 @@ msgstr ""
29582958
msgid "dtype must be float, or complex"
29592959
msgstr ""
29602960

2961+
#: extmod/ulab/code/ndarray_operators.c
2962+
msgid "dtype of int32 is not supported"
2963+
msgstr ""
2964+
29612965
#: py/objdeque.c
29622966
msgid "empty"
29632967
msgstr ""
@@ -3822,6 +3826,10 @@ msgstr ""
38223826
msgid "operation is not supported for given type"
38233827
msgstr ""
38243828

3829+
#: extmod/ulab/code/ndarray_operators.c
3830+
msgid "operation not supported for the input types"
3831+
msgstr ""
3832+
38253833
#: py/modbuiltins.c
38263834
msgid "ord expects a character"
38273835
msgstr ""

main.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ STATIC supervisor_allocation *allocate_pystack(safe_mode_t safe_mode) {
147147
if (pystack) {
148148
return pystack;
149149
}
150-
serial_write_compressed(translate("Invalid CIRCUITPY_PYSTACK_SIZE\n"));
150+
serial_write_compressed(MP_ERROR_TEXT("Invalid CIRCUITPY_PYSTACK_SIZE\n"));
151151
}
152152
#endif
153153
return allocate_memory(CIRCUITPY_PYSTACK_SIZE, false, false);
@@ -243,7 +243,7 @@ void supervisor_execution_status(void) {
243243
exception != NULL) {
244244
mp_printf(&mp_plat_print, "%d@%s %q", _exec_result.exception_line, _exec_result.exception_filename, exception->base.type->name);
245245
} else {
246-
serial_write_compressed(translate("Done"));
246+
serial_write_compressed(MP_ERROR_TEXT("Done"));
247247
}
248248
}
249249
#endif
@@ -275,7 +275,7 @@ STATIC bool maybe_run_list(const char *const *filenames, size_t n_filenames) {
275275
return false;
276276
}
277277
mp_hal_stdout_tx_str(_current_executing_filename);
278-
serial_write_compressed(translate(" output:\n"));
278+
serial_write_compressed(MP_ERROR_TEXT(" output:\n"));
279279

280280
#if CIRCUITPY_STATUS_BAR
281281
supervisor_status_bar_update();
@@ -393,12 +393,12 @@ STATIC void cleanup_after_vm(supervisor_allocation *heap, supervisor_allocation
393393
STATIC void print_code_py_status_message(safe_mode_t safe_mode) {
394394
if (autoreload_is_enabled()) {
395395
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"));
397397
} else {
398-
serial_write_compressed(translate("Auto-reload is off.\n"));
398+
serial_write_compressed(MP_ERROR_TEXT("Auto-reload is off.\n"));
399399
}
400400
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"));
402402
}
403403
}
404404

@@ -463,7 +463,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
463463
found_main = maybe_run_list(filenames, MP_ARRAY_SIZE(filenames));
464464
if (!found_main) {
465465
serial_write(info->filename);
466-
serial_write_compressed(translate(" not found.\n"));
466+
serial_write_compressed(MP_ERROR_TEXT(" not found.\n"));
467467
}
468468
}
469469
}
@@ -476,7 +476,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
476476
if (!found_main) {
477477
found_main = maybe_run_list(double_extension_filenames, MP_ARRAY_SIZE(double_extension_filenames));
478478
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"));
480480
}
481481
}
482482
#else
@@ -487,9 +487,9 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
487487
// Print done before resetting everything so that we get the message over
488488
// BLE before it is reset and we have a delay before reconnect.
489489
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"));
491491
} else {
492-
serial_write_compressed(translate("\nCode done running.\n"));
492+
serial_write_compressed(MP_ERROR_TEXT("\nCode done running.\n"));
493493
}
494494

495495

@@ -610,7 +610,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
610610
// sleep.
611611
#if CIRCUITPY_ALARM
612612
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"));
614614
supervisor_set_run_reason(RUN_REASON_STARTUP);
615615
skip_repl = true;
616616
break;
@@ -628,7 +628,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
628628
printed_safe_mode_message = true;
629629
}
630630
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"));
632632
printed_press_any_key = true;
633633
}
634634
if (!serial_connected()) {
@@ -673,7 +673,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
673673
// Does not return.
674674
} else {
675675
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"));
677677
fake_sleeping = true;
678678
}
679679
} else {
@@ -856,9 +856,9 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
856856
#if CIRCUITPY_MICROCONTROLLER && COMMON_HAL_MCU_PROCESSOR_UID_LENGTH > 0
857857
uint8_t raw_id[COMMON_HAL_MCU_PROCESSOR_UID_LENGTH];
858858
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:"));
860860
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]);
862862
}
863863
mp_printf(&mp_plat_print, "\n");
864864
port_boot_info();
@@ -1116,7 +1116,7 @@ int __attribute__((used)) main(void) {
11161116
}
11171117
if (exit_code == PYEXEC_FORCED_EXIT) {
11181118
if (!simulate_reset) {
1119-
serial_write_compressed(translate("soft reboot\n"));
1119+
serial_write_compressed(MP_ERROR_TEXT("soft reboot\n"));
11201120
}
11211121
simulate_reset = false;
11221122
if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {

0 commit comments

Comments
 (0)