summaryrefslogtreecommitdiff
path: root/src/bookmarks.c
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 /src/bookmarks.c
parent93c6969e922ee9d34a0c5b653b3940dbad94ed25 (diff)
Translations for hardcoded English strings
IssueID #276
Diffstat (limited to 'src/bookmarks.c')
-rw-r--r--src/bookmarks.c34
1 files changed, 14 insertions, 20 deletions
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