Fix unix coverage and update translations.

This commit is contained in:
Scott Shawcroft 2018-08-16 14:37:06 -07:00
parent 76e0373576
commit 96534e598e
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59
6 changed files with 214 additions and 20 deletions

View File

@ -31,6 +31,7 @@
#if defined(MICROPY_VFS_POSIX) && MICROPY_VFS_POSIX
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <dirent.h>

View File

@ -27,6 +27,7 @@
#include "py/runtime.h"
#include "py/stream.h"
#include "extmod/vfs_posix.h"
#include "supervisor/shared/translate.h"
#if defined(MICROPY_VFS_POSIX) && MICROPY_VFS_POSIX
@ -44,7 +45,7 @@ typedef struct _mp_obj_vfs_posix_file_t {
#ifdef MICROPY_CPYTHON_COMPAT
STATIC void check_fd_is_open(const mp_obj_vfs_posix_file_t *o) {
if (o->fd < 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "I/O operation on closed file"));
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, translate("I/O operation on closed file")));
}
}
#else

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-16 13:33-0700\n"
"POT-Creation-Date: 2018-08-16 14:36-0700\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"
@ -26,7 +26,7 @@ msgstr ""
msgid "I2C operation not supported"
msgstr ""
#: extmod/machine_mem.c:45
#: extmod/machine_mem.c:45 ports/unix/modmachine.c:53
#, c-format
msgid "address %08x is not aligned to %d bytes"
msgstr ""
@ -135,6 +135,10 @@ msgstr ""
msgid "Read-only filesystem"
msgstr ""
#: extmod/vfs_posix_file.c:48 ports/unix/file.c:50 py/objstringio.c:43
msgid "I/O operation on closed file"
msgstr ""
#: lib/embed/abort_.c:8
msgid "abort() called"
msgstr ""
@ -240,6 +244,7 @@ msgid "No default UART bus"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63
#: ports/nrf/common-hal/analogio/AnalogIn.c:39
msgid "Pin does not have ADC capabilities"
msgstr ""
@ -350,6 +355,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/busio/I2C.c:76
#: ports/atmel-samd/common-hal/busio/SPI.c:132
#: ports/atmel-samd/common-hal/busio/UART.c:119
#: ports/nrf/common-hal/busio/I2C.c:58
msgid "Invalid pins"
msgstr ""
@ -386,6 +392,7 @@ msgid "No TX pin"
msgstr ""
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c:168
#: ports/nrf/common-hal/digitalio/DigitalInOut.c:158
msgid "Cannot get pull while in output mode"
msgstr ""
@ -396,6 +403,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:366
#: ports/nrf/common-hal/pulseio/PWMOut.c:227
msgid "Invalid PWM frequency"
msgstr ""
@ -452,15 +460,18 @@ msgid "No free GCLKs"
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:78
#: ports/nrf/common-hal/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
#: ports/nrf/common-hal/usb_hid/Device.c:53
msgid "USB Busy"
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
#: ports/nrf/common-hal/usb_hid/Device.c:59
msgid "USB Error"
msgstr ""
@ -669,6 +680,23 @@ msgstr ""
msgid "unknown config param"
msgstr ""
#: ports/nrf/common-hal/analogio/AnalogOut.c:37
msgid "AnalogOut functionality not supported"
msgstr ""
#: ports/nrf/common-hal/busio/UART.c:45 ports/nrf/common-hal/busio/UART.c:49
#: ports/nrf/common-hal/busio/UART.c:53 ports/nrf/common-hal/busio/UART.c:62
#: ports/nrf/common-hal/busio/UART.c:68 ports/nrf/common-hal/busio/UART.c:73
#: ports/nrf/common-hal/busio/UART.c:78 ports/nrf/common-hal/busio/UART.c:83
#: ports/nrf/common-hal/busio/UART.c:88
msgid "busio.UART not yet implemented"
msgstr ""
#: ports/nrf/common-hal/microcontroller/Processor.c:49
#, c-format
msgid "Can not get temperature. status: 0x%02x"
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
msgstr ""
@ -677,6 +705,10 @@ msgstr ""
msgid "Cannot set PPCP parameters."
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:245
msgid "Can not query for the device address."
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:264
msgid "Can not add Vendor Specific 128-bit UUID."
msgstr ""
@ -751,6 +783,42 @@ msgstr ""
msgid "Can not connect. status: 0x%02x"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_characteristic.c:68
#: ports/nrf/modules/ubluepy/ubluepy_service.c:80
#: ports/nrf/modules/ubluepy/ubluepy_service.c:132
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:137
msgid "Invalid UUID parameter"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_service.c:73
msgid "Invalid Service type"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:127
msgid "Invalid UUID string length"
msgstr ""
#: ports/unix/modffi.c:138
msgid "Unknown type"
msgstr ""
#: ports/unix/modffi.c:207 ports/unix/modffi.c:265
msgid "Error in ffi_prep_cif"
msgstr ""
#: ports/unix/modffi.c:270
msgid "ffi_prep_closure_loc"
msgstr ""
#: ports/unix/modffi.c:413
msgid "Don't know how to pass object to native function"
msgstr ""
#: ports/unix/modusocket.c:474
#, c-format
msgid "[addrinfo error %d]"
msgstr ""
#: py/argcheck.c:44
msgid "function does not take keyword arguments"
msgstr ""
@ -1583,10 +1651,6 @@ msgstr ""
msgid "can't convert '%q' object to %q implicitly"
msgstr ""
#: py/objstringio.c:43
msgid "I/O operation on closed file"
msgstr ""
#: py/objstrunicode.c:134
#, c-format
msgid "string indices must be integers, not %s"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-16 13:33-0700\n"
"POT-Creation-Date: 2018-08-16 14:36-0700\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -26,7 +26,7 @@ msgstr ""
msgid "I2C operation not supported"
msgstr ""
#: extmod/machine_mem.c:45
#: extmod/machine_mem.c:45 ports/unix/modmachine.c:53
#, c-format
msgid "address %08x is not aligned to %d bytes"
msgstr ""
@ -135,6 +135,10 @@ msgstr ""
msgid "Read-only filesystem"
msgstr ""
#: extmod/vfs_posix_file.c:48 ports/unix/file.c:50 py/objstringio.c:43
msgid "I/O operation on closed file"
msgstr ""
#: lib/embed/abort_.c:8
msgid "abort() called"
msgstr ""
@ -240,6 +244,7 @@ msgid "No default UART bus"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63
#: ports/nrf/common-hal/analogio/AnalogIn.c:39
msgid "Pin does not have ADC capabilities"
msgstr ""
@ -350,6 +355,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/busio/I2C.c:76
#: ports/atmel-samd/common-hal/busio/SPI.c:132
#: ports/atmel-samd/common-hal/busio/UART.c:119
#: ports/nrf/common-hal/busio/I2C.c:58
msgid "Invalid pins"
msgstr ""
@ -386,6 +392,7 @@ msgid "No TX pin"
msgstr ""
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c:168
#: ports/nrf/common-hal/digitalio/DigitalInOut.c:158
msgid "Cannot get pull while in output mode"
msgstr ""
@ -396,6 +403,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:366
#: ports/nrf/common-hal/pulseio/PWMOut.c:227
msgid "Invalid PWM frequency"
msgstr ""
@ -452,15 +460,18 @@ msgid "No free GCLKs"
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:78
#: ports/nrf/common-hal/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
#: ports/nrf/common-hal/usb_hid/Device.c:53
msgid "USB Busy"
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
#: ports/nrf/common-hal/usb_hid/Device.c:59
msgid "USB Error"
msgstr ""
@ -669,6 +680,23 @@ msgstr ""
msgid "unknown config param"
msgstr ""
#: ports/nrf/common-hal/analogio/AnalogOut.c:37
msgid "AnalogOut functionality not supported"
msgstr ""
#: ports/nrf/common-hal/busio/UART.c:45 ports/nrf/common-hal/busio/UART.c:49
#: ports/nrf/common-hal/busio/UART.c:53 ports/nrf/common-hal/busio/UART.c:62
#: ports/nrf/common-hal/busio/UART.c:68 ports/nrf/common-hal/busio/UART.c:73
#: ports/nrf/common-hal/busio/UART.c:78 ports/nrf/common-hal/busio/UART.c:83
#: ports/nrf/common-hal/busio/UART.c:88
msgid "busio.UART not yet implemented"
msgstr ""
#: ports/nrf/common-hal/microcontroller/Processor.c:49
#, c-format
msgid "Can not get temperature. status: 0x%02x"
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
msgstr ""
@ -677,6 +705,10 @@ msgstr ""
msgid "Cannot set PPCP parameters."
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:245
msgid "Can not query for the device address."
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:264
msgid "Can not add Vendor Specific 128-bit UUID."
msgstr ""
@ -751,6 +783,42 @@ msgstr ""
msgid "Can not connect. status: 0x%02x"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_characteristic.c:68
#: ports/nrf/modules/ubluepy/ubluepy_service.c:80
#: ports/nrf/modules/ubluepy/ubluepy_service.c:132
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:137
msgid "Invalid UUID parameter"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_service.c:73
msgid "Invalid Service type"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:127
msgid "Invalid UUID string length"
msgstr ""
#: ports/unix/modffi.c:138
msgid "Unknown type"
msgstr ""
#: ports/unix/modffi.c:207 ports/unix/modffi.c:265
msgid "Error in ffi_prep_cif"
msgstr ""
#: ports/unix/modffi.c:270
msgid "ffi_prep_closure_loc"
msgstr ""
#: ports/unix/modffi.c:413
msgid "Don't know how to pass object to native function"
msgstr ""
#: ports/unix/modusocket.c:474
#, c-format
msgid "[addrinfo error %d]"
msgstr ""
#: py/argcheck.c:44
msgid "function does not take keyword arguments"
msgstr ""
@ -1583,10 +1651,6 @@ msgstr ""
msgid "can't convert '%q' object to %q implicitly"
msgstr ""
#: py/objstringio.c:43
msgid "I/O operation on closed file"
msgstr ""
#: py/objstrunicode.c:134
#, c-format
msgid "string indices must be integers, not %s"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-16 13:33-0700\n"
"POT-Creation-Date: 2018-08-16 14:36-0700\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -26,7 +26,7 @@ msgstr ""
msgid "I2C operation not supported"
msgstr ""
#: extmod/machine_mem.c:45
#: extmod/machine_mem.c:45 ports/unix/modmachine.c:53
#, c-format
msgid "address %08x is not aligned to %d bytes"
msgstr ""
@ -135,6 +135,10 @@ msgstr ""
msgid "Read-only filesystem"
msgstr ""
#: extmod/vfs_posix_file.c:48 ports/unix/file.c:50 py/objstringio.c:43
msgid "I/O operation on closed file"
msgstr ""
#: lib/embed/abort_.c:8
msgid "abort() called"
msgstr ""
@ -240,6 +244,7 @@ msgid "No default UART bus"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63
#: ports/nrf/common-hal/analogio/AnalogIn.c:39
msgid "Pin does not have ADC capabilities"
msgstr ""
@ -350,6 +355,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/busio/I2C.c:76
#: ports/atmel-samd/common-hal/busio/SPI.c:132
#: ports/atmel-samd/common-hal/busio/UART.c:119
#: ports/nrf/common-hal/busio/I2C.c:58
msgid "Invalid pins"
msgstr ""
@ -386,6 +392,7 @@ msgid "No TX pin"
msgstr ""
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c:168
#: ports/nrf/common-hal/digitalio/DigitalInOut.c:158
msgid "Cannot get pull while in output mode"
msgstr ""
@ -396,6 +403,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:366
#: ports/nrf/common-hal/pulseio/PWMOut.c:227
msgid "Invalid PWM frequency"
msgstr ""
@ -452,15 +460,18 @@ msgid "No free GCLKs"
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:78
#: ports/nrf/common-hal/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
#: ports/nrf/common-hal/usb_hid/Device.c:53
msgid "USB Busy"
msgstr ""
#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
#: ports/nrf/common-hal/usb_hid/Device.c:59
msgid "USB Error"
msgstr ""
@ -669,6 +680,23 @@ msgstr ""
msgid "unknown config param"
msgstr ""
#: ports/nrf/common-hal/analogio/AnalogOut.c:37
msgid "AnalogOut functionality not supported"
msgstr ""
#: ports/nrf/common-hal/busio/UART.c:45 ports/nrf/common-hal/busio/UART.c:49
#: ports/nrf/common-hal/busio/UART.c:53 ports/nrf/common-hal/busio/UART.c:62
#: ports/nrf/common-hal/busio/UART.c:68 ports/nrf/common-hal/busio/UART.c:73
#: ports/nrf/common-hal/busio/UART.c:78 ports/nrf/common-hal/busio/UART.c:83
#: ports/nrf/common-hal/busio/UART.c:88
msgid "busio.UART not yet implemented"
msgstr ""
#: ports/nrf/common-hal/microcontroller/Processor.c:49
#, c-format
msgid "Can not get temperature. status: 0x%02x"
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
msgstr ""
@ -677,6 +705,10 @@ msgstr ""
msgid "Cannot set PPCP parameters."
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:245
msgid "Can not query for the device address."
msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:264
msgid "Can not add Vendor Specific 128-bit UUID."
msgstr ""
@ -751,6 +783,42 @@ msgstr ""
msgid "Can not connect. status: 0x%02x"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_characteristic.c:68
#: ports/nrf/modules/ubluepy/ubluepy_service.c:80
#: ports/nrf/modules/ubluepy/ubluepy_service.c:132
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:137
msgid "Invalid UUID parameter"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_service.c:73
msgid "Invalid Service type"
msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:127
msgid "Invalid UUID string length"
msgstr ""
#: ports/unix/modffi.c:138
msgid "Unknown type"
msgstr ""
#: ports/unix/modffi.c:207 ports/unix/modffi.c:265
msgid "Error in ffi_prep_cif"
msgstr ""
#: ports/unix/modffi.c:270
msgid "ffi_prep_closure_loc"
msgstr ""
#: ports/unix/modffi.c:413
msgid "Don't know how to pass object to native function"
msgstr ""
#: ports/unix/modusocket.c:474
#, c-format
msgid "[addrinfo error %d]"
msgstr ""
#: py/argcheck.c:44
msgid "function does not take keyword arguments"
msgstr ""
@ -1583,10 +1651,6 @@ msgstr ""
msgid "can't convert '%q' object to %q implicitly"
msgstr ""
#: py/objstringio.c:43
msgid "I/O operation on closed file"
msgstr ""
#: py/objstrunicode.c:134
#, c-format
msgid "string indices must be integers, not %s"

View File

@ -242,7 +242,7 @@ freedos:
# build an interpreter for coverage testing and do the testing
coverage:
$(MAKE) V=2 \
$(MAKE) \
COPT="-O0" CFLAGS_EXTRA='$(CFLAGS_EXTRA) -DMP_CONFIGFILE="<mpconfigport_coverage.h>" \
-fprofile-arcs -ftest-coverage \
-Wdouble-promotion -Wformat -Wmissing-declarations -Wmissing-prototypes -Wsign-compare \