8000 Fixes and translate more strings. by tannewt · Pull Request #1104 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Fixes and translate more strings. #1104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy s 8000 tatement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion extmod/vfs_fat.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "extmod/vfs_fat.h"
#include "lib/timeutils/timeutils.h"

#include "supervisor/shared/translate.h"

#if _MAX_SS == _MIN_SS
#define SECSIZE(fs) (_MIN_SS)
#else
Expand Down Expand Up @@ -421,7 +423,7 @@ STATIC mp_obj_t vfs_fat_setlabel(mp_obj_t self_in, mp_obj_t label_in) {
FRESULT res = f_setlabel(&self->fatfs, label_str);
if (res != FR_OK) {
if(res == FR_WRITE_PROTECTED) {
mp_raise_msg(&mp_type_OSError, "Read-only filesystem");
mp_raise_msg(&mp_type_OSError, translate("Read-only filesystem"));
}
mp_raise_OSError(fresult_to_errno_table[res]);
}
Expand Down
4 changes: 3 additions & 1 deletion lib/embed/abort_.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <py/runtime.h>

#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"));
}
2 changes: 1 addition & 1 deletion lib/utils/pyexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Loading
0