Skip to content

Update built-in help output for localization (Issue #3907) #3911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
8 changes: 8 additions & 0 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ msgstr ""
msgid " File \"%q\", line %d"
msgstr ""

#: py/builtinhelp.c
msgid " is of type %q\n"
msgstr ""

#: main.c
msgid " output:\n"
msgstr ""
Expand Down Expand Up @@ -3292,6 +3296,10 @@ msgstr ""
msgid "number of points must be at least 2"
msgstr ""

#: py/builtinhelp.c
msgid "object "
msgstr ""

#: py/obj.c
msgid "object '%q' is not a tuple or list"
msgstr ""
Expand Down
2 changes: 2 additions & 0 deletions ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ LONGINT_IMPL = NONE
CIRCUITPY_FULL_BUILD = 0

SUPEROPT_GC = 0
SUPEROPT_VM = 0
CFLAGS_INLINE_LIMIT = 40
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ LONGINT_IMPL = NONE
CIRCUITPY_FULL_BUILD = 0

SUPEROPT_GC = 0
SUPEROPT_VM = 0
1 change: 1 addition & 0 deletions ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ endif
ifeq ($(TRANSLATION), de_DE)
RELEASE_NEEDS_CLEAN_BUILD = 1
CFLAGS_INLINE_LIMIT = 35
SUPEROPT_VM = 0
endif
13 changes: 11 additions & 2 deletions py/builtinhelp.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,18 @@ STATIC void mp_help_print_obj(const mp_obj_t obj) {
mp_obj_type_t *type = mp_obj_get_type(obj);

// try to print something sensible about the given object
mp_print_str(MP_PYTHON_PRINTER, "object ");
const compressed_string_t* compressed = translate("object ");
char decompressed_object[decompress_length(compressed)];
decompress(compressed, decompressed_object);

mp_print_str(MP_PYTHON_PRINTER, decompressed_object);
mp_obj_print(obj, PRINT_STR);
mp_printf(MP_PYTHON_PRINTER, " is of type %q\n", type->name);

compressed = translate(" is of type %q\n");
char decompressed_typestring[decompress_length(compressed)];
decompress(compressed, decompressed_typestring);

mp_printf(MP_PYTHON_PRINTER, decompressed_typestring, type->name);

mp_map_t *map = NULL;
if (type == &mp_type_module) {
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy