From d55586e83772238fd1adf9ca9370f37697b29e33 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 2 Nov 2019 22:02:30 +0100 Subject: fix formatting --- badwolf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index 6c6b0c9..b4dd580 100644 --- a/badwolf.c +++ b/badwolf.c @@ -726,7 +726,8 @@ main(int argc, char *argv[]) webkit_get_minor_version(), webkit_get_micro_version()); - web_extensions_directory = g_build_filename(g_get_user_data_dir(), "badwolf", "webkit-web-extension", NULL); + web_extensions_directory = + g_build_filename(g_get_user_data_dir(), "badwolf", "webkit-web-extension", NULL); g_fprintf(stderr, _("webkit-web-extension directory set to: %s\n"), web_extensions_directory); window->main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); -- cgit v1.3.1-23-gd82d From 2a4e981821edcf340d1324560e95c08a4674bc22 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 13 Dec 2019 03:48:36 +0100 Subject: Add GtkMessageDialog on load-failed-with-tls-errors --- badwolf.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index b4dd580..fe40193 100644 --- a/badwolf.c +++ b/badwolf.c @@ -354,6 +354,28 @@ WebViewCb_decide_policy(WebKitWebView *web_view, return TRUE; } +static gboolean +WebViewCb_load_failed_with_tls_errors(WebKitWebView *web_view, + gchar *failing_uri, + GTlsCertificate *certificate, + GTlsCertificateFlags errors, + gpointer user_data) +{ + (void)web_view; + (void)certificate; + (void)errors; + struct Client *browser = (struct Client *)user_data; + + GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(browser->window->main_window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + "TLS Error for: %s", + failing_uri); + + return FALSE; /* propagate the event further */ +} + static void web_contextCb_download_started(WebKitWebContext *web_context, WebKitDownload *download, @@ -606,6 +628,10 @@ new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web g_signal_connect( browser->webView, "permission-request", G_CALLBACK(WebViewCb_permission_request), NULL); g_signal_connect(browser->webView, "decide-policy", G_CALLBACK(WebViewCb_decide_policy), NULL); + g_signal_connect(browser->webView, + "load-failed-with-tls-errors", + G_CALLBACK(WebViewCb_load_failed_with_tls_errors), + browser); /* signals for WebView's WebContext */ g_signal_connect(G_OBJECT(web_context), -- cgit v1.3.1-23-gd82d From e5ecaf777659e8d3a625002826c4a1a3f8b31801 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 13 Dec 2019 14:06:33 +0100 Subject: badwolf.c: Use SoupURI instead of g_uri_parse_scheme() --- Makefile | 2 +- badwolf.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'badwolf.c') diff --git a/Makefile b/Makefile index 0a58cda..cbd134e 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ DATADIR = $(PREFIX)/share/badwolf APPSDIR = $(PREFIX)/share/applications PACKAGE = Badwolf -DEPS = gtk+-3.0 webkit2gtk-4.0 +DEPS = gtk+-3.0 webkit2gtk-4.0 libsoup-2.4 OBJS = keybindings.o badwolf.o EXE = badwolf TRANS = fr.mo diff --git a/badwolf.c b/badwolf.c index fe40193..e85f189 100644 --- a/badwolf.c +++ b/badwolf.c @@ -9,6 +9,7 @@ #include /* _() and other internationalization/localization helpers */ #include /* g_fprintf() */ +#include /* soup* */ #include /* LC_* */ #include /* realpath(), malloc() */ @@ -64,11 +65,21 @@ notebookCb_switch__page(GtkNotebook *notebook, GtkWidget *page, guint page_num, gchar * badwolf_ensure_uri_scheme(gchar *text, gboolean try_file) { - if(text == NULL) return "about:blank"; + SoupURI *uri = soup_uri_new(text); - char *scheme = g_uri_parse_scheme(text); + if(uri->path == NULL) + { + soup_uri_free(uri); + return "about:blank"; + } + + if(uri->scheme != NULL) + { + soup_uri_free(uri); + return text; + } - if(scheme != NULL) return text; + soup_uri_free(uri); if(try_file) { -- cgit v1.3.1-23-gd82d From 2e4298b105fab04e1ac092c99ce5d44dc90823af Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 13 Dec 2019 14:20:28 +0100 Subject: badwolf.c: Add error details and adding exception --- badwolf.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 5 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index e85f189..866a4ba 100644 --- a/badwolf.c +++ b/badwolf.c @@ -365,9 +365,38 @@ WebViewCb_decide_policy(WebKitWebView *web_view, return TRUE; } +static char * +detail_tls_certificate_flags(GTlsCertificateFlags tls_errors) +{ + GString *errors = g_string_new(NULL); + + if(tls_errors & G_TLS_CERTIFICATE_UNKNOWN_CA) + g_string_append_printf(errors, _("The Certificate Authority is unknown.\n")); + + if(tls_errors & G_TLS_CERTIFICATE_BAD_IDENTITY) + g_string_append(errors, _("The given identity doesn't match the expected one.\n")); + + if(tls_errors & G_TLS_CERTIFICATE_NOT_ACTIVATED) + g_string_append(errors, _("The certificate isn't valid yet.\n")); + + if(tls_errors & G_TLS_CERTIFICATE_EXPIRED) + g_string_append(errors, _("The certificate has expired.\n")); + + if(tls_errors & G_TLS_CERTIFICATE_REVOKED) + g_string_append(errors, _("The certificate has been revoked.\n")); + + if(tls_errors & G_TLS_CERTIFICATE_INSECURE) + g_string_append(errors, _("The certificate is considered to be insecure.\n")); + + if(tls_errors & G_TLS_CERTIFICATE_GENERIC_ERROR) + g_string_append(errors, _("Some unknown error occurred validating the certificate\n")); + + return g_string_free(errors, FALSE); +} + static gboolean WebViewCb_load_failed_with_tls_errors(WebKitWebView *web_view, - gchar *failing_uri, + gchar *failing_text, GTlsCertificate *certificate, GTlsCertificateFlags errors, gpointer user_data) @@ -376,13 +405,32 @@ WebViewCb_load_failed_with_tls_errors(WebKitWebView *web_view, (void)certificate; (void)errors; struct Client *browser = (struct Client *)user_data; + gchar *error_details = detail_tls_certificate_flags(errors); + gint dialog_response; + SoupURI *failing_uri = soup_uri_new(failing_text); GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(browser->window->main_window), - GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_DIALOG_MODAL & GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - "TLS Error for: %s", - failing_uri); + GTK_BUTTONS_NONE, + "TLS Error for %s.", + failing_text); + gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Add Exception"), 1, _("Ignore"), 0, NULL); + gtk_dialog_set_default_response(GTK_DIALOG(dialog), 0); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s\n", error_details); + + dialog_response = gtk_dialog_run(GTK_DIALOG(dialog)); + + if(dialog_response == 1) + { + webkit_web_context_allow_tls_certificate_for_host( + webkit_web_view_get_context(browser->webView), certificate, failing_uri->host); + webkit_web_view_reload(browser->webView); + } + + soup_uri_free(failing_uri); + g_free(error_details); + gtk_widget_destroy(dialog); return FALSE; /* propagate the event further */ } -- cgit v1.3.1-23-gd82d From 13f01bbd402ab667e7ee80afc3cfaee2f7b92f44 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 7 Dec 2019 10:40:42 +0100 Subject: badwolf.c: Simplify badwolf_ensure_uri_scheme() --- badwolf.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index 866a4ba..fc26407 100644 --- a/badwolf.c +++ b/badwolf.c @@ -81,19 +81,7 @@ badwolf_ensure_uri_scheme(gchar *text, gboolean try_file) soup_uri_free(uri); - if(try_file) - { - gchar *f; - char *path; - path = realpath(text, NULL); - - if(path != NULL) - { - f = g_strdup_printf("file://%s", path); - free(path); - return f; - } - } + if(try_file && (access(text, R_OK) == 0)) return g_strdup_printf("file://%s", text); return g_strdup_printf("http://%s", text); } -- cgit v1.3.1-23-gd82d From 95138deae3a523bf10b59ec13b6e5b4b0a1456a6 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 7 Dec 2019 10:51:19 +0100 Subject: badwolf.c: badwolf_ensure_uri_scheme never returns NULL --- badwolf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index fc26407..a69c05a 100644 --- a/badwolf.c +++ b/badwolf.c @@ -474,12 +474,10 @@ downloadCb_decide_destination(WebKitDownload *download, static gboolean locationCb_activate(GtkEntry *location, gpointer user_data) { - char *target_url; struct Client *browser = (struct Client *)user_data; - target_url = badwolf_ensure_uri_scheme((char *)gtk_entry_get_text(location), TRUE); - - if(target_url != NULL) webkit_web_view_load_uri(browser->webView, target_url); + webkit_web_view_load_uri(browser->webView, + badwolf_ensure_uri_scheme(gtk_entry_get_text(location), TRUE)); return TRUE; } -- cgit v1.3.1-23-gd82d From 92578a663bbb9a931a1771cd25922915cd014849 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 7 Dec 2019 11:50:42 +0100 Subject: Move from GtkFileChooserDialog to GtkFileChooserNative --- badwolf.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index a69c05a..9071351 100644 --- a/badwolf.c +++ b/badwolf.c @@ -445,28 +445,22 @@ downloadCb_decide_destination(WebKitDownload *download, gint chooser_response; GtkWindow *parent_window = GTK_WINDOW(browser->window->main_window); - GtkWidget *file_dialog = gtk_file_chooser_dialog_new(NULL, - parent_window, - GTK_FILE_CHOOSER_ACTION_SAVE, - _("_Cancel"), - GTK_RESPONSE_CANCEL, - _("_Save"), - GTK_RESPONSE_ACCEPT, - NULL); + GtkFileChooserNative *file_dialog = + gtk_file_chooser_native_new(NULL, parent_window, GTK_FILE_CHOOSER_ACTION_SAVE, NULL, NULL); GtkFileChooser *file_chooser = GTK_FILE_CHOOSER(file_dialog); gtk_file_chooser_set_current_name(file_chooser, suggested_filename); gtk_file_chooser_set_do_overwrite_confirmation(file_chooser, TRUE); webkit_download_set_allow_overwrite(download, TRUE); - chooser_response = gtk_dialog_run(GTK_DIALOG(file_dialog)); + chooser_response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(file_dialog)); if(chooser_response == GTK_RESPONSE_ACCEPT) webkit_download_set_destination(download, gtk_file_chooser_get_uri(file_chooser)); else webkit_download_cancel(download); - gtk_widget_destroy(file_dialog); + g_object_unref(file_dialog); return FALSE; /* Let it propagate */ } -- cgit v1.3.1-23-gd82d From 5e1ea02409b318a46edc5d976738ca48d28246eb Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 7 Dec 2019 11:50:04 +0100 Subject: Simplify formatting --- badwolf.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index 9071351..289e218 100644 --- a/badwolf.c +++ b/badwolf.c @@ -243,10 +243,9 @@ WebViewCb_notify__estimated_load_progress(WebKitWebView *webView, gdouble progress; progress = webkit_web_view_get_estimated_load_progress(browser->webView); - if(progress == 1) - { - progress = 0; - } + + if(progress >= 1) progress = 0; + gtk_entry_set_progress_fraction(GTK_ENTRY(browser->location), progress); return TRUE; @@ -304,13 +303,9 @@ WebViewCb_create(WebKitWebView *related_web_view, struct Client *browser = new_browser(window, NULL, related_web_view); if(badwolf_new_tab(GTK_NOTEBOOK(window->notebook), browser) < 0) - { return NULL; - } else - { return browser->webView; - } } static gboolean @@ -711,10 +706,7 @@ badwolf_new_tab(GtkNotebook *notebook, struct Client *browser) gtk_widget_show_all(browser->box); - if(gtk_notebook_insert_page(notebook, browser->box, NULL, (current_page + 1)) == -1) - { - return -1; - } + if(gtk_notebook_insert_page(notebook, browser->box, NULL, (current_page + 1)) == -1) return -1; gtk_notebook_set_tab_reorderable(notebook, browser->box, TRUE); gtk_notebook_set_tab_label(notebook, browser->box, badwolf_new_tab_box(title, browser)); -- cgit v1.3.1-23-gd82d From 10aa19f7b748385fa08f99a0766dac837ee9522a Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 15 Dec 2019 19:17:31 +0100 Subject: badwolf_ensure_uri_scheme(): Fix const discarding --- badwolf.c | 6 +++--- badwolf.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index 289e218..bf42eb2 100644 --- a/badwolf.c +++ b/badwolf.c @@ -62,8 +62,8 @@ static void closeCb_clicked(GtkButton *close, gpointer user_data); static void notebookCb_switch__page(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data); -gchar * -badwolf_ensure_uri_scheme(gchar *text, gboolean try_file) +const gchar * +badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file) { SoupURI *uri = soup_uri_new(text); @@ -535,7 +535,7 @@ SearchEntryCb_stop__search(GtkSearchEntry *search, gpointer user_data) } struct Client * -new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web_view) +new_browser(struct Window *window, const gchar *target_url, WebKitWebView *related_web_view) { struct Client *browser = malloc(sizeof(struct Client)); target_url = badwolf_ensure_uri_scheme(target_url, (related_web_view == NULL)); diff --git a/badwolf.h b/badwolf.h index 4c9fa65..971ffa3 100644 --- a/badwolf.h +++ b/badwolf.h @@ -41,11 +41,11 @@ struct Client * In the end use the fallback (`http://` for now, might get configuration), * might get some safeguard. */ -gchar *badwolf_ensure_uri_scheme(gchar *text, gboolean try_file); +const gchar *badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file); GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser); void webView_tab_label_change(struct Client *browser, const gchar *title); struct Client * -new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web_view); +new_browser(struct Window *window, const gchar *target_url, WebKitWebView *related_web_view); int badwolf_new_tab(GtkNotebook *notebook, struct Client *browser); gint badwolf_get_tab_position(GtkContainer *notebook, GtkWidget *child); #endif /* BADWOLF_H_INCLUDED */ -- cgit v1.3.1-23-gd82d From 94bc1e381baacba8a45f5782f368af11eff279a7 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 15 Dec 2019 19:33:19 +0100 Subject: badwolf.c: Fix access() usage --- Makefile | 2 +- badwolf.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'badwolf.c') diff --git a/Makefile b/Makefile index a215292..f2c5cee 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ DOCS = usr.bin.badwolf README.md KnowledgeBase.md CC = cc CFLAGS = -g -Wall -Wextra -Wconversion -Wsign-conversion -CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_DEFAULT_SOURCE -DVERSION=\"$(VERSION_FULL)\" +CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION_FULL)\" LIBS = `pkg-config --libs $(DEPS)` all: $(EXE) $(TRANS) diff --git a/badwolf.c b/badwolf.c index bf42eb2..909df75 100644 --- a/badwolf.c +++ b/badwolf.c @@ -11,7 +11,8 @@ #include /* g_fprintf() */ #include /* soup* */ #include /* LC_* */ -#include /* realpath(), malloc() */ +#include /* malloc() */ +#include /* access() */ const gchar *homepage = "https://hacktivis.me/projects/badwolf"; const gchar *version = VERSION; @@ -67,7 +68,7 @@ badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file) { SoupURI *uri = soup_uri_new(text); - if(uri->path == NULL) + if(uri->path == NULL || text == NULL) { soup_uri_free(uri); return "about:blank"; -- cgit v1.3.1-23-gd82d From 06b34a53c2c7af02fbc673d53b5c13f40c2933a6 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Mon, 16 Dec 2019 01:47:12 +0100 Subject: Add tests on badwolf_ensure_uri_scheme --- Makefile | 19 ++++++++++++++----- badwolf.c | 26 +------------------------- badwolf.h | 12 ------------ uri.c | 39 +++++++++++++++++++++++++++++++++++++++ uri.h | 17 +++++++++++++++++ uri_test.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 125 insertions(+), 42 deletions(-) create mode 100644 uri.c create mode 100644 uri.h create mode 100644 uri_test.c (limited to 'badwolf.c') diff --git a/Makefile b/Makefile index f2c5cee..c065d79 100644 --- a/Makefile +++ b/Makefile @@ -12,13 +12,15 @@ APPSDIR = $(PREFIX)/share/applications PACKAGE = Badwolf DEPS = gtk+-3.0 webkit2gtk-4.0 libsoup-2.4 -OBJS = keybindings.o badwolf.o +OBJS = uri.o keybindings.o badwolf.o +OBJS_test = uri_test.o EXE = badwolf +EXE_test = uri_test TRANS = fr.mo DOCS = usr.bin.badwolf README.md KnowledgeBase.md CC = cc -CFLAGS = -g -Wall -Wextra -Wconversion -Wsign-conversion +CFLAGS = -g -Wall -Wextra -Wconversion -Wsign-conversion -O2 CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION_FULL)\" LIBS = `pkg-config --libs $(DEPS)` @@ -43,6 +45,14 @@ badwolf: $(OBJS) .c.o: $(CC) -std=c11 $(CFLAGS) $(CDEPS) -c -o $@ $< +uri_test: uri.o uri_test.o + $(CC) -std=c11 -o $@ uri.o uri_test.o $(LDFLAGS) $(LIBS) + ./$@ + +.PHONY: test +test: $(EXE_test) + +.PHONY: install install: all mkdir -p $(DESTDIR)$(BINDIR) cp -p badwolf $(DESTDIR)$(BINDIR)/badwolf @@ -56,10 +66,9 @@ install: all cp -p $(DOCS) $(DESTDIR)$(DOCDIR)/ @printf '\nNote: An example AppArmor profile has been installed at '$(DOCDIR)/usr.bin.badwolf'\n' +.PHONY: clean clean: - rm -fr locale $(OBJS) $(EXE) + rm -fr locale $(OBJS) $(OBJS_test) $(EXE) $(EXE_test) format: *.c *.h clang-format -style=file -assume-filename=.clang-format -i *.c *.h - -.PHONY: clean install diff --git a/badwolf.c b/badwolf.c index 909df75..627cb3f 100644 --- a/badwolf.c +++ b/badwolf.c @@ -6,13 +6,13 @@ #include "config.h" #include "keybindings.h" +#include "uri.h" #include /* _() and other internationalization/localization helpers */ #include /* g_fprintf() */ #include /* soup* */ #include /* LC_* */ #include /* malloc() */ -#include /* access() */ const gchar *homepage = "https://hacktivis.me/projects/badwolf"; const gchar *version = VERSION; @@ -63,30 +63,6 @@ static void closeCb_clicked(GtkButton *close, gpointer user_data); static void notebookCb_switch__page(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data); -const gchar * -badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file) -{ - SoupURI *uri = soup_uri_new(text); - - if(uri->path == NULL || text == NULL) - { - soup_uri_free(uri); - return "about:blank"; - } - - if(uri->scheme != NULL) - { - soup_uri_free(uri); - return text; - } - - soup_uri_free(uri); - - if(try_file && (access(text, R_OK) == 0)) return g_strdup_printf("file://%s", text); - - return g_strdup_printf("http://%s", text); -} - static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data) { diff --git a/badwolf.h b/badwolf.h index 971ffa3..91c05a4 100644 --- a/badwolf.h +++ b/badwolf.h @@ -30,18 +30,6 @@ struct Client GtkWidget *search; }; -/* badwolf_ensure_uri_scheme: tries to add a scheme on a pseudo-URL missing a scheme - * - gchar text: pseudo-URL missing a scheme - * - gboolean try_file: when TRUE check try first if it can be a file:// path - * - * When `text` isn't exploitable (ie. NULL), returns "about:blank", - * when the URL seems to be valid, return it, - * if try_file is TRUE, check if it can be file:// path, - * some other checks might be added. - * In the end use the fallback (`http://` for now, might get configuration), - * might get some safeguard. - */ -const gchar *badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file); GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser); void webView_tab_label_change(struct Client *browser, const gchar *title); struct Client * diff --git a/uri.c b/uri.c new file mode 100644 index 0000000..bc2bc01 --- /dev/null +++ b/uri.c @@ -0,0 +1,39 @@ +// BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser +// Copyright © 2019 Haelwenn (lanodan) Monnier +// SPDX-License-Identifier: BSD-3-Clause + +#include "uri.h" + +#include /* g_fprintf() */ +#include /* soup* */ +#include /* access() */ + +const gchar * +badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file) +{ + const gchar *fallback = "about:blank"; + SoupURI *uri; + + uri = soup_uri_new(text); + if(!uri) return fallback; + + //g_fprintf(stderr, "uri->scheme = %s, uri->path = %s\n", uri->scheme, uri->path); + + if(!uri->path) + { + soup_uri_free(uri); + return fallback; + } + + if(uri->scheme) + { + soup_uri_free(uri); + return text; + } + + soup_uri_free(uri); + + if(try_file && (access(text, R_OK) == 0)) return g_strdup_printf("file://%s", text); + + return g_strdup_printf("http://%s", text); +} diff --git a/uri.h b/uri.h new file mode 100644 index 0000000..cef50b4 --- /dev/null +++ b/uri.h @@ -0,0 +1,17 @@ +#ifndef URI_H_INCLUDED +#define URI_H_INCLUDED +#include + +/* badwolf_ensure_uri_scheme: tries to add a scheme on a pseudo-URL missing a scheme + * - gchar text: pseudo-URL missing a scheme + * - gboolean try_file: when TRUE check try first if it can be a file:// path + * + * When `text` isn't exploitable (ie. NULL), returns "about:blank", + * when the URL seems to be valid, return it, + * if try_file is TRUE, check if it can be file:// path, + * some other checks might be added. + * In the end use the fallback (`http://` for now, might get configuration), + * might get some safeguard. + */ +const gchar *badwolf_ensure_uri_scheme(const gchar *text, gboolean try_file); +#endif /* URI_H_INCLUDED */ diff --git a/uri_test.c b/uri_test.c new file mode 100644 index 0000000..c5ebe7e --- /dev/null +++ b/uri_test.c @@ -0,0 +1,54 @@ +// BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser +// Copyright © 2019 Haelwenn (lanodan) Monnier +// SPDX-License-Identifier: BSD-3-Clause + +#include "uri.h" + +#include +#include + +static void +badwolf_ensure_uri_scheme_test(void) +{ + const gchar *fallback = "about:blank"; + + struct + { + const gchar *expect; + const gchar *text; + gboolean try_file; + } cases[] = { + // clang formatting hack + {fallback, NULL, FALSE}, + {fallback, NULL, TRUE}, + {fallback, "", FALSE}, + {fallback, "", TRUE}, + {fallback, "/dev/null", FALSE}, + //{"file://dev/null", "/dev/null", TRUE}, + //{"http://example.org", "example.org", FALSE}, + //{"http://example.org", "example.org", TRUE}, + //{fallback, "http://", FALSE}, + //{fallback, "http://", TRUE} + }; + + for(size_t i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) + { + g_info("badwolf_ensure_uri_scheme(\"%s\", %s)", + cases[i].text, + cases[i].try_file ? "TRUE" : "FALSE"); + + const gchar *got = badwolf_ensure_uri_scheme(cases[i].text, cases[i].try_file); + + if(got != cases[i].expect) g_error("expected: \"%s\", got: \"%s\"", cases[i].expect, got); + } +} + +int +main(int argc, char *argv[]) +{ + g_test_init(&argc, &argv, NULL); + + g_test_add_func("/badwolf_ensure_uri_scheme/test", badwolf_ensure_uri_scheme_test); + + return g_test_run(); +} -- cgit v1.3.1-23-gd82d From db49a0a36361a742f0e5a1f834fb5fea4e259cb2 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Mon, 16 Dec 2019 05:41:03 +0100 Subject: Add more strings to translation --- badwolf.c | 2 +- keybindings.c | 2 +- po/fr.po | 13 +++++++++++-- po/messages.pot | 13 +++++++++++-- 4 files changed, 24 insertions(+), 6 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index 627cb3f..e9b7a00 100644 --- a/badwolf.c +++ b/badwolf.c @@ -373,7 +373,7 @@ WebViewCb_load_failed_with_tls_errors(WebKitWebView *web_view, GTK_DIALOG_MODAL & GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, - "TLS Error for %s.", + _("TLS Error for %s."), failing_text); gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Add Exception"), 1, _("Ignore"), 0, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), 0); diff --git a/keybindings.c b/keybindings.c index d75a438..0ea4384 100644 --- a/keybindings.c +++ b/keybindings.c @@ -11,7 +11,7 @@ badwolf_about_dialog(GtkWindow *main_window) "license", "SPDX-License-Identifier: BSD-3-Clause", "copyright", "2019 Haelwenn (lanodan) Monnier ", "website", homepage, - "comments", "Minimalist and privacy-oriented WebKitGTK+ browser", + "comments", _("Minimalist and privacy-oriented WebKitGTK+ browser"), "version", version, //FIXME: "logo-icon-name", g_get_application_name(), NULL diff --git a/po/fr.po b/po/fr.po index 0bf9863..d8af0f3 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Badwolf 0.3.0+gd88f2e7\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2019-12-16 05:26+0100\n" -"PO-Revision-Date: 2019-05-11 05:03+0200\n" +"POT-Creation-Date: 2019-12-16 05:37+0100\n" +"PO-Revision-Date: 2019-12-16 05:37+0100\n" "Last-Translator: Haelwenn (lanodan) Monnier \n" "Language-Team: French\n" "Language: fr\n" @@ -30,6 +30,10 @@ msgstr "Version WebKit à la compilation: %d.%d.%d\n" msgid "Ignore" msgstr "Ignorer" +#: keybindings.c:14 +msgid "Minimalist and privacy-oriented WebKitGTK+ browser" +msgstr "Navigateur WebKitGTK+ minimaliste et orienté vie privée" + #: badwolf.c:457 badwolf.c:621 badwolf.c:643 badwolf.c:680 msgid "New tab" msgstr "Nouvel onglet" @@ -52,6 +56,11 @@ msgstr "Version WebKit au lancement: %d.%d.%d\n" msgid "Some unknown error occurred validating the certificate\n" msgstr "Une error inconnue est apparue pendant la validation du certificat\n" +#: badwolf.c:376 +#, c-format +msgid "TLS Error for %s." +msgstr "Erreur TLS pour %s." + #: badwolf.c:334 msgid "The Certificate Authority is unknown.\n" msgstr "L'autoritée de certification (CA) est inconnue.\n" diff --git a/po/messages.pot b/po/messages.pot index c50f501..a6321ff 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 0.4.0+g5659b01\n" +"Project-Id-Version: Badwolf 0.4.0+g3f954fa\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2019-12-16 05:26+0100\n" +"POT-Creation-Date: 2019-12-16 05:37+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,6 +30,10 @@ msgstr "" msgid "Ignore" msgstr "" +#: keybindings.c:14 +msgid "Minimalist and privacy-oriented WebKitGTK+ browser" +msgstr "" + #: badwolf.c:457 badwolf.c:621 badwolf.c:643 badwolf.c:680 msgid "New tab" msgstr "" @@ -52,6 +56,11 @@ msgstr "" msgid "Some unknown error occurred validating the certificate\n" msgstr "" +#: badwolf.c:376 +#, c-format +msgid "TLS Error for %s." +msgstr "" + #: badwolf.c:334 msgid "The Certificate Authority is unknown.\n" msgstr "" -- cgit v1.3.1-23-gd82d From 0dc338ad3f7c7789960f25ce6c4a2e2c886e2307 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Wed, 18 Dec 2019 16:27:46 +0100 Subject: Add GtkSettings overwrite on dark-theme Bug: https://bugs.webkit.org/show_bug.cgi?id=197947 --- badwolf.c | 7 +++++++ config.h | 6 ++++++ keybindings.c | 5 ++--- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index e9b7a00..2467ce4 100644 --- a/badwolf.c +++ b/badwolf.c @@ -748,6 +748,13 @@ main(int argc, char *argv[]) gtk_init(&argc, &argv); +#ifdef BADWOLF_PREFER_DARK_THEME + g_object_set(gtk_settings_get_default(), + "gtk-application-prefer-dark-theme", + BADWOLF_PREFER_DARK_THEME, + NULL); +#endif + g_fprintf(stderr, _("Running Badwolf version: %s\n"), version); g_fprintf(stderr, _("Buildtime WebKit version: %d.%d.%d\n"), diff --git a/config.h b/config.h index 4aa5c5a..c88d59d 100644 --- a/config.h +++ b/config.h @@ -86,4 +86,10 @@ */ #define BADWOLF_STATUSLABEL_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE +/* BADWOLF_PREFER_DARK_THEME: Overwrites user GtkSettings for gtk-application-prefer-dark-theme + * Done as a temporary workaround against https://bugs.webkit.org/show_bug.cgi?id=197947 + * Remove definition to keep user settings, should only be done once the bug is fixed. + */ +#define BADWOLF_PREFER_DARK_THEME FALSE + #endif /* CONFIG_H_INCLUDED */ diff --git a/keybindings.c b/keybindings.c index d0126e5..b5e9228 100644 --- a/keybindings.c +++ b/keybindings.c @@ -24,7 +24,7 @@ about_dialogCb_activate_link(GtkAboutDialog *about_dialog, gchar *uri, gpointer static void badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) { - struct Window *window = (struct Window *)user_data; + struct Window *window = (struct Window *)user_data; GtkWidget *about_dialog = gtk_about_dialog_new(); gtk_window_set_transient_for(GTK_WINDOW(about_dialog), main_window); @@ -39,8 +39,7 @@ badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) _("Minimalist and privacy-oriented WebKitGTK+ browser")); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog), version); - g_signal_connect( - about_dialog, "activate-link", G_CALLBACK(about_dialogCb_activate_link), window); + g_signal_connect(about_dialog, "activate-link", G_CALLBACK(about_dialogCb_activate_link), window); (void)gtk_dialog_run(GTK_DIALOG(about_dialog)); gtk_widget_destroy(about_dialog); -- cgit v1.3.1-23-gd82d From 607300e550bd06e32875030797829977904d5a78 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 22 Dec 2019 00:39:05 +0100 Subject: badwolf.c: Improve TLS Error messages --- badwolf.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index 2467ce4..1c94da4 100644 --- a/badwolf.c +++ b/badwolf.c @@ -330,26 +330,28 @@ detail_tls_certificate_flags(GTlsCertificateFlags tls_errors) { GString *errors = g_string_new(NULL); + g_string_append_printf(errors, _("Couldn't verify the TLS certificate to ensure a better security of the connection. You might want to verify your machine and network.\n\n")); + if(tls_errors & G_TLS_CERTIFICATE_UNKNOWN_CA) - g_string_append_printf(errors, _("The Certificate Authority is unknown.\n")); + g_string_append_printf(errors, _("Error: The X509 Certificate Authority is unknown.\n")); if(tls_errors & G_TLS_CERTIFICATE_BAD_IDENTITY) - g_string_append(errors, _("The given identity doesn't match the expected one.\n")); + g_string_append(errors, _("Error: The given identity doesn't match the expected one.\n")); if(tls_errors & G_TLS_CERTIFICATE_NOT_ACTIVATED) - g_string_append(errors, _("The certificate isn't valid yet.\n")); + g_string_append(errors, _("Error: The certificate isn't valid yet. Check your system's clock.\n")); if(tls_errors & G_TLS_CERTIFICATE_EXPIRED) - g_string_append(errors, _("The certificate has expired.\n")); + g_string_append(errors, _("Error: The certificate has expired. Check your system's clock.\n")); if(tls_errors & G_TLS_CERTIFICATE_REVOKED) - g_string_append(errors, _("The certificate has been revoked.\n")); + g_string_append(errors, _("Error: The certificate has been revoked.\n")); if(tls_errors & G_TLS_CERTIFICATE_INSECURE) - g_string_append(errors, _("The certificate is considered to be insecure.\n")); + g_string_append(errors, _("Error: The certificate is considered to be insecure.\n")); if(tls_errors & G_TLS_CERTIFICATE_GENERIC_ERROR) - g_string_append(errors, _("Some unknown error occurred validating the certificate\n")); + g_string_append(errors, _("Error: Some unknown error occurred validating the certificate.\n")); return g_string_free(errors, FALSE); } @@ -375,7 +377,7 @@ WebViewCb_load_failed_with_tls_errors(WebKitWebView *web_view, GTK_BUTTONS_NONE, _("TLS Error for %s."), failing_text); - gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Add Exception"), 1, _("Ignore"), 0, NULL); + gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Temporarly Add Exception"), 1, _("Continue"), 0, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), 0); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s\n", error_details); -- cgit v1.3.1-23-gd82d From 3c2ee134e9f6aae03aa28edce2d185d6c3e582a8 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 22 Dec 2019 01:14:37 +0100 Subject: Update translation --- Makefile | 2 +- badwolf.c | 6 +++ po/fr.po | 129 +++++++++++++++++++++++++++++--------------------------- po/messages.pot | 112 ++++++++++++++++++++++++------------------------ 4 files changed, 133 insertions(+), 116 deletions(-) (limited to 'badwolf.c') diff --git a/Makefile b/Makefile index 8a5dd69..f3fcbc5 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ MSGFMT = msgfmt all: $(EXE) $(TRANS) po/messages.pot: $(SRCS) - xgettext --keyword=_ --language=C -o $@ --add-comments --sort-output -j --copyright-holder="Haelwenn (lanodan) Monnier " --package-name="$(PACKAGE)" --package-version="$(VERSION_FULL)" --msgid-bugs-address="contact+badwolf-msgid@hacktivis.me" $(SRCS) + xgettext --keyword=_ --language=C --from-code=UTF-8 -o $@ --add-comments --sort-output --copyright-holder="Haelwenn (lanodan) Monnier " --package-name="$(PACKAGE)" --package-version="$(VERSION_FULL)" --msgid-bugs-address="contact+badwolf-msgid@hacktivis.me" $(SRCS) po/%.po: po/messages.pot msgmerge --update $@ $< diff --git a/badwolf.c b/badwolf.c index 1c94da4..c513bf1 100644 --- a/badwolf.c +++ b/badwolf.c @@ -807,5 +807,11 @@ main(int argc, char *argv[]) gtk_widget_show_all(window->main_window); gtk_main(); + +#if 0 + /* TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. */ + _("ø"); +#endif + return 0; } diff --git a/po/fr.po b/po/fr.po index d8af0f3..e83eab4 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Badwolf 0.3.0+gd88f2e7\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2019-12-16 05:37+0100\n" -"PO-Revision-Date: 2019-12-16 05:37+0100\n" +"POT-Creation-Date: 2019-12-22 00:57+0100\n" +"PO-Revision-Date: 2019-12-22 00:57+0100\n" "Last-Translator: Haelwenn (lanodan) Monnier \n" "Language-Team: French\n" "Language: fr\n" @@ -17,118 +17,125 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: badwolf.c:378 -msgid "Add Exception" -msgstr "Ajouter une Exception" - -#: badwolf.c:527 badwolf.c:692 badwolf.c:719 badwolf.c:753 +#: badwolf.c:760 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "Version WebKit à la compilation: %d.%d.%d\n" #: badwolf.c:378 -msgid "Ignore" -msgstr "Ignorer" +msgid "Continue" +msgstr "Continuer" + +#: badwolf.c:331 +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" +"\n" +msgstr "" +"Impossibilitée de vérifier le certificat TLS pour assurer une meilleure " +"sécurité de la connection. Penser potentiellement à vérifier votre machine " +"et son réseau.\n" +"\n" + +#: badwolf.c:352 +msgid "Error: Some unknown error occurred validating the certificate.\n" +msgstr "" +"Erreur : Une error inconnue est apparue pendant la validation du " +"certificat.\n" + +#: badwolf.c:334 +msgid "Error: The X509 Certificate Authority is unknown.\n" +msgstr "Erreur : L'autoritée de certification (CA X509) est inconnue.\n" + +#: badwolf.c:346 +msgid "Error: The certificate has been revoked.\n" +msgstr "Erreur : Le certificat à été révoqué.\n" + +#: badwolf.c:343 +msgid "Error: The certificate has expired. Check your system's clock.\n" +msgstr "Erreur : Le certificat à expiré.\n" + +#: badwolf.c:349 +msgid "Error: The certificate is considered to be insecure.\n" +msgstr "Erreur : Le certificat est considéré comme non-sécurisé.\n" + +#: badwolf.c:340 +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:337 +msgid "Error: The given identity doesn't match the expected one.\n" +msgstr "Erreur : L'identitée ne correspond pas à celle attendue.\n" -#: keybindings.c:14 +#: keybindings.c:39 msgid "Minimalist and privacy-oriented WebKitGTK+ browser" msgstr "Navigateur WebKitGTK+ minimaliste et orienté vie privée" -#: badwolf.c:457 badwolf.c:621 badwolf.c:643 badwolf.c:680 +#: badwolf.c:680 msgid "New tab" msgstr "Nouvel onglet" -#: badwolf.c:549 badwolf.c:714 badwolf.c:740 badwolf.c:775 +#: badwolf.c:782 msgid "Open new tab" msgstr "Ouvrir un nouvel onglet" -#: badwolf.c:690 badwolf.c:717 badwolf.c:751 +#: badwolf.c:758 #, c-format msgid "Running Badwolf version: %s\n" msgstr "Version de Badwolf: %s\n" -#: badwolf.c:532 badwolf.c:697 badwolf.c:724 badwolf.c:758 +#: badwolf.c:765 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "Version WebKit au lancement: %d.%d.%d\n" -#: badwolf.c:352 -msgid "Some unknown error occurred validating the certificate\n" -msgstr "Une error inconnue est apparue pendant la validation du certificat\n" - #: badwolf.c:376 #, c-format msgid "TLS Error for %s." msgstr "Erreur TLS pour %s." -#: badwolf.c:334 -msgid "The Certificate Authority is unknown.\n" -msgstr "L'autoritée de certification (CA) est inconnue.\n" - -#: badwolf.c:346 -msgid "The certificate has been revoked.\n" -msgstr "Le certificat à été révoqué.\n" - -#: badwolf.c:343 -msgid "The certificate has expired.\n" -msgstr "Le certificat à expiré.\n" - -#: badwolf.c:349 -msgid "The certificate is considered to be insecure.\n" -msgstr "Le certificat est considéré comme non-sécurisé.\n" - -#: badwolf.c:340 -msgid "The certificate isn't valid yet.\n" -msgstr "Le certificat n'est pas encore valide.\n" - -#: badwolf.c:337 -msgid "The given identity doesn't match the expected one.\n" -msgstr "L'identitée ne correspond pas à celle attendue.\n" +#: badwolf.c:378 +msgid "Temporarly Add Exception" +msgstr "Ajouter Temporairement une Exception" -#: badwolf.c:373 badwolf.c:532 badwolf.c:565 +#: badwolf.c:565 msgid "Toggle javascript" msgstr "Activer/Désactiver javascript" -#: badwolf.c:382 -msgid "_Cancel" -msgstr "A_rrêter" - -#: badwolf.c:384 -msgid "_Save" -msgstr "_Sauvegarder" - -#: badwolf.c:413 badwolf.c:572 badwolf.c:573 badwolf.c:606 +#: badwolf.c:606 msgid "search in current page" msgstr "recherche dans la page courante" -#: badwolf.c:100 badwolf.c:234 badwolf.c:118 badwolf.c:94 -#, fuzzy +#: badwolf.c:92 msgid "the web process crashed.\n" msgstr "le processus web à cessé de fonctionner.\n" -#: badwolf.c:104 badwolf.c:238 badwolf.c:122 badwolf.c:98 -#, fuzzy +#: badwolf.c:96 msgid "the web process exceeded the memory limit.\n" msgstr "le processus web à dépassé la limitation de mémoire.\n" -#: badwolf.c:108 badwolf.c:242 badwolf.c:126 badwolf.c:102 -#, fuzzy +#: badwolf.c:100 msgid "the web process terminated for an unknown reason.\n" msgstr "le processus web s’est interrompu pour une raison inconnue.\n" -#: badwolf.c:101 badwolf.c:235 badwolf.c:119 badwolf.c:95 +#: badwolf.c:93 msgid "title|Crashed" msgstr "Crash" -#: badwolf.c:105 badwolf.c:239 badwolf.c:123 badwolf.c:99 +#: badwolf.c:97 msgid "title|Out of Memory" msgstr "Dépassement Mémoire" -#: badwolf.c:109 badwolf.c:243 badwolf.c:127 badwolf.c:103 +#: badwolf.c:101 msgid "title|Unknown Crash" msgstr "Crash inconnu" -#: badwolf.c:730 badwolf.c:765 +#: badwolf.c:772 #, 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:811 +msgid "ø" +msgstr "" diff --git a/po/messages.pot b/po/messages.pot index a6321ff..3e497fd 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 0.4.0+g3f954fa\n" +"Project-Id-Version: Badwolf 0.4.0+g607300e\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2019-12-16 05:37+0100\n" +"POT-Creation-Date: 2019-12-22 00:57+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,115 +17,119 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: badwolf.c:378 -msgid "Add Exception" -msgstr "" - -#: badwolf.c:527 badwolf.c:692 badwolf.c:719 badwolf.c:753 +#: badwolf.c:760 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "" #: badwolf.c:378 -msgid "Ignore" +msgid "Continue" msgstr "" -#: keybindings.c:14 -msgid "Minimalist and privacy-oriented WebKitGTK+ browser" +#: badwolf.c:331 +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" +"\n" msgstr "" -#: badwolf.c:457 badwolf.c:621 badwolf.c:643 badwolf.c:680 -msgid "New tab" +#: badwolf.c:352 +msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" -#: badwolf.c:549 badwolf.c:714 badwolf.c:740 badwolf.c:775 -msgid "Open new tab" +#: badwolf.c:334 +msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "" -#: badwolf.c:690 badwolf.c:717 badwolf.c:751 -#, c-format -msgid "Running Badwolf version: %s\n" +#: badwolf.c:346 +msgid "Error: The certificate has been revoked.\n" msgstr "" -#: badwolf.c:532 badwolf.c:697 badwolf.c:724 badwolf.c:758 -#, c-format -msgid "Runtime WebKit version: %d.%d.%d\n" +#: badwolf.c:343 +msgid "Error: The certificate has expired. Check your system's clock.\n" msgstr "" -#: badwolf.c:352 -msgid "Some unknown error occurred validating the certificate\n" +#: badwolf.c:349 +msgid "Error: The certificate is considered to be insecure.\n" msgstr "" -#: badwolf.c:376 -#, c-format -msgid "TLS Error for %s." +#: badwolf.c:340 +msgid "Error: The certificate isn't valid yet. Check your system's clock.\n" msgstr "" -#: badwolf.c:334 -msgid "The Certificate Authority is unknown.\n" +#: badwolf.c:337 +msgid "Error: The given identity doesn't match the expected one.\n" msgstr "" -#: badwolf.c:346 -msgid "The certificate has been revoked.\n" +#: keybindings.c:39 +msgid "Minimalist and privacy-oriented WebKitGTK+ browser" msgstr "" -#: badwolf.c:343 -msgid "The certificate has expired.\n" +#: badwolf.c:680 +msgid "New tab" msgstr "" -#: badwolf.c:349 -msgid "The certificate is considered to be insecure.\n" +#: badwolf.c:782 +msgid "Open new tab" msgstr "" -#: badwolf.c:340 -msgid "The certificate isn't valid yet.\n" +#: badwolf.c:758 +#, c-format +msgid "Running Badwolf version: %s\n" msgstr "" -#: badwolf.c:337 -msgid "The given identity doesn't match the expected one.\n" +#: badwolf.c:765 +#, c-format +msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:373 badwolf.c:532 badwolf.c:565 -msgid "Toggle javascript" +#: badwolf.c:376 +#, c-format +msgid "TLS Error for %s." msgstr "" -#: badwolf.c:382 -msgid "_Cancel" +#: badwolf.c:378 +msgid "Temporarly Add Exception" msgstr "" -#: badwolf.c:384 -msgid "_Save" +#: badwolf.c:565 +msgid "Toggle javascript" msgstr "" -#: badwolf.c:413 badwolf.c:572 badwolf.c:573 badwolf.c:606 +#: badwolf.c:606 msgid "search in current page" msgstr "" -#: badwolf.c:100 badwolf.c:234 badwolf.c:118 badwolf.c:94 +#: badwolf.c:92 msgid "the web process crashed.\n" msgstr "" -#: badwolf.c:104 badwolf.c:238 badwolf.c:122 badwolf.c:98 +#: badwolf.c:96 msgid "the web process exceeded the memory limit.\n" msgstr "" -#: badwolf.c:108 badwolf.c:242 badwolf.c:126 badwolf.c:102 +#: badwolf.c:100 msgid "the web process terminated for an unknown reason.\n" msgstr "" -#: badwolf.c:101 badwolf.c:235 badwolf.c:119 badwolf.c:95 +#: badwolf.c:93 msgid "title|Crashed" -msgstr "Crashed" +msgstr "" -#: badwolf.c:105 badwolf.c:239 badwolf.c:123 badwolf.c:99 +#: badwolf.c:97 msgid "title|Out of Memory" -msgstr "Out of Memory" +msgstr "" -#: badwolf.c:109 badwolf.c:243 badwolf.c:127 badwolf.c:103 +#: badwolf.c:101 msgid "title|Unknown Crash" -msgstr "Unknown Crash" +msgstr "" -#: badwolf.c:730 badwolf.c:765 +#: badwolf.c:772 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "" + +#. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. +#: badwolf.c:811 +msgid "ø" +msgstr "" -- cgit v1.3.1-23-gd82d From 42f87f328e7e53ca317eeb90378d09cc28543517 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Wed, 8 Jan 2020 05:18:19 +0100 Subject: badwolf.c: fix formatting --- badwolf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index c513bf1..bfffef4 100644 --- a/badwolf.c +++ b/badwolf.c @@ -330,7 +330,9 @@ detail_tls_certificate_flags(GTlsCertificateFlags tls_errors) { GString *errors = g_string_new(NULL); - g_string_append_printf(errors, _("Couldn't verify the TLS certificate to ensure a better security of the connection. You might want to verify your machine and network.\n\n")); + g_string_append_printf(errors, + _("Couldn't verify the TLS certificate to ensure a better security of the " + "connection. You might want to verify your machine and network.\n\n")); if(tls_errors & G_TLS_CERTIFICATE_UNKNOWN_CA) g_string_append_printf(errors, _("Error: The X509 Certificate Authority is unknown.\n")); @@ -339,7 +341,8 @@ detail_tls_certificate_flags(GTlsCertificateFlags tls_errors) g_string_append(errors, _("Error: The given identity doesn't match the expected one.\n")); if(tls_errors & G_TLS_CERTIFICATE_NOT_ACTIVATED) - g_string_append(errors, _("Error: The certificate isn't valid yet. Check your system's clock.\n")); + g_string_append(errors, + _("Error: The certificate isn't valid yet. Check your system's clock.\n")); if(tls_errors & G_TLS_CERTIFICATE_EXPIRED) g_string_append(errors, _("Error: The certificate has expired. Check your system's clock.\n")); @@ -377,7 +380,8 @@ WebViewCb_load_failed_with_tls_errors(WebKitWebView *web_view, GTK_BUTTONS_NONE, _("TLS Error for %s."), failing_text); - gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Temporarly Add Exception"), 1, _("Continue"), 0, NULL); + gtk_dialog_add_buttons( + GTK_DIALOG(dialog), _("Temporarly Add Exception"), 1, _("Continue"), 0, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), 0); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s\n", error_details); -- cgit v1.3.1-23-gd82d From e97228fc74b15026f2c8db56c069ffed11898d4d Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Wed, 8 Jan 2020 10:07:13 +0100 Subject: badwolf.c: g_fprintf → fprintf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- badwolf.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index bfffef4..d46c91c 100644 --- a/badwolf.c +++ b/badwolf.c @@ -9,9 +9,9 @@ #include "uri.h" #include /* _() and other internationalization/localization helpers */ -#include /* g_fprintf() */ #include /* soup* */ #include /* LC_* */ +#include /* fprintf() */ #include /* malloc() */ const gchar *homepage = "https://hacktivis.me/projects/badwolf"; @@ -91,15 +91,15 @@ WebViewCb_web_process_terminated(WebKitWebView *webView, switch(reason) { case WEBKIT_WEB_PROCESS_CRASHED: - g_fprintf(stderr, _("the web process crashed.\n")); + fprintf(stderr, _("the web process crashed.\n")); webView_tab_label_change(browser, _("title|Crashed")); break; case WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT: - g_fprintf(stderr, _("the web process exceeded the memory limit.\n")); + fprintf(stderr, _("the web process exceeded the memory limit.\n")); webView_tab_label_change(browser, _("title|Out of Memory")); break; default: - g_fprintf(stderr, _("the web process terminated for an unknown reason.\n")); + fprintf(stderr, _("the web process terminated for an unknown reason.\n")); webView_tab_label_change(browser, _("title|Unknown Crash")); } @@ -761,21 +761,21 @@ main(int argc, char *argv[]) NULL); #endif - g_fprintf(stderr, _("Running Badwolf version: %s\n"), version); - g_fprintf(stderr, - _("Buildtime WebKit version: %d.%d.%d\n"), - WEBKIT_MAJOR_VERSION, - WEBKIT_MINOR_VERSION, - WEBKIT_MICRO_VERSION); - g_fprintf(stderr, - _("Runtime WebKit version: %d.%d.%d\n"), - webkit_get_major_version(), - webkit_get_minor_version(), - webkit_get_micro_version()); + fprintf(stderr, _("Running Badwolf version: %s\n"), version); + fprintf(stderr, + _("Buildtime WebKit version: %d.%d.%d\n"), + WEBKIT_MAJOR_VERSION, + WEBKIT_MINOR_VERSION, + WEBKIT_MICRO_VERSION); + fprintf(stderr, + _("Runtime WebKit version: %d.%d.%d\n"), + webkit_get_major_version(), + webkit_get_minor_version(), + webkit_get_micro_version()); web_extensions_directory = g_build_filename(g_get_user_data_dir(), "badwolf", "webkit-web-extension", NULL); - g_fprintf(stderr, _("webkit-web-extension directory set to: %s\n"), web_extensions_directory); + fprintf(stderr, _("webkit-web-extension directory set to: %s\n"), web_extensions_directory); window->main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); window->notebook = gtk_notebook_new(); -- cgit v1.3.1-23-gd82d From ccc42ba4f8e1e87f949b055c77d875be450aff48 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Wed, 8 Jan 2020 10:08:05 +0100 Subject: badwolf.c: g_malloc → malloc+perror+exit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- badwolf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index d46c91c..74f6a7f 100644 --- a/badwolf.c +++ b/badwolf.c @@ -11,7 +11,7 @@ #include /* _() and other internationalization/localization helpers */ #include /* soup* */ #include /* LC_* */ -#include /* fprintf() */ +#include /* perror(), fprintf() */ #include /* malloc() */ const gchar *homepage = "https://hacktivis.me/projects/badwolf"; @@ -745,7 +745,12 @@ int main(int argc, char *argv[]) { // getting an abort if this one fails to alloc - struct Window *window = g_malloc(sizeof(struct Window)); + struct Window *window = malloc(sizeof(struct Window)); + if(window == NULL) + { + perror("malloc"); + return 1; + } setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, DATADIR "/locale"); -- cgit v1.3.1-23-gd82d From d4a4b0ab1b5809a7a85b786135627bf9e0448908 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Wed, 22 Jan 2020 16:30:15 +0100 Subject: Update copyright to (2019-)2020 Badwolf Authors --- Makefile | 2 +- README.md | 2 +- badwolf.1 | 2 +- badwolf.c | 2 +- keybindings.c | 2 +- po/fr.po | 59 ++++++++++++++++++++++++---------------------- po/messages.pot | 61 +++++++++++++++++++++++++----------------------- po/pt_BR.po | 72 ++++++++++++++++++++++++++++----------------------------- uri.c | 2 +- uri_test.c | 2 +- usr.bin.badwolf | 2 +- 11 files changed, 106 insertions(+), 102 deletions(-) (limited to 'badwolf.c') diff --git a/Makefile b/Makefile index 0a5aa3e..024eb56 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ MSGFMT = msgfmt all: $(EXE) $(TRANS) po/messages.pot: $(SRCS) - xgettext --keyword=_ --language=C --from-code=UTF-8 -o $@ --add-comments --sort-output --copyright-holder="Haelwenn (lanodan) Monnier " --package-name="$(PACKAGE)" --package-version="$(VERSION_FULL)" --msgid-bugs-address="contact+badwolf-msgid@hacktivis.me" $(SRCS) + xgettext --keyword=_ --language=C --from-code=UTF-8 -o $@ --add-comments --sort-output --copyright-holder="Badwolf Authors " --package-name="$(PACKAGE)" --package-version="$(VERSION_FULL)" --msgid-bugs-address="contact+badwolf-msgid@hacktivis.me" $(SRCS) po/%.po: po/messages.pot msgmerge --update $@ $< diff --git a/README.md b/README.md index 2e3d245..75752b0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Minimalist and privacy-oriented WebKitGTK+ browser. Homepage: ``` -Copyright © 2019 Haelwenn (lanodan) Monnier +Copyright © 2019-2020 Badwolf Authors SPDX-License-Identifier: BSD-3-Clause ``` diff --git a/badwolf.1 b/badwolf.1 index 0b044d5..6f8ecb8 100644 --- a/badwolf.1 +++ b/badwolf.1 @@ -1,5 +1,5 @@ ./" BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser -./" Copyright © 2019 Haelwenn (lanodan) Monnier +./" Copyright © 2019-2020 Badwolf Authors ./" SPDX-License-Identifier: BSD-3-Clause .Dd 2019-10-31 .Dt badwolf 1 diff --git a/badwolf.c b/badwolf.c index 74f6a7f..64136f7 100644 --- a/badwolf.c +++ b/badwolf.c @@ -1,5 +1,5 @@ // BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser -// Copyright © 2019 Haelwenn (lanodan) Monnier +// Copyright © 2019-2020 Badwolf Authors // SPDX-License-Identifier: BSD-3-Clause #include "badwolf.h" diff --git a/keybindings.c b/keybindings.c index b5e9228..86713c2 100644 --- a/keybindings.c +++ b/keybindings.c @@ -1,5 +1,5 @@ // BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser -// Copyright © 2019 Haelwenn (lanodan) Monnier +// Copyright © 2019-2020 Badwolf Authors // SPDX-License-Identifier: BSD-3-Clause #include "keybindings.h" diff --git a/po/fr.po b/po/fr.po index e4d49cc..5691800 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,5 +1,5 @@ # BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser -# Copyright (C) 2019 Haelwenn (lanodan) Monnier +# Copyright (C) 2019-2020 Badwolf Authors # This file is distributed under the same license as the Badwolf package. # Haelwenn (lanodan) Monnier , 2019 # @@ -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: 2019-12-22 00:57+0100\n" +"POT-Creation-Date: 2020-01-22 16:20+0100\n" "PO-Revision-Date: 2019-12-22 00:57+0100\n" "Last-Translator: Haelwenn (lanodan) Monnier \n" "Language-Team: French\n" @@ -17,16 +17,16 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: badwolf.c:760 +#: badwolf.c:771 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "Version WebKit à la compilation: %d.%d.%d\n" -#: badwolf.c:378 +#: badwolf.c:384 msgid "Continue" msgstr "Continuer" -#: badwolf.c:331 +#: badwolf.c:334 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" @@ -37,33 +37,33 @@ msgstr "" "et son réseau.\n" "\n" -#: badwolf.c:352 +#: badwolf.c:357 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:334 +#: badwolf.c:338 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "Erreur : L'autorité de certification (CA X509) est inconnue.\n" -#: badwolf.c:346 +#: badwolf.c:351 msgid "Error: The certificate has been revoked.\n" msgstr "Erreur : Le certificat à été révoqué.\n" -#: badwolf.c:343 +#: badwolf.c:348 msgid "Error: The certificate has expired. Check your system's clock.\n" msgstr "Erreur : Le certificat a expiré.\n" -#: badwolf.c:349 +#: badwolf.c:354 msgid "Error: The certificate is considered to be insecure.\n" msgstr "Erreur : Le certificat est considéré comme non-sécurisé.\n" -#: badwolf.c:340 +#: badwolf.c:345 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:337 +#: badwolf.c:341 msgid "Error: The given identity doesn't match the expected one.\n" msgstr "Erreur : L'identité ne correspond pas à celle attendue.\n" @@ -71,71 +71,74 @@ msgstr "Erreur : L'identité ne correspond pas à celle attendue.\n" msgid "Minimalist and privacy-oriented WebKitGTK+ browser" msgstr "Navigateur WebKitGTK+ minimaliste et orienté vie privée" -#: badwolf.c:680 +#: badwolf.c:686 msgid "New tab" msgstr "Nouvel onglet" -#: badwolf.c:782 +#: badwolf.c:793 msgid "Open new tab" msgstr "Ouvrir un nouvel onglet" -#: badwolf.c:758 +#: badwolf.c:769 #, c-format msgid "Running Badwolf version: %s\n" msgstr "Version de Badwolf: %s\n" -#: badwolf.c:765 +#: badwolf.c:776 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "Version WebKit au lancement: %d.%d.%d\n" -#: badwolf.c:376 +#: badwolf.c:381 #, c-format msgid "TLS Error for %s." msgstr "Erreur TLS pour %s." -#: badwolf.c:378 +#: badwolf.c:384 msgid "Temporarly Add Exception" msgstr "Ajouter Temporairement une Exception" -#: badwolf.c:565 +#: badwolf.c:571 msgid "Toggle javascript" msgstr "Activer/Désactiver javascript" -#: badwolf.c:606 +#: badwolf.c:612 msgid "search in current page" msgstr "recherche dans la page courante" -#: badwolf.c:92 +#: badwolf.c:94 +#, c-format msgid "the web process crashed.\n" msgstr "le processus web a cessé de fonctionner.\n" -#: badwolf.c:96 +#: badwolf.c:98 +#, c-format msgid "the web process exceeded the memory limit.\n" msgstr "le processus web a dépassé la limitation de mémoire.\n" -#: badwolf.c:100 +#: badwolf.c:102 +#, c-format msgid "the web process terminated for an unknown reason.\n" msgstr "le processus web s’est interrompu pour une raison inconnue.\n" -#: badwolf.c:93 +#: badwolf.c:95 msgid "title|Crashed" msgstr "Crash" -#: badwolf.c:97 +#: badwolf.c:99 msgid "title|Out of Memory" msgstr "Dépassement Mémoire" -#: badwolf.c:101 +#: badwolf.c:103 msgid "title|Unknown Crash" msgstr "Crash inconnu" -#: badwolf.c:772 +#: badwolf.c:783 #, 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:811 +#: badwolf.c:822 msgid "ø" msgstr "" diff --git a/po/messages.pot b/po/messages.pot index 3e497fd..fc77c19 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Haelwenn (lanodan) Monnier +# Copyright (C) YEAR Badwolf Authors # This file is distributed under the same license as the Badwolf package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 0.4.0+g607300e\n" +"Project-Id-Version: Badwolf 0.4.0+ge6bdb68\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2019-12-22 00:57+0100\n" +"POT-Creation-Date: 2020-01-22 16:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,47 +17,47 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: badwolf.c:760 +#: badwolf.c:771 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:378 +#: badwolf.c:384 msgid "Continue" msgstr "" -#: badwolf.c:331 +#: badwolf.c:334 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" "\n" msgstr "" -#: badwolf.c:352 +#: badwolf.c:357 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" -#: badwolf.c:334 +#: badwolf.c:338 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "" -#: badwolf.c:346 +#: badwolf.c:351 msgid "Error: The certificate has been revoked.\n" msgstr "" -#: badwolf.c:343 +#: badwolf.c:348 msgid "Error: The certificate has expired. Check your system's clock.\n" msgstr "" -#: badwolf.c:349 +#: badwolf.c:354 msgid "Error: The certificate is considered to be insecure.\n" msgstr "" -#: badwolf.c:340 +#: badwolf.c:345 msgid "Error: The certificate isn't valid yet. Check your system's clock.\n" msgstr "" -#: badwolf.c:337 +#: badwolf.c:341 msgid "Error: The given identity doesn't match the expected one.\n" msgstr "" @@ -65,71 +65,74 @@ msgstr "" msgid "Minimalist and privacy-oriented WebKitGTK+ browser" msgstr "" -#: badwolf.c:680 +#: badwolf.c:686 msgid "New tab" msgstr "" -#: badwolf.c:782 +#: badwolf.c:793 msgid "Open new tab" msgstr "" -#: badwolf.c:758 +#: badwolf.c:769 #, c-format msgid "Running Badwolf version: %s\n" msgstr "" -#: badwolf.c:765 +#: badwolf.c:776 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:376 +#: badwolf.c:381 #, c-format msgid "TLS Error for %s." msgstr "" -#: badwolf.c:378 +#: badwolf.c:384 msgid "Temporarly Add Exception" msgstr "" -#: badwolf.c:565 +#: badwolf.c:571 msgid "Toggle javascript" msgstr "" -#: badwolf.c:606 +#: badwolf.c:612 msgid "search in current page" msgstr "" -#: badwolf.c:92 +#: badwolf.c:94 +#, c-format msgid "the web process crashed.\n" msgstr "" -#: badwolf.c:96 +#: badwolf.c:98 +#, c-format msgid "the web process exceeded the memory limit.\n" msgstr "" -#: badwolf.c:100 +#: badwolf.c:102 +#, c-format msgid "the web process terminated for an unknown reason.\n" msgstr "" -#: badwolf.c:93 +#: badwolf.c:95 msgid "title|Crashed" msgstr "" -#: badwolf.c:97 +#: badwolf.c:99 msgid "title|Out of Memory" msgstr "" -#: badwolf.c:101 +#: badwolf.c:103 msgid "title|Unknown Crash" msgstr "" -#: badwolf.c:772 +#: badwolf.c:783 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:811 +#: badwolf.c:822 msgid "ø" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index 5e57452..e1aac75 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1,13 +1,12 @@ # BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser -# Copyright (C) 2020 Haelwenn (lanodan) Monnier +# Copyright (C) 2020 Badwolf Authors # This file is distributed under the same license as the Badwolf package. -# Haelwenn (lanodan) Monnier , 2020 # msgid "" msgstr "" "Project-Id-Version: Badwolf 0.4.0+g607300e\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2019-12-22 00:57+0100\n" +"POT-Creation-Date: 2020-01-22 16:20+0100\n" "PO-Revision-Date: 2020-01-20 22:17-0300\n" "Last-Translator: Pedro Lucas Porcellis \n" "Language-Team: Brazilian Portuguese\n" @@ -17,57 +16,53 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: badwolf.c:760 +#: badwolf.c:771 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "Versão do WebKit %d.%d.%d\n" -#: badwolf.c:378 +#: badwolf.c:384 msgid "Continue" msgstr "Continuar" -#: badwolf.c:331 +#: badwolf.c:334 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" "\n" msgstr "" "Não foi possível verificar o certificado TLS para garantir uma melhor " -"segurança da conexão. Talvez você deva verificar a sua máquina e " -"rede.\n" +"segurança da conexão. Talvez você deva verificar a sua máquina e rede.\n" "\n" -#: badwolf.c:352 +#: badwolf.c:357 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" -"Erro: Algum erro desconhecido ocorreu enquanto validava o " -"certificado.\n" +"Erro: Algum erro desconhecido ocorreu enquanto validava o certificado.\n" -#: badwolf.c:334 +#: badwolf.c:338 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "Erro: A Autoridade de Certificados X509 é desconhecida.\n" -#: badwolf.c:346 +#: badwolf.c:351 msgid "Error: The certificate has been revoked.\n" msgstr "Erro: O certificado foi revogado.\n" -#: badwolf.c:343 +#: badwolf.c:348 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:349 +#: badwolf.c:354 msgid "Error: The certificate is considered to be insecure.\n" msgstr "Erro: O certificado é considerado inseguro.\n" -#: badwolf.c:340 -msgid "" -"Error: The certificate isn't valid yet. Check your system's clock.\n" +#: badwolf.c:345 +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" +"Erro: O certificado não é válido ainda. Verifique o relógio do seu sistema.\n" -#: badwolf.c:337 +#: badwolf.c:341 msgid "Error: The given identity doesn't match the expected one.\n" msgstr "Erro: A identidade não confere com a esperada.\n" @@ -75,71 +70,74 @@ msgstr "Erro: A identidade não confere com a esperada.\n" msgid "Minimalist and privacy-oriented WebKitGTK+ browser" msgstr "Navegador orientado pela privacidade e minimalismo" -#: badwolf.c:680 +#: badwolf.c:686 msgid "New tab" msgstr "Nova aba" -#: badwolf.c:782 +#: badwolf.c:793 msgid "Open new tab" msgstr "Abrir uma Nova aba" -#: badwolf.c:758 +#: badwolf.c:769 #, c-format msgid "Running Badwolf version: %s\n" msgstr "Rodando versão %s do Badwolf\n" -#: badwolf.c:765 +#: badwolf.c:776 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "Versão do WebKit: %d.%d.%d\n" -#: badwolf.c:376 +#: badwolf.c:381 #, c-format msgid "TLS Error for %s." msgstr "Erro TLS para %s." -#: badwolf.c:378 +#: badwolf.c:384 msgid "Temporarly Add Exception" msgstr "Temporáriamente adicionar exceção" -#: badwolf.c:565 +#: badwolf.c:571 msgid "Toggle javascript" msgstr "Habilitar Javascript" -#: badwolf.c:606 +#: badwolf.c:612 msgid "search in current page" msgstr "buscar na página atual" -#: badwolf.c:92 +#: badwolf.c:94 +#, c-format msgid "the web process crashed.\n" msgstr "o processo web travou.\n" -#: badwolf.c:96 +#: badwolf.c:98 +#, c-format msgid "the web process exceeded the memory limit.\n" msgstr "o processo web excedeu o limite de memória.\n" -#: badwolf.c:100 +#: badwolf.c:102 +#, c-format msgid "the web process terminated for an unknown reason.\n" msgstr "o processo web terminou por uma razão desconhecida.\n" -#: badwolf.c:93 +#: badwolf.c:95 msgid "title|Crashed" msgstr "Erro" -#: badwolf.c:97 +#: badwolf.c:99 msgid "title|Out of Memory" msgstr "Sem memória" -#: badwolf.c:101 +#: badwolf.c:103 msgid "title|Unknown Crash" msgstr "Erro desconhecido" -#: badwolf.c:772 +#: badwolf.c:783 #, 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:811 +#: badwolf.c:822 msgid "ø" msgstr "ø" diff --git a/uri.c b/uri.c index b287140..6843e4a 100644 --- a/uri.c +++ b/uri.c @@ -1,5 +1,5 @@ // BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser -// Copyright © 2019 Haelwenn (lanodan) Monnier +// Copyright © 2019-2020 Badwolf Authors // SPDX-License-Identifier: BSD-3-Clause #include "uri.h" diff --git a/uri_test.c b/uri_test.c index 13fa3eb..5881120 100644 --- a/uri_test.c +++ b/uri_test.c @@ -1,5 +1,5 @@ // BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser -// Copyright © 2019 Haelwenn (lanodan) Monnier +// Copyright © 2019-2020 Badwolf Authors // SPDX-License-Identifier: BSD-3-Clause #include "uri.h" diff --git a/usr.bin.badwolf b/usr.bin.badwolf index 4407f31..0ebce5d 100644 --- a/usr.bin.badwolf +++ b/usr.bin.badwolf @@ -1,5 +1,5 @@ # BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser -# Copyright © 2019 Haelwenn (lanodan) Monnier +# Copyright © 2019-2020 Badwolf Authors # SPDX-License-Identifier: BSD-3-Clause # # Made on Gentoo Linux with PREFIX=/usr -- cgit v1.3.1-23-gd82d From 186cee6c2b5d80046c71022d422f9df17bbd21d5 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 30 Jan 2020 03:59:22 +0100 Subject: badwolf.c: Make *window declaration static This allows to avoid a useless malloc() call done ourselves. --- badwolf.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index 64136f7..580fedc 100644 --- a/badwolf.c +++ b/badwolf.c @@ -744,14 +744,7 @@ badwolf_get_tab_position(GtkContainer *notebook, GtkWidget *child) int main(int argc, char *argv[]) { - // getting an abort if this one fails to alloc - struct Window *window = malloc(sizeof(struct Window)); - if(window == NULL) - { - perror("malloc"); - return 1; - } - + struct Window *window = &(struct Window){NULL}; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, DATADIR "/locale"); bind_textdomain_codeset(PACKAGE, "UTF-8"); -- cgit v1.3.1-23-gd82d From 6b5f7edc9b3d420837a3035fb24760de54451c4d Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 4 Feb 2020 07:37:51 +0100 Subject: badwolf.c: Always set a format in *printf calls Potential bug found via printf-scan aka pscan --- badwolf.c | 6 +++--- po/fr.po | 17 +++++++---------- po/messages.pot | 19 ++++++++----------- po/pt_BR.po | 17 +++++++---------- 4 files changed, 25 insertions(+), 34 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index 580fedc..b6318b8 100644 --- a/badwolf.c +++ b/badwolf.c @@ -91,15 +91,15 @@ WebViewCb_web_process_terminated(WebKitWebView *webView, switch(reason) { case WEBKIT_WEB_PROCESS_CRASHED: - fprintf(stderr, _("the web process crashed.\n")); + fprintf(stderr, "%s", _("the web process crashed.\n")); webView_tab_label_change(browser, _("title|Crashed")); break; case WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT: - fprintf(stderr, _("the web process exceeded the memory limit.\n")); + fprintf(stderr, "%s", _("the web process exceeded the memory limit.\n")); webView_tab_label_change(browser, _("title|Out of Memory")); break; default: - fprintf(stderr, _("the web process terminated for an unknown reason.\n")); + fprintf(stderr, "%s", _("the web process terminated for an unknown reason.\n")); webView_tab_label_change(browser, _("title|Unknown Crash")); } diff --git a/po/fr.po b/po/fr.po index 5691800..7f341de 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-01-22 16:20+0100\n" +"POT-Creation-Date: 2020-02-04 07:57+0100\n" "PO-Revision-Date: 2019-12-22 00:57+0100\n" "Last-Translator: Haelwenn (lanodan) Monnier \n" "Language-Team: French\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: badwolf.c:771 +#: badwolf.c:764 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "Version WebKit à la compilation: %d.%d.%d\n" @@ -75,16 +75,16 @@ msgstr "Navigateur WebKitGTK+ minimaliste et orienté vie privée" msgid "New tab" msgstr "Nouvel onglet" -#: badwolf.c:793 +#: badwolf.c:786 msgid "Open new tab" msgstr "Ouvrir un nouvel onglet" -#: badwolf.c:769 +#: badwolf.c:762 #, c-format msgid "Running Badwolf version: %s\n" msgstr "Version de Badwolf: %s\n" -#: badwolf.c:776 +#: badwolf.c:769 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "Version WebKit au lancement: %d.%d.%d\n" @@ -107,17 +107,14 @@ msgid "search in current page" msgstr "recherche dans la page courante" #: badwolf.c:94 -#, c-format msgid "the web process crashed.\n" msgstr "le processus web a cessé de fonctionner.\n" #: badwolf.c:98 -#, c-format msgid "the web process exceeded the memory limit.\n" msgstr "le processus web a dépassé la limitation de mémoire.\n" #: badwolf.c:102 -#, c-format msgid "the web process terminated for an unknown reason.\n" msgstr "le processus web s’est interrompu pour une raison inconnue.\n" @@ -133,12 +130,12 @@ msgstr "Dépassement Mémoire" msgid "title|Unknown Crash" msgstr "Crash inconnu" -#: badwolf.c:783 +#: badwolf.c:776 #, 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:822 +#: badwolf.c:815 msgid "ø" msgstr "" diff --git a/po/messages.pot b/po/messages.pot index fc77c19..51b036c 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 0.4.0+ge6bdb68\n" +"Project-Id-Version: Badwolf 0.4.0+gac60080\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-01-22 16:20+0100\n" +"POT-Creation-Date: 2020-02-04 07:57+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: badwolf.c:771 +#: badwolf.c:764 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "" @@ -69,16 +69,16 @@ msgstr "" msgid "New tab" msgstr "" -#: badwolf.c:793 +#: badwolf.c:786 msgid "Open new tab" msgstr "" -#: badwolf.c:769 +#: badwolf.c:762 #, c-format msgid "Running Badwolf version: %s\n" msgstr "" -#: badwolf.c:776 +#: badwolf.c:769 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "" @@ -101,17 +101,14 @@ msgid "search in current page" msgstr "" #: badwolf.c:94 -#, c-format msgid "the web process crashed.\n" msgstr "" #: badwolf.c:98 -#, c-format msgid "the web process exceeded the memory limit.\n" msgstr "" #: badwolf.c:102 -#, c-format msgid "the web process terminated for an unknown reason.\n" msgstr "" @@ -127,12 +124,12 @@ msgstr "" msgid "title|Unknown Crash" msgstr "" -#: badwolf.c:783 +#: badwolf.c:776 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:822 +#: badwolf.c:815 msgid "ø" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index e1aac75..89fa6ea 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-01-22 16:20+0100\n" +"POT-Creation-Date: 2020-02-04 07:57+0100\n" "PO-Revision-Date: 2020-01-20 22:17-0300\n" "Last-Translator: Pedro Lucas Porcellis \n" "Language-Team: Brazilian Portuguese\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: badwolf.c:771 +#: badwolf.c:764 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "Versão do WebKit %d.%d.%d\n" @@ -74,16 +74,16 @@ msgstr "Navegador orientado pela privacidade e minimalismo" msgid "New tab" msgstr "Nova aba" -#: badwolf.c:793 +#: badwolf.c:786 msgid "Open new tab" msgstr "Abrir uma Nova aba" -#: badwolf.c:769 +#: badwolf.c:762 #, c-format msgid "Running Badwolf version: %s\n" msgstr "Rodando versão %s do Badwolf\n" -#: badwolf.c:776 +#: badwolf.c:769 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "Versão do WebKit: %d.%d.%d\n" @@ -106,17 +106,14 @@ msgid "search in current page" msgstr "buscar na página atual" #: badwolf.c:94 -#, c-format msgid "the web process crashed.\n" msgstr "o processo web travou.\n" #: badwolf.c:98 -#, c-format msgid "the web process exceeded the memory limit.\n" msgstr "o processo web excedeu o limite de memória.\n" #: badwolf.c:102 -#, c-format msgid "the web process terminated for an unknown reason.\n" msgstr "o processo web terminou por uma razão desconhecida.\n" @@ -132,12 +129,12 @@ msgstr "Sem memória" msgid "title|Unknown Crash" msgstr "Erro desconhecido" -#: badwolf.c:783 +#: badwolf.c:776 #, 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:822 +#: badwolf.c:815 msgid "ø" msgstr "ø" -- cgit v1.3.1-23-gd82d From 177b29e2e39e9b5833a1bd1587b4ffc470b07f55 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Tue, 4 Feb 2020 08:03:13 +0100 Subject: badwolf.c: Remove title| in crash handling It is just too confusable for translators, proper context function should be used instead. --- badwolf.c | 6 +++--- po/fr.po | 15 ++++++++++++++- po/messages.pot | 16 ++++++++++++++-- po/pt_BR.po | 17 ++++++++++++++++- 4 files changed, 47 insertions(+), 7 deletions(-) (limited to 'badwolf.c') diff --git a/badwolf.c b/badwolf.c index b6318b8..cb26dcf 100644 --- a/badwolf.c +++ b/badwolf.c @@ -92,15 +92,15 @@ WebViewCb_web_process_terminated(WebKitWebView *webView, { case WEBKIT_WEB_PROCESS_CRASHED: fprintf(stderr, "%s", _("the web process crashed.\n")); - webView_tab_label_change(browser, _("title|Crashed")); + webView_tab_label_change(browser, _("Crashed")); break; case WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT: fprintf(stderr, "%s", _("the web process exceeded the memory limit.\n")); - webView_tab_label_change(browser, _("title|Out of Memory")); + webView_tab_label_change(browser, _("Out of Memory")); break; default: fprintf(stderr, "%s", _("the web process terminated for an unknown reason.\n")); - webView_tab_label_change(browser, _("title|Unknown Crash")); + webView_tab_label_change(browser, _("Unknown Crash")); } return FALSE; diff --git a/po/fr.po b/po/fr.po index 7f341de..a3b348e 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-02-04 07:57+0100\n" +"POT-Creation-Date: 2020-02-04 07:54+0100\n" "PO-Revision-Date: 2019-12-22 00:57+0100\n" "Last-Translator: Haelwenn (lanodan) Monnier \n" "Language-Team: French\n" @@ -37,6 +37,11 @@ msgstr "" "et son réseau.\n" "\n" +#: badwolf.c:95 +#, fuzzy +msgid "Crashed" +msgstr "Crash" + #: badwolf.c:357 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" @@ -79,6 +84,10 @@ msgstr "Nouvel onglet" msgid "Open new tab" msgstr "Ouvrir un nouvel onglet" +#: badwolf.c:99 +msgid "Out of Memory" +msgstr "Dépassement Mémoire" + #: badwolf.c:762 #, c-format msgid "Running Badwolf version: %s\n" @@ -102,6 +111,10 @@ msgstr "Ajouter Temporairement une Exception" msgid "Toggle javascript" msgstr "Activer/Désactiver javascript" +#: badwolf.c:103 +msgid "Unknown Crash" +msgstr "Crash inconnu" + #: badwolf.c:612 msgid "search in current page" msgstr "recherche dans la page courante" diff --git a/po/messages.pot b/po/messages.pot index 51b036c..6f2f9f8 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 0.4.0+gac60080\n" +"Project-Id-Version: Badwolf 0.4.0+g2e84f1d\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-02-04 07:57+0100\n" +"POT-Creation-Date: 2020-02-04 07:54+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,6 +33,10 @@ msgid "" "\n" msgstr "" +#: badwolf.c:95 +msgid "Crashed" +msgstr "" + #: badwolf.c:357 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" @@ -73,6 +77,10 @@ msgstr "" msgid "Open new tab" msgstr "" +#: badwolf.c:99 +msgid "Out of Memory" +msgstr "" + #: badwolf.c:762 #, c-format msgid "Running Badwolf version: %s\n" @@ -96,6 +104,10 @@ msgstr "" msgid "Toggle javascript" msgstr "" +#: badwolf.c:103 +msgid "Unknown Crash" +msgstr "" + #: badwolf.c:612 msgid "search in current page" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index 89fa6ea..aca5ce3 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-02-04 07:57+0100\n" +"POT-Creation-Date: 2020-02-04 07:54+0100\n" "PO-Revision-Date: 2020-01-20 22:17-0300\n" "Last-Translator: Pedro Lucas Porcellis \n" "Language-Team: Brazilian Portuguese\n" @@ -35,6 +35,11 @@ msgstr "" "segurança da conexão. Talvez você deva verificar a sua máquina e rede.\n" "\n" +#: badwolf.c:95 +#, fuzzy +msgid "Crashed" +msgstr "Erro" + #: badwolf.c:357 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" @@ -78,6 +83,11 @@ msgstr "Nova aba" msgid "Open new tab" msgstr "Abrir uma Nova aba" +#: badwolf.c:99 +#, fuzzy +msgid "Out of Memory" +msgstr "Sem memória" + #: badwolf.c:762 #, c-format msgid "Running Badwolf version: %s\n" @@ -101,6 +111,11 @@ msgstr "Temporáriamente adicionar exceção" msgid "Toggle javascript" msgstr "Habilitar Javascript" +#: badwolf.c:103 +#, fuzzy +msgid "Unknown Crash" +msgstr "Erro desconhecido" + #: badwolf.c:612 msgid "search in current page" msgstr "buscar na página atual" -- cgit v1.3.1-23-gd82d