From 96ebf5bc3fb455162286b9bc31e763f3c4f1c457 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 8 Aug 2018 18:24:49 -0700 Subject: Two fixes and translate more strings. * Fix finding translations with escaped characters. * Add back \r to translations since its needed by screen. --- lib/embed/abort_.c | 4 +++- lib/utils/pyexec.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/embed/abort_.c b/lib/embed/abort_.c index 2fba0de4e..3eeb42d9e 100644 --- a/lib/embed/abort_.c +++ b/lib/embed/abort_.c @@ -1,7 +1,9 @@ #include +#include "supervisor/shared/translate.h" + NORETURN void abort_(void); NORETURN void abort_(void) { - mp_raise_msg(&mp_type_RuntimeError, "abort() called"); + mp_raise_msg(&mp_type_RuntimeError, translate("abort() called")); } diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index 8cd9848ca..e637fe544 100755 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -94,7 +94,7 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input // Clear the parse tree because it has a heap pointer we don't need anymore. *((uint32_t volatile*) &parse_tree.chunk) = 0; #else - mp_raise_msg(&mp_type_RuntimeError, "script compilation not supported"); + mp_raise_msg(&mp_type_RuntimeError, translate("script compilation not supported")); #endif } -- cgit v1.2.3