diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-08-01 14:06:59 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-08-01 14:06:59 +0300 |
commit | 395cb3a996482c9e9fc27e00b4259219f85ec663 (patch) | |
tree | 13a692988709a625f12f1ec2b588ca20a9bb6ac7 | |
parent | 93c6969e922ee9d34a0c5b653b3940dbad94ed25 (diff) |
Translations for hardcoded English strings
IssueID #276
-rw-r--r-- | po/en.po | 44 | ||||
-rw-r--r-- | res/lang/de.bin | bin | 22653 -> 23761 bytes | |||
-rw-r--r-- | res/lang/en.bin | bin | 21161 -> 22362 bytes | |||
-rw-r--r-- | res/lang/es.bin | bin | 23780 -> 24888 bytes | |||
-rw-r--r-- | res/lang/fi.bin | bin | 23771 -> 24879 bytes | |||
-rw-r--r-- | res/lang/fr.bin | bin | 24076 -> 25184 bytes | |||
-rw-r--r-- | res/lang/ia.bin | bin | 23381 -> 24489 bytes | |||
-rw-r--r-- | res/lang/ie.bin | bin | 23025 -> 24133 bytes | |||
-rw-r--r-- | res/lang/pl.bin | bin | 24314 -> 25422 bytes | |||
-rw-r--r-- | res/lang/ru.bin | bin | 35242 -> 36350 bytes | |||
-rw-r--r-- | res/lang/sr.bin | bin | 34870 -> 35978 bytes | |||
-rw-r--r-- | res/lang/tok.bin | bin | 21594 -> 22702 bytes | |||
-rw-r--r-- | res/lang/zh_Hans.bin | bin | 20333 -> 21441 bytes | |||
-rw-r--r-- | res/lang/zh_Hant.bin | bin | 20518 -> 21626 bytes | |||
-rw-r--r-- | src/bookmarks.c | 34 | ||||
-rw-r--r-- | src/gmrequest.c | 9 | ||||
-rw-r--r-- | src/mimehooks.c | 5 | ||||
-rw-r--r-- | src/ui/documentwidget.c | 9 |
18 files changed, 69 insertions, 32 deletions
@@ -12,6 +12,12 @@ msgstr "%s is a compressed archive." | |||
12 | msgid "doc.archive.view" | 12 | msgid "doc.archive.view" |
13 | msgstr "View archive contents" | 13 | msgstr "View archive contents" |
14 | 14 | ||
15 | msgid "media.untitled.image" | ||
16 | msgstr "Image" | ||
17 | |||
18 | msgid "media.untitled.audio" | ||
19 | msgstr "Audio" | ||
20 | |||
15 | # Inline download status message. | 21 | # Inline download status message. |
16 | msgid "media.download.warnclose" | 22 | msgid "media.download.warnclose" |
17 | msgstr "Download will be cancelled if this tab is closed." | 23 | msgstr "Download will be cancelled if this tab is closed." |
@@ -468,6 +474,9 @@ msgstr "Mark All as Read" | |||
468 | msgid "feeds.refresh" | 474 | msgid "feeds.refresh" |
469 | msgstr "Refresh Feeds" | 475 | msgstr "Refresh Feeds" |
470 | 476 | ||
477 | msgid "feeds.atom.translated" | ||
478 | msgstr "This Atom XML document has been automatically translated to a Gemini feed to allow subscribing to it." | ||
479 | |||
471 | msgid "menu.opentab" | 480 | msgid "menu.opentab" |
472 | msgstr "Open in New Tab" | 481 | msgstr "Open in New Tab" |
473 | 482 | ||
@@ -837,6 +846,41 @@ msgstr "View Image" | |||
837 | msgid "bookmark.title.blank" | 846 | msgid "bookmark.title.blank" |
838 | msgstr "Blank Page" | 847 | msgstr "Blank Page" |
839 | 848 | ||
849 | msgid "bookmark.export.title.folder" | ||
850 | msgstr "Bookmarks" | ||
851 | |||
852 | msgid "bookmark.export.title.tag" | ||
853 | msgstr "Bookmark tags" | ||
854 | |||
855 | msgid "bookmark.export.title.time" | ||
856 | msgstr "Created bookmarks" | ||
857 | |||
858 | msgid "bookmark.export.count" | ||
859 | msgid_plural "bookmark.export.count.n" | ||
860 | msgstr[0] "You have %d bookmark." | ||
861 | msgstr[1] "You have %d bookmarks." | ||
862 | |||
863 | msgid "bookmark.export.saving" | ||
864 | msgstr "Save this page to export them, or you can copy them to the clipboard." | ||
865 | |||
866 | msgid "bookmark.export.taginfo" | ||
867 | msgstr "In this list each heading represents a bookmark tag. Only tagged bookmarks are listed. Bookmarks with multiple tags are repeated under each tag." | ||
868 | |||
869 | msgid "bookmark.export.format.sub" | ||
870 | msgstr "This page is formatted according to the \"Subscribing to Gemini pages\" companion specification." | ||
871 | |||
872 | msgid "bookmark.export.format.linklines" | ||
873 | msgstr "Each link represents a bookmark." | ||
874 | |||
875 | msgid "bookmark.export.format.otherlines" | ||
876 | msgstr "Bullet lines and quotes are reserved for additional information about the preceding bookmark. Text lines and preformatted text are considered comments and should be ignored." | ||
877 | |||
878 | msgid "bookmark.export.format.folders" | ||
879 | msgstr "Folder structure is defined by level 2/3 headings." | ||
880 | |||
881 | msgid "bookmark.export.format.tags" | ||
882 | msgstr "Tags are defined by level 2 headings." | ||
883 | |||
840 | # Interpret as "Results from bookmarks..." | 884 | # Interpret as "Results from bookmarks..." |
841 | msgid "heading.lookup.bookmarks" | 885 | msgid "heading.lookup.bookmarks" |
842 | msgstr "BOOKMARKS" | 886 | msgstr "BOOKMARKS" |
diff --git a/res/lang/de.bin b/res/lang/de.bin index ab7b90e2..bac3d41b 100644 --- a/res/lang/de.bin +++ b/res/lang/de.bin | |||
Binary files differ | |||
diff --git a/res/lang/en.bin b/res/lang/en.bin index ae50e06a..d2f19cef 100644 --- a/res/lang/en.bin +++ b/res/lang/en.bin | |||
Binary files differ | |||
diff --git a/res/lang/es.bin b/res/lang/es.bin index e0a17671..8462461d 100644 --- a/res/lang/es.bin +++ b/res/lang/es.bin | |||
Binary files differ | |||
diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 9ca9838a..7b7b6c28 100644 --- a/res/lang/fi.bin +++ b/res/lang/fi.bin | |||
Binary files differ | |||
diff --git a/res/lang/fr.bin b/res/lang/fr.bin index b27c62fb..9c3024f8 100644 --- a/res/lang/fr.bin +++ b/res/lang/fr.bin | |||
Binary files differ | |||
diff --git a/res/lang/ia.bin b/res/lang/ia.bin index fe067931..4b82125e 100644 --- a/res/lang/ia.bin +++ b/res/lang/ia.bin | |||
Binary files differ | |||
diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 39ee9776..97c02a90 100644 --- a/res/lang/ie.bin +++ b/res/lang/ie.bin | |||
Binary files differ | |||
diff --git a/res/lang/pl.bin b/res/lang/pl.bin index a1fe6e16..f905414b 100644 --- a/res/lang/pl.bin +++ b/res/lang/pl.bin | |||
Binary files differ | |||
diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 0425df1e..176fa4fe 100644 --- a/res/lang/ru.bin +++ b/res/lang/ru.bin | |||
Binary files differ | |||
diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 32dce6c8..4a299323 100644 --- a/res/lang/sr.bin +++ b/res/lang/sr.bin | |||
Binary files differ | |||
diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 22a2418e..4cd4212d 100644 --- a/res/lang/tok.bin +++ b/res/lang/tok.bin | |||
Binary files differ | |||
diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 279a5503..49decd2d 100644 --- a/res/lang/zh_Hans.bin +++ b/res/lang/zh_Hans.bin | |||
Binary files differ | |||
diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index 82cdb583..10a8e86c 100644 --- a/res/lang/zh_Hant.bin +++ b/res/lang/zh_Hant.bin | |||
Binary files differ | |||
diff --git a/src/bookmarks.c b/src/bookmarks.c index 65cc7982..c27efbfe 100644 --- a/src/bookmarks.c +++ b/src/bookmarks.c | |||
@@ -325,22 +325,18 @@ const iString *bookmarkListPage_Bookmarks(const iBookmarks *d, enum iBookmarkLis | |||
325 | iString *str = collectNew_String(); | 325 | iString *str = collectNew_String(); |
326 | lock_Mutex(d->mtx); | 326 | lock_Mutex(d->mtx); |
327 | format_String(str, | 327 | format_String(str, |
328 | "# %s\n\n", | 328 | "# ${bookmark.export.title.%s}\n\n", |
329 | listType == listByFolder_BookmarkListType ? "Bookmarks" | 329 | listType == listByFolder_BookmarkListType ? "folder" |
330 | : listType == listByTag_BookmarkListType ? "Bookmark tags" | 330 | : listType == listByTag_BookmarkListType ? "tag" |
331 | : "Created bookmarks"); | 331 | : "time"); |
332 | if (listType == listByFolder_BookmarkListType) { | 332 | if (listType == listByFolder_BookmarkListType) { |
333 | appendFormat_String(str, | 333 | appendFormat_String(str, |
334 | "You have %d bookmark%s.\n\n" | 334 | "%s\n\n" |
335 | "Save this page to export them, or you can copy them to " | 335 | "${bookmark.export.saving}\n\n", |
336 | "the clipboard.\n\n", | 336 | formatCStrs_Lang("bookmark.export.count.n", size_Hash(&d->bookmarks))); |
337 | size_Hash(&d->bookmarks), | ||
338 | size_Hash(&d->bookmarks) != 1 ? "s" : ""); | ||
339 | } | 337 | } |
340 | else if (listType == listByTag_BookmarkListType) { | 338 | else if (listType == listByTag_BookmarkListType) { |
341 | appendFormat_String(str, "In this list each heading represents a bookmark tag. " | 339 | appendFormat_String(str, "${bookmark.export.taginfo}\n\n"); |
342 | "Only tagged bookmarks are listed. " | ||
343 | "Bookmarks with multiple tags are repeated under each tag.\n\n"); | ||
344 | } | 340 | } |
345 | iStringSet *tags = new_StringSet(); | 341 | iStringSet *tags = new_StringSet(); |
346 | const iPtrArray *bmList = list_Bookmarks(d, | 342 | const iPtrArray *bmList = list_Bookmarks(d, |
@@ -393,22 +389,20 @@ const iString *bookmarkListPage_Bookmarks(const iBookmarks *d, enum iBookmarkLis | |||
393 | iRelease(tags); | 389 | iRelease(tags); |
394 | unlock_Mutex(d->mtx); | 390 | unlock_Mutex(d->mtx); |
395 | if (listType == listByCreationTime_BookmarkListType) { | 391 | if (listType == listByCreationTime_BookmarkListType) { |
396 | appendCStr_String(str, "\nThis page is formatted according to the " | 392 | appendCStr_String(str, "\n${bookmark.export.format.sub}\n"); |
397 | "\"Subscribing to Gemini pages\" companion specification.\n"); | ||
398 | } | 393 | } |
399 | else { | 394 | else { |
400 | appendFormat_String(str, | 395 | appendFormat_String(str, |
401 | "\nEach link represents a bookmark. " | 396 | "\n${bookmark.export.format.linklines} " |
402 | "%s" | 397 | "%s" |
403 | "Bullet lines and quotes are reserved for additional information about " | 398 | "${bookmark.export.format.otherlines}\n", |
404 | "the preceding bookmark. Text lines and preformatted text are considered " | ||
405 | "comments and should be ignored.\n", | ||
406 | listType == listByFolder_BookmarkListType | 399 | listType == listByFolder_BookmarkListType |
407 | ? "Folder structure is defined by level 2/3 headings. " | 400 | ? "${bookmark.export.format.folders} " |
408 | : listType == listByTag_BookmarkListType | 401 | : listType == listByTag_BookmarkListType |
409 | ? "Tags are defined by level 2 headings. " | 402 | ? "${bookmark.export.format.tags} " |
410 | : ""); | 403 | : ""); |
411 | } | 404 | } |
405 | translate_Lang(str); | ||
412 | return str; | 406 | return str; |
413 | } | 407 | } |
414 | 408 | ||
diff --git a/src/gmrequest.c b/src/gmrequest.c index 1d2790cc..00a02983 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -985,9 +985,12 @@ iBool isFinished_GmRequest(const iGmRequest *d) { | |||
985 | } | 985 | } |
986 | 986 | ||
987 | enum iGmStatusCode status_GmRequest(const iGmRequest *d) { | 987 | enum iGmStatusCode status_GmRequest(const iGmRequest *d) { |
988 | enum iGmStatusCode code; | 988 | if (d) { |
989 | iGuardMutex(d->mtx, code = d->resp->statusCode); | 989 | enum iGmStatusCode code; |
990 | return code; | 990 | iGuardMutex(d->mtx, code = d->resp->statusCode); |
991 | return code; | ||
992 | } | ||
993 | return none_GmStatusCode; | ||
991 | } | 994 | } |
992 | 995 | ||
993 | const iString *meta_GmRequest(const iGmRequest *d) { | 996 | const iString *meta_GmRequest(const iGmRequest *d) { |
diff --git a/src/mimehooks.c b/src/mimehooks.c index 4788d534..ce712c2d 100644 --- a/src/mimehooks.c +++ b/src/mimehooks.c | |||
@@ -139,9 +139,8 @@ static iBlock *translateAtomXmlToGeminiFeed_(const iString *mime, const iBlock * | |||
139 | if (!isEmpty_String(subtitle)) { | 139 | if (!isEmpty_String(subtitle)) { |
140 | appendFormat_String(&out, "## %s\n\n", cstr_String(subtitle)); | 140 | appendFormat_String(&out, "## %s\n\n", cstr_String(subtitle)); |
141 | } | 141 | } |
142 | appendCStr_String(&out, | 142 | appendCStr_String(&out, cstr_Lang("feeds.atom.translated")); |
143 | "This Atom XML document has been automatically translated to a Gemini feed " | 143 | appendCStr_String(&out, "\n\n"); |
144 | "to allow subscribing to it.\n\n"); | ||
145 | iRegExp *datePattern = | 144 | iRegExp *datePattern = |
146 | iClob(new_RegExp("^([0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9])T.*", caseSensitive_RegExpOption)); | 145 | iClob(new_RegExp("^([0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9])T.*", caseSensitive_RegExpOption)); |
147 | iBeginCollect(); | 146 | iBeginCollect(); |
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 2d4b6b1c..9c8be416 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1174,10 +1174,6 @@ static void showErrorPage_DocumentWidget_(iDocumentWidget *d, enum iGmStatusCode | |||
1174 | 1); | 1174 | 1); |
1175 | break; | 1175 | break; |
1176 | } | 1176 | } |
1177 | case slowDown_GmStatusCode: | ||
1178 | appendFormat_String(src, "\n\nWait %s seconds before your next request.", | ||
1179 | cstr_String(meta)); | ||
1180 | break; | ||
1181 | default: | 1177 | default: |
1182 | if (!isEmpty_String(meta)) { | 1178 | if (!isEmpty_String(meta)) { |
1183 | appendFormat_String(src, "\n\n${error.server.msg}\n> %s", cstr_String(meta)); | 1179 | appendFormat_String(src, "\n\n${error.server.msg}\n> %s", cstr_String(meta)); |
@@ -1482,8 +1478,9 @@ static void updateDocument_DocumentWidget_(iDocumentWidget *d, | |||
1482 | const iGmLinkId imgLinkId = 1; /* there's only the one link */ | 1478 | const iGmLinkId imgLinkId = 1; /* there's only the one link */ |
1483 | /* TODO: Do the image loading in `postProcessRequestContent_DocumentWidget_()` */ | 1479 | /* TODO: Do the image loading in `postProcessRequestContent_DocumentWidget_()` */ |
1484 | if ((isAudio && isInitialUpdate) || (!isAudio && isRequestFinished)) { | 1480 | if ((isAudio && isInitialUpdate) || (!isAudio && isRequestFinished)) { |
1485 | const char *linkTitle = | 1481 | const char *linkTitle = cstr_Lang( |
1486 | startsWith_String(mimeStr, "image/") ? "Image" : "Audio"; | 1482 | startsWith_String(mimeStr, "image/") ? "media.untitled.image" |
1483 | : "media.untitled.audio"); | ||
1487 | iUrl parts; | 1484 | iUrl parts; |
1488 | init_Url(&parts, d->mod.url); | 1485 | init_Url(&parts, d->mod.url); |
1489 | if (!isEmpty_Range(&parts.path)) { | 1486 | if (!isEmpty_Range(&parts.path)) { |