Merge pull request #1478 from dhalbert/struct-compat

Improve struct compatibility with CPython
This commit is contained in:
Scott Shawcroft 2019-01-21 00:31:45 -08:00 committed by GitHub
commit b369fa9013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 511 additions and 372 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -1363,9 +1363,9 @@ msgstr ""
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "" msgstr ""
@ -2649,10 +2649,20 @@ msgstr ""
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "" msgstr ""
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, fuzzy, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr "Gagal untuk megalokasikan buffer RX dari %d byte"
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "" msgstr ""
#: shared-module/struct/__init__.c:179
#, fuzzy
msgid "buffer size must match format"
msgstr "buffers harus mempunyai panjang yang sama"
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -2739,17 +2749,8 @@ msgid ""
"exit safe mode.\n" "exit safe mode.\n"
msgstr "" msgstr ""
#~ msgid "" #~ msgid "Invalid UUID string length"
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "Panjang string UUID tidak valid"
#~ msgstr ""
#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n"
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parameter UUID tidak valid"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
#~ msgid "" #~ msgid ""
#~ "enough power for the whole circuit and press reset (after ejecting " #~ "enough power for the whole circuit and press reset (after ejecting "
@ -2758,5 +2759,14 @@ msgstr ""
#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut " #~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut "
#~ "CIRCUITPY).\n" #~ "CIRCUITPY).\n"
#~ msgid "Invalid UUID string length" #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr "Panjang string UUID tidak valid" #~ msgstr ""
#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parameter UUID tidak valid"
#~ msgid ""
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -1330,9 +1330,9 @@ msgstr ""
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "" msgstr ""
@ -2612,10 +2612,19 @@ msgstr ""
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "" msgstr ""
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr ""
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "" msgstr ""
#: shared-module/struct/__init__.c:179
msgid "buffer size must match format"
msgstr ""
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Sebastian Plamauer\n" "Last-Translator: Sebastian Plamauer\n"
"Language-Team: \n" "Language-Team: \n"
@ -1359,9 +1359,9 @@ msgstr ""
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "" msgstr ""
@ -2651,10 +2651,20 @@ msgstr "Kann '/' nicht remounten when USB aktiv ist"
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "" msgstr ""
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, fuzzy, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr "Konnte keine RX Buffer mit %d allozieren"
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "" msgstr ""
#: shared-module/struct/__init__.c:179
#, fuzzy
msgid "buffer size must match format"
msgstr "Buffer müssen gleich lang sein"
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -2739,22 +2749,29 @@ msgid ""
"exit safe mode.\n" "exit safe mode.\n"
msgstr "" msgstr ""
#~ msgid "Invalid UUID string length" #~ msgid "Can not add Characteristic."
#~ msgstr "Ungültige UUID-Stringlänge" #~ msgstr "Kann das Merkmal nicht hinzufügen."
#~ msgid "Can encode UUID into the advertisement packet." #~ msgid "Can not add Service."
#~ msgstr "Kann UUID in das advertisement packet kodieren." #~ msgstr "Kann den Dienst nicht hinzufügen."
#~ msgid "" #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" #~ msgstr "CircuitPython ist abgestürzt. Ups!\n"
#~ msgstr ""
#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n"
#~ msgid "Invalid UUID parameter" #~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Ungültiger UUID-Parameter" #~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x"
#~ msgid "Invalid Service type" #~ msgid "Cannot apply GAP parameters."
#~ msgstr "Ungültiger Diensttyp" #~ msgstr "Kann GAP Parameter nicht anwenden."
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen."
#~ msgid "Can not query for the device address."
#~ msgstr "Kann nicht nach der Geräteadresse suchen."
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden."
#~ msgid "" #~ msgid ""
#~ "enough power for the whole circuit and press reset (after ejecting " #~ "enough power for the whole circuit and press reset (after ejecting "
@ -2763,26 +2780,19 @@ msgstr ""
#~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem " #~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem "
#~ "sicheren Auswerfen von CIRCUITPY.)\n" #~ "sicheren Auswerfen von CIRCUITPY.)\n"
#~ msgid "Can not apply device name in the stack." #~ msgid "Invalid Service type"
#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." #~ msgstr "Ungültiger Diensttyp"
#~ msgid "Can not query for the device address." #~ msgid "Invalid UUID parameter"
#~ msgstr "Kann nicht nach der Geräteadresse suchen." #~ msgstr "Ungültiger UUID-Parameter"
#~ msgid "Can not encode UUID, to check length." #~ msgid ""
#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." #~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n"
#~ msgid "Cannot apply GAP parameters." #~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "Kann GAP Parameter nicht anwenden." #~ msgstr "Kann UUID in das advertisement packet kodieren."
#~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgid "Invalid UUID string length"
#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" #~ msgstr "Ungültige UUID-Stringlänge"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr "CircuitPython ist abgestürzt. Ups!\n"
#~ msgid "Can not add Service."
#~ msgstr "Kann den Dienst nicht hinzufügen."
#~ msgid "Can not add Characteristic."
#~ msgstr "Kann das Merkmal nicht hinzufügen."

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -1330,9 +1330,9 @@ msgstr ""
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "" msgstr ""
@ -2612,10 +2612,19 @@ msgstr ""
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "" msgstr ""
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr ""
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "" msgstr ""
#: shared-module/struct/__init__.c:179
msgid "buffer size must match format"
msgstr ""
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -1366,9 +1366,9 @@ msgstr "división por cero"
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "buffer demasiado pequeño" msgstr "buffer demasiado pequeño"
@ -2673,10 +2673,20 @@ msgstr "No se puede volver a montar '/' cuando el USB esta activo."
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "'S' y 'O' no son compatibles con los tipos de formato" msgstr "'S' y 'O' no son compatibles con los tipos de formato"
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, fuzzy, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr "Falló la asignación del buffer RX de %d bytes"
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "demasiados argumentos provistos con el formato dado" msgstr "demasiados argumentos provistos con el formato dado"
#: shared-module/struct/__init__.c:179
#, fuzzy
msgid "buffer size must match format"
msgstr "los buffers deben de tener la misma longitud"
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -2771,31 +2781,32 @@ msgstr ""
"El botón reset fue presionado mientras arrancaba CircuitPython. Presiona " "El botón reset fue presionado mientras arrancaba CircuitPython. Presiona "
"otra vez para salir del modo seguro.\n" "otra vez para salir del modo seguro.\n"
#~ msgid "Invalid UUID string length" #~ msgid "Baud rate too high for this SPI peripheral"
#~ msgstr "Longitud de string UUID inválida" #~ msgstr "Baud rate demasiado alto para este periférico SPI"
#~ msgid "Invalid UUID parameter" #~ msgid "Invalid Service type"
#~ msgstr "Parámetro UUID inválido" #~ msgstr "Tipo de Servicio inválido"
#~ msgid "Can not query for the device address." #~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "No se puede consultar la dirección del dispositivo." #~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" #~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "" #~ msgstr "Se puede codificar el UUID en el paquete de anuncio."
#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n"
#~ msgid "Cannot set PPCP parameters." #~ msgid "Can not encode UUID, to check length."
#~ msgstr "No se pueden establecer los parámetros PPCP." #~ msgstr "No se puede codificar el UUID, para revisar la longitud."
#~ msgid "" #~ msgid "Cannot apply GAP parameters."
#~ "enough power for the whole circuit and press reset (after ejecting " #~ msgstr "No se pueden aplicar los parámetros GAP."
#~ "CIRCUITPY).\n"
#~ msgstr ""
#~ "suficiente poder para todo el circuito y presiona reset (después de "
#~ "expulsar CIRCUITPY).\n"
#~ msgid "Can not apply device name in the stack." #~ msgid "Can not add Service."
#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." #~ msgstr "No se puede agregar el Servicio."
#~ msgid "Wrong number of bytes provided"
#~ msgstr "Numero erroneo de bytes dados"
#~ msgid "Wrong address length"
#~ msgstr "Longitud de address erronea"
#, fuzzy #, fuzzy
#~ msgid "" #~ msgid ""
@ -2804,29 +2815,28 @@ msgstr ""
#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu " #~ "Por favor registra un issue en la siguiente URL con el contenidos de tu "
#~ "unidad de almacenamiento CIRCUITPY:\n" #~ "unidad de almacenamiento CIRCUITPY:\n"
#~ msgid "Wrong address length" #~ msgid "Can not apply device name in the stack."
#~ msgstr "Longitud de address erronea" #~ msgstr "No se puede aplicar el nombre del dispositivo en el stack."
#~ msgid "Wrong number of bytes provided" #~ msgid ""
#~ msgstr "Numero erroneo de bytes dados" #~ "enough power for the whole circuit and press reset (after ejecting "
#~ "CIRCUITPY).\n"
#~ msgstr ""
#~ "suficiente poder para todo el circuito y presiona reset (después de "
#~ "expulsar CIRCUITPY).\n"
#~ msgid "Can not add Service." #~ msgid "Cannot set PPCP parameters."
#~ msgstr "No se puede agregar el Servicio." #~ msgstr "No se pueden establecer los parámetros PPCP."
#~ msgid "Cannot apply GAP parameters." #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr "No se pueden aplicar los parámetros GAP." #~ msgstr ""
#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n"
#~ msgid "Can not encode UUID, to check length." #~ msgid "Can not query for the device address."
#~ msgstr "No se puede codificar el UUID, para revisar la longitud." #~ msgstr "No se puede consultar la dirección del dispositivo."
#~ msgid "Can encode UUID into the advertisement packet." #~ msgid "Invalid UUID parameter"
#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." #~ msgstr "Parámetro UUID inválido"
#~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgid "Invalid UUID string length"
#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x" #~ msgstr "Longitud de string UUID inválida"
#~ msgid "Invalid Service type"
#~ msgstr "Tipo de Servicio inválido"
#~ msgid "Baud rate too high for this SPI peripheral"
#~ msgstr "Baud rate demasiado alto para este periférico SPI"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n" "Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n" "Language-Team: fil\n"
@ -1367,9 +1367,9 @@ msgstr "dibisyon ng zero"
msgid "schedule stack full" msgid "schedule stack full"
msgstr "puno na ang schedule stack" msgstr "puno na ang schedule stack"
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "masyadong maliit ang buffer" msgstr "masyadong maliit ang buffer"
@ -2679,10 +2679,20 @@ msgstr "Hindi ma-remount '/' kapag aktibo ang USB."
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "Ang 'S' at 'O' ay hindi suportadong uri ng format" msgstr "Ang 'S' at 'O' ay hindi suportadong uri ng format"
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, fuzzy, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr "Nabigong ilaan ang RX buffer ng %d bytes"
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format" msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format"
#: shared-module/struct/__init__.c:179
#, fuzzy
msgid "buffer size must match format"
msgstr "aarehas na haba dapat ang buffer slices"
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -2777,21 +2787,42 @@ msgstr ""
"Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin " "Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin "
"ulit para lumabas sa safe mode.\n" "ulit para lumabas sa safe mode.\n"
#~ msgid "Invalid UUID string length" #, fuzzy
#~ msgstr "Mali ang UUID string length" #~ msgid "palette must be displayio.Palette"
#~ msgstr "ang palette ay dapat 32 bytes ang haba"
#~ msgid "Invalid UUID parameter" #~ msgid "Invalid Service type"
#~ msgstr "Mali ang UUID parameter" #~ msgstr "Mali ang tipo ng serbisyo"
#~ msgid "Can not query for the device address." #~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Hindi maaaring mag-query para sa address ng device." #~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" #~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "Maaring i-encode ang UUID sa advertisement packet."
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Hindi ma-encode UUID, para suriin ang haba."
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Hindi ma-apply ang GAP parameters."
#~ msgid "Can not add Service."
#~ msgstr "Hindi maidaragdag ang serbisyo."
#~ msgid "Wrong number of bytes provided"
#~ msgstr "Mali ang bilang ng bytes"
#~ msgid "Wrong address length"
#~ msgstr "Mali ang address length"
#~ msgid ""
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr "" #~ msgstr ""
#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" #~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY "
#~ "drive:\n"
#~ msgid "Cannot set PPCP parameters." #~ msgid "Can not apply device name in the stack."
#~ msgstr "Hindi ma-set ang PPCP parameters." #~ msgstr "Hindi maaaring ma-aplay ang device name sa stack."
#~ msgid "" #~ msgid ""
#~ "enough power for the whole circuit and press reset (after ejecting " #~ "enough power for the whole circuit and press reset (after ejecting "
@ -2800,39 +2831,18 @@ msgstr ""
#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " #~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang "
#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" #~ "reset (pagkatapos i-eject ang CIRCUITPY).\n"
#~ msgid "Can not apply device name in the stack." #~ msgid "Cannot set PPCP parameters."
#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." #~ msgstr "Hindi ma-set ang PPCP parameters."
#~ msgid "" #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr "" #~ msgstr ""
#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY " #~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n"
#~ "drive:\n"
#~ msgid "Wrong address length" #~ msgid "Can not query for the device address."
#~ msgstr "Mali ang address length" #~ msgstr "Hindi maaaring mag-query para sa address ng device."
#~ msgid "Wrong number of bytes provided" #~ msgid "Invalid UUID parameter"
#~ msgstr "Mali ang bilang ng bytes" #~ msgstr "Mali ang UUID parameter"
#~ msgid "Can not add Service." #~ msgid "Invalid UUID string length"
#~ msgstr "Hindi maidaragdag ang serbisyo." #~ msgstr "Mali ang UUID string length"
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Hindi ma-apply ang GAP parameters."
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Hindi ma-encode UUID, para suriin ang haba."
#~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "Maaring i-encode ang UUID sa advertisement packet."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
#~ msgid "Invalid Service type"
#~ msgstr "Mali ang tipo ng serbisyo"
#, fuzzy
#~ msgid "palette must be displayio.Palette"
#~ msgstr "ang palette ay dapat 32 bytes ang haba"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 0.1\n" "Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: 2018-12-23 20:05+0100\n" "PO-Revision-Date: 2018-12-23 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n" "Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n" "Language-Team: fr\n"
@ -1366,9 +1366,9 @@ msgstr "division par zéro"
msgid "schedule stack full" msgid "schedule stack full"
msgstr "pile de plannification pleine" msgstr "pile de plannification pleine"
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "tampon trop petit" msgstr "tampon trop petit"
@ -2703,10 +2703,20 @@ msgstr "'/' ne peut être remonté quand l'USB est actif."
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "'S' et 'O' ne sont pas des types de format supportés" msgstr "'S' et 'O' ne sont pas des types de format supportés"
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, fuzzy, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr "Echec de l'allocation de %d octets du tampon RX"
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "trop d'arguments fournis avec ce format" msgstr "trop d'arguments fournis avec ce format"
#: shared-module/struct/__init__.c:179
#, fuzzy
msgid "buffer size must match format"
msgstr "les slices de tampon doivent être de longueurs égales"
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -2806,47 +2816,17 @@ msgstr ""
"Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. " "Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. "
"Appuyer denouveau pour quitter de le mode sans-échec.\n" "Appuyer denouveau pour quitter de le mode sans-échec.\n"
#~ msgid "Invalid UUID string length" #~ msgid "Cannot set PPCP parameters."
#~ msgstr "Longeur de chaîne UUID invalide" #~ msgstr "Impossible d'appliquer les paramètres PPCP"
#~ msgid "Invalid UUID parameter" #~ msgid "Can not add Characteristic."
#~ msgstr "Paramètre UUID invalide" #~ msgstr "Impossible d'ajouter la Characteristic."
#, fuzzy #~ msgid "Can not query for the device address."
#~ msgid "palette must be displayio.Palette" #~ msgstr "Impossible d'obtenir l'adresse du périphérique"
#~ msgstr "la palette doit être une displayio.Palette"
#, fuzzy #~ msgid "Can not add Service."
#~ msgid "value_size must be power of two" #~ msgstr "Impossible d'ajouter le Service"
#~ msgstr "value_size doit être une puissance de 2"
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Impossible d'appliquer les paramètres GAP"
#~ msgid "Invalid Service type"
#~ msgstr "Type de service invalide"
#~ msgid ""
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n"
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur."
#~ msgid "Wrong address length"
#~ msgstr "Mauvaise longueur d'adresse"
#, fuzzy
#~ msgid "Wrong number of bytes provided"
#~ msgstr "mauvais nombre d'octets fourni'"
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n"
#~ msgid "" #~ msgid ""
#~ "enough power for the whole circuit and press reset (after ejecting " #~ "enough power for the whole circuit and press reset (after ejecting "
@ -2855,14 +2835,44 @@ msgstr ""
#~ "assez de puissance pour l'ensemble du circuit et appuyez sur " #~ "assez de puissance pour l'ensemble du circuit et appuyez sur "
#~ "'reset' (après avoir éjecter CIRCUITPY).\n" #~ "'reset' (après avoir éjecter CIRCUITPY).\n"
#~ msgid "Can not add Service." #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr "Impossible d'ajouter le Service" #~ msgstr ""
#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n"
#~ msgid "Can not query for the device address." #~ msgid "Can not apply device name in the stack."
#~ msgstr "Impossible d'obtenir l'adresse du périphérique" #~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile"
#~ msgid "Can not add Characteristic." #, fuzzy
#~ msgstr "Impossible d'ajouter la Characteristic." #~ msgid "Wrong number of bytes provided"
#~ msgstr "mauvais nombre d'octets fourni'"
#~ msgid "Cannot set PPCP parameters." #~ msgid "Wrong address length"
#~ msgstr "Impossible d'appliquer les paramètres PPCP" #~ msgstr "Mauvaise longueur d'adresse"
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur."
#~ msgid ""
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n"
#~ msgid "Invalid Service type"
#~ msgstr "Type de service invalide"
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Impossible d'appliquer les paramètres GAP"
#, fuzzy
#~ msgid "value_size must be power of two"
#~ msgstr "value_size doit être une puissance de 2"
#, fuzzy
#~ msgid "palette must be displayio.Palette"
#~ msgstr "la palette doit être une displayio.Palette"
#~ msgid "Invalid UUID parameter"
#~ msgstr "Paramètre UUID invalide"
#~ msgid "Invalid UUID string length"
#~ msgstr "Longeur de chaîne UUID invalide"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n" "Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -1366,9 +1366,9 @@ msgstr "divisione per zero"
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "buffer troppo piccolo" msgstr "buffer troppo piccolo"
@ -2685,10 +2685,20 @@ msgstr "Non è possibile rimontare '/' mentre l'USB è attiva."
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "'S' e 'O' non sono formati supportati" msgstr "'S' e 'O' non sono formati supportati"
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, fuzzy, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr "Fallita allocazione del buffer RX di %d byte"
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "troppi argomenti forniti con il formato specificato" msgstr "troppi argomenti forniti con il formato specificato"
#: shared-module/struct/__init__.c:179
#, fuzzy
msgid "buffer size must match format"
msgstr "slice del buffer devono essere della stessa lunghezza"
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -2775,53 +2785,8 @@ msgid ""
"exit safe mode.\n" "exit safe mode.\n"
msgstr "" msgstr ""
#~ msgid "Invalid UUID string length" #~ msgid "Cannot apply GAP parameters."
#~ msgstr "Lunghezza della stringa UUID non valida" #~ msgstr "Impossibile applicare i parametri GAP."
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parametro UUID non valido"
#~ msgid "Invalid Service type"
#~ msgstr "Tipo di servizio non valido"
#, fuzzy
#~ msgid "Wrong number of bytes provided"
#~ msgstr "numero di argomenti errato"
#~ msgid "Cannot set PPCP parameters."
#~ msgstr "Impossibile impostare i parametri PPCP."
#~ msgid "Can not add Characteristic."
#~ msgstr "Non è possibile aggiungere Characteristic."
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare."
#~ msgid ""
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
#~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie "
#~ "CIRCUITPY:\n"
#~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement."
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista."
#~ msgid "Can not add Service."
#~ msgstr "Non è possibile aggiungere Service."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x"
#~ msgid "Can not query for the device address."
#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo."
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. "
#~ "Whoops!\n"
#~ msgid "" #~ msgid ""
#~ "enough power for the whole circuit and press reset (after ejecting " #~ "enough power for the whole circuit and press reset (after ejecting "
@ -2830,5 +2795,50 @@ msgstr ""
#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " #~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver "
#~ "espulso CIRCUITPY).\n" #~ "espulso CIRCUITPY).\n"
#~ msgid "Cannot apply GAP parameters." #~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr "Impossibile applicare i parametri GAP." #~ msgstr ""
#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. "
#~ "Whoops!\n"
#~ msgid "Can not query for the device address."
#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x"
#~ msgid "Can not add Service."
#~ msgstr "Non è possibile aggiungere Service."
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista."
#~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement."
#~ msgid ""
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
#~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie "
#~ "CIRCUITPY:\n"
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare."
#~ msgid "Can not add Characteristic."
#~ msgstr "Non è possibile aggiungere Characteristic."
#~ msgid "Cannot set PPCP parameters."
#~ msgstr "Impossibile impostare i parametri PPCP."
#, fuzzy
#~ msgid "Wrong number of bytes provided"
#~ msgstr "numero di argomenti errato"
#~ msgid "Invalid Service type"
#~ msgstr "Tipo di servizio non valido"
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parametro UUID non valido"
#~ msgid "Invalid UUID string length"
#~ msgstr "Lunghezza della stringa UUID non valida"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-20 17:33-0800\n" "POT-Creation-Date: 2019-01-20 22:46-0500\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -1348,9 +1348,9 @@ msgstr "divisão por zero"
msgid "schedule stack full" msgid "schedule stack full"
msgstr "" msgstr ""
#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244 #: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145 #: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175 #: shared-module/struct/__init__.c:183
msgid "buffer too small" msgid "buffer too small"
msgstr "" msgstr ""
@ -2642,10 +2642,20 @@ msgstr "Não é possível remontar '/' enquanto o USB estiver ativo."
msgid "'S' and 'O' are not supported format types" msgid "'S' and 'O' are not supported format types"
msgstr "'S' e 'O' não são tipos de formato suportados" msgstr "'S' e 'O' não são tipos de formato suportados"
#: shared-module/struct/__init__.c:83 #: shared-module/struct/__init__.c:128
#, fuzzy, c-format
msgid "unpack requires a buffer of %d bytes"
msgstr "Falha ao alocar buffer RX de %d bytes"
#: shared-module/struct/__init__.c:136
msgid "too many arguments provided with the given format" msgid "too many arguments provided with the given format"
msgstr "Muitos argumentos fornecidos com o formato dado" msgstr "Muitos argumentos fornecidos com o formato dado"
#: shared-module/struct/__init__.c:179
#, fuzzy
msgid "buffer size must match format"
msgstr "buffers devem ser o mesmo tamanho"
#: shared-module/usb_hid/Device.c:45 #: shared-module/usb_hid/Device.c:45
#, c-format #, c-format
msgid "Buffer incorrect size. Should be %d bytes." msgid "Buffer incorrect size. Should be %d bytes."
@ -2726,32 +2736,32 @@ msgid ""
"exit safe mode.\n" "exit safe mode.\n"
msgstr "" msgstr ""
#~ msgid "Can not query for the device address." #~ msgid "Cannot set PPCP parameters."
#~ msgstr "Não é possível consultar o endereço do dispositivo." #~ msgstr "Não é possível definir parâmetros PPCP."
#~ msgid "Invalid Service type"
#~ msgstr "Tipo de serviço inválido"
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."
#~ msgid "Baud rate too high for this SPI peripheral"
#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
#~ msgid "Can not add Characteristic."
#~ msgstr "Não é possível adicionar Característica."
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Não é possível aplicar parâmetros GAP."
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parâmetro UUID inválido"
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
#~ msgid "Can encode UUID into the advertisement packet." #~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "Pode codificar o UUID no pacote de anúncios." #~ msgstr "Pode codificar o UUID no pacote de anúncios."
#~ msgid "Cannot set PPCP parameters." #~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Não é possível definir parâmetros PPCP." #~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
#~ msgid "Invalid UUID parameter"
#~ msgstr "Parâmetro UUID inválido"
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Não é possível aplicar parâmetros GAP."
#~ msgid "Can not add Characteristic."
#~ msgstr "Não é possível adicionar Característica."
#~ msgid "Baud rate too high for this SPI peripheral"
#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."
#~ msgid "Invalid Service type"
#~ msgstr "Tipo de serviço inválido"
#~ msgid "Can not query for the device address."
#~ msgstr "Não é possível consultar o endereço do dispositivo."

