Skip to content

Commit f55f2bf

Browse files
committed
shorten error strings
1 parent 7f62962 commit f55f2bf

File tree

2 files changed

+30
-42
lines changed

2 files changed

+30
-42
lines changed

locale/circuitpython.pot

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-08-21 14:36-0500\n"
11+
"POT-Creation-Date: 2020-08-21 21:39-0500\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -82,15 +82,13 @@ msgstr ""
8282
msgid "%q list must be a list"
8383
msgstr ""
8484

85-
#: shared-bindings/memorymonitor/AllocationAlarm 2.c
8685
#: shared-bindings/memorymonitor/AllocationAlarm.c
8786
msgid "%q must be >= 0"
8887
msgstr ""
8988

9089
#: shared-bindings/_bleio/CharacteristicBuffer.c
9190
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
9291
#: shared-bindings/displayio/Shape.c
93-
#: shared-bindings/memorymonitor/AllocationAlarm 2.c
9492
#: shared-bindings/memorymonitor/AllocationAlarm.c
9593
#: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c
9694
msgid "%q must be >= 1"
@@ -254,14 +252,6 @@ msgstr ""
254252
msgid "'yield' outside function"
255253
msgstr ""
256254

257-
#: shared-bindings/displayio/Bitmap.c
258-
msgid "(x,y): out of range of target bitmap"
259-
msgstr ""
260-
261-
#: shared-bindings/displayio/Bitmap.c
262-
msgid "(x1,y1) or (x2,y2): out of range of source bitmap"
263-
msgstr ""
264-
265255
#: py/compile.c
266256
msgid "*x must be assignment target"
267257
msgstr ""
@@ -332,9 +322,7 @@ msgstr ""
332322
msgid "Already advertising."
333323
msgstr ""
334324

335-
#: shared-module/memorymonitor/AllocationAlarm 2.c
336325
#: shared-module/memorymonitor/AllocationAlarm.c
337-
#: shared-module/memorymonitor/AllocationSize 2.c
338326
#: shared-module/memorymonitor/AllocationSize.c
339327
msgid "Already running"
340328
msgstr ""
@@ -374,7 +362,6 @@ msgstr ""
374362
msgid "At most %d %q may be specified (not %d)"
375363
msgstr ""
376364

377-
#: shared-module/memorymonitor/AllocationAlarm 2.c
378365
#: shared-module/memorymonitor/AllocationAlarm.c
379366
#, c-format
380367
msgid "Attempt to allocate %d blocks"
@@ -456,8 +443,7 @@ msgid "Buffer length %d too big. It must be less than %d"
456443
msgstr ""
457444

458445
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
459-
#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard 2.c
460-
#: shared-module/sdcardio/SDCard.c
446+
#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c
461447
msgid "Buffer length must be a multiple of 512"
462448
msgstr ""
463449

@@ -505,11 +491,6 @@ msgid "Can't set CCCD on local Characteristic"
505491
msgstr ""
506492

507493
#: shared-bindings/displayio/Bitmap.c
508-
msgid "Cannot blit: source palette too large."
509-
msgstr ""
510-
511-
#: shared-bindings/displayio/Bitmap.c
512-
#: shared-bindings/memorymonitor/AllocationSize 2.c
513494
#: shared-bindings/memorymonitor/AllocationSize.c
514495
#: shared-bindings/pulseio/PulseIn.c
515496
msgid "Cannot delete values"
@@ -931,7 +912,7 @@ msgstr ""
931912
msgid "Internal error #%d"
932913
msgstr ""
933914

934-
#: shared-bindings/sdioio/SDCard 2.c shared-bindings/sdioio/SDCard.c
915+
#: shared-bindings/sdioio/SDCard.c
935916
msgid "Invalid %q"
936917
msgstr ""
937918

@@ -1398,7 +1379,6 @@ msgstr ""
13981379
msgid "Random number generation error"
13991380
msgstr ""
14001381

