Merge some messages

This commit is contained in:
Jeff Epler 2022-11-08 15:36:23 -06:00
parent d61fde349d
commit d39d146352
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
4 changed files with 8 additions and 24 deletions

26
locale/circuitpython.pot Executable file → Normal file
View File

@ -189,6 +189,10 @@ msgstr ""
msgid "%q pin invalid"
msgstr ""
#: py/objrange.c py/objslice.c shared-bindings/random/__init__.c
msgid "%q step cannot be zero"
msgstr ""
#: py/bc.c py/objnamedtuple.c
msgid "%q() takes %d positional arguments but %d were given"
msgstr ""
@ -2846,7 +2850,7 @@ msgstr ""
msgid "div/mod not implemented for uint"
msgstr ""
#: py/runtime.c shared-bindings/math/__init__.c
#: py/runtime.c
msgid "division by zero"
msgstr ""
@ -3218,10 +3222,6 @@ msgstr ""
msgid "inputs are not iterable"
msgstr ""
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
#: extmod/ulab/code/numpy/approx.c
msgid "interp is defined for 1D iterables of equal length"
msgstr ""
@ -3359,10 +3359,6 @@ msgstr ""
msgid "local variable referenced before assignment"
msgstr ""
#: py/objint.c
msgid "long int not supported in this build"
msgstr ""
#: ports/espressif/common-hal/canio/CAN.c
msgid "loopback + silent mode not supported by peripheral"
msgstr ""
@ -3897,10 +3893,6 @@ msgstr ""
msgid "slice step can't be zero"
msgstr ""
#: py/objslice.c
msgid "slice step cannot be zero"
msgstr ""
#: py/nativeglue.c
msgid "slice unsupported"
msgstr ""
@ -3949,10 +3941,6 @@ msgstr ""
msgid "start/end indices"
msgstr ""
#: shared-bindings/random/__init__.c
msgid "step must be non-zero"
msgstr ""
#: shared-bindings/random/__init__.c
msgid "stop not reachable from start"
msgstr ""
@ -4278,10 +4266,6 @@ msgstr ""
msgid "y value out of bounds"
msgstr ""
#: py/objrange.c
msgid "zero step"
msgstr ""
#: extmod/ulab/code/scipy/signal/signal.c
msgid "zi must be an ndarray"
msgstr ""

View File

@ -110,7 +110,7 @@ STATIC mp_obj_t range_make_new(const mp_obj_type_t *type, size_t n_args, size_t
if (n_args == 3) {
o->step = mp_obj_get_int(args[2]);
if (o->step == 0) {
mp_raise_ValueError(MP_ERROR_TEXT("zero step"));
mp_raise_ValueError_varg(MP_ERROR_TEXT("%q step cannot be zero"), MP_QSTR_range);
}
}
}

View File

@ -157,7 +157,7 @@ void mp_obj_slice_indices(mp_obj_t self_in, mp_int_t length, mp_bound_slice_t *r
} else {
step = mp_obj_get_int(self->step);
if (step == 0) {
mp_raise_ValueError(MP_ERROR_TEXT("slice step cannot be zero"));
mp_raise_ValueError_varg(MP_ERROR_TEXT("%q step cannot be zero"), MP_QSTR_slice);
}
}

View File

@ -108,7 +108,7 @@ STATIC mp_obj_t random_randrange(size_t n_args, const mp_obj_t *args) {
} else if (step < 0) {
n = (stop - start + step + 1) / step;
} else {
mp_raise_ValueError(translate("step must be non-zero"));
mp_raise_ValueError_varg(MP_ERROR_TEXT("%q step cannot be zero"), MP_QSTR_randrange);
}
if (n <= 0) {
mp_raise_ValueError(translate("invalid step"));