Merge pull request #2721 from jepler/cannot-assign

runtime: Improve error message when setting read-only property
This commit is contained in:
Dan Halbert 2020-03-21 10:59:32 -04:00 committed by GitHub
commit 7e56f6eac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 66 additions and 14 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -134,6 +134,10 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' integer 0x%x tidak cukup didalam mask 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -133,6 +133,10 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@ -135,6 +135,10 @@ msgstr "'%s' integer %d ist nicht im Bereich %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' Integer 0x%x passt nicht in Maske 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -133,6 +133,10 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n"
@ -135,6 +135,10 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -135,6 +135,10 @@ msgstr "'%s' entero %d no esta dentro del rango %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' entero 0x%x no cabe en la máscara 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@ -136,6 +136,10 @@ msgstr "'%s' integer %d ay wala sa sakop ng %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' integer 0x%x ay wala sa mask na sakop ng 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n"
@ -137,6 +137,10 @@ msgstr "'%s' l'entier %d n'est pas dans la gamme %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' l'entier 0x%x ne correspond pas au masque 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@ -135,6 +135,10 @@ msgstr "intero '%s' non è nell'intervallo %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "intero '%s' non è nell'intervallo %d..%d"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -135,6 +135,10 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
"Language-Team: pl\n"
@ -134,6 +134,10 @@ msgstr "'%s' liczba %d poza zakresem %d..%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' liczba 0x%x nie pasuje do maski 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -135,6 +135,10 @@ msgstr ""
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
"Last-Translator: hexthat\n"
"Language-Team: Chinese Hanyu Pinyin\n"
@ -140,6 +140,10 @@ msgstr "'%s' zhěngshù %d bùzài fànwéi nèi %d.%d"
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' zhěngshù 0x%x bù shìyòng yú yǎn mǎ 0x%x"
#: py/runtime.c
msgid "'%s' object cannot assign attribute '%q'"
msgstr ""
#: py/proto.c
msgid "'%s' object does not support '%q'"
msgstr "'%s' duì xiàng bù zhīchí '%q'"

View File

@ -1172,7 +1172,7 @@ void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t value) {
mp_raise_AttributeError(translate("no such attribute"));
} else {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_AttributeError,
translate("'%s' object has no attribute '%q'"),
translate("'%s' object cannot assign attribute '%q'"),
mp_obj_get_type_str(base), attr));
}
}