1401-
#: shared-bindings/memorymonitor/AllocationSize 2.c
14021382
#: shared-bindings/memorymonitor/AllocationSize.c
14031383
#: shared-bindings/pulseio/PulseIn.c
14041384
msgid "Read-only"
@@ -1432,7 +1412,7 @@ msgstr ""
14321412
msgid "Running in safe mode! "
14331413
msgstr ""
14341414

1435-
#: shared-module/sdcardio/SDCard 2.c shared-module/sdcardio/SDCard.c
1415+
#: shared-module/sdcardio/SDCard.c
14361416
msgid "SD card CSD format not supported"
14371417
msgstr ""
14381418

@@ -1491,7 +1471,6 @@ msgstr ""
14911471

14921472
#: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c
14931473
#: shared-bindings/displayio/TileGrid.c
1494-
#: shared-bindings/memorymonitor/AllocationSize 2.c
14951474
#: shared-bindings/memorymonitor/AllocationSize.c
14961475
#: shared-bindings/pulseio/PulseIn.c
14971476
msgid "Slices not supported"
@@ -1517,7 +1496,7 @@ msgstr ""
15171496
msgid "Supply at least one UART pin"
15181497
msgstr ""
15191498

1520-
#: shared-bindings/gnss/GNSS 2.c shared-bindings/gnss/GNSS.c
1499+
#: shared-bindings/gnss/GNSS.c
15211500
msgid "System entry must be gnss.SatelliteSystem"
15221501
msgstr ""
15231502

@@ -1821,12 +1800,10 @@ msgstr ""
18211800
msgid "address %08x is not aligned to %d bytes"
18221801
msgstr ""
18231802

1824-
#: shared-bindings/i2cperipheral/I2CPeripheral 2.c
18251803
#: shared-bindings/i2cperipheral/I2CPeripheral.c
18261804
msgid "address out of bounds"
18271805
msgstr ""
18281806

1829-
#: shared-bindings/i2cperipheral/I2CPeripheral 2.c
18301807
#: shared-bindings/i2cperipheral/I2CPeripheral.c
18311808
msgid "addresses is empty"
18321809
msgstr ""
@@ -1989,8 +1966,7 @@ msgstr ""
19891966
msgid "can't assign to expression"
19901967
msgstr ""
19911968

1992-
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral 2.c
1993-
#: shared-bindings/i2cperipheral/I2CPeripheral.c
1969+
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
19941970
#: shared-module/_pixelbuf/PixelBuf.c
19951971
msgid "can't convert %q to %q"
19961972
msgstr ""
@@ -2051,7 +2027,7 @@ msgstr ""
20512027
msgid "can't send non-None value to a just-started generator"
20522028
msgstr ""
20532029

2054-
#: shared-module/sdcardio/SDCard 2.c shared-module/sdcardio/SDCard.c
2030+
#: shared-module/sdcardio/SDCard.c
20552031
msgid "can't set 512 block size"
20562032
msgstr ""
20572033

@@ -2181,7 +2157,7 @@ msgstr ""
21812157
msgid "could not invert Vandermonde matrix"
21822158
msgstr ""
21832159

2184-
#: shared-module/sdcardio/SDCard 2.c shared-module/sdcardio/SDCard.c
2160+
#: shared-module/sdcardio/SDCard.c
21852161
msgid "couldn't determine SD card version"
21862162
msgstr ""
21872163

@@ -2739,7 +2715,7 @@ msgstr ""
27392715
msgid "negative shift count"
27402716
msgstr ""
27412717

2742-
#: shared-module/sdcardio/SDCard 2.c shared-module/sdcardio/SDCard.c
2718+
#: shared-module/sdcardio/SDCard.c
27432719
msgid "no SD card"
27442720
msgstr ""
27452721

@@ -2764,7 +2740,7 @@ msgstr ""
27642740
msgid "no reset pin available"
27652741
msgstr ""
27662742

2767-
#: shared-module/sdcardio/SDCard 2.c shared-module/sdcardio/SDCard.c
2743+
#: shared-module/sdcardio/SDCard.c
27682744
msgid "no response from SD card"
27692745
msgstr ""
27702746

@@ -2899,6 +2875,14 @@ msgstr ""
28992875
msgid "ord() expected a character, but string of length %d found"
29002876
msgstr ""
29012877

