diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-23 06:23:13 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-23 06:23:13 +0200 |
commit | 244599398b8fa457a160077513456b4b274d386d (patch) | |
tree | cdeebda9ae59386388644cd461cbda541309ab46 /src/ui/sidebarwidget.c | |
parent | de34940c4dd709fa7103c6961cbe8b410638ffdd (diff) |
Lang: Applied more string IDs
IssueID #192
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r-- | src/ui/sidebarwidget.c | 177 |
1 files changed, 92 insertions, 85 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 2cc1d899..7a704de7 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -168,11 +168,14 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
168 | on = entryDate; | 168 | on = entryDate; |
169 | iSidebarItem *sep = new_SidebarItem(); | 169 | iSidebarItem *sep = new_SidebarItem(); |
170 | sep->listItem.isSeparator = iTrue; | 170 | sep->listItem.isSeparator = iTrue; |
171 | iString *text = format_Date(&on, on.year == today.year ? "%b. %d" : "%b. %d, %Y"); | 171 | iString *text = format_Date(&on, |
172 | cstr_Lang(on.year == today.year | ||
173 | ? "sidebar.date.thisyear" | ||
174 | : "sidebar.date.otheryear")); | ||
172 | if (today.year == on.year && | 175 | if (today.year == on.year && |
173 | today.month == on.month && | 176 | today.month == on.month && |
174 | today.day == on.day) { | 177 | today.day == on.day) { |
175 | appendCStr_String(text, " \u2014 Today"); | 178 | appendCStr_String(text, " \u2014 ${feeds.today}"); |
176 | } | 179 | } |
177 | set_String(&sep->meta, text); | 180 | set_String(&sep->meta, text); |
178 | delete_String(text); | 181 | delete_String(text); |
@@ -203,16 +206,16 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
203 | } | 206 | } |
204 | d->menu = makeMenu_Widget( | 207 | d->menu = makeMenu_Widget( |
205 | as_Widget(d), | 208 | as_Widget(d), |
206 | (iMenuItem[]){ { openTab_Icon " Open Entry in New Tab", 0, 0, "feed.entry.opentab" }, | 209 | (iMenuItem[]){ { openTab_Icon " ${feeds.entry.newtab}", 0, 0, "feed.entry.opentab" }, |
207 | { circle_Icon " Mark as Read", 0, 0, "feed.entry.toggleread" }, | 210 | { circle_Icon " ${feeds.entry.markread}", 0, 0, "feed.entry.toggleread" }, |
208 | { pin_Icon " Add Bookmark...", 0, 0, "feed.entry.bookmark" }, | 211 | { pin_Icon " ${feeds.entry.bookmark}", 0, 0, "feed.entry.bookmark" }, |
209 | { "---", 0, 0, NULL }, | 212 | { "---", 0, 0, NULL }, |
210 | { page_Icon " Open Feed Page", 0, 0, "feed.entry.openfeed" }, | 213 | { page_Icon " ${feeds.entry.openfeed}", 0, 0, "feed.entry.openfeed" }, |
211 | { edit_Icon " Edit Feed...", 0, 0, "feed.entry.edit" }, | 214 | { edit_Icon " ${feeds.edit}", 0, 0, "feed.entry.edit" }, |
212 | { whiteStar_Icon " " uiTextCaution_ColorEscape "Unsubscribe...", 0, 0, "feed.entry.unsubscribe" }, | 215 | { whiteStar_Icon " " uiTextCaution_ColorEscape "${feeds.unsubscribe}", 0, 0, "feed.entry.unsubscribe" }, |
213 | { "---", 0, 0, NULL }, | 216 | { "---", 0, 0, NULL }, |
214 | { check_Icon " Mark All as Read", SDLK_a, KMOD_SHIFT, "feeds.markallread" }, | 217 | { check_Icon " ${feeds.markallread}", SDLK_a, KMOD_SHIFT, "feeds.markallread" }, |
215 | { reload_Icon " Refresh Feeds", SDLK_r, KMOD_PRIMARY | KMOD_SHIFT, "feeds.refresh" } }, | 218 | { reload_Icon " ${feeds.refresh}", SDLK_r, KMOD_PRIMARY | KMOD_SHIFT, "feeds.refresh" } }, |
216 | 10); | 219 | 10); |
217 | break; | 220 | break; |
218 | } | 221 | } |
@@ -262,20 +265,20 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
262 | } | 265 | } |
263 | d->menu = makeMenu_Widget( | 266 | d->menu = makeMenu_Widget( |
264 | as_Widget(d), | 267 | as_Widget(d), |
265 | (iMenuItem[]){ { openTab_Icon " Open in New Tab", 0, 0, "bookmark.open newtab:1" }, | 268 | (iMenuItem[]){ { openTab_Icon " ${menu.opentab}", 0, 0, "bookmark.open newtab:1" }, |
266 | { openTabBg_Icon " Open in Background Tab", 0, 0, "bookmark.open newtab:2" }, | 269 | { openTabBg_Icon " ${menu.opentab.background}", 0, 0, "bookmark.open newtab:2" }, |
267 | { "---", 0, 0, NULL }, | 270 | { "---", 0, 0, NULL }, |
268 | { edit_Icon " Edit...", 0, 0, "bookmark.edit" }, | 271 | { edit_Icon " ${menu.edit}", 0, 0, "bookmark.edit" }, |
269 | { copy_Icon " Duplicate...", 0, 0, "bookmark.dup" }, | 272 | { copy_Icon " ${menu.dup}", 0, 0, "bookmark.dup" }, |
270 | { "Copy URL", 0, 0, "bookmark.copy" }, | 273 | { "${menu.copyurl}", 0, 0, "bookmark.copy" }, |
271 | { "---", 0, 0, NULL }, | 274 | { "---", 0, 0, NULL }, |
272 | { "?", 0, 0, "bookmark.tag tag:subscribed" }, | 275 | { "?", 0, 0, "bookmark.tag tag:subscribed" }, |
273 | { "?", 0, 0, "bookmark.tag tag:homepage" }, | 276 | { "?", 0, 0, "bookmark.tag tag:homepage" }, |
274 | { "?", 0, 0, "bookmark.tag tag:remotesource" }, | 277 | { "?", 0, 0, "bookmark.tag tag:remotesource" }, |
275 | { "---", 0, 0, NULL }, | 278 | { "---", 0, 0, NULL }, |
276 | { delete_Icon " " uiTextCaution_ColorEscape "Delete Bookmark", 0, 0, "bookmark.delete" }, | 279 | { delete_Icon " " uiTextCaution_ColorEscape "${bookmark.delete}", 0, 0, "bookmark.delete" }, |
277 | { "---", 0, 0, NULL }, | 280 | { "---", 0, 0, NULL }, |
278 | { reload_Icon " Refresh Remote Sources", 0, 0, "bookmarks.reload.remote" } }, | 281 | { reload_Icon " ${bookmarks.reload}", 0, 0, "bookmarks.reload.remote" } }, |
279 | 14); | 282 | 14); |
280 | break; | 283 | break; |
281 | } | 284 | } |
@@ -301,8 +304,10 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
301 | /* Date separator. */ | 304 | /* Date separator. */ |
302 | iSidebarItem *sep = new_SidebarItem(); | 305 | iSidebarItem *sep = new_SidebarItem(); |
303 | sep->listItem.isSeparator = iTrue; | 306 | sep->listItem.isSeparator = iTrue; |
304 | const iString *text = collect_String(format_Date( | 307 | const iString *text = collect_String( |
305 | &date, date.year != thisYear ? "%b. %d, %Y" : "%b. %d")); | 308 | format_Date(&date, |
309 | cstr_Lang(date.year != thisYear ? "sidebar.date.otheryear" | ||
310 | : "sidebar.date.thisyear"))); | ||
306 | set_String(&sep->meta, text); | 311 | set_String(&sep->meta, text); |
307 | const int yOffset = itemHeight_ListWidget(d->list) * 2 / 3; | 312 | const int yOffset = itemHeight_ListWidget(d->list) * 2 / 3; |
308 | sep->id = yOffset; | 313 | sep->id = yOffset; |
@@ -322,12 +327,12 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
322 | d->menu = makeMenu_Widget( | 327 | d->menu = makeMenu_Widget( |
323 | as_Widget(d), | 328 | as_Widget(d), |
324 | (iMenuItem[]){ | 329 | (iMenuItem[]){ |
325 | { "Copy URL", 0, 0, "history.copy" }, | 330 | { "${menu.copyurl}", 0, 0, "history.copy" }, |
326 | { pin_Icon " Add Bookmark...", 0, 0, "history.addbookmark" }, | 331 | { pin_Icon " ${sidebar.entry.bookmark}", 0, 0, "history.addbookmark" }, |
327 | { "---", 0, 0, NULL }, | 332 | { "---", 0, 0, NULL }, |
328 | { close_Icon " Forget URL", 0, 0, "history.delete" }, | 333 | { close_Icon " ${menu.forgeturl}", 0, 0, "history.delete" }, |
329 | { "---", 0, 0, NULL }, | 334 | { "---", 0, 0, NULL }, |
330 | { delete_Icon " " uiTextCaution_ColorEscape "Clear History...", 0, 0, "history.clear confirm:1" }, | 335 | { delete_Icon " " uiTextCaution_ColorEscape "${history.clear}", 0, 0, "history.clear confirm:1" }, |
331 | }, 6); | 336 | }, 6); |
332 | break; | 337 | break; |
333 | } | 338 | } |
@@ -342,17 +347,16 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
342 | iDate until; | 347 | iDate until; |
343 | validUntil_TlsCertificate(ident->cert, &until); | 348 | validUntil_TlsCertificate(ident->cert, &until); |
344 | const iBool isActive = isUsedOn_GmIdentity(ident, tabUrl); | 349 | const iBool isActive = isUsedOn_GmIdentity(ident, tabUrl); |
345 | format_String( | 350 | format_String(&item->meta, |
346 | &item->meta, | 351 | "%s", |
347 | "%s", | 352 | isActive ? cstr_Lang("ident.using") |
348 | isActive ? "Using on this page" | 353 | : isUsed_GmIdentity(ident) |
349 | : isUsed_GmIdentity(ident) | 354 | ? format_CStr(cstr_Lang("ident.usedonurls"), size_StringSet(ident->useUrls)) |
350 | ? format_CStr("Used on %zu URLs", size_StringSet(ident->useUrls)) | 355 | : cstr_Lang("ident.notused")); |
351 | : "Not used"); | ||
352 | const char *expiry = | 356 | const char *expiry = |
353 | ident->flags & temporary_GmIdentityFlag | 357 | ident->flags & temporary_GmIdentityFlag |
354 | ? "Temporary" | 358 | ? cstr_Lang("ident.temporary") |
355 | : cstrCollect_String(format_Date(&until, "Expires %b %d, %Y")); | 359 | : cstrCollect_String(format_Date(&until, cstr_Lang("ident.expiry"))); |
356 | if (isEmpty_String(&ident->notes)) { | 360 | if (isEmpty_String(&ident->notes)) { |
357 | appendFormat_String(&item->meta, "\n%s", expiry); | 361 | appendFormat_String(&item->meta, "\n%s", expiry); |
358 | } | 362 | } |
@@ -368,17 +372,17 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
368 | iRelease(item); | 372 | iRelease(item); |
369 | } | 373 | } |
370 | const iMenuItem menuItems[] = { | 374 | const iMenuItem menuItems[] = { |
371 | { person_Icon " Use on This Page", 0, 0, "ident.use arg:1" }, | 375 | { person_Icon " ${ident.use}", 0, 0, "ident.use arg:1" }, |
372 | { close_Icon " Stop Using on This Page", 0, 0, "ident.use arg:0" }, | 376 | { close_Icon " ${ident.stopuse}", 0, 0, "ident.use arg:0" }, |
373 | { close_Icon " Stop Using Everywhere", 0, 0, "ident.use arg:0 clear:1" }, | 377 | { close_Icon " ${ident.stopuse.all}", 0, 0, "ident.use arg:0 clear:1" }, |
374 | { "Show Usage", 0, 0, "ident.showuse" }, | 378 | { "${ident.showuse}", 0, 0, "ident.showuse" }, |
375 | { "---", 0, 0, NULL }, | 379 | { "---", 0, 0, NULL }, |
376 | { edit_Icon " Edit Notes...", 0, 0, "ident.edit" }, | 380 | { edit_Icon " ${menu.edit.notes}", 0, 0, "ident.edit" }, |
377 | { "Copy Fingerprint", 0, 0, "ident.fingerprint" }, | 381 | { "${ident.fingerprint}", 0, 0, "ident.fingerprint" }, |
378 | // { "Pick Icon...", 0, 0, "ident.pickicon" }, | 382 | // { "Pick Icon...", 0, 0, "ident.pickicon" }, |
379 | { "---", 0, 0, NULL }, | 383 | { "---", 0, 0, NULL }, |
380 | //{ "Reveal Files", 0, 0, "ident.reveal" }, | 384 | //{ "Reveal Files", 0, 0, "ident.reveal" }, |
381 | { delete_Icon " " uiTextCaution_ColorEscape "Delete Identity...", 0, 0, "ident.delete confirm:1" }, | 385 | { delete_Icon " " uiTextCaution_ColorEscape "${ident.delete}", 0, 0, "ident.delete confirm:1" }, |
382 | }; | 386 | }; |
383 | d->menu = makeMenu_Widget(as_Widget(d), menuItems, iElemCount(menuItems)); | 387 | d->menu = makeMenu_Widget(as_Widget(d), menuItems, iElemCount(menuItems)); |
384 | break; | 388 | break; |
@@ -394,7 +398,7 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
394 | iWidget *div = makeVDiv_Widget(); | 398 | iWidget *div = makeVDiv_Widget(); |
395 | setPadding_Widget(div, 3 * gap_UI, 0, 3 * gap_UI, 2 * gap_UI); | 399 | setPadding_Widget(div, 3 * gap_UI, 0, 3 * gap_UI, 2 * gap_UI); |
396 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ | 400 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ |
397 | addChild_Widget(div, iClob(new_LabelWidget("Refresh Feeds", "feeds.refresh"))); | 401 | addChild_Widget(div, iClob(new_LabelWidget("${menu.feeds.refresh}", "feeds.refresh"))); |
398 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ | 402 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ |
399 | addChild_Widget(d->blank, iClob(div)); | 403 | addChild_Widget(d->blank, iClob(div)); |
400 | } | 404 | } |
@@ -402,20 +406,22 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
402 | iWidget *div = makeVDiv_Widget(); | 406 | iWidget *div = makeVDiv_Widget(); |
403 | setPadding_Widget(div, 3 * gap_UI, 0, 3 * gap_UI, 2 * gap_UI); | 407 | setPadding_Widget(div, 3 * gap_UI, 0, 3 * gap_UI, 2 * gap_UI); |
404 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ | 408 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ |
405 | iLabelWidget *msg = new_LabelWidget("No Identities", NULL); | 409 | iLabelWidget *msg = new_LabelWidget("${sidebar.empty.idents}", NULL); |
406 | setFont_LabelWidget(msg, uiLabelLarge_FontId); | 410 | setFont_LabelWidget(msg, uiLabelLarge_FontId); |
407 | addChildFlags_Widget(div, iClob(msg), frameless_WidgetFlag); | 411 | addChildFlags_Widget(div, iClob(msg), frameless_WidgetFlag); |
408 | addChild_Widget(div, iClob(makePadding_Widget(3 * gap_UI))); | 412 | addChild_Widget(div, iClob(makePadding_Widget(3 * gap_UI))); |
409 | addChild_Widget(div, iClob(new_LabelWidget("New Identity...", "ident.new"))); | 413 | addChild_Widget(div, iClob(new_LabelWidget("${menu.identity.new}", "ident.new"))); |
410 | addChild_Widget(div, iClob(makePadding_Widget(gap_UI))); | 414 | addChild_Widget(div, iClob(makePadding_Widget(gap_UI))); |
411 | addChild_Widget(div, iClob(new_LabelWidget("Import...", "ident.import"))); | 415 | addChild_Widget(div, iClob(new_LabelWidget("${menu.identity.import}", "ident.import"))); |
412 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ | 416 | addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); /* pad */ |
413 | setBackgroundColor_Widget(addChildFlags_Widget( | 417 | setBackgroundColor_Widget( |
414 | div, | 418 | addChildFlags_Widget( |
415 | iClob(new_LabelWidget("See " uiTextStrong_ColorEscape "Help" restore_ColorEscape | 419 | div, |
416 | " for more information about TLS client certificates.", | 420 | iClob(new_LabelWidget(format_CStr(cstr_Lang("ident.gotohelp"), |
417 | "!open newtab:1 gotoheading:1.6 url:about:help")), | 421 | uiTextStrong_ColorEscape, |
418 | frameless_WidgetFlag | fixedHeight_WidgetFlag | wrapText_WidgetFlag), | 422 | restore_ColorEscape), |
423 | "!open newtab:1 gotoheading:1.6 url:about:help")), | ||
424 | frameless_WidgetFlag | fixedHeight_WidgetFlag | wrapText_WidgetFlag), | ||
419 | uiBackgroundSidebar_ColorId); | 425 | uiBackgroundSidebar_ColorId); |
420 | addChild_Widget(d->blank, iClob(div)); | 426 | addChild_Widget(d->blank, iClob(div)); |
421 | } | 427 | } |
@@ -459,11 +465,11 @@ int width_SidebarWidget(const iSidebarWidget *d) { | |||
459 | } | 465 | } |
460 | 466 | ||
461 | static const char *normalModeLabels_[max_SidebarMode] = { | 467 | static const char *normalModeLabels_[max_SidebarMode] = { |
462 | pin_Icon " Bookmarks", | 468 | pin_Icon " ${sidebar.bookmarks}", |
463 | star_Icon " Feeds", | 469 | star_Icon " ${sidebar.feeds}", |
464 | clock_Icon " History", | 470 | clock_Icon " ${sidebar.history}", |
465 | person_Icon " Identities", | 471 | person_Icon " ${sidebar.identities}", |
466 | page_Icon " Outline", | 472 | page_Icon " ${sidebar.outline}", |
467 | }; | 473 | }; |
468 | 474 | ||
469 | static const char *tightModeLabels_[max_SidebarMode] = { | 475 | static const char *tightModeLabels_[max_SidebarMode] = { |
@@ -554,7 +560,7 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { | |||
554 | // } | 560 | // } |
555 | } | 561 | } |
556 | else { | 562 | else { |
557 | iLabelWidget *heading = new_LabelWidget(person_Icon " Identities", NULL); | 563 | iLabelWidget *heading = new_LabelWidget(person_Icon " ${sidebar.identities}", NULL); |
558 | checkIcon_LabelWidget(heading); | 564 | checkIcon_LabelWidget(heading); |
559 | setBackgroundColor_Widget(as_Widget(heading), uiBackgroundSidebar_ColorId); | 565 | setBackgroundColor_Widget(as_Widget(heading), uiBackgroundSidebar_ColorId); |
560 | setTextColor_LabelWidget(heading, uiTextSelected_ColorId); | 566 | setTextColor_LabelWidget(heading, uiTextSelected_ColorId); |
@@ -699,7 +705,7 @@ static void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) { | |||
699 | collectNewFormat_String("%s " uiTextAction_ColorEscape "%zu%s", | 705 | collectNewFormat_String("%s " uiTextAction_ColorEscape "%zu%s", |
700 | tightModeLabels_[i], | 706 | tightModeLabels_[i], |
701 | d->numUnreadEntries, | 707 | d->numUnreadEntries, |
702 | !isTight ? " Unread" : "")); | 708 | !isTight ? " ${sidebar.unread}" : "")); |
703 | } | 709 | } |
704 | else { | 710 | else { |
705 | updateTextCStr_LabelWidget(button, | 711 | updateTextCStr_LabelWidget(button, |
@@ -1008,7 +1014,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1008 | postCommand_App("visited.changed"); | 1014 | postCommand_App("visited.changed"); |
1009 | return iTrue; | 1015 | return iTrue; |
1010 | } | 1016 | } |
1011 | if (isCommand_Widget(w, ev, "feed.entry.bookmark")) { | 1017 | if (isCommand_Widget(w, ev, "sidebar.entry.bookmark")) { |
1012 | makeBookmarkCreation_Widget(&item->url, &item->label, item->icon); | 1018 | makeBookmarkCreation_Widget(&item->url, &item->label, item->icon); |
1013 | postCommand_App("focus.set id:bmed.title"); | 1019 | postCommand_App("focus.set id:bmed.title"); |
1014 | return iTrue; | 1020 | return iTrue; |
@@ -1032,12 +1038,12 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1032 | } | 1038 | } |
1033 | else { | 1039 | else { |
1034 | makeQuestion_Widget( | 1040 | makeQuestion_Widget( |
1035 | uiTextCaution_ColorEscape "UNSUBSCRIBE", | 1041 | uiTextCaution_ColorEscape "${heading.unsub}", |
1036 | format_CStr("Really unsubscribe from feed\n\"%s\"?", | 1042 | format_CStr(cstr_Lang("dlg.confirm.unsub"), |
1037 | cstr_String(&feedBookmark->title)), | 1043 | cstr_String(&feedBookmark->title)), |
1038 | (iMenuItem[]){ | 1044 | (iMenuItem[]){ |
1039 | { "Cancel", 0, 0, NULL }, | 1045 | { "${cancel}", 0, 0, NULL }, |
1040 | { uiTextCaution_ColorEscape "Unsubscribe", | 1046 | { uiTextCaution_ColorEscape "${dlg.unsub}", |
1041 | 0, | 1047 | 0, |
1042 | 0, | 1048 | 0, |
1043 | format_CStr("!feed.entry.unsubscribe arg:1 ptr:%p", d) } }, | 1049 | format_CStr("!feed.entry.unsubscribe arg:1 ptr:%p", d) } }, |
@@ -1069,7 +1075,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1069 | else if (isCommand_Widget(w, ev, "ident.showuse")) { | 1075 | else if (isCommand_Widget(w, ev, "ident.showuse")) { |
1070 | const iGmIdentity *ident = menuIdentity_SidebarWidget_(d); | 1076 | const iGmIdentity *ident = menuIdentity_SidebarWidget_(d); |
1071 | if (ident) { | 1077 | if (ident) { |
1072 | makeMessage_Widget(uiHeading_ColorEscape "IDENTITY USAGE", | 1078 | makeMessage_Widget(uiHeading_ColorEscape "${heading.ident.use}", |
1073 | cstrCollect_String(joinCStr_StringSet(ident->useUrls, "\n"))); | 1079 | cstrCollect_String(joinCStr_StringSet(ident->useUrls, "\n"))); |
1074 | } | 1080 | } |
1075 | return iTrue; | 1081 | return iTrue; |
@@ -1079,8 +1085,8 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1079 | if (ident) { | 1085 | if (ident) { |
1080 | makeValueInput_Widget(get_Window()->root, | 1086 | makeValueInput_Widget(get_Window()->root, |
1081 | &ident->notes, | 1087 | &ident->notes, |
1082 | uiHeading_ColorEscape "IDENTITY NOTES", | 1088 | uiHeading_ColorEscape "${heading.ident.notes}", |
1083 | format_CStr("Notes about %s:", cstr_String(name_GmIdentity(ident))), | 1089 | format_CStr(cstr_Lang("dlg.ident.notes"), cstr_String(name_GmIdentity(ident))), |
1084 | uiTextAction_ColorEscape "OK", | 1090 | uiTextAction_ColorEscape "OK", |
1085 | format_CStr("!ident.setnotes ident:%p ptr:%p", ident, d)); | 1091 | format_CStr("!ident.setnotes ident:%p ptr:%p", ident, d)); |
1086 | } | 1092 | } |
@@ -1120,15 +1126,16 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1120 | iSidebarItem *item = d->contextItem; | 1126 | iSidebarItem *item = d->contextItem; |
1121 | if (argLabel_Command(cmd, "confirm")) { | 1127 | if (argLabel_Command(cmd, "confirm")) { |
1122 | makeQuestion_Widget( | 1128 | makeQuestion_Widget( |
1123 | uiTextCaution_ColorEscape "DELETE IDENTITY", | 1129 | uiTextCaution_ColorEscape "${heading.ident.delete}", |
1124 | format_CStr( | 1130 | format_CStr(cstr_Lang("dlg.confirm.ident.delete"), |
1125 | "Do you really want to delete the identity\n" uiTextAction_ColorEscape | 1131 | uiTextAction_ColorEscape, |
1126 | "%s\n" uiText_ColorEscape | 1132 | cstr_String(&item->label), |
1127 | "including its certificate and private key files?", | 1133 | uiText_ColorEscape), |
1128 | cstr_String(&item->label)), | 1134 | (iMenuItem[]){ { "${cancel}", 0, 0, NULL }, |
1129 | (iMenuItem[]){ { "Cancel", 0, 0, NULL }, | 1135 | { uiTextCaution_ColorEscape "${dlg.ident.delete}", |
1130 | { uiTextCaution_ColorEscape "Delete Identity and Files", | 1136 | 0, |
1131 | 0, 0, format_CStr("!ident.delete confirm:0 ptr:%p", d) } }, | 1137 | 0, |
1138 | format_CStr("!ident.delete confirm:0 ptr:%p", d) } }, | ||
1132 | 2); | 1139 | 2); |
1133 | return iTrue; | 1140 | return iTrue; |
1134 | } | 1141 | } |
@@ -1163,10 +1170,10 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1163 | } | 1170 | } |
1164 | else if (equal_Command(cmd, "history.clear")) { | 1171 | else if (equal_Command(cmd, "history.clear")) { |
1165 | if (argLabel_Command(cmd, "confirm")) { | 1172 | if (argLabel_Command(cmd, "confirm")) { |
1166 | makeQuestion_Widget(uiTextCaution_ColorEscape "CLEAR HISTORY", | 1173 | makeQuestion_Widget(uiTextCaution_ColorEscape "${heading.history.clear}", |
1167 | "Do you really want to erase the history of all visited pages?", | 1174 | "${dlg.confirm.history.clear}", |
1168 | (iMenuItem[]){ { "Cancel", 0, 0, NULL }, | 1175 | (iMenuItem[]){ { "${cancel}", 0, 0, NULL }, |
1169 | { uiTextCaution_ColorEscape "Clear History", | 1176 | { uiTextCaution_ColorEscape "${dlg.history.clear}", |
1170 | 0, 0, "history.clear confirm:0" } }, | 1177 | 0, 0, "history.clear confirm:0" } }, |
1171 | 2); | 1178 | 2); |
1172 | } | 1179 | } |
@@ -1215,24 +1222,24 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1215 | if (menuItem) { | 1222 | if (menuItem) { |
1216 | setTextCStr_LabelWidget(menuItem, | 1223 | setTextCStr_LabelWidget(menuItem, |
1217 | hasTag_Bookmark(bm, "homepage") | 1224 | hasTag_Bookmark(bm, "homepage") |
1218 | ? home_Icon " Remove Homepage" | 1225 | ? home_Icon " ${bookmark.untag.home}" |
1219 | : home_Icon " Use as Homepage"); | 1226 | : home_Icon " ${bookmark.tag.home}"); |
1220 | checkIcon_LabelWidget(menuItem); | 1227 | checkIcon_LabelWidget(menuItem); |
1221 | } | 1228 | } |
1222 | menuItem = findMenuItem_Widget(d->menu, "bookmark.tag tag:subscribed"); | 1229 | menuItem = findMenuItem_Widget(d->menu, "bookmark.tag tag:subscribed"); |
1223 | if (menuItem) { | 1230 | if (menuItem) { |
1224 | setTextCStr_LabelWidget(menuItem, | 1231 | setTextCStr_LabelWidget(menuItem, |
1225 | hasTag_Bookmark(bm, "subscribed") | 1232 | hasTag_Bookmark(bm, "subscribed") |
1226 | ? star_Icon " Unsubscribe from Feed" | 1233 | ? star_Icon " ${bookmark.untag.sub}" |
1227 | : star_Icon " Subscribe to Feed"); | 1234 | : star_Icon " ${bookmark.tag.sub}"); |
1228 | checkIcon_LabelWidget(menuItem); | 1235 | checkIcon_LabelWidget(menuItem); |
1229 | } | 1236 | } |
1230 | menuItem = findMenuItem_Widget(d->menu, "bookmark.tag tag:remotesource"); | 1237 | menuItem = findMenuItem_Widget(d->menu, "bookmark.tag tag:remotesource"); |
1231 | if (menuItem) { | 1238 | if (menuItem) { |
1232 | setTextCStr_LabelWidget(menuItem, | 1239 | setTextCStr_LabelWidget(menuItem, |
1233 | hasTag_Bookmark(bm, "remotesource") | 1240 | hasTag_Bookmark(bm, "remotesource") |
1234 | ? downArrowBar_Icon " Remove Bookmark Source" | 1241 | ? downArrowBar_Icon " ${bookmark.untag.remote}" |
1235 | : downArrowBar_Icon " Use as Bookmark Source"); | 1242 | : downArrowBar_Icon " ${bookmark.tag.remote}"); |
1236 | checkIcon_LabelWidget(menuItem); | 1243 | checkIcon_LabelWidget(menuItem); |
1237 | } | 1244 | } |
1238 | } | 1245 | } |
@@ -1241,8 +1248,8 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1241 | iLabelWidget *menuItem = findMenuItem_Widget(d->menu, "feed.entry.toggleread"); | 1248 | iLabelWidget *menuItem = findMenuItem_Widget(d->menu, "feed.entry.toggleread"); |
1242 | const iBool isRead = d->contextItem->indent == 0; | 1249 | const iBool isRead = d->contextItem->indent == 0; |
1243 | setTextCStr_LabelWidget(menuItem, | 1250 | setTextCStr_LabelWidget(menuItem, |
1244 | isRead ? circle_Icon " Mark as Unread" | 1251 | isRead ? circle_Icon " ${feeds.entry.markunread}" |
1245 | : circleWhite_Icon " Mark as Read"); | 1252 | : circleWhite_Icon " ${feeds.entry.markread}"); |
1246 | checkIcon_LabelWidget(menuItem); | 1253 | checkIcon_LabelWidget(menuItem); |
1247 | } | 1254 | } |
1248 | else if (d->mode == identities_SidebarMode) { | 1255 | else if (d->mode == identities_SidebarMode) { |