summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-08-01 14:06:59 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-08-01 14:06:59 +0300
commit395cb3a996482c9e9fc27e00b4259219f85ec663 (patch)
tree13a692988709a625f12f1ec2b588ca20a9bb6ac7
parent93c6969e922ee9d34a0c5b653b3940dbad94ed25 (diff)
Translations for hardcoded English strings
IssueID #276
-rw-r--r--po/en.po44
-rw-r--r--res/lang/de.binbin22653 -> 23761 bytes
-rw-r--r--res/lang/en.binbin21161 -> 22362 bytes
-rw-r--r--res/lang/es.binbin23780 -> 24888 bytes
-rw-r--r--res/lang/fi.binbin23771 -> 24879 bytes
-rw-r--r--res/lang/fr.binbin24076 -> 25184 bytes
-rw-r--r--res/lang/ia.binbin23381 -> 24489 bytes
-rw-r--r--res/lang/ie.binbin23025 -> 24133 bytes
-rw-r--r--res/lang/pl.binbin24314 -> 25422 bytes
-rw-r--r--res/lang/ru.binbin35242 -> 36350 bytes
-rw-r--r--res/lang/sr.binbin34870 -> 35978 bytes
-rw-r--r--res/lang/tok.binbin21594 -> 22702 bytes
-rw-r--r--res/lang/zh_Hans.binbin20333 -> 21441 bytes
-rw-r--r--res/lang/zh_Hant.binbin20518 -> 21626 bytes
-rw-r--r--src/bookmarks.c34
-rw-r--r--src/gmrequest.c9
-rw-r--r--src/mimehooks.c5
-rw-r--r--src/ui/documentwidget.c9
18 files changed, 69 insertions, 32 deletions
diff --git a/po/en.po b/po/en.po
index a3306f27..609a4bca 100644
--- a/po/en.po
+++ b/po/en.po
@@ -12,6 +12,12 @@ msgstr "%s is a compressed archive."
12msgid "doc.archive.view" 12msgid "doc.archive.view"
13msgstr "View archive contents" 13msgstr "View archive contents"
14 14
15msgid "media.untitled.image"
16msgstr "Image"
17
18msgid "media.untitled.audio"
19msgstr "Audio"
20
15# Inline download status message. 21# Inline download status message.
16msgid "media.download.warnclose" 22msgid "media.download.warnclose"
17msgstr "Download will be cancelled if this tab is closed." 23msgstr "Download will be cancelled if this tab is closed."
@@ -468,6 +474,9 @@ msgstr "Mark All as Read"
468msgid "feeds.refresh" 474msgid "feeds.refresh"
469msgstr "Refresh Feeds" 475msgstr "Refresh Feeds"
470 476
477msgid "feeds.atom.translated"
478msgstr "This Atom XML document has been automatically translated to a Gemini feed to allow subscribing to it."
479
471msgid "menu.opentab" 480msgid "menu.opentab"
472msgstr "Open in New Tab" 481msgstr "Open in New Tab"
473 482
@@ -837,6 +846,41 @@ msgstr "View Image"
837msgid "bookmark.title.blank" 846msgid "bookmark.title.blank"
838msgstr "Blank Page" 847msgstr "Blank Page"
839 848
849msgid "bookmark.export.title.folder"
850msgstr "Bookmarks"
851
852msgid "bookmark.export.title.tag"
853msgstr "Bookmark tags"
854
855msgid "bookmark.export.title.time"
856msgstr "Created bookmarks"
857
858msgid "bookmark.export.count"
859msgid_plural "bookmark.export.count.n"
860msgstr[0] "You have %d bookmark."
861msgstr[1] "You have %d bookmarks."
862
863msgid "bookmark.export.saving"
864msgstr "Save this page to export them, or you can copy them to the clipboard."
865
866msgid "bookmark.export.taginfo"
867msgstr "In this list each heading represents a bookmark tag. Only tagged bookmarks are listed. Bookmarks with multiple tags are repeated under each tag."
868
869msgid "bookmark.export.format.sub"
870msgstr "This page is formatted according to the \"Subscribing to Gemini pages\" companion specification."
871
872msgid "bookmark.export.format.linklines"
873msgstr "Each link represents a bookmark."
874
875msgid "bookmark.export.format.otherlines"
876msgstr "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
878msgid "bookmark.export.format.folders"
879msgstr "Folder structure is defined by level 2/3 headings."
880
881msgid "bookmark.export.format.tags"
882msgstr "Tags are defined by level 2 headings."
883
840# Interpret as "Results from bookmarks..." 884# Interpret as "Results from bookmarks..."
841msgid "heading.lookup.bookmarks" 885msgid "heading.lookup.bookmarks"
842msgstr "BOOKMARKS" 886msgstr "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
987enum iGmStatusCode status_GmRequest(const iGmRequest *d) { 987enum 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
993const iString *meta_GmRequest(const iGmRequest *d) { 996const 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)) {