View File

@ -49,7 +49,7 @@ size_t mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) {
switch (struct_type) { switch (struct_type) {
case '<': case '>': case '<': case '>':
switch (val_type) { switch (val_type) {
case 'b': case 'B': case 'b': case 'B': case 'x':
size = 1; break; size = 1; break;
case 'h': case 'H': case 'h': case 'H':
size = 2; break; size = 2; break;
@ -79,7 +79,7 @@ size_t mp_binary_get_size(char struct_type, char val_type, mp_uint_t *palign) {
// particular (or any) ABI. // particular (or any) ABI.
switch (val_type) { switch (val_type) {
case BYTEARRAY_TYPECODE: case BYTEARRAY_TYPECODE:
case 'b': case 'B': case 'b': case 'B': case 'x':
align = size = 1; break; align = size = 1; break;
case 'h': case 'H': case 'h': case 'H':
align = alignof(short); align = alignof(short);
@ -126,6 +126,7 @@ mp_obj_t mp_binary_get_val_array(char typecode, void *p, mp_uint_t index) {
break; break;
case BYTEARRAY_TYPECODE: case BYTEARRAY_TYPECODE:
case 'B': case 'B':
case 'x': // value will be discarded
val = ((unsigned char*)p)[index]; val = ((unsigned char*)p)[index];
break; break;
case 'h': case 'h':
@ -364,6 +365,8 @@ void mp_binary_set_val_array_from_int(char typecode, void *p, mp_uint_t index, m
case 'B': case 'B':
((unsigned char*)p)[index] = val; ((unsigned char*)p)[index] = val;
break; break;
case 'x':
((unsigned char*)p)[index] = 0;
case 'h': case 'h':
((short*)p)[index] = val; ((short*)p)[index] = val;
break; break;

View File

@ -97,7 +97,10 @@ STATIC size_t calc_size_items(const char *fmt, size_t *total_sz) {
total_cnt += 1; total_cnt += 1;
size += cnt; size += cnt;
} else { } else {
total_cnt += cnt; // Pad bytes are skipped and don't get included in the item count.
if (*fmt != 'x') {
total_cnt += cnt;
}
mp_uint_t align; mp_uint_t align;
size_t sz = mp_binary_get_size(fmt_type, *fmt, &align); size_t sz = mp_binary_get_size(fmt_type, *fmt, &align);
while (cnt--) { while (cnt--) {
@ -166,7 +169,10 @@ STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *args) {
} else { } else {
while (cnt--) { while (cnt--) {
item = mp_binary_get_val(fmt_type, *fmt, &p); item = mp_binary_get_val(fmt_type, *fmt, &p);
res->items[i++] = item; // Pad bytes ('x') are just skipped.
if (*fmt != 'x') {
res->items[i++] = item;
}
} }
} }
fmt++; fmt++;
@ -204,7 +210,11 @@ STATIC void struct_pack_into_internal(mp_obj_t fmt_in, byte *p, size_t n_args, c
} else { } else {
// If we run out of args then we just finish; CPython would raise struct.error // If we run out of args then we just finish; CPython would raise struct.error
while (cnt-- && i < n_args) { while (cnt-- && i < n_args) {
mp_binary_set_val(fmt_type, *fmt, args[i++], &p); mp_binary_set_val(fmt_type, *fmt, args[i], &p);
// Pad bytes don't have a corresponding argument.
if (*fmt != 'x') {
i++;
}
} }
} }
fmt++; fmt++;

View File

@ -51,7 +51,7 @@
//| //|
//| Supported size/byte order prefixes: *@*, *<*, *>*, *!*. //| Supported size/byte order prefixes: *@*, *<*, *>*, *!*.
//| //|
//| Supported format codes: *b*, *B*, *h*, *H*, *i*, *I*, *l*, *L*, *q*, *Q*, //| Supported format codes: *b*, *B*, *x*, *h*, *H*, *i*, *I*, *l*, *L*, *q*, *Q*,
//| *s*, *P*, *f*, *d* (the latter 2 depending on the floating-point support). //| *s*, *P*, *f*, *d* (the latter 2 depending on the floating-point support).
//| //|
@ -74,7 +74,6 @@ MP_DEFINE_CONST_FUN_OBJ_1(struct_calcsize_obj, struct_calcsize);
//| //|
STATIC mp_obj_t struct_pack(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t struct_pack(size_t n_args, const mp_obj_t *args) {
// TODO: "The arguments must match the values required by the format exactly."
mp_int_t size = MP_OBJ_SMALL_INT_VALUE(struct_calcsize(args[0])); mp_int_t size = MP_OBJ_SMALL_INT_VALUE(struct_calcsize(args[0]));
vstr_t vstr; vstr_t vstr;
vstr_init_len(&vstr, size); vstr_init_len(&vstr, size);
@ -115,49 +114,67 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_into_obj, 3, MP_OBJ_FUN_ARGS_MAX
//| .. function:: unpack(fmt, data) //| .. function:: unpack(fmt, data)
//| //|
//| Unpack from the data according to the format string fmt. The return value //| Unpack from the data according to the format string fmt. The return value
//| is a tuple of the unpacked values. //| is a tuple of the unpacked values. The buffer size must match the size
//| required by the format.
//| //|
//| .. function:: unpack_from(fmt, data, offset) STATIC mp_obj_t struct_unpack(size_t n_args, const mp_obj_t *args) {
//|
//| Unpack from the data starting at offset according to the format string fmt.
//| offset may be negative to count from the end of buffer. The return value is
//| a tuple of the unpacked values.
//|
STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *args) {
// unpack requires that the buffer be exactly the right size.
// unpack_from requires that the buffer be "big enough".
// Since we implement unpack and unpack_from using the same function
// we relax the "exact" requirement, and only implement "big enough".
mp_buffer_info_t bufinfo; mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ); mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ);
byte *p = bufinfo.buf; byte *p = bufinfo.buf;
byte *end_p = &p[bufinfo.len]; byte *end_p = &p[bufinfo.len];
if (n_args > 2) { // true means check the size must be exactly right.
mp_int_t offset = mp_obj_get_int(args[2]); return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[0] , p, end_p, true));
// offset arg provided
if (offset < 0) {
// negative offsets are relative to the end of the buffer
offset = bufinfo.len + offset;
if (offset < 0) {
mp_raise_RuntimeError(translate("buffer too small"));
}
}
p += offset;
}
return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[0] , p, end_p));
} }
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_from_obj, 2, 3, struct_unpack_from); MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_unpack_obj, 2, 3, struct_unpack);
//| .. function:: unpack_from(fmt, data, offset=0)
//|
//| Unpack from the data starting at offset according to the format string fmt.
//| offset may be negative to count from the end of buffer. The return value is
//| a tuple of the unpacked values. The buffer size must be at least as big
//| as the size required by the form.
//|
STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_format, ARG_buffer, ARG_offset };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_format, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_offset, MP_ARG_INT, {.u_int = 0} },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ);
byte *p = bufinfo.buf;
byte *end_p = &p[bufinfo.len];
mp_int_t offset = args[ARG_offset].u_int;
if (offset < 0) {
// negative offsets are relative to the end of the buffer
offset = bufinfo.len + offset;
if (offset < 0) {
mp_raise_RuntimeError(translate("buffer too small"));
}
}
p += offset;
// false means the size doesn't have to be exact. struct.unpack_from() only requires
// that be buffer be big enough.
return MP_OBJ_FROM_PTR(shared_modules_struct_unpack_from(args[ARG_format].u_obj, p, end_p, false));
}
MP_DEFINE_CONST_FUN_OBJ_KW(struct_unpack_from_obj, 0, struct_unpack_from);
STATIC const mp_rom_map_elem_t mp_module_struct_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_struct_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_struct) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_struct) },
{ MP_ROM_QSTR(MP_QSTR_calcsize), MP_ROM_PTR(&struct_calcsize_obj) }, { MP_ROM_QSTR(MP_QSTR_calcsize), MP_ROM_PTR(&struct_calcsize_obj) },
{ MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&struct_pack_obj) }, { MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&struct_pack_obj) },
{ MP_ROM_QSTR(MP_QSTR_pack_into), MP_ROM_PTR(&struct_pack_into_obj) }, { MP_ROM_QSTR(MP_QSTR_pack_into), MP_ROM_PTR(&struct_pack_into_obj) },
{ MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&struct_unpack_from_obj) }, { MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&struct_unpack_obj) },
{ MP_ROM_QSTR(MP_QSTR_unpack_from), MP_ROM_PTR(&struct_unpack_from_obj) }, { MP_ROM_QSTR(MP_QSTR_unpack_from), MP_ROM_PTR(&struct_unpack_from_obj) },
}; };

