diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-08-08 18:24:49 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2018-08-09 13:29:30 -0700 |
| commit | 96ebf5bc3fb455162286b9bc31e763f3c4f1c457 (patch) | |
| tree | 3d06bc866bcf943a0e0ea881a1fcab9826291a1c /py/objdeque.c | |
| parent | 9da79c880e387ab05a683b67feb8f3da600d937d (diff) | |
Two fixes and translate more strings.
* Fix finding translations with escaped characters.
* Add back \r to translations since its needed by screen.
Diffstat (limited to 'py/objdeque.c')
| -rw-r--r-- | py/objdeque.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/py/objdeque.c b/py/objdeque.c index 1cff1f8d3..dd0141831 100644 --- a/py/objdeque.c +++ b/py/objdeque.c @@ -28,6 +28,8 @@ #include <string.h> #include "py/mpconfig.h" +#include "supervisor/shared/translate.h" + #if MICROPY_PY_COLLECTIONS_DEQUE #include "py/runtime.h" @@ -102,7 +104,7 @@ STATIC mp_obj_t mp_obj_deque_append(mp_obj_t self_in, mp_obj_t arg) { } if (self->flags & FLAG_CHECK_OVERFLOW && new_i_put == self->i_get) { - mp_raise_msg(&mp_type_IndexError, "full"); + mp_raise_msg(&mp_type_IndexError, translate("full")); } self->items[self->i_put] = arg; @@ -122,7 +124,7 @@ STATIC mp_obj_t deque_popleft(mp_obj_t self_in) { mp_obj_deque_t *self = MP_OBJ_TO_PTR(self_in); if (self->i_get == self->i_put) { - mp_raise_msg(&mp_type_IndexError, "empty"); + mp_raise_msg(&mp_type_IndexError, translate("empty")); } mp_obj_t ret = self->items[self->i_get]; |
