8000 Merge pull request #1104 from tannewt/more_strings · sparkfun/circuitpython@bbc034c · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bbc034c

Browse files
authored
Merge pull request adafruit#1104 from tannewt/more_strings
Fixes and translate more strings.
2 parents b735b9d + 24e53ad commit bbc034c

Some content is hidden

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

55 files changed

+3205
-373
lines changed

extmod/vfs_fat.c

Lines changed: 3 additions & 1 deletion
< 8000 /tr>
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