View File

@ -29,6 +29,6 @@
void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args); void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args);
mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in); mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in);
mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p); mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p, bool exact_size);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_RANDOM___INIT___H #endif // MICROPY_INCLUDED_SHARED_BINDINGS_RANDOM___INIT___H

View File

@ -71,45 +71,6 @@ mp_uint_t get_fmt_num(const char **p) {
return val; return val;
} }
void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args) {
const char *fmt = mp_obj_str_get_str(fmt_in);
char fmt_type = get_fmt_type(&fmt);
size_t i;
for (i = 0; i < n_args;) {
mp_uint_t sz = 1;
if (*fmt == '\0') {
// more arguments given than used by format string; CPython raises struct.error here
mp_raise_RuntimeError(translate("too many arguments provided with the given format"));
}
struct_validate_format(*fmt);
if (unichar_isdigit(*fmt)) {
sz = get_fmt_num(&fmt);
}
if (p + sz > end_p) {
mp_raise_RuntimeError(translate("buffer too small"));
}
if (*fmt == 's') {
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[i++], &bufinfo, MP_BUFFER_READ);
mp_uint_t to_copy = sz;
if (bufinfo.len < to_copy) {
to_copy = bufinfo.len;
}
memcpy(p, bufinfo.buf, to_copy);
memset(p + to_copy, 0, sz - to_copy);
p += sz;
} else {
while (sz--) {
mp_binary_set_val(fmt_type, *fmt, args[i++], &p);
}
}
fmt++;
}
}
mp_uint_t calcsize_items(const char *fmt) { mp_uint_t calcsize_items(const char *fmt) {
mp_uint_t cnt = 0; mp_uint_t cnt = 0;
while (*fmt) { while (*fmt) {
@ -120,7 +81,10 @@ mp_uint_t calcsize_items(const char *fmt) {
num = 1; num = 1;
} }
} }
cnt += num; // Pad bytes are skipped and don't get included in the item count.
if (*fmt != 'x') {
cnt += num;
}
fmt++; fmt++;
} }
return cnt; return cnt;
@ -155,14 +119,71 @@ mp_uint_t shared_modules_struct_calcsize(mp_obj_t fmt_in) {
return size; return size;
} }
void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte* end_p, size_t n_args, const mp_obj_t *args) {
const char *fmt = mp_obj_str_get_str(fmt_in);
char fmt_type = get_fmt_type(&fmt);
const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in);
mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p) { if (p + total_sz != end_p) {
mp_raise_msg_varg(&mp_type_RuntimeError, translate("unpack requires a buffer of %d bytes"), total_sz);
}
size_t i;
for (i = 0; i < n_args;) {
mp_uint_t sz = 1;
if (*fmt == '\0') {
// more arguments given than used by format string; CPython raises struct.error here
mp_raise_RuntimeError(translate("too many arguments provided with the given format"));
}
struct_validate_format(*fmt);
if (unichar_isdigit(*fmt)) {
sz = get_fmt_num(&fmt);
}
if (*fmt == 's') {
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(args[i++], &bufinfo, MP_BUFFER_READ);
mp_uint_t to_copy = sz;
if (bufinfo.len < to_copy) {
to_copy = bufinfo.len;
}
memcpy(p, bufinfo.buf, to_copy);
memset(p + to_copy, 0, sz - to_copy);
p += sz;
} else {
while (sz--) {
mp_binary_set_val(fmt_type, *fmt, args[i], &p);
// Pad bytes don't have a corresponding argument.
if (*fmt != 'x') {
i++;
}
}
}
fmt++;
}
}
mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byte *end_p, bool exact_size) {
const char *fmt = mp_obj_str_get_str(fmt_in); const char *fmt = mp_obj_str_get_str(fmt_in);
char fmt_type = get_fmt_type(&fmt); char fmt_type = get_fmt_type(&fmt);
mp_uint_t num_items = calcsize_items(fmt); const mp_uint_t num_items = calcsize_items(fmt);
const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in);
mp_obj_tuple_t *res = MP_OBJ_TO_PTR(mp_obj_new_tuple(num_items, NULL)); mp_obj_tuple_t *res = MP_OBJ_TO_PTR(mp_obj_new_tuple(num_items, NULL));
// If exact_size, make sure the buffer is exactly the right size.
// Otherwise just make sure it's big enough.
if (exact_size) {
if (p + total_sz != end_p) {
mp_raise_RuntimeError(translate("buffer size must match format"));
}
} else {
if (p + total_sz > end_p) {
mp_raise_RuntimeError(translate("buffer too small"));
}
}
for (uint i = 0; i < num_items;) { for (uint i = 0; i < num_items;) {
mp_uint_t sz = 1; mp_uint_t sz = 1;
@ -171,9 +192,6 @@ mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byt
if (unichar_isdigit(*fmt)) { if (unichar_isdigit(*fmt)) {
sz = get_fmt_num(&fmt); sz = get_fmt_num(&fmt);
} }
if (p + sz > end_p) {
mp_raise_RuntimeError(translate("buffer too small"));
}
mp_obj_t item; mp_obj_t item;
if (*fmt == 's') { if (*fmt == 's') {
item = mp_obj_new_bytes(p, sz); item = mp_obj_new_bytes(p, sz);
@ -182,7 +200,10 @@ mp_obj_tuple_t * shared_modules_struct_unpack_from(mp_obj_t fmt_in, byte *p, byt
} else { } else {
while (sz--) { while (sz--) {
item = mp_binary_get_val(fmt_type, *fmt, &p); item = mp_binary_get_val(fmt_type, *fmt, &p);
res->items[i++] = item; // Pad bytes are not stored.
if (*fmt != 'x') {
res->items[i++] = item;
}
} }
} }
fmt++; fmt++;