From 47111d6da444a8370e14ff62a7f6b9ee396c1a24 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 13 May 2021 08:36:08 +0300 Subject: Lang: Added Polish UI translation IssueID #192 --- res/lang/pl.bin | Bin 0 -> 21985 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 res/lang/pl.bin (limited to 'res/lang/pl.bin') diff --git a/res/lang/pl.bin b/res/lang/pl.bin new file mode 100644 index 00000000..7af11355 Binary files /dev/null and b/res/lang/pl.bin differ -- cgit v1.2.3 From eabae64f99804c1c7521ca55d3eb883e7880df4f Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 14 May 2021 12:07:23 +0300 Subject: Show "Line break" help text in input dialog --- po/en.po | 3 +++ res/lang/de.bin | Bin 20274 -> 20305 bytes res/lang/en.bin | Bin 19023 -> 19054 bytes res/lang/es.bin | Bin 20990 -> 21021 bytes res/lang/fi.bin | Bin 20964 -> 20995 bytes res/lang/fr.bin | Bin 21480 -> 21511 bytes res/lang/ia.bin | Bin 21181 -> 21212 bytes res/lang/ie.bin | Bin 20352 -> 20383 bytes res/lang/pl.bin | Bin 21985 -> 22016 bytes res/lang/ru.bin | Bin 32063 -> 32094 bytes res/lang/sr.bin | Bin 30642 -> 30673 bytes res/lang/tok.bin | Bin 19386 -> 19417 bytes res/lang/zh_Hans.bin | Bin 18145 -> 18176 bytes res/lang/zh_Hant.bin | Bin 18219 -> 18250 bytes src/defs.h | 10 ++++++++++ src/ui/documentwidget.c | 9 ++++++++- src/ui/util.c | 17 ++++++++++++----- 17 files changed, 33 insertions(+), 6 deletions(-) (limited to 'res/lang/pl.bin') diff --git a/po/en.po b/po/en.po index efd06360..60beade4 100644 --- a/po/en.po +++ b/po/en.po @@ -640,6 +640,9 @@ msgstr "Copy Fingerprint" msgid "dlg.input.prompt" msgstr "Please enter input for %s:" +msgid "dlg.input.linebreak" +msgstr "Line break" + msgid "dlg.input.send" msgstr "Send" diff --git a/res/lang/de.bin b/res/lang/de.bin index 40b255c3..45c01abd 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 0f13b945..0a9a3c0f 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index bbaf5c21..0d3e80c7 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 385e0162..00039ebd 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 6a9e8e85..139f8e51 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index 43306c8e..e7607899 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 6ef9d35e..79b517df 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 7af11355..e208f3ba 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index b771cebd..4e775c94 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index e52abbb8..19408d1a 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index d4d08ea9..2d8017cb 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index c7cd1d10..171bd2a8 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index b4cc3bf1..6518c7bf 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/defs.h b/src/defs.h index cc485ed1..35e687e4 100644 --- a/src/defs.h +++ b/src/defs.h @@ -90,6 +90,16 @@ enum iFileVersion { #define globe_Icon "\U0001f310" #define magnifyingGlass_Icon "\U0001f50d" #define midEllipsis_Icon "\u00b7\u00b7\u00b7" +#define return_Icon "\u21a9" + +#if defined (iPlatformApple) +# define shift_Icon "\u21e7" +# define shiftReturn_Icon shift_Icon return_Icon +#else +# define shift_Icon "Shift" +# define shiftReturn_Icon shift_Icon " " return_Icon +#endif + /* UI labels that depend on the platform */ diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index a467df10..d2a97371 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -1615,7 +1615,14 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) { : cstr_String(&resp->meta), uiTextCaution_ColorEscape "${dlg.input.send}", format_CStr("!document.input.submit doc:%p", d)); - setId_Widget(addChildPosFlags_Widget(findChild_Widget(dlg, "dialogbuttons"), + iWidget *buttons = findChild_Widget(dlg, "dialogbuttons"); + iLabelWidget *lineBreak = + insertChildAfter_Widget(buttons, iClob(new_LabelWidget("${dlg.input.linebreak}" + uiTextAction_ColorEscape + " " shiftReturn_Icon, + NULL)), 0); + setTextColor_LabelWidget(lineBreak, uiTextDim_ColorId); + setId_Widget(addChildPosFlags_Widget(buttons, iClob(new_LabelWidget("", NULL)), front_WidgetAddPos, frameless_WidgetFlag), "valueinput.counter"); diff --git a/src/ui/util.c b/src/ui/util.c index 7156b445..93afeb4a 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -80,7 +80,7 @@ void toString_Sym(int key, int kmods, iString *str) { appendChar_String(str, 0x2325); } if (kmods & KMOD_SHIFT) { - appendChar_String(str, 0x21e7); + appendCStr_String(str, shift_Icon); } if (kmods & KMOD_GUI) { appendChar_String(str, 0x2318); @@ -93,7 +93,7 @@ void toString_Sym(int key, int kmods, iString *str) { appendCStr_String(str, "Alt+"); } if (kmods & KMOD_SHIFT) { - appendCStr_String(str, "Shift+"); + appendCStr_String(str, shift_Icon "+"); } if (kmods & KMOD_GUI) { appendCStr_String(str, "Meta+"); @@ -138,7 +138,7 @@ void toString_Sym(int key, int kmods, iString *str) { } else if (key == SDLK_RETURN) { removePlus_(str); - appendChar_String(str, 0x21a9); /* Leftwards arrow with a hook */ + appendCStr_String(str, return_Icon); /* Leftwards arrow with a hook */ } else { appendCStr_String(str, SDL_GetKeyName(key)); @@ -904,7 +904,7 @@ static iBool isTabPage_Widget_(const iWidget *tabs, const iWidget *page) { static void unfocusFocusInsideTabPage_(const iWidget *page) { iWidget *focus = focus_Widget(); if (page && focus && hasParent_Widget(focus, page)) { - printf("unfocus inside page: %p\n", focus); +// printf("unfocus inside page: %p\n", focus); setFocus_Widget(NULL); } } @@ -1806,7 +1806,8 @@ static void updateValueInputWidth_(iWidget *dlg) { dlg->rect.size.x = rootSize.x; } else { - dlg->rect.size.x = iMaxi(iMaxi(rootSize.x / 2, title->rect.size.x), prompt->rect.size.x); + dlg->rect.size.x = + iMaxi(iMaxi(iMin(rootSize.x, 100 * gap_UI), title->rect.size.x), prompt->rect.size.x); } } @@ -1880,6 +1881,12 @@ iWidget *makeDialogButtons_Widget(const iMenuItem *actions, size_t numActions) { if (*label == '*' || *label == '&') { continue; /* Special value selection items for a Question dialog. */ } + if (startsWith_CStr(label, "```")) { + /* Annotation. */ + iLabelWidget *annotation = addChild_Widget(div, iClob(new_LabelWidget(label + 3, NULL))); + setTextColor_LabelWidget(annotation, uiTextAction_ColorId); + continue; + } if (!iCmpStr(label, "---")) { /* Separator.*/ addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); -- cgit v1.2.3