summaryrefslogtreecommitdiff
path: root/py/objlist.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2018-08-08 18:24:49 -0700
committerScott Shawcroft <scott@tannewt.org>2018-08-09 13:29:30 -0700
commit96ebf5bc3fb455162286b9bc31e763f3c4f1c457 (patch)
tree3d06bc866bcf943a0e0ea881a1fcab9826291a1c /py/objlist.c
parent9da79c880e387ab05a683b67feb8f3da600d937d (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/objlist.c')
-rw-r--r--py/objlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/objlist.c b/py/objlist.c
index 0cbf68c2f..d4f9b0222 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -31,6 +31,8 @@
#include "py/runtime.h"
#include "py/stackctrl.h"
+#include "supervisor/shared/translate.h"
+
STATIC mp_obj_t mp_obj_new_list_iterator(mp_obj_t list, size_t cur, mp_obj_iter_buf_t *iter_buf);
STATIC mp_obj_list_t *list_new(size_t n);
STATIC mp_obj_t list_extend(mp_obj_t self_in, mp_obj_t arg_in);
@@ -268,7 +270,7 @@ STATIC mp_obj_t list_pop(size_t n_args, const mp_obj_t *args) {
mp_check_self(MP_OBJ_IS_TYPE(args[0], &mp_type_list));
mp_obj_list_t *self = MP_OBJ_TO_PTR(args[0]);
if (self->len == 0) {
- mp_raise_IndexError("pop from empty list");
+ mp_raise_IndexError(translate("pop from empty list"));
}
size_t index = mp_get_index(self->base.type, self->len, n_args == 1 ? MP_OBJ_NEW_SMALL_INT(-1) : args[1], false);
mp_obj_t ret = self->items[index];