From 0336bc677685ad3c7765f6bb46d1b7e3d66935de Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 3 May 2021 06:25:52 +0300 Subject: Lang: Added new and missing strings IssueID #192 --- po/en.po | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ res/lang/de.bin | Bin 18855 -> 19776 bytes res/lang/en.bin | Bin 17343 -> 18264 bytes res/lang/es.bin | Bin 19434 -> 20355 bytes res/lang/fi.bin | Bin 19137 -> 20058 bytes res/lang/fr.bin | Bin 19888 -> 20809 bytes res/lang/ia.bin | Bin 19326 -> 20247 bytes res/lang/ie.bin | Bin 18558 -> 19479 bytes res/lang/ru.bin | Bin 29046 -> 29967 bytes res/lang/sr.bin | Bin 27541 -> 28462 bytes res/lang/zh_Hans.bin | Bin 16733 -> 17654 bytes res/lang/zh_Hant.bin | Bin 16807 -> 17728 bytes src/app.c | 15 +++++------ src/gempub.c | 26 +++++++++---------- src/ui/documentwidget.c | 2 +- src/ui/root.c | 16 ++++++------ 16 files changed, 94 insertions(+), 31 deletions(-) diff --git a/po/en.po b/po/en.po index 6644d591..c2d9f413 100644 --- a/po/en.po +++ b/po/en.po @@ -152,6 +152,18 @@ msgstr "Close Tabs To Right" msgid "menu.duptab" msgstr "Duplicate Tab" +msgid "menu.split.merge" +msgstr "Merge Tabs" + +msgid "menu.split.swap" +msgstr "Swap Sides" + +msgid "menu.split.horizontal" +msgstr "Horizontal" + +msgid "menu.split.vertical" +msgstr "Vertical" + msgid "menu.openlocation" msgstr "Open Location…" @@ -630,6 +642,9 @@ msgstr "The page contents are still being downloaded." msgid "dlg.save.size" msgstr "Size:" +msgid "dlg.save.opendownload" +msgstr "Open Downloaded File" + msgid "heading.save.error" msgstr "ERROR SAVING FILE" @@ -911,6 +926,21 @@ msgstr "Country:" msgid "dlg.newident.create" msgstr "Create Identity" +msgid "heading.newident.missing" +msgstr "MISSING INFO" + +msgid "dlg.newindent.missing.commonname" +msgstr "A \"Common name\" must be specified." + +msgid "heading.newident.date.bad" +msgstr "INVALID DATE" + +msgid "dlg.newident.date.past" +msgstr "Expiration date must be in the future." + +msgid "dlg.newident.date.example" +msgstr "Please check the \"Valid until\" date. Examples:\n• 2030\n• 2025-06-30\n• 2021-12-31 23:59:59" + msgid "heading.feedcfg" msgstr "FEED SETTINGS" @@ -1415,3 +1445,39 @@ msgstr "Invalid Certificate" msgid "error.cert.invalid.msg" msgstr "The provided client certificate is expired or invalid." + +msgid "gempub.cover.viewlocal" +msgstr "This Gempub book can be viewed after it has been saved locally." + +msgid "gempub.cover.untitled" +msgstr "Untitled Book" + +msgid "gempub.cover.aboutbook" +msgstr "About this book" + +msgid "gempub.cover.view" +msgstr "View Gempub contents" + +msgid "gempub.cover.image" +msgstr "Cover image" + +msgid "gempub.meta.author" +msgstr "Author" + +msgid "gempub.meta.version" +msgstr "Version" + +msgid "gempub.meta.revdate" +msgstr "Revision date" + +msgid "gempub.meta.pub" +msgstr "Published" + +msgid "gempub.meta.pubdate" +msgstr "Publish date" + +msgid "gempub.meta.lang" +msgstr "Language" + +msgid "gempub.meta.license" +msgstr "License" \ No newline at end of file diff --git a/res/lang/de.bin b/res/lang/de.bin index 84482e24..ff0018b7 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 e9a2b78d..83164f2e 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 90fd5c56..0b0a96c3 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 b9d36a25..cd40873b 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 d356cb9a..04a72088 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 b79f60c7..4ec00896 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 32f58e81..dcef1187 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 5b7740e2..572b7d1f 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 3049e072..e73caafb 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index c01c8d4b..d445954f 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 57529199..812f97da 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index 52b004e2..3c1dd025 100644 --- a/src/app.c +++ b/src/app.c @@ -1591,8 +1591,8 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { const iString *country = text_InputWidget (findChild_Widget(dlg, "ident.country")); const iBool isTemp = isSelected_Widget(findChild_Widget(dlg, "ident.temp")); if (isEmpty_String(commonName)) { - makeSimpleMessage_Widget(orange_ColorEscape "MISSING INFO", - "A \"Common name\" must be specified."); + makeSimpleMessage_Widget(orange_ColorEscape "${heading.newident.missing}", + "${dlg.newindent.missing.commonname}"); return iTrue; } iDate until; @@ -1606,11 +1606,8 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { "%04u-%u-%u %u:%u:%u", &val[0], &val[1], &val[2], &val[3], &val[4], &val[5]); if (n <= 0) { - makeSimpleMessage_Widget(orange_ColorEscape "INVALID DATE", - "Please check the \"Valid until\" date. Examples:\n" - "\u2022 2030\n" - "\u2022 2025-06-30\n" - "\u2022 2021-12-31 23:59:59"); + makeSimpleMessage_Widget(orange_ColorEscape "${heading.newident.date.bad}", + "${dlg.newident.date.example}"); return iTrue; } until.year = val[0]; @@ -1625,8 +1622,8 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { initCurrent_Time(&now); init_Time(&t, &until); if (cmp_Time(&t, &now) <= 0) { - makeSimpleMessage_Widget(orange_ColorEscape "INVALID DATE", - "Expiration date must be in the future."); + makeSimpleMessage_Widget(orange_ColorEscape "${heading.newident.date.bad}", + "${dlg.newident.date.past}"); return iTrue; } } diff --git a/src/gempub.c b/src/gempub.c index 448349c8..c9b1c242 100644 --- a/src/gempub.c +++ b/src/gempub.c @@ -79,7 +79,7 @@ static iBool parseMetadata_Gempub_(iGempub *d) { "cover:", }; /* Default values. */ - setCStr_String(&d->props[title_GempubProperty], "Untitled Book"); + setCStr_String(&d->props[title_GempubProperty], "${gempub.cover.untitled}"); setCStr_String(&d->props[cover_GempubProperty], entryCStr_Archive(d->arch, "cover.jpg") ? "cover.jpg" : entryCStr_Archive(d->arch, "cover.png") ? "cover.png" : ""); @@ -173,38 +173,38 @@ iString *coverPageSource_Gempub(const iGempub *d) { appendFormat_String(out, "%s\n", cstr_String(&d->props[description_GempubProperty])); } appendCStr_String(out, "\n"); - appendProperty_Gempub_(d, "Author:", author_GempubProperty, out); + appendProperty_Gempub_(d, "${gempub.meta.author}:", author_GempubProperty, out); if (!isRemote_Gempub_(d)) { - appendFormat_String(out, "\n=> %s " book_Icon " View Gempub contents\n", + appendFormat_String(out, "\n=> %s " book_Icon " ${gempub.cover.view}\n", cstrCollect_String(concat_Path(baseUrl, &d->props[index_GempubProperty]))); if (hasProperty_Gempub_(d, cover_GempubProperty)) { - appendFormat_String(out, "\n=> %s Cover image\n", + appendFormat_String(out, "\n=> %s ${gempub.cover.image}\n", cstrCollect_String(concat_Path(baseUrl, &d->props[cover_GempubProperty]))); } } else { iString *key = collectNew_String(); /* TODO: add a helper for this */ toString_Sym(SDLK_s, KMOD_PRIMARY, key); - appendCStr_String(out, "\nThis Gempub book can be viewed after it has been saved locally. "); + appendCStr_String(out, "\n${gempub.cover.viewlocal} "); appendFormat_String(out, cstr_Lang("error.unsupported.suggestsave"), cstr_String(key), saveToDownloads_Label); - translate_Lang(out); appendCStr_String(out, "\n"); } - appendCStr_String(out, "\n## About this book\n"); - appendProperty_Gempub_(d, "Version:", version_GempubProperty, out); - appendProperty_Gempub_(d, "Revision date:", revisionDate_GempubProperty, out); + appendCStr_String(out, "\n## ${gempub.cover.aboutbook}\n"); + appendProperty_Gempub_(d, "${gempub.meta.version}:", version_GempubProperty, out); + appendProperty_Gempub_(d, "${gempub.meta.revdate}:", revisionDate_GempubProperty, out); if (hasProperty_Gempub_(d, publishDate_GempubProperty)) { - appendProperty_Gempub_(d, "Publish date:", publishDate_GempubProperty, out); + appendProperty_Gempub_(d, "${gempub.meta.pubdate}:", publishDate_GempubProperty, out); } else { - appendProperty_Gempub_(d, "Published:", published_GempubProperty, out); + appendProperty_Gempub_(d, "${gempub.meta.pub}:", published_GempubProperty, out); } - appendProperty_Gempub_(d, "Language:", language_GempubProperty, out); - appendProperty_Gempub_(d, "License:", license_GempubProperty, out); + appendProperty_Gempub_(d, "${gempub.meta.lang}:", language_GempubProperty, out); + appendProperty_Gempub_(d, "${gempub.meta.license}:", license_GempubProperty, out); appendProperty_Gempub_(d, "\u00a9", copyright_GempubProperty, out); + translate_Lang(out); return out; } diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 290bf95e..4158b719 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -1762,7 +1762,7 @@ static void saveToDownloads_(const iString *url, const iString *mime, const iBlo exportDownloadedFile_iOS(savePath); #else const iMenuItem items[2] = { - { "Open Downloaded File", 0, 0, + { "${dlg.save.opendownload}", 0, 0, format_CStr("!open url:%s", cstrCollect_String(makeFileUrl_String(savePath))) }, { "${dlg.message.ok}", 0, 0, "message.ok" }, }; diff --git a/src/ui/root.c b/src/ui/root.c index d660c468..17682125 100644 --- a/src/ui/root.c +++ b/src/ui/root.c @@ -1252,16 +1252,16 @@ void createUserInterface_Root(iRoot *d) { }, 4); iWidget *splitMenu = makeMenu_Widget(root, (iMenuItem[]){ - { "Merge Tabs", '1', 0, "ui.split arg:0" }, - { "Swap Sides", SDLK_x, 0, "ui.split swap:1" }, + { "${menu.split.merge}", '1', 0, "ui.split arg:0" }, + { "${menu.split.swap}", SDLK_x, 0, "ui.split swap:1" }, { "---", 0, 0, NULL }, - { "Horizontal", '2', 0, "ui.split arg:3 axis:0" }, - { "Horizontal 1:2", SDLK_d, 0, "ui.split arg:1 axis:0" }, - { "Horizontal 2:1", SDLK_e, 0, "ui.split arg:2 axis:0" }, + { "${menu.split.horizontal}", '2', 0, "ui.split arg:3 axis:0" }, + { "${menu.split.horizontal} 1:2", SDLK_d, 0, "ui.split arg:1 axis:0" }, + { "${menu.split.horizontal} 2:1", SDLK_e, 0, "ui.split arg:2 axis:0" }, { "---", 0, 0, NULL }, - { "Vertical", '3', 0, "ui.split arg:3 axis:1" }, - { "Vertical 1:2", SDLK_f, 0, "ui.split arg:1 axis:1" }, - { "Vertical 2:1", SDLK_r, 0, "ui.split arg:2 axis:1" }, + { "${menu.split.vertical}", '3', 0, "ui.split arg:3 axis:1" }, + { "${menu.split.vertical} 1:2", SDLK_f, 0, "ui.split arg:1 axis:1" }, + { "${menu.split.vertical} 2:1", SDLK_r, 0, "ui.split arg:2 axis:1" }, }, 10); setFlags_Widget(splitMenu, disabledWhenHidden_WidgetFlag, iTrue); /* enabled when open */ setId_Widget(tabsMenu, "doctabs.menu"); -- cgit v1.2.3