2878+
#: shared-bindings/displayio/Bitmap.c
2879+
msgid "out of range of source"
2880+
msgstr ""
2881+
2882+
#: shared-bindings/displayio/Bitmap.c
2883+
msgid "out of range of target"
2884+
msgstr ""
2885+
29022886
#: py/objint_mpz.c
29032887
msgid "overflow converting long int to machine word"
29042888
msgstr ""
@@ -3076,6 +3060,10 @@ msgstr ""
30763060
msgid "sosfilt requires iterable arguments"
30773061
msgstr ""
30783062

3063+
#: shared-bindings/displayio/Bitmap.c
3064+
msgid "source palette too large"
3065+
msgstr ""
3066+
30793067
#: py/objstr.c
30803068
msgid "start/end indices"
30813069
msgstr ""
@@ -3152,11 +3140,11 @@ msgstr ""
31523140
msgid "timeout must be >= 0.0"
31533141
msgstr ""
31543142

3155-
#: shared-module/sdcardio/SDCard 2.c shared-module/sdcardio/SDCard.c
3143+
#: shared-module/sdcardio/SDCard.c
31563144
msgid "timeout waiting for v1 card"
31573145
msgstr ""
31583146

3159-
#: shared-module/sdcardio/SDCard 2.c shared-module/sdcardio/SDCard.c
3147+
#: shared-module/sdcardio/SDCard.c
31603148
msgid "timeout waiting for v2 card"
31613149
msgstr ""
31623150

shared-bindings/displayio/Bitmap.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,16 @@ STATIC mp_obj_t bitmap_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t val
177177
//| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location.
178178
//|
179179
//| :param int x: Horizontal pixel location in bitmap where source_bitmap upper-left
180-
//| corner will be placed
180+
//| corner will be placed
181181
//| :param int y: Vertical pixel location in bitmap where source_bitmap upper-left
182-
//| corner will be placed
182+
//| corner will be placed
183183
//| :param bitmap source_bitmap: Source bitmap that contains the graphical region to be copied
184184
//| :param int x1: Minimum x-value for rectangular bounding box to be copied from the source bitmap
185185
//| :param int y1: Minimum y-value for rectangular bounding box to be copied from the source bitmap
186186
//| :param int x2: Maximum x-value (exclusive) for rectangular bounding box to be copied from the source bitmap
187187
//| :param int y2: Maximum y-value (exclusive) for rectangular bounding box to be copied from the source bitmap
188188
//| :param int skip_index: bitmap palette index in the source that will not be copied,
189-
//| set to None to copy all pixels"""
189+
//| set to None to copy all pixels"""
190190
//| ...
191191
//|
192192
STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args){
@@ -213,7 +213,7 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg
213213

214214
// ensure that the target bitmap (self) has at least as many `bits_per_value` as the source
215215
if (self->bits_per_value < source->bits_per_value) {
216-
mp_raise_ValueError(translate("Cannot blit: source palette too large."));
216+
mp_raise_ValueError(translate("source palette too large"));
217217
}
218218

219219
int16_t x1 = args[ARG_x1].u_int;
@@ -234,14 +234,14 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg
234234

235235
// Check x,y are within self (target) bitmap boundary
236236
if ( (x < 0) || (y < 0) || (x > self->width) || (y > self->height) ) {
237-
mp_raise_ValueError(translate("(x,y): out of range of target bitmap"));
237+
mp_raise_ValueError(translate("out of range of target"));
238238
}
239239
// Check x1,y1,x2,y2 are within source bitmap boundary
240240
if ( (x1 < 0) || (x1 > source->width) ||
241241
(y1 < 0) || (y1 > source->height) ||
242242
(x2 < 0) || (x2 > source->width) ||
243243
(y2 < 0) || (y2 > source->height) ) {
244-
mp_raise_ValueError(translate("(x1,y1) or (x2,y2): out of range of source bitmap"));
244+
mp_raise_ValueError(translate("out of range of source"));
245245
}
246246

247247
// Ensure x1 < x2 and y1 < y2

0 commit comments

Comments
 (0)