10000 Two fixes and translate more strings. · sparkfun/circuitpython@96ebf5b · GitHub
[go: up one dir, main page]

Skip to content

Commit 96ebf5b

Browse files
committed
Two fixes and translate more strings.
* Fix finding translations with escaped characters. * Add back \r to translations since its needed by screen.
1 parent 9da79c8 commit 96ebf5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2207
-335
lines changed

extmod/vfs_fat.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#include "extmod/vfs_fat.h"
4141
#include "lib/timeutils/timeutils.h"
4242

43+
#include "supervisor/shared/translate.h"
44+
4345
#if _MAX_SS == _MIN_SS
4446
#define SECSIZE(fs) (_MIN_SS)
4547
#else
@@ -421,7 +423,7 @@ STATIC mp_obj_t vfs_fat_setlabel(mp_obj_t self_in, mp_obj_t label_in) {
421423
FRESULT res = f_setlabel(&self->fatfs, label_str);
422424
if (res != FR_OK) {
423425
if(res == FR_WRITE_PROTECTED) {
424-
mp_raise_msg(&mp_type_OSError, "Read-only filesystem");
426+
mp_raise_msg(&mp_type_OSError, translate("Read-only filesystem"));
425427
}
426428
mp_raise_OSError(fresult_to_errno_table[res]);
427429
}

lib/embed/abort_.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include <py/runtime.h>
22

3+
#include "supervisor/shared/translate.h"
4+
35
NORETURN void abort_(void);
46

57
NORETURN void abort_(void) {
6-
mp_raise_msg(&mp_type_RuntimeError, "abort() called");
8+
mp_raise_msg(&mp_type_RuntimeError, translate("abort() called"));
79
}

lib/utils/pyexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
9494
// Clear the parse tree because it has a heap pointer we don't need anymore.
9595
*((uint32_t volatile*) &parse_tree.chunk) = 0;
9696
#else
97-
mp_raise_msg(&mp_type_RuntimeError, "script compilation not supported");
97+
mp_raise_msg(&mp_type_RuntimeError, translate("script compilation not supported"));
9898
#endif
9999
}
100100

0 commit comments

Comments
 (0)
0