From abb47b4c0faf2eadcdce62c285fea8af7edd8894 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 2 Nov 2019 22:01:00 +0100 Subject: Add completion --- bookmarks.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 bookmarks.c (limited to 'bookmarks.c') diff --git a/bookmarks.c b/bookmarks.c new file mode 100644 index 0000000..f43ed46 --- /dev/null +++ b/bookmarks.c @@ -0,0 +1,45 @@ +#include "badwolf.h" +#include "bookmarks.h" + +#include +#include /* g_fprintf() */ + +void +location_completion_init() +{ + GtkTreeIter iter; + GtkListStore *list_store; + GIOChannel *file_channel; + GError *file_err = NULL; + gchar *file_line; + + location_completion = gtk_entry_completion_new(); + + list_store = gtk_list_store_new(1, G_TYPE_STRING); + + gchar *filename = g_build_filename(g_get_user_data_dir(), "badwolf", "URLs.txt", NULL); + g_fprintf(stderr, "URL Completion: loading at %s\n", filename); + file_channel = g_io_channel_new_file(filename, "r", &file_err); + + if(file_channel != NULL) + { + while(G_IO_STATUS_NORMAL == + g_io_channel_read_line(file_channel, &file_line, NULL, NULL, &file_err)) + { + gtk_list_store_append(list_store, &iter); + gtk_list_store_set(list_store, &iter, 0, g_strchomp(file_line), -1); + } + g_free(file_line); + g_io_channel_unref(file_channel); + //g_io_channel_shutdown(file_channel, FALSE, &file_err); + g_fprintf(stderr, "URL Completion: Done.\n"); + } + else + g_fprintf(stderr, "URL Completion: Failed to load file.\n"); + + gtk_list_store_append(list_store, &iter); + gtk_list_store_set(list_store, &iter, 0, homepage, -1); + + gtk_entry_completion_set_model(location_completion, GTK_TREE_MODEL(list_store)); + gtk_entry_completion_set_text_column(location_completion, 0); +} -- cgit v1.3.1-23-gd82d From a7ba36264f3a62013d393075bd992ac252d3e51a Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 3 Nov 2019 21:34:46 +0100 Subject: Add support for XBEL Bookmarks --- KnowledgeBase.md | 17 ++++++++++ Makefile | 2 +- README.md | 1 + badwolf.1 | 10 ++++-- badwolf.c | 1 + bookmarks.c | 99 ++++++++++++++++++++++++++++++++++++++++---------------- 6 files changed, 100 insertions(+), 30 deletions(-) (limited to 'bookmarks.c') diff --git a/KnowledgeBase.md b/KnowledgeBase.md index f5f9f9a..af59415 100644 --- a/KnowledgeBase.md +++ b/KnowledgeBase.md @@ -2,3 +2,20 @@ - WebKit2 Extensions Tutorial: https://blogs.igalia.com/carlosgc/2013/09/10/webkit2gtk-web-process-extensions/ - https://trac.torproject.org/projects/tor/wiki/doc/ImportantGoogleChromeBugs / https://trac.torproject.org/projects/tor/ticket/1925 - https://webkit.org/blog/3476/content-blockers-first-look/ + +# Bookmark formats +The different plain-text formats used by web browsers found in the wild, done +in Augmented Backus–Naur Form (ABNF). + +url = *CHAR +title = *CHAR + +## uzbl +bookmark = URL TAB title [TAB tags] +tags = *(*CHAR SP) + +Documenter comment: How does it manages when the separator (TAB here) is +present in the title? + +## qutebrowser +bookmark = URL SP title diff --git a/Makefile b/Makefile index 8ba3003..8ba9b7e 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ INKSCAPE ?= inkscape # for i in 24 32 48 64 128 256; do echo icons/hicolor/${i}x${i}/apps/badwolf.png; done | tr '\n' ' ' ICON_SIZES = icons/hicolor/24x24/apps/badwolf.png icons/hicolor/32x32/apps/badwolf.png icons/hicolor/48x48/apps/badwolf.png icons/hicolor/64x64/apps/badwolf.png icons/hicolor/128x128/apps/badwolf.png icons/hicolor/256x256/apps/badwolf.png -DEPS = gtk+-3.0 webkit2gtk-4.0 libsoup-2.4 +DEPS = gtk+-3.0 webkit2gtk-4.0 libsoup-2.4 libxml-2.0 SRCS = bookmarks.c uri.c uri_test.c keybindings.c downloads.c badwolf.c OBJS = bookmarks.o uri.o keybindings.o downloads.o badwolf.o OBJS_test = uri_test.o diff --git a/README.md b/README.md index 6804aea..b83d134 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ Dependencies are: - C11 Compiler (such as clang or gcc) - [WebKitGTK](https://webkitgtk.org/), only the latest stable is supported +- [libxml-2.0](http://www.xmlsoft.org/), no known version limitation - POSIX make with extension for shell in variables (works with GNU, {Net,Free,Open}BSD) - A pkg-config implementation (pkgconf is recommended) - (optionnal) gettext implementation (such as GNU Gettext) diff --git a/badwolf.1 b/badwolf.1 index 96a20d3..6bbe2b2 100644 --- a/badwolf.1 +++ b/badwolf.1 @@ -75,8 +75,14 @@ A more generic variable name is also intended to be used in the future. .El .Sh FILES .Bl -tag -width Ds -compact -.It Pa ${XDG_DATA_HOME:-$HOME/.local/share}/badwolf/URLs.txt -File containing a URL on each line. [UNSTABLE] +.It Pa ${XDG_DATA_HOME:-$HOME/.local/share}/badwolf/bookmarks.xbel +XBEL (XML Bookmark Exchange Language) file, known to be currently supported by: +.Xr elinks 1 , +.Xr konqueror 1 , +.Xr kbookmarkeditor 1 . Doing a symbolic link from their path works fine. +.Pp +For more information about this format see: +.Lk http://pyxml.sourceforge.net/topics/xbel/ .It Pa ${XDG_DATA_HOME:-$HOME/.local/share}/badwolf/webkit-web-extensions/ Directory containing the .Lk https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebExtension.html WebKitWebExtensions diff --git a/badwolf.c b/badwolf.c index bf4916b..f284378 100644 --- a/badwolf.c +++ b/badwolf.c @@ -7,6 +7,7 @@ #include "config.h" #include "downloads.h" #include "bookmarks.h" +#include "config.h" #include "keybindings.h" #include "uri.h" diff --git a/bookmarks.c b/bookmarks.c index f43ed46..23cb558 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -1,45 +1,90 @@ -#include "badwolf.h" #include "bookmarks.h" -#include +#include "badwolf.h" + #include /* g_fprintf() */ +#include +#include void -location_completion_init() +location_completion_setup(GtkListStore *list_store) { - GtkTreeIter iter; - GtkListStore *list_store; - GIOChannel *file_channel; - GError *file_err = NULL; - gchar *file_line; + gtk_entry_completion_set_model(location_completion, GTK_TREE_MODEL(list_store)); + gtk_entry_completion_set_text_column(location_completion, 0); +} - location_completion = gtk_entry_completion_new(); +void +location_completion_cleanup(xmlXPathObjectPtr xpathObj, xmlXPathContextPtr xpathCtx, xmlDocPtr doc) +{ + if(xpathObj != NULL) xmlXPathFreeObject(xpathObj); + if(xpathCtx != NULL) xmlXPathFreeContext(xpathCtx); + if(doc != NULL) xmlFreeDoc(doc); +} - list_store = gtk_list_store_new(1, G_TYPE_STRING); +GtkTreeIter +load_xpath_results(GtkListStore *list_store, xmlNodeSetPtr nodes) +{ + GtkTreeIter iter; + int size; - gchar *filename = g_build_filename(g_get_user_data_dir(), "badwolf", "URLs.txt", NULL); - g_fprintf(stderr, "URL Completion: loading at %s\n", filename); - file_channel = g_io_channel_new_file(filename, "r", &file_err); + size = (nodes) ? nodes->nodeNr : 0; - if(file_channel != NULL) - { - while(G_IO_STATUS_NORMAL == - g_io_channel_read_line(file_channel, &file_line, NULL, NULL, &file_err)) + g_fprintf(stderr, "Bookmarks: Found %d bookmarks.\n", size); + for(int i = 0; i < size; i++) + if(nodes->nodeTab[i]) { gtk_list_store_append(list_store, &iter); - gtk_list_store_set(list_store, &iter, 0, g_strchomp(file_line), -1); + gtk_list_store_set( + list_store, &iter, 0, (char *)xmlXPathCastNodeToString(nodes->nodeTab[i]), -1); } - g_free(file_line); - g_io_channel_unref(file_channel); - //g_io_channel_shutdown(file_channel, FALSE, &file_err); - g_fprintf(stderr, "URL Completion: Done.\n"); - } - else - g_fprintf(stderr, "URL Completion: Failed to load file.\n"); + return iter; +} + +void +location_completion_init() +{ + const xmlChar *xpathExpr = "//bookmark/@href"; + char *filename = g_build_filename(g_get_user_data_dir(), "badwolf", "bookmarks.xbel", NULL); + xmlDocPtr doc = NULL; + xmlXPathContextPtr xpathCtx = NULL; + xmlXPathObjectPtr xpathObj = NULL; + GtkTreeIter iter; + GtkListStore *list_store = gtk_list_store_new(1, G_TYPE_STRING); + + location_completion = gtk_entry_completion_new(); gtk_list_store_append(list_store, &iter); gtk_list_store_set(list_store, &iter, 0, homepage, -1); - gtk_entry_completion_set_model(location_completion, GTK_TREE_MODEL(list_store)); - gtk_entry_completion_set_text_column(location_completion, 0); + g_fprintf(stderr, "Bookmarks: loading at %s\n", filename); + doc = xmlParseFile(filename); + if(doc == NULL) + { + g_fprintf(stderr, "Bookmarks: unable to parse file \"%s\"\n", filename); + location_completion_cleanup(xpathObj, xpathCtx, doc); + return; + } + + xpathCtx = xmlXPathNewContext(doc); + if(xpathCtx == NULL) + { + g_fprintf(stderr, "Bookmarks: unable to create new XPath context\n"); + location_completion_cleanup(xpathObj, xpathCtx, doc); + return; + } + + xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx); + if(xpathObj == NULL) + { + g_fprintf(stderr, "Bookmarks: unable to evaluate xpath expression \"%s\"\n", xpathExpr); + location_completion_cleanup(xpathObj, xpathCtx, doc); + return; + } + + iter = load_xpath_results(list_store, xpathObj->nodesetval); + + location_completion_cleanup(xpathObj, xpathCtx, doc); + location_completion_setup(list_store); + + g_fprintf(stderr, "Bookmarks: Done.\n"); } -- cgit v1.3.1-23-gd82d From 3f164de8eb38f06138d908536b198dcd507a3a74 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 3 Nov 2019 22:44:18 +0100 Subject: bookmarks.c: Wildcard-based suggestion matching --- bookmarks.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bookmarks.c') diff --git a/bookmarks.c b/bookmarks.c index 23cb558..4bbfb8a 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -6,11 +6,30 @@ #include #include +gboolean +location_completion_matches(GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data) +{ + (void)user_data; + gchar *buffer; + gchar *pattern; + gboolean result; + + pattern = g_strdup_printf("*%s*", key); + + gtk_tree_model_get(gtk_entry_completion_get_model(completion), iter, 0, &buffer, -1); + result = g_pattern_match_simple(pattern, buffer); + + g_free(buffer); + g_free(pattern); + return result; +} + void location_completion_setup(GtkListStore *list_store) { gtk_entry_completion_set_model(location_completion, GTK_TREE_MODEL(list_store)); gtk_entry_completion_set_text_column(location_completion, 0); + gtk_entry_completion_set_match_func(location_completion, location_completion_matches, NULL, NULL); } void -- cgit v1.3.1-23-gd82d From 41cfd1ccae96dda3378b9666e38e70e547fe87f2 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Mon, 4 Nov 2019 20:11:02 +0100 Subject: Show selected completion as a inline-selection --- bookmarks.c | 7 ++++++- config.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'bookmarks.c') diff --git a/bookmarks.c b/bookmarks.c index 4bbfb8a..8a69814 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -1,13 +1,17 @@ #include "bookmarks.h" #include "badwolf.h" +#include "config.h" #include /* g_fprintf() */ #include #include gboolean -location_completion_matches(GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data) +location_completion_matches(GtkEntryCompletion *completion, + const gchar *key, + GtkTreeIter *iter, + gpointer user_data) { (void)user_data; gchar *buffer; @@ -30,6 +34,7 @@ location_completion_setup(GtkListStore *list_store) gtk_entry_completion_set_model(location_completion, GTK_TREE_MODEL(list_store)); gtk_entry_completion_set_text_column(location_completion, 0); gtk_entry_completion_set_match_func(location_completion, location_completion_matches, NULL, NULL); + gtk_entry_completion_set_inline_selection(location_completion, BADWOLF_LOCATION_INLINE_SELECTION); } void diff --git a/config.h b/config.h index 8426ce3..6bd76df 100644 --- a/config.h +++ b/config.h @@ -104,4 +104,7 @@ */ #define BADWOLF_DOWNLOAD_FILE_PATH_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE +// BADWOLF_LOCATION_INLINE_SELECTION: show selected completion as a selection in location entry +#define BADWOLF_LOCATION_INLINE_SELECTION TRUE + #endif /* CONFIG_H_INCLUDED */ -- cgit v1.3.1-23-gd82d From 720eb415a73893bf4c3894c10e27c66996f7e67e Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Mon, 16 Dec 2019 14:35:37 +0100 Subject: Fix setting up completion --- badwolf.c | 16 ++++++++++++++-- bookmarks.c | 24 ++++++++++++------------ bookmarks.h | 4 ++-- 3 files changed, 28 insertions(+), 16 deletions(-) (limited to 'bookmarks.c') diff --git a/badwolf.c b/badwolf.c index f284378..ca1f5d7 100644 --- a/badwolf.c +++ b/badwolf.c @@ -23,6 +23,7 @@ const gchar *version = VERSION; static gchar *web_extensions_directory; static int context_id_counter = 0; +GtkTreeModel *bookmarks_completion_model; static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data); static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView, @@ -738,9 +739,17 @@ new_browser(struct Window *window, const gchar *target_url, struct Client *old_b gtk_label_set_single_line_mode(GTK_LABEL(browser->statuslabel), TRUE); gtk_label_set_ellipsize(GTK_LABEL(browser->statuslabel), BADWOLF_STATUSLABEL_ELLIPSIZE); + if(bookmarks_completion_model != NULL) + { + GtkEntryCompletion *location_completion = gtk_entry_completion_new(); + GtkTreeModel *location_completion_model = bookmarks_completion_model; + + bookmarks_completion_setup(location_completion, location_completion_model); + gtk_entry_set_completion(GTK_ENTRY(browser->location), location_completion); + } + gtk_entry_set_text(GTK_ENTRY(browser->location), target_url); gtk_entry_set_input_purpose(GTK_ENTRY(browser->location), GTK_INPUT_PURPOSE_URL); - gtk_entry_set_completion(GTK_ENTRY(browser->location), location_completion); gtk_entry_set_placeholder_text(GTK_ENTRY(browser->search), _("search in current page")); @@ -933,7 +942,8 @@ main(int argc, char *argv[]) g_build_filename(g_get_user_data_dir(), "badwolf", "webkit-web-extension", NULL); fprintf(stderr, _("webkit-web-extension directory set to: %s\n"), web_extensions_directory); - location_completion_init(); + bookmarks_completion_model = bookmarks_completion_init(); + g_object_ref(bookmarks_completion_model); window->main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); window->notebook = gtk_notebook_new(); @@ -1002,6 +1012,8 @@ main(int argc, char *argv[]) gtk_main(); + g_object_unref(bookmarks_completion_model); + #if 0 /* TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. */ _("ø"); diff --git a/bookmarks.c b/bookmarks.c index 8a69814..59faf95 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -7,7 +7,7 @@ #include #include -gboolean +static gboolean location_completion_matches(GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, @@ -29,15 +29,15 @@ location_completion_matches(GtkEntryCompletion *completion, } void -location_completion_setup(GtkListStore *list_store) +bookmarks_completion_setup(GtkEntryCompletion *location_completion, GtkTreeModel *tree_model) { - gtk_entry_completion_set_model(location_completion, GTK_TREE_MODEL(list_store)); + gtk_entry_completion_set_model(location_completion, tree_model); gtk_entry_completion_set_text_column(location_completion, 0); gtk_entry_completion_set_match_func(location_completion, location_completion_matches, NULL, NULL); gtk_entry_completion_set_inline_selection(location_completion, BADWOLF_LOCATION_INLINE_SELECTION); } -void +static void location_completion_cleanup(xmlXPathObjectPtr xpathObj, xmlXPathContextPtr xpathCtx, xmlDocPtr doc) { if(xpathObj != NULL) xmlXPathFreeObject(xpathObj); @@ -45,7 +45,7 @@ location_completion_cleanup(xmlXPathObjectPtr xpathObj, xmlXPathContextPtr xpath if(doc != NULL) xmlFreeDoc(doc); } -GtkTreeIter +static GtkTreeIter load_xpath_results(GtkListStore *list_store, xmlNodeSetPtr nodes) { GtkTreeIter iter; @@ -65,8 +65,8 @@ load_xpath_results(GtkListStore *list_store, xmlNodeSetPtr nodes) return iter; } -void -location_completion_init() +GtkTreeModel * +bookmarks_completion_init() { const xmlChar *xpathExpr = "//bookmark/@href"; char *filename = g_build_filename(g_get_user_data_dir(), "badwolf", "bookmarks.xbel", NULL); @@ -76,7 +76,6 @@ location_completion_init() GtkTreeIter iter; GtkListStore *list_store = gtk_list_store_new(1, G_TYPE_STRING); - location_completion = gtk_entry_completion_new(); gtk_list_store_append(list_store, &iter); gtk_list_store_set(list_store, &iter, 0, homepage, -1); @@ -86,7 +85,7 @@ location_completion_init() { g_fprintf(stderr, "Bookmarks: unable to parse file \"%s\"\n", filename); location_completion_cleanup(xpathObj, xpathCtx, doc); - return; + return NULL; } xpathCtx = xmlXPathNewContext(doc); @@ -94,7 +93,7 @@ location_completion_init() { g_fprintf(stderr, "Bookmarks: unable to create new XPath context\n"); location_completion_cleanup(xpathObj, xpathCtx, doc); - return; + return NULL; } xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx); @@ -102,13 +101,14 @@ location_completion_init() { g_fprintf(stderr, "Bookmarks: unable to evaluate xpath expression \"%s\"\n", xpathExpr); location_completion_cleanup(xpathObj, xpathCtx, doc); - return; + return NULL; } iter = load_xpath_results(list_store, xpathObj->nodesetval); location_completion_cleanup(xpathObj, xpathCtx, doc); - location_completion_setup(list_store); g_fprintf(stderr, "Bookmarks: Done.\n"); + + return GTK_TREE_MODEL(list_store); } diff --git a/bookmarks.h b/bookmarks.h index 2e44eb3..29bd553 100644 --- a/bookmarks.h +++ b/bookmarks.h @@ -1,3 +1,3 @@ #include -GtkEntryCompletion *location_completion; -void location_completion_init(); +GtkTreeModel *bookmarks_completion_init(); +void bookmarks_completion_setup(GtkEntryCompletion *location_completion, GtkTreeModel *tree_model); -- cgit v1.3.1-23-gd82d From 5af5a723bfa9a3da2df754e63a3833445ecdb49b Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 22 Aug 2020 07:53:38 +0200 Subject: bookmarks: Check for access before reading, remove homepage --- bookmarks.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bookmarks.c') diff --git a/bookmarks.c b/bookmarks.c index 59faf95..dcf579d 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -6,6 +6,7 @@ #include /* g_fprintf() */ #include #include +#include /* access() */ static gboolean location_completion_matches(GtkEntryCompletion *completion, @@ -76,8 +77,10 @@ bookmarks_completion_init() GtkTreeIter iter; GtkListStore *list_store = gtk_list_store_new(1, G_TYPE_STRING); - gtk_list_store_append(list_store, &iter); - gtk_list_store_set(list_store, &iter, 0, homepage, -1); + if(access(filename, R_OK) != 0) { + g_fprintf(stderr, "Bookmarks: No loadable file found at %s\n", filename); + return NULL; + } g_fprintf(stderr, "Bookmarks: loading at %s\n", filename); doc = xmlParseFile(filename); -- cgit v1.3.1-23-gd82d From a702a8c2a7c173174804165e05f314549753e289 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 11 Oct 2020 09:17:54 +0200 Subject: Enable Intelligent Tracking Protection (ITP) Note: Permission requests are still stuck to deny by default, so third-party domains are always denied access --- badwolf.c | 10 ++++++---- bookmarks.c | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'bookmarks.c') diff --git a/badwolf.c b/badwolf.c index ba26f88..065aeb8 100644 --- a/badwolf.c +++ b/badwolf.c @@ -4,10 +4,9 @@ #include "badwolf.h" -#include "config.h" -#include "downloads.h" #include "bookmarks.h" #include "config.h" +#include "downloads.h" #include "keybindings.h" #include "uri.h" @@ -644,11 +643,14 @@ new_browser(struct Window *window, const gchar *target_url, struct Client *old_b browser->statuslabel = gtk_label_new(NULL); gtk_widget_set_name(browser->statuslabel, "browser__statuslabel"); - WebKitWebContext *web_context = webkit_web_context_new_ephemeral(); + WebKitWebsiteDataManager *website_data_manager = webkit_website_data_manager_new_ephemeral(); + webkit_website_data_manager_set_itp_enabled(website_data_manager, TRUE); + + WebKitWebContext *web_context = + webkit_web_context_new_with_website_data_manager(website_data_manager); webkit_web_context_set_sandbox_enabled(web_context, TRUE); webkit_web_context_set_process_model(web_context, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES); - webkit_web_context_set_web_extensions_directory(web_context, web_extensions_directory); badwolf_l10n = getenv("BADWOLF_L10N"); diff --git a/bookmarks.c b/bookmarks.c index dcf579d..c6e2ece 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -6,7 +6,7 @@ #include /* g_fprintf() */ #include #include -#include /* access() */ +#include /* access() */ static gboolean location_completion_matches(GtkEntryCompletion *completion, @@ -77,7 +77,8 @@ bookmarks_completion_init() GtkTreeIter iter; GtkListStore *list_store = gtk_list_store_new(1, G_TYPE_STRING); - if(access(filename, R_OK) != 0) { + if(access(filename, R_OK) != 0) + { g_fprintf(stderr, "Bookmarks: No loadable file found at %s\n", filename); return NULL; } -- cgit v1.3.1-23-gd82d From 2938c5cf138bef4f65644d9213233fa0e5a5ee6f Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 11 Oct 2020 20:50:39 +0200 Subject: bookmarks: Add support for XInclude --- badwolf.1 | 2 +- bookmarks.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'bookmarks.c') diff --git a/badwolf.1 b/badwolf.1 index 6bbe2b2..ca02f83 100644 --- a/badwolf.1 +++ b/badwolf.1 @@ -79,7 +79,7 @@ A more generic variable name is also intended to be used in the future. XBEL (XML Bookmark Exchange Language) file, known to be currently supported by: .Xr elinks 1 , .Xr konqueror 1 , -.Xr kbookmarkeditor 1 . Doing a symbolic link from their path works fine. +.Xr kbookmarkeditor 1 . Doing a symbolic link from their path works fine but you might also want to use XInclude to merge multiple XBEL files. .Pp For more information about this format see: .Lk http://pyxml.sourceforge.net/topics/xbel/ diff --git a/bookmarks.c b/bookmarks.c index c6e2ece..6d35216 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -92,6 +92,8 @@ bookmarks_completion_init() return NULL; } + xmlXIncludeProcess(doc); + xpathCtx = xmlXPathNewContext(doc); if(xpathCtx == NULL) { -- cgit v1.3.1-23-gd82d From 6fa3ab417f9339a7dcfbbdf4e0909e58298c3d39 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 17 Oct 2020 07:26:16 +0200 Subject: bookmarks: Fix compiler warnings --- bookmarks.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'bookmarks.c') diff --git a/bookmarks.c b/bookmarks.c index 6d35216..2eb321d 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -5,6 +5,7 @@ #include /* g_fprintf() */ #include +#include #include #include /* access() */ @@ -46,7 +47,7 @@ location_completion_cleanup(xmlXPathObjectPtr xpathObj, xmlXPathContextPtr xpath if(doc != NULL) xmlFreeDoc(doc); } -static GtkTreeIter +static void load_xpath_results(GtkListStore *list_store, xmlNodeSetPtr nodes) { GtkTreeIter iter; @@ -62,20 +63,17 @@ load_xpath_results(GtkListStore *list_store, xmlNodeSetPtr nodes) gtk_list_store_set( list_store, &iter, 0, (char *)xmlXPathCastNodeToString(nodes->nodeTab[i]), -1); } - - return iter; } GtkTreeModel * bookmarks_completion_init() { - const xmlChar *xpathExpr = "//bookmark/@href"; + const xmlChar *xpathExpr = (const xmlChar *)"//bookmark/@href"; char *filename = g_build_filename(g_get_user_data_dir(), "badwolf", "bookmarks.xbel", NULL); xmlDocPtr doc = NULL; xmlXPathContextPtr xpathCtx = NULL; xmlXPathObjectPtr xpathObj = NULL; - GtkTreeIter iter; - GtkListStore *list_store = gtk_list_store_new(1, G_TYPE_STRING); + GtkListStore *list_store = gtk_list_store_new(1, G_TYPE_STRING); if(access(filename, R_OK) != 0) { @@ -110,7 +108,7 @@ bookmarks_completion_init() return NULL; } - iter = load_xpath_results(list_store, xpathObj->nodesetval); + load_xpath_results(list_store, xpathObj->nodesetval); location_completion_cleanup(xpathObj, xpathCtx, doc); -- cgit v1.3.1-23-gd82d From 506ea6fa32138827a103cf11cc174f4a0f3a25c3 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 25 Oct 2020 02:42:10 +0100 Subject: Add _() to bookmarks.c and update french translation --- bookmarks.c | 15 ++++----- po/fr.po | 95 ++++++++++++++++++++++++++++++++++++++------------------- po/messages.pot | 83 ++++++++++++++++++++++++++++++++++--------------- po/pt_BR.po | 83 ++++++++++++++++++++++++++++++++++--------------- po/tr.po | 87 ++++++++++++++++++++++++++++++++++++---------------- 5 files changed, 249 insertions(+), 114 deletions(-) (limited to 'bookmarks.c') diff --git a/bookmarks.c b/bookmarks.c index 2eb321d..2a6df22 100644 --- a/bookmarks.c +++ b/bookmarks.c @@ -3,6 +3,7 @@ #include "badwolf.h" #include "config.h" +#include /* _() and other internationalization/localization helpers */ #include /* g_fprintf() */ #include #include @@ -55,7 +56,7 @@ load_xpath_results(GtkListStore *list_store, xmlNodeSetPtr nodes) size = (nodes) ? nodes->nodeNr : 0; - g_fprintf(stderr, "Bookmarks: Found %d bookmarks.\n", size); + g_fprintf(stderr, _("Bookmarks: Found %d bookmarks.\n"), size); for(int i = 0; i < size; i++) if(nodes->nodeTab[i]) { @@ -77,15 +78,15 @@ bookmarks_completion_init() if(access(filename, R_OK) != 0) { - g_fprintf(stderr, "Bookmarks: No loadable file found at %s\n", filename); + g_fprintf(stderr, _("Bookmarks: No loadable file found at %s\n"), filename); return NULL; } - g_fprintf(stderr, "Bookmarks: loading at %s\n", filename); + g_fprintf(stderr, _("Bookmarks: loading at %s\n"), filename); doc = xmlParseFile(filename); if(doc == NULL) { - g_fprintf(stderr, "Bookmarks: unable to parse file \"%s\"\n", filename); + g_fprintf(stderr, _("Bookmarks: unable to parse file \"%s\"\n"), filename); location_completion_cleanup(xpathObj, xpathCtx, doc); return NULL; } @@ -95,7 +96,7 @@ bookmarks_completion_init() xpathCtx = xmlXPathNewContext(doc); if(xpathCtx == NULL) { - g_fprintf(stderr, "Bookmarks: unable to create new XPath context\n"); + g_fprintf(stderr, _("Bookmarks: unable to create new XPath context\n")); location_completion_cleanup(xpathObj, xpathCtx, doc); return NULL; } @@ -103,7 +104,7 @@ bookmarks_completion_init() xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx); if(xpathObj == NULL) { - g_fprintf(stderr, "Bookmarks: unable to evaluate xpath expression \"%s\"\n", xpathExpr); + g_fprintf(stderr, _("Bookmarks: unable to evaluate XPath expression \"%s\"\n"), xpathExpr); location_completion_cleanup(xpathObj, xpathCtx, doc); return NULL; } @@ -112,7 +113,7 @@ bookmarks_completion_init() location_completion_cleanup(xpathObj, xpathCtx, doc); - g_fprintf(stderr, "Bookmarks: Done.\n"); + g_fprintf(stderr, _("Bookmarks: Done.\n")); return GTK_TREE_MODEL(list_store); } diff --git a/po/fr.po b/po/fr.po index d41f044..d938819 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Badwolf 0.3.0+gd88f2e7\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-05-15 06:00+0200\n" +"POT-Creation-Date: 2020-10-25 02:35+0100\n" "PO-Revision-Date: 2019-12-22 00:57+0100\n" "Last-Translator: Haelwenn (lanodan) Monnier \n" "Language-Team: French\n" @@ -37,20 +37,53 @@ msgstr "%02i:%02i:%02i Téléchargement finit" msgid "%02i:%02i:%02i Downloading…" msgstr "%02i:%02i:%02i Téléchargement en cours…" -#: downloads.c:195 downloads.c:212 downloads.c:215 +#: downloads.c:199 downloads.c:216 downloads.c:219 msgid "Badwolf Downloads" msgstr "Téléchargements Badwolf" -#: badwolf.c:861 +#: bookmarks.c:116 +msgid "Bookmarks: Done.\n" +msgstr "Marque-Pages: Terminé.\n" + +#: bookmarks.c:59 +#, c-format +msgid "Bookmarks: Found %d bookmarks.\n" +msgstr "Marque-Pages: %d marque-pages trouvés.\n" + +#: bookmarks.c:81 +#, c-format +msgid "Bookmarks: No loadable file found at %s\n" +msgstr "Marques-Pages: Aucun fichier chargeable trouvé à %s\n" + +#: bookmarks.c:85 +#, c-format +msgid "Bookmarks: loading at %s\n" +msgstr "Marques-Pages: chargement à %s\n" + +#: bookmarks.c:99 +msgid "Bookmarks: unable to create new XPath context\n" +msgstr "Marques-Pages: Échec à la création du contexte XPath\n" + +#: bookmarks.c:107 +#, c-format +msgid "Bookmarks: unable to evaluate XPath expression \"%s\"\n" +msgstr "Marques-Pages: Échec à l'évaluation de l'expression XPath « %s »\n" + +#: bookmarks.c:89 +#, c-format +msgid "Bookmarks: unable to parse file \"%s\"\n" +msgstr "Marques-Pages: Ëchec au parsage du fichier « %s »\n" + +#: badwolf.c:954 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "Version WebKit à la compilation: %d.%d.%d\n" -#: badwolf.c:391 +#: badwolf.c:439 msgid "Continue" msgstr "Continuer" -#: badwolf.c:341 +#: badwolf.c:389 msgid "" "Couldn't verify the TLS certificate to ensure a better security of the " "connection. You might want to verify your machine and network.\n" @@ -61,7 +94,7 @@ msgstr "" "et son réseau.\n" "\n" -#: badwolf.c:98 +#: badwolf.c:99 msgid "Crashed" msgstr "Crash" @@ -69,33 +102,33 @@ msgstr "Crash" msgid "Download starting…" msgstr "Démarrage du téléchargement" -#: badwolf.c:364 +#: badwolf.c:412 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" "Erreur : Une erreur inconnue est apparue pendant la validation du " "certificat.\n" -#: badwolf.c:345 +#: badwolf.c:393 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "Erreur : L'autorité de certification (CA X509) est inconnue.\n" -#: badwolf.c:358 +#: badwolf.c:406 msgid "Error: The certificate has been revoked.\n" msgstr "Erreur : Le certificat à été révoqué.\n" -#: badwolf.c:355 +#: badwolf.c:403 msgid "Error: The certificate has expired. Check your system's clock.\n" msgstr "Erreur : Le certificat a expiré.\n" -#: badwolf.c:361 +#: badwolf.c:409 msgid "Error: The certificate is considered to be insecure.\n" msgstr "Erreur : Le certificat est considéré comme non-sécurisé.\n" -#: badwolf.c:352 +#: badwolf.c:400 msgid "Error: The certificate isn't valid yet. Check your system's clock.\n" msgstr "Erreur : Le certificat n'est pas encore valide.\n" -#: badwolf.c:348 +#: badwolf.c:396 msgid "Error: The given identity doesn't match the expected one.\n" msgstr "Erreur : L'identité ne correspond pas à celle attendue.\n" @@ -108,80 +141,80 @@ msgstr "" "Navigateur WebKitGTK+ minimaliste et orienté vie privée\n" "Version WebKit au lancement: %d.%d.%d" -#: badwolf.c:790 +#: badwolf.c:889 msgid "New tab" msgstr "Nouvel onglet" -#: badwolf.c:910 +#: badwolf.c:1006 msgid "Open new tab" msgstr "Ouvrir un nouvel onglet" -#: badwolf.c:102 +#: badwolf.c:103 msgid "Out of Memory" msgstr "Dépassement Mémoire" -#: badwolf.c:859 +#: badwolf.c:952 #, c-format msgid "Running Badwolf version: %s\n" msgstr "Version de Badwolf: %s\n" -#: badwolf.c:866 +#: badwolf.c:959 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "Version WebKit au lancement: %d.%d.%d\n" -#: badwolf.c:388 +#: badwolf.c:436 #, c-format msgid "TLS Error for %s." msgstr "Erreur TLS pour %s." -#: badwolf.c:391 +#: badwolf.c:439 #, fuzzy msgid "Temporarily Add Exception" msgstr "Ajouter Temporairement une Exception" -#: badwolf.c:588 +#: badwolf.c:647 msgid "Toggle javascript" msgstr "Activer/Désactiver javascript" -#: badwolf.c:593 +#: badwolf.c:652 msgid "Toggle loading images automatically" msgstr "" -#: badwolf.c:106 +#: badwolf.c:107 msgid "Unknown Crash" msgstr "Crash inconnu" -#: badwolf.c:591 +#: badwolf.c:650 msgid "_IMG" msgstr "_IMG" -#: badwolf.c:586 +#: badwolf.c:645 msgid "_JS" msgstr "_JS" -#: badwolf.c:706 +#: badwolf.c:777 msgid "search in current page" msgstr "recherche dans la page courante" -#: badwolf.c:97 +#: badwolf.c:98 msgid "the web process crashed.\n" msgstr "le processus web a cessé de fonctionner.\n" -#: badwolf.c:101 +#: badwolf.c:102 msgid "the web process exceeded the memory limit.\n" msgstr "le processus web a dépassé la limitation de mémoire.\n" -#: badwolf.c:105 +#: badwolf.c:106 msgid "the web process terminated for an unknown reason.\n" msgstr "le processus web s’est interrompu pour une raison inconnue.\n" -#: badwolf.c:873 +#: badwolf.c:966 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "Répertoire webkit-web-extension configuré à %s\n" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:944 +#: badwolf.c:1042 msgid "ø" msgstr "" diff --git a/po/messages.pot b/po/messages.pot index b122acb..dfddb74 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 1.0.2+g17b9802.develop\n" +"Project-Id-Version: Badwolf 1.0.3+g0391361.develop\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-07-11 11:35+0200\n" +"POT-Creation-Date: 2020-10-25 02:35+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,16 +41,49 @@ msgstr "" msgid "Badwolf Downloads" msgstr "" -#: badwolf.c:919 +#: bookmarks.c:116 +msgid "Bookmarks: Done.\n" +msgstr "" + +#: bookmarks.c:59 +#, c-format +msgid "Bookmarks: Found %d bookmarks.\n" +msgstr "" + +#: bookmarks.c:81 +#, c-format +msgid "Bookmarks: No loadable file found at %s\n" +msgstr "" + +#: bookmarks.c:85 +#, c-format +msgid "Bookmarks: loading at %s\n" +msgstr "" + +#: bookmarks.c:99 +msgid "Bookmarks: unable to create new XPath context\n" +msgstr "" + +#: bookmarks.c:107 +#, c-format +msgid "Bookmarks: unable to evaluate XPath expression \"%s\"\n" +msgstr "" + +#: bookmarks.c:89 +#, c-format +msgid "Bookmarks: unable to parse file \"%s\"\n" +msgstr "" + +#: badwolf.c:954 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:416 +#: badwolf.c:439 msgid "Continue" msgstr "" -#: badwolf.c:366 +#: badwolf.c:389 msgid "" "Couldn't verify the TLS certificate to ensure a better security of the " "connection. You might want to verify your machine and network.\n" @@ -65,31 +98,31 @@ msgstr "" msgid "Download starting…" msgstr "" -#: badwolf.c:389 +#: badwolf.c:412 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" -#: badwolf.c:370 +#: badwolf.c:393 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "" -#: badwolf.c:383 +#: badwolf.c:406 msgid "Error: The certificate has been revoked.\n" msgstr "" -#: badwolf.c:380 +#: badwolf.c:403 msgid "Error: The certificate has expired. Check your system's clock.\n" msgstr "" -#: badwolf.c:386 +#: badwolf.c:409 msgid "Error: The certificate is considered to be insecure.\n" msgstr "" -#: badwolf.c:377 +#: badwolf.c:400 msgid "Error: The certificate isn't valid yet. Check your system's clock.\n" msgstr "" -#: badwolf.c:373 +#: badwolf.c:396 msgid "Error: The given identity doesn't match the expected one.\n" msgstr "" @@ -100,11 +133,11 @@ msgid "" "Runtime WebKit version: %d.%d.%d" msgstr "" -#: badwolf.c:854 +#: badwolf.c:889 msgid "New tab" msgstr "" -#: badwolf.c:968 +#: badwolf.c:1006 msgid "Open new tab" msgstr "" @@ -112,30 +145,30 @@ msgstr "" msgid "Out of Memory" msgstr "" -#: badwolf.c:917 +#: badwolf.c:952 #, c-format msgid "Running Badwolf version: %s\n" msgstr "" -#: badwolf.c:924 +#: badwolf.c:959 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:413 +#: badwolf.c:436 #, c-format msgid "TLS Error for %s." msgstr "" -#: badwolf.c:416 +#: badwolf.c:439 msgid "Temporarily Add Exception" msgstr "" -#: badwolf.c:624 +#: badwolf.c:647 msgid "Toggle javascript" msgstr "" -#: badwolf.c:629 +#: badwolf.c:652 msgid "Toggle loading images automatically" msgstr "" @@ -143,15 +176,15 @@ msgstr "" msgid "Unknown Crash" msgstr "" -#: badwolf.c:627 +#: badwolf.c:650 msgid "_IMG" msgstr "" -#: badwolf.c:622 +#: badwolf.c:645 msgid "_JS" msgstr "" -#: badwolf.c:742 +#: badwolf.c:777 msgid "search in current page" msgstr "" @@ -167,12 +200,12 @@ msgstr "" msgid "the web process terminated for an unknown reason.\n" msgstr "" -#: badwolf.c:931 +#: badwolf.c:966 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:1002 +#: badwolf.c:1042 msgid "ø" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index 9f54980..56f5ea0 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Badwolf 0.4.0+g607300e\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-05-18 03:06+0200\n" +"POT-Creation-Date: 2020-10-25 02:35+0100\n" "PO-Revision-Date: 2020-05-17 20:18-0300\n" "Last-Translator: Pedro Lucas Porcellis \n" "Language-Team: Brazilian Portuguese\n" @@ -36,20 +36,53 @@ msgstr "%02i:%02i:%02i Transferência Concluída" msgid "%02i:%02i:%02i Downloading…" msgstr "%02i:%02i:%02i Baixando…" -#: downloads.c:195 downloads.c:212 downloads.c:215 +#: downloads.c:199 downloads.c:216 downloads.c:219 msgid "Badwolf Downloads" msgstr "Transferências do Badwolf" -#: badwolf.c:874 +#: bookmarks.c:116 +msgid "Bookmarks: Done.\n" +msgstr "" + +#: bookmarks.c:59 +#, c-format +msgid "Bookmarks: Found %d bookmarks.\n" +msgstr "" + +#: bookmarks.c:81 +#, c-format +msgid "Bookmarks: No loadable file found at %s\n" +msgstr "" + +#: bookmarks.c:85 +#, c-format +msgid "Bookmarks: loading at %s\n" +msgstr "" + +#: bookmarks.c:99 +msgid "Bookmarks: unable to create new XPath context\n" +msgstr "" + +#: bookmarks.c:107 +#, c-format +msgid "Bookmarks: unable to evaluate XPath expression \"%s\"\n" +msgstr "" + +#: bookmarks.c:89 +#, c-format +msgid "Bookmarks: unable to parse file \"%s\"\n" +msgstr "" + +#: badwolf.c:954 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "Versão do WebKit %d.%d.%d\n" -#: badwolf.c:403 +#: badwolf.c:439 msgid "Continue" msgstr "Continuar" -#: badwolf.c:353 +#: badwolf.c:389 msgid "" "Couldn't verify the TLS certificate to ensure a better security of the " "connection. You might want to verify your machine and network.\n" @@ -67,34 +100,34 @@ msgstr "Erro" msgid "Download starting…" msgstr "Transferência Iniciada…" -#: badwolf.c:376 +#: badwolf.c:412 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" "Erro: Algum erro desconhecido ocorreu enquanto validava o certificado.\n" -#: badwolf.c:357 +#: badwolf.c:393 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "Erro: A Autoridade de Certificados X509 é desconhecida.\n" -#: badwolf.c:370 +#: badwolf.c:406 msgid "Error: The certificate has been revoked.\n" msgstr "Erro: O certificado foi revogado.\n" -#: badwolf.c:367 +#: badwolf.c:403 msgid "Error: The certificate has expired. Check your system's clock.\n" msgstr "" "Erro: O certificado foi expirado. Verifique o relógio do seu sistema.\n" -#: badwolf.c:373 +#: badwolf.c:409 msgid "Error: The certificate is considered to be insecure.\n" msgstr "Erro: O certificado é considerado inseguro.\n" -#: badwolf.c:364 +#: badwolf.c:400 msgid "Error: The certificate isn't valid yet. Check your system's clock.\n" msgstr "" "Erro: O certificado não é válido ainda. Verifique o relógio do seu sistema.\n" -#: badwolf.c:360 +#: badwolf.c:396 msgid "Error: The given identity doesn't match the expected one.\n" msgstr "Erro: A identidade não confere com a esperada.\n" @@ -107,11 +140,11 @@ msgstr "" "Navegador orientado pela privacidade e minimalismo\n" "Versão do WebKit: %d.%d.%d" -#: badwolf.c:803 +#: badwolf.c:889 msgid "New tab" msgstr "Nova aba" -#: badwolf.c:923 +#: badwolf.c:1006 msgid "Open new tab" msgstr "Abrir uma Nova aba" @@ -119,30 +152,30 @@ msgstr "Abrir uma Nova aba" msgid "Out of Memory" msgstr "Sem memória" -#: badwolf.c:872 +#: badwolf.c:952 #, c-format msgid "Running Badwolf version: %s\n" msgstr "Rodando versão %s do Badwolf\n" -#: badwolf.c:879 +#: badwolf.c:959 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "Versão do WebKit: %d.%d.%d\n" -#: badwolf.c:400 +#: badwolf.c:436 #, c-format msgid "TLS Error for %s." msgstr "Erro TLS para %s." -#: badwolf.c:403 +#: badwolf.c:439 msgid "Temporarily Add Exception" msgstr "Adicionar exceção temporária" -#: badwolf.c:600 +#: badwolf.c:647 msgid "Toggle javascript" msgstr "Habilitar Javascript" -#: badwolf.c:605 +#: badwolf.c:652 msgid "Toggle loading images automatically" msgstr "Habilitar carregamento de imagens automático" @@ -150,15 +183,15 @@ msgstr "Habilitar carregamento de imagens automático" msgid "Unknown Crash" msgstr "Erro desconhecido" -#: badwolf.c:603 +#: badwolf.c:650 msgid "_IMG" msgstr "_IMG" -#: badwolf.c:598 +#: badwolf.c:645 msgid "_JS" msgstr "_JS" -#: badwolf.c:718 +#: badwolf.c:777 msgid "search in current page" msgstr "buscar na página atual" @@ -174,12 +207,12 @@ msgstr "o processo web excedeu o limite de memória.\n" msgid "the web process terminated for an unknown reason.\n" msgstr "o processo web terminou por uma razão desconhecida.\n" -#: badwolf.c:886 +#: badwolf.c:966 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "diretório de extensões configurado para: %s\n" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:957 +#: badwolf.c:1042 msgid "ø" msgstr "" diff --git a/po/tr.po b/po/tr.po index 040c48c..5c387ee 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Badwolf 1.0.2+g17b9802.develop\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-07-11 11:35+0200\n" +"POT-Creation-Date: 2020-10-25 02:35+0100\n" "PO-Revision-Date: 2020-07-17 23:50+0300\n" "Last-Translator: Oğuz Ersen \n" "Language-Team: Turkish\n" @@ -41,16 +41,49 @@ msgstr "%02i:%02i:%02i İndiriliyor…" msgid "Badwolf Downloads" msgstr "Badwolf İndirmeleri" -#: badwolf.c:919 +#: bookmarks.c:116 +msgid "Bookmarks: Done.\n" +msgstr "" + +#: bookmarks.c:59 +#, c-format +msgid "Bookmarks: Found %d bookmarks.\n" +msgstr "" + +#: bookmarks.c:81 +#, c-format +msgid "Bookmarks: No loadable file found at %s\n" +msgstr "" + +#: bookmarks.c:85 +#, c-format +msgid "Bookmarks: loading at %s\n" +msgstr "" + +#: bookmarks.c:99 +msgid "Bookmarks: unable to create new XPath context\n" +msgstr "" + +#: bookmarks.c:107 +#, c-format +msgid "Bookmarks: unable to evaluate XPath expression \"%s\"\n" +msgstr "" + +#: bookmarks.c:89 +#, c-format +msgid "Bookmarks: unable to parse file \"%s\"\n" +msgstr "" + +#: badwolf.c:954 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "Oluşturma zamanı WebKit sürümü: %d.%d.%d\n" -#: badwolf.c:416 +#: badwolf.c:439 msgid "Continue" msgstr "Devam Et" -#: badwolf.c:366 +#: badwolf.c:389 msgid "" "Couldn't verify the TLS certificate to ensure a better security of the " "connection. You might want to verify your machine and network.\n" @@ -68,31 +101,33 @@ msgstr "Çöktü" msgid "Download starting…" msgstr "İndirme başlatılıyor…" -#: badwolf.c:389 +#: badwolf.c:412 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "Hata: Sertifika doğrulanırken bilinmeyen bir hata oluştu.\n" -#: badwolf.c:370 +#: badwolf.c:393 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "Hata: X509 Sertifika Yetkilisi bilinmiyor.\n" -#: badwolf.c:383 +#: badwolf.c:406 msgid "Error: The certificate has been revoked.\n" msgstr "Hata: Sertifika yürürlükten kaldırıldı.\n" -#: badwolf.c:380 +#: badwolf.c:403 msgid "Error: The certificate has expired. Check your system's clock.\n" -msgstr "Hata: Sertifikanın süresi doldu. Sisteminizin saatini gözden geçirin.\n" +msgstr "" +"Hata: Sertifikanın süresi doldu. Sisteminizin saatini gözden geçirin.\n" -#: badwolf.c:386 +#: badwolf.c:409 msgid "Error: The certificate is considered to be insecure.\n" msgstr "Hata: Sertifikanın güvensiz olduğu kabul ediliyor.\n" -#: badwolf.c:377 +#: badwolf.c:400 msgid "Error: The certificate isn't valid yet. Check your system's clock.\n" -msgstr "Hata: Sertifika henüz geçerli değil. Sisteminizin saatini gözden geçirin.\n" +msgstr "" +"Hata: Sertifika henüz geçerli değil. Sisteminizin saatini gözden geçirin.\n" -#: badwolf.c:373 +#: badwolf.c:396 msgid "Error: The given identity doesn't match the expected one.\n" msgstr "Hata: Verilen kimlik beklenen ile eşleşmiyor.\n" @@ -105,11 +140,11 @@ msgstr "" "Sadelik ve gizlilik odaklı WebKitGTK+ tarayıcısı\n" "Çalışma zamanı WebKit sürümü: %d.%d.%d" -#: badwolf.c:854 +#: badwolf.c:889 msgid "New tab" msgstr "Yeni sekme" -#: badwolf.c:968 +#: badwolf.c:1006 msgid "Open new tab" msgstr "Yeni sekme aç" @@ -117,30 +152,30 @@ msgstr "Yeni sekme aç" msgid "Out of Memory" msgstr "Yetersiz Bellek" -#: badwolf.c:917 +#: badwolf.c:952 #, c-format msgid "Running Badwolf version: %s\n" msgstr "Çalışan Badwolf sürümü: %s\n" -#: badwolf.c:924 +#: badwolf.c:959 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "Çalışma zamanı WebKit sürümü: %d.%d.%d\n" -#: badwolf.c:413 +#: badwolf.c:436 #, c-format msgid "TLS Error for %s." msgstr "%s için TLS Hatası." -#: badwolf.c:416 +#: badwolf.c:439 msgid "Temporarily Add Exception" msgstr "Geçici Olarak İstisna Ekle" -#: badwolf.c:624 +#: badwolf.c:647 msgid "Toggle javascript" msgstr "Javascript'i aç/kapat" -#: badwolf.c:629 +#: badwolf.c:652 msgid "Toggle loading images automatically" msgstr "Resimleri otomatik yüklemeyi aç/kapat" @@ -148,15 +183,15 @@ msgstr "Resimleri otomatik yüklemeyi aç/kapat" msgid "Unknown Crash" msgstr "Bilinmeyen Çökme" -#: badwolf.c:627 +#: badwolf.c:650 msgid "_IMG" msgstr "_RSM" -#: badwolf.c:622 +#: badwolf.c:645 msgid "_JS" msgstr "_JS" -#: badwolf.c:742 +#: badwolf.c:777 msgid "search in current page" msgstr "geçerli sayfada ara" @@ -172,12 +207,12 @@ msgstr "web işlemi bellek sınırını aştı.\n" msgid "the web process terminated for an unknown reason.\n" msgstr "web işlemi bilinmeyen bir nedenle sona erdi.\n" -#: badwolf.c:931 +#: badwolf.c:966 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "webkit-web-extension dizini şuna ayarlandı: %s\n" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:1002 +#: badwolf.c:1042 msgid "ø" msgstr "" -- cgit v1.3.1-23-gd82d