From 0aa41fa92efdcb095d26b1202dedeaaec4c3cc6f Mon Sep 17 00:00:00 2001 From: Neradoc Date: Sat, 29 Oct 2022 05:31:12 +0200 Subject: [PATCH] change BOARD_USER_SAFE_MODE_ACTION into a separate sentence --- locale/circuitpython.pot | 74 ++++++++----------- .../circuitplayground_express/mpconfigboard.h | 2 +- .../mpconfigboard.h | 2 +- .../mpconfigboard.h | 2 +- .../boards/meowmeow/mpconfigboard.h | 2 +- .../adafruit_feather_esp32_v2/mpconfigboard.h | 2 +- .../hardkernel_odroid_go/mpconfigboard.h | 2 +- .../boards/m5stack_atom_lite/mpconfigboard.h | 2 +- .../boards/m5stack_core_basic/mpconfigboard.h | 2 +- .../boards/m5stack_core_fire/mpconfigboard.h | 2 +- .../nrf/boards/aramcon2_badge/mpconfigboard.h | 2 +- supervisor/shared/safe_mode.c | 5 +- 12 files changed, 42 insertions(+), 57 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 9537a28bdd..b880087884 100755 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -583,6 +583,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "" @@ -648,6 +655,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "" @@ -1975,18 +1987,34 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2047,7 +2075,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2345,10 +2373,6 @@ msgid "" "You pressed the reset button during boot. Press again to exit safe mode." msgstr "" -#: supervisor/shared/safe_mode.c -msgid "You requested starting safe mode by " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -3815,46 +3839,8 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - #: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h -msgid "pressing central button at start up.\n" -msgstr "" - -#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h -#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h -msgid "pressing button A at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" +msgid "The central button was pressed at start up.\n" msgstr "" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h index 9020c243b1..33910221a0 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h index 5073c5e403..7f0e041f25 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h index 20cfc617a2..12fd30e005 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting. #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h index 73853dab5d..ad6901230f 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h @@ -6,7 +6,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") #define DEFAULT_I2C_BUS_SCL (&pin_PA01) #define DEFAULT_I2C_BUS_SDA (&pin_PA00) diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h index fc478ef005..b7f2513217 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h @@ -47,7 +47,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO38) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing SW38 button at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The SW38 button was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h index 423890f2e1..7de90b0ae8 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +++ b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h @@ -35,7 +35,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing VOLUME button at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The VOLUME button was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h b/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h index fdc79ec744..dfa12b53b0 100644 --- a/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h @@ -42,7 +42,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing central button at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The central button was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h b/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h index 6ea8e508d4..c974c64874 100755 --- a/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h @@ -42,7 +42,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing button A at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Button A was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h index 8c389a641d..f56a8fe901 100755 --- a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h @@ -43,7 +43,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing button A at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Button A was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/nrf/boards/aramcon2_badge/mpconfigboard.h b/ports/nrf/boards/aramcon2_badge/mpconfigboard.h index 517ad7324b..af8e3c3507 100644 --- a/ports/nrf/boards/aramcon2_badge/mpconfigboard.h +++ b/ports/nrf/boards/aramcon2_badge/mpconfigboard.h @@ -52,7 +52,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_P0_29) -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing the left button at start up\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The left button was pressed at start up.\n") #define CIRCUITPY_INTERNAL_NVM_SIZE (4096) diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index aefae1e48b..64391059d3 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -149,13 +149,12 @@ void print_safe_mode_message(safe_mode_t reason) { #ifdef BOARD_USER_SAFE_MODE_ACTION message = BOARD_USER_SAFE_MODE_ACTION; #elif defined(CIRCUITPY_BOOT_BUTTON) - message = translate("pressing boot button at start up.\n"); + message = translate("The BOOT button was pressed at start up.\n"); #endif if (message != NULL) { // Output a user safe mode string if it's set. - serial_write_compressed(translate("You requested starting safe mode by ")); serial_write_compressed(message); - serial_write_compressed(translate("To exit, please reset the board without ")); + message = translate("To exit, please reset the board without requesting safe mode."); // The final piece is printed below. } break;