summaryrefslogtreecommitdiff
path: root/ports/nrf
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-08-01 12:14:55 -0500
committerJeff Epler <jepler@gmail.com>2020-08-04 13:34:29 -0500
commitdddd25a776fb0d9c002c1b6b039e24bb3048e6ff (patch)
tree72406398044fe8064b7e43fcd3c8e16f7a86b6f5 /ports/nrf
parentc394af412837f96164ebcc88d5301bece19e4a6f (diff)
Combine similar strings to reduce size of translations
This is a slight trade-off with code size, in places where a "_varg" mp_raise variant is now used. The net savings on trinket_m0 is just 32 bytes. It also means that the translation will include the original English text, and cannot be translated. These are usually names of Python types such as int, set, or dict or special values such as "inf" or "Nan".
Diffstat (limited to 'ports/nrf')
-rw-r--r--ports/nrf/common-hal/pulseio/PulseIn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/nrf/common-hal/pulseio/PulseIn.c b/ports/nrf/common-hal/pulseio/PulseIn.c
index be2903e44..80ff2c529 100644
--- a/ports/nrf/common-hal/pulseio/PulseIn.c
+++ b/ports/nrf/common-hal/pulseio/PulseIn.c
@@ -284,7 +284,7 @@ uint16_t common_hal_pulseio_pulsein_get_item(pulseio_pulsein_obj_t* self, int16_
uint16_t common_hal_pulseio_pulsein_popleft(pulseio_pulsein_obj_t* self) {
if (self->len == 0) {
- mp_raise_IndexError(translate("pop from an empty PulseIn"));
+ mp_raise_IndexError_varg(translate("pop from empty %s"), "PulseIn");
}
if ( !self->paused ) {