commit: 1b868aad609d9c3460af8df0e2c151d4f755f210
parent: 862a1e08583d5d48fbb369b3f9bf1d8a6781aefa
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 26 Apr 2019 21:28:52 +0200
Merge branch 'develop'
Diffstat:
M | .clang-format | 1 | + |
M | Makefile | 43 | +++++++++++++++++++++++++++++++------------ |
M | badwolf.c | 149 | ++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------- |
M | config.h | 12 | +++++++++++- |
A | mo/.keep | 0 | |
A | po/fr.po | 70 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | po/messages.pot | 66 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
7 files changed, 273 insertions(+), 68 deletions(-)
diff --git a/.clang-format b/.clang-format
@@ -5,6 +5,7 @@ AlignTrailingComments: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
+AlwaysBreakAfterReturnType: AllDefinitions
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Allman
diff --git a/Makefile b/Makefile
@@ -1,26 +1,45 @@
.POSIX:
-PREFIX = /usr/local
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/share/man
+DATADIR = $(PREFIX)/share/badwolf
+PACKAGE = Badwolf
-DEPS = gtk+-3.0 webkit2gtk-4.0
-OBJS = badwolf
+DEPS = gtk+-3.0 webkit2gtk-4.0
+OBJS = badwolf
+TRANS = fr.mo
-CC = cc
-CFLAGS = -g -Wall -Wextra
-CDEPS = `pkg-config --cflags $(DEPS)`
-LIBS = `pkg-config --libs $(DEPS)`
+CC = cc
+CFLAGS = -g -Wall -Wextra
+CDEPS = `pkg-config --cflags $(DEPS)` -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\"
+LIBS = `pkg-config --libs $(DEPS)`
-all: $(OBJS)
+all: $(OBJS) $(TRANS)
+
+%.mo:
+ mkdir -p locale/$*/LC_MESSAGES
+ msgfmt -o locale/$*/LC_MESSAGES/$(PACKAGE).mo po/$*.po
+
+po/messages.pot:
+ xgettext --keyword=_ --language=C -o $@ --add-comments --sort-output -j badwolf.c
+
+po/%.po: po/messages.pot
+ msgmerge --update $@ $<
.c:
$(CC) -std=c11 $(CFLAGS) $(CDEPS) -o $@ $< $(LDFLAGS) $(LIBS)
-install: badwolf
- mkdir -p $(DESTDIR)$(PREFIX)/bin
- cp -p badwolf $(DESTDIR)$(PREFIX)/bin/badwolf
+install: all
+ mkdir -p $(DESTDIR)$(BINDIR)
+ cp -p badwolf $(DESTDIR)$(BINDIR)/badwolf
+ mkdir -p $(DESTDIR)$(MANDIR)/man1
+ cp -p badwolf.1 $(DESTDIR)$(MANDIR)/man1
+ mkdir -p $(DESTDIR)$(DATADIR)/locale
+ cp -r locale/ $(DESTDIR)$(DATADIR)
clean:
- rm $(OBJS)
+ rm -fr locale $(OBJS)
format: *.c *.h
clang-format -style=file -assume-filename=.clang-format -i *.c *.h
diff --git a/badwolf.c b/badwolf.c
@@ -4,8 +4,10 @@
#include "config.h"
+#include <glib/gi18n.h> /* _() and other internationalization/localization helpers */
#include <glib/gprintf.h> /* g_fprintf() */
#include <gtk/gtk.h>
+#include <locale.h> /* LC_* */
#include <webkit2/webkit2.h>
struct Window
@@ -33,14 +35,16 @@ struct Client
static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data);
static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView,
- WebKitWebProcessTerminationReason reason);
+ WebKitWebProcessTerminationReason reason,
+ gpointer user_data);
static gboolean
WebViewCb_notify__uri(WebKitWebView *webView, GParamSpec *pspec, gpointer user_data);
+GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser);
static gboolean
WebViewCb_notify__title(WebKitWebView *webView, GParamSpec *pspec, gpointer user_data);
static gboolean
WebViewCb_notify__is__playing__audio(WebKitWebView *webView, GParamSpec *pspec, gpointer user_data);
-void webView_tab_label_change(struct Client *browser);
+void webView_tab_label_change(struct Client *browser, const gchar *title);
static gboolean WebViewCb_notify__estimated_load_progress(WebKitWebView *webView,
GParamSpec *pspec,
gpointer user_data);
@@ -48,7 +52,7 @@ static gboolean WebViewCb_mouse_target_changed(WebKitWebView *webView,
WebKitHitTestResult *hit,
guint modifiers,
gpointer user_data);
-static WebKitWebView *WebViewCb_create(WebKitWebView *webView,
+static WebKitWebView *WebViewCb_create(WebKitWebView *related_web_view,
WebKitNavigationAction *navigation_action,
gpointer user_data);
static gboolean locationCb_activate(GtkEntry *location, gpointer user_data);
@@ -59,14 +63,15 @@ static gboolean SearchEntryCb_search__changed(GtkSearchEntry *search, gpointer u
static gboolean SearchEntryCb_stop__search(GtkSearchEntry *search, gpointer user_data);
struct Client *
new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web_view);
-void new_tabCb_clicked(GtkButton *new_tab, gpointer user_data);
-void closeCb_clicked(GtkButton *close, gpointer user_data);
int badwolf_new_tab(GtkNotebook *notebook, struct Client *browser);
-GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser);
+static void new_tabCb_clicked(GtkButton *new_tab, gpointer user_data);
+static void closeCb_clicked(GtkButton *close, gpointer user_data);
+static void
+notebookCb_switch__page(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data);
gint get_tab_position(GtkContainer *notebook, GtkWidget *child);
-int main(int argc, char *argv[]);
-static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data)
+static gboolean
+WebViewCb_close(WebKitWebView *webView, gpointer user_data)
{
(void)webView;
struct Client *browser = (struct Client *)user_data;
@@ -81,27 +86,34 @@ static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data)
return TRUE;
}
-static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView,
- WebKitWebProcessTerminationReason reason)
+static gboolean
+WebViewCb_web_process_terminated(WebKitWebView *webView,
+ WebKitWebProcessTerminationReason reason,
+ gpointer user_data)
{
(void)webView;
- char *str_reason;
+ struct Client *browser = (struct Client *)user_data;
switch(reason)
{
- case WEBKIT_WEB_PROCESS_CRASHED: str_reason = "the web process crashed."; break;
+ case WEBKIT_WEB_PROCESS_CRASHED:
+ g_fprintf(stderr, _("the web process crashed.\n"));
+ webView_tab_label_change(browser, _("title|Crashed"));
+ break;
case WEBKIT_WEB_PROCESS_EXCEEDED_MEMORY_LIMIT:
- str_reason = "the web process exceeded the memory limit.";
+ g_fprintf(stderr, _("the web process exceeded the memory limit.\n"));
+ webView_tab_label_change(browser, _("title|Out of Memory"));
break;
- default: str_reason = "the web process terminated for an unknown reason.";
+ default:
+ g_fprintf(stderr, _("the web process terminated for an unknown reason.\n"));
+ webView_tab_label_change(browser, _("title|Unknown Crash"));
}
- g_fprintf(stderr, "BadWolf [signal: web-process-terminated]: %s\n", str_reason);
-
return FALSE;
}
-static gboolean WebViewCb_notify__uri(WebKitWebView *webView, GParamSpec *pspec, gpointer user_data)
+static gboolean
+WebViewCb_notify__uri(WebKitWebView *webView, GParamSpec *pspec, gpointer user_data)
{
(void)webView;
(void)pspec;
@@ -115,7 +127,8 @@ static gboolean WebViewCb_notify__uri(WebKitWebView *webView, GParamSpec *pspec,
return TRUE;
}
-GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser)
+GtkWidget *
+badwolf_new_tab_box(const gchar *title, struct Client *browser)
{
(void)browser;
GtkWidget *tab_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
@@ -125,13 +138,20 @@ GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser)
GtkWidget *playing =
gtk_image_new_from_icon_name("audio-volume-high-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
+#ifdef BADWOLF_TAB_BOX_WIDTH
+ gtk_widget_set_size_request(label, BADWOLF_TAB_BOX_WIDTH, -1);
+#endif
+#ifdef BADWOLF_TAB_LABEL_CHARWIDTH
gtk_label_set_width_chars(GTK_LABEL(label), BADWOLF_TAB_LABEL_CHARWIDTH);
+#endif
+ gtk_widget_set_hexpand(tab_box, BADWOLF_TAB_HEXPAND);
+
gtk_label_set_ellipsize(GTK_LABEL(label), BADWOLF_TAB_LABEL_ELLIPSIZE);
gtk_label_set_single_line_mode(GTK_LABEL(label), TRUE);
gtk_box_pack_start(GTK_BOX(tab_box), playing, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(tab_box), label, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(tab_box), close, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(tab_box), close, FALSE, FALSE, 0);
gtk_button_set_relief(GTK_BUTTON(close), GTK_RELIEF_NONE);
@@ -152,7 +172,7 @@ WebViewCb_notify__title(WebKitWebView *webView, GParamSpec *pspec, gpointer user
(void)pspec;
struct Client *browser = (struct Client *)user_data;
- webView_tab_label_change(browser);
+ webView_tab_label_change(browser, NULL);
return TRUE;
}
@@ -164,21 +184,21 @@ WebViewCb_notify__is__playing__audio(WebKitWebView *webView, GParamSpec *pspec,
(void)pspec;
struct Client *browser = (struct Client *)user_data;
- webView_tab_label_change(browser);
+ webView_tab_label_change(browser, NULL);
return TRUE;
}
-void webView_tab_label_change(struct Client *browser)
+void
+webView_tab_label_change(struct Client *browser, const gchar *title)
{
- const gchar *title;
GtkWidget *notebook = browser->window->notebook;
- title = webkit_web_view_get_title(browser->webView);
+#define title_IS_EMPTY (title == NULL) || (title == (const gchar *)"")
- if(title == NULL) title = webkit_web_view_get_uri(browser->webView);
-
- if(title == NULL) title = "BadWolf";
+ if(title_IS_EMPTY) title = webkit_web_view_get_title(browser->webView);
+ if(title_IS_EMPTY) title = webkit_web_view_get_uri(browser->webView);
+ if(title_IS_EMPTY) title = "BadWolf";
gtk_notebook_set_tab_label(
GTK_NOTEBOOK(notebook), browser->box, badwolf_new_tab_box(title, browser));
@@ -188,9 +208,10 @@ void webView_tab_label_change(struct Client *browser)
gtk_window_set_title(GTK_WINDOW(browser->window->main_window), title);
}
-static gboolean WebViewCb_notify__estimated_load_progress(WebKitWebView *webView,
- GParamSpec *pspec,
- gpointer user_data)
+static gboolean
+WebViewCb_notify__estimated_load_progress(WebKitWebView *webView,
+ GParamSpec *pspec,
+ gpointer user_data)
{
(void)webView;
(void)pspec;
@@ -207,10 +228,11 @@ static gboolean WebViewCb_notify__estimated_load_progress(WebKitWebView *webView
return TRUE;
}
-static gboolean WebViewCb_mouse_target_changed(WebKitWebView *webView,
- WebKitHitTestResult *hit,
- guint modifiers,
- gpointer user_data)
+static gboolean
+WebViewCb_mouse_target_changed(WebKitWebView *webView,
+ WebKitHitTestResult *hit,
+ guint modifiers,
+ gpointer user_data)
{
(void)webView;
(void)modifiers;
@@ -222,9 +244,10 @@ static gboolean WebViewCb_mouse_target_changed(WebKitWebView *webView,
return TRUE;
}
-static WebKitWebView *WebViewCb_create(WebKitWebView *related_web_view,
- WebKitNavigationAction *navigation_action,
- gpointer user_data)
+static WebKitWebView *
+WebViewCb_create(WebKitWebView *related_web_view,
+ WebKitNavigationAction *navigation_action,
+ gpointer user_data)
{
(void)navigation_action;
struct Window *window = (struct Window *)user_data;
@@ -240,7 +263,8 @@ static WebKitWebView *WebViewCb_create(WebKitWebView *related_web_view,
}
}
-static gboolean locationCb_activate(GtkEntry *location, gpointer user_data)
+static gboolean
+locationCb_activate(GtkEntry *location, gpointer user_data)
{
const char *target_url;
struct Client *browser = (struct Client *)user_data;
@@ -252,7 +276,8 @@ static gboolean locationCb_activate(GtkEntry *location, gpointer user_data)
return TRUE;
}
-static gboolean javascriptCb_toggled(GtkButton *javascript, gpointer user_data)
+static gboolean
+javascriptCb_toggled(GtkButton *javascript, gpointer user_data)
{
struct Client *browser = (struct Client *)user_data;
@@ -266,7 +291,8 @@ static gboolean javascriptCb_toggled(GtkButton *javascript, gpointer user_data)
return TRUE;
}
-static gboolean SearchEntryCb_next__match(GtkSearchEntry *search, gpointer user_data)
+static gboolean
+SearchEntryCb_next__match(GtkSearchEntry *search, gpointer user_data)
{
(void)search;
struct Client *browser = (struct Client *)user_data;
@@ -277,7 +303,8 @@ static gboolean SearchEntryCb_next__match(GtkSearchEntry *search, gpointer user_
return TRUE;
}
-static gboolean SearchEntryCb_previous__match(GtkSearchEntry *search, gpointer user_data)
+static gboolean
+SearchEntryCb_previous__match(GtkSearchEntry *search, gpointer user_data)
{
(void)search;
struct Client *browser = (struct Client *)user_data;
@@ -288,7 +315,8 @@ static gboolean SearchEntryCb_previous__match(GtkSearchEntry *search, gpointer u
return TRUE;
}
-static gboolean SearchEntryCb_search__changed(GtkSearchEntry *search, gpointer user_data)
+static gboolean
+SearchEntryCb_search__changed(GtkSearchEntry *search, gpointer user_data)
{
struct Client *browser = (struct Client *)user_data;
WebKitFindController *findController = webkit_web_view_get_find_controller(browser->webView);
@@ -299,7 +327,8 @@ static gboolean SearchEntryCb_search__changed(GtkSearchEntry *search, gpointer u
return TRUE;
}
-static gboolean SearchEntryCb_stop__search(GtkSearchEntry *search, gpointer user_data)
+static gboolean
+SearchEntryCb_stop__search(GtkSearchEntry *search, gpointer user_data)
{
(void)search;
struct Client *browser = (struct Client *)user_data;
@@ -341,7 +370,7 @@ new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web
settings,
NULL));
- gtk_widget_set_tooltip_text(browser->javascript, "Toggle javascript");
+ gtk_widget_set_tooltip_text(browser->javascript, _("Toggle javascript"));
gtk_box_pack_start(GTK_BOX(browser->toolbar),
GTK_WIDGET(browser->javascript),
@@ -381,7 +410,7 @@ new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web
gtk_entry_set_has_frame(GTK_ENTRY(browser->location), FALSE);
gtk_entry_set_input_purpose(GTK_ENTRY(browser->location), GTK_INPUT_PURPOSE_URL);
- gtk_entry_set_placeholder_text(GTK_ENTRY(browser->search), "search in current page");
+ gtk_entry_set_placeholder_text(GTK_ENTRY(browser->search), _("search in current page"));
gtk_entry_set_has_frame(GTK_ENTRY(browser->search), FALSE);
g_signal_connect(browser->location, "activate", G_CALLBACK(locationCb_activate), browser);
@@ -391,7 +420,7 @@ new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web
g_signal_connect(browser->webView,
"web-process-terminated",
G_CALLBACK(WebViewCb_web_process_terminated),
- NULL);
+ browser);
g_signal_connect(browser->webView, "notify::uri", G_CALLBACK(WebViewCb_notify__uri), browser);
g_signal_connect(browser->webView, "notify::title", G_CALLBACK(WebViewCb_notify__title), browser);
g_signal_connect(browser->webView,
@@ -421,10 +450,11 @@ new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web
return browser;
}
-int badwolf_new_tab(GtkNotebook *notebook, struct Client *browser)
+int
+badwolf_new_tab(GtkNotebook *notebook, struct Client *browser)
{
gint current_page = gtk_notebook_get_current_page(notebook);
- gchar *title = "New tab";
+ gchar *title = _("New tab");
gtk_widget_show_all(browser->box);
@@ -441,7 +471,8 @@ int badwolf_new_tab(GtkNotebook *notebook, struct Client *browser)
return 0;
}
-void new_tabCb_clicked(GtkButton *new_tab, gpointer user_data)
+static void
+new_tabCb_clicked(GtkButton *new_tab, gpointer user_data)
{
(void)new_tab;
struct Window *window = (struct Window *)user_data;
@@ -450,7 +481,8 @@ void new_tabCb_clicked(GtkButton *new_tab, gpointer user_data)
badwolf_new_tab(GTK_NOTEBOOK(window->notebook), browser);
}
-void closeCb_clicked(GtkButton *close, gpointer user_data)
+static void
+closeCb_clicked(GtkButton *close, gpointer user_data)
{
(void)close;
struct Client *browser = (struct Client *)user_data;
@@ -469,7 +501,8 @@ notebookCb_switch__page(GtkNotebook *notebook, GtkWidget *page, guint page_num,
gtk_window_set_title(GTK_WINDOW(window->main_window), gtk_widget_get_tooltip_text(label));
}
-gint get_tab_position(GtkContainer *notebook, GtkWidget *child)
+gint
+get_tab_position(GtkContainer *notebook, GtkWidget *child)
{
GValue position = G_VALUE_INIT;
g_value_init(&position, G_TYPE_INT);
@@ -479,18 +512,24 @@ gint get_tab_position(GtkContainer *notebook, GtkWidget *child)
return g_value_get_int(&position);
}
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
{
struct Window *window = g_malloc(sizeof(struct Client));
gchar *target_url = NULL;
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, DATADIR "/locale");
+ bind_textdomain_codeset(PACKAGE, "UTF-8");
+ textdomain(PACKAGE);
+
g_fprintf(stderr,
- "Buildtime WebKit version: %d.%d.%d\n",
+ _("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",
+ _("Runtime WebKit version: %d.%d.%d\n"),
webkit_get_major_version(),
webkit_get_minor_version(),
webkit_get_micro_version());
@@ -507,7 +546,7 @@ int main(int argc, char *argv[])
GTK_WINDOW(window->main_window), BADWOLF_DEFAULT_WIDTH, BADWOLF_DEFAULT_HEIGHT);
gtk_window_set_role(GTK_WINDOW(window->main_window), "browser");
- gtk_widget_set_tooltip_text(window->new_tab, "Open new tab");
+ gtk_widget_set_tooltip_text(window->new_tab, _("Open new tab"));
gtk_notebook_set_action_widget(GTK_NOTEBOOK(window->notebook), window->new_tab, GTK_PACK_END);
gtk_notebook_set_scrollable(GTK_NOTEBOOK(window->notebook), TRUE);
diff --git a/config.h b/config.h
@@ -8,9 +8,19 @@
*/
#define BADWOLF_TAB_POSITION GTK_POS_TOP
-// BADWOLF_TAB_LABEL_CHARWIDTH: Amount of characters the tab label text fits
+/* BADWOLF_TAB_LABEL_CHARWIDTH: Amount of characters the tab label text fits
+ * Quite conflicts with BADWOLF_TAB_BOX_WIDTH, recommended to only define one
+ */
#define BADWOLF_TAB_LABEL_CHARWIDTH 26
+/* BADWOLF_TAB_BOX_WIDTH: Requested width (in pixels) for the whole tab
+ * Quite conflicts with BADWOLF_TAB_LABEL_CHARWIDTH, recommended to only define one
+ */
+//#define BADWOLF_TAB_BOX_WIDTH 120
+
+// BADWOLF_TAB_HEXPAND: Should the tab try to fill the available horizontal space?
+#define BADWOLF_TAB_HEXPAND FALSE
+
/* BADWOLF_TAB_LABEL_ELLIPSIZE: pango ellipsize mode of the tab label text, can be one of:
* - PANGO_ELLIPSIZE_NONE
* - PANGO_ELLIPSIZE_START
diff --git a/mo/.keep b/mo/.keep
diff --git a/po/fr.po b/po/fr.po
@@ -0,0 +1,70 @@
+# BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser
+# Copyright (C) 2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# This file is distributed under the same license as the Badwolf package.
+# Haelwenn (lanodan) Monnier <contact@hacktivis.me>, 2019
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Badwolf 0.1.0\n"
+"POT-Creation-Date: 2019-04-18 13:16+0200\n"
+"PO-Revision-Date: 2019-04-11 09:28+0200\n"
+"Last-Translator: <contact@hacktivis.me>\n"
+"Language-Team: French\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: badwolf.c:527
+#, c-format
+msgid "Buildtime WebKit version: %d.%d.%d\n"
+msgstr "Version WebKit à la compilation: %d.%d.%d\n"
+
+#: badwolf.c:457
+msgid "New tab"
+msgstr "Nouvel onglet"
+
+#: badwolf.c:549
+msgid "Open new tab"
+msgstr "Ouvrir un nouvel onglet"
+
+#: badwolf.c:532
+#, c-format
+msgid "Runtime WebKit version: %d.%d.%d\n"
+msgstr "Version WebKit au lancement: %d.%d.%d\n"
+
+#: badwolf.c:373
+msgid "Toggle javascript"
+msgstr "Activer/Désactiver javascript"
+
+#: badwolf.c:413
+msgid "search in current page"
+msgstr "recherche dans la page courante"
+
+#: badwolf.c:100
+#, fuzzy
+msgid "the web process crashed.\n"
+msgstr "le processus web à cessé de fonctionner.\n"
+
+#: badwolf.c:104
+#, fuzzy
+msgid "the web process exceeded the memory limit.\n"
+msgstr "le processus web à dépassé la limitation de mémoire.\n"
+
+#: badwolf.c:108
+#, fuzzy
+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
+msgid "title|Crashed"
+msgstr "title|Crash"
+
+#: badwolf.c:105
+msgid "title|Out of Memory"
+msgstr "title|Dépassement Mémoire"
+
+#: badwolf.c:109
+msgid "title|Unknown Crash"
+msgstr "title|Crash inconnu"
diff --git a/po/messages.pot b/po/messages.pot
@@ -0,0 +1,66 @@
+# BadWolf: Minimalist and privacy-oriented WebKitGTK+ browser
+# Copyright (C) 2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+# This file is distributed under the same license as the Badwolf package.
+# Haelwenn (lanodan) Monnier <contact@hacktivis.me>, 2019
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: Badwolf 0.1.0\n"
+"POT-Creation-Date: 2019-04-18 13:16+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: \"Haelwenn (lanodan) Monnier <contact@hacktivis.me>\"\n"
+"Language: en\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: badwolf.c:527
+#, c-format
+msgid "Buildtime WebKit version: %d.%d.%d\n"
+msgstr ""
+
+#: badwolf.c:457
+msgid "New tab"
+msgstr ""
+
+#: badwolf.c:549
+msgid "Open new tab"
+msgstr ""
+
+#: badwolf.c:532
+#, c-format
+msgid "Runtime WebKit version: %d.%d.%d\n"
+msgstr ""
+
+#: badwolf.c:373
+msgid "Toggle javascript"
+msgstr ""
+
+#: badwolf.c:413
+msgid "search in current page"
+msgstr ""
+
+#: badwolf.c:100
+msgid "the web process crashed.\n"
+msgstr ""
+
+#: badwolf.c:104
+msgid "the web process exceeded the memory limit.\n"
+msgstr ""
+
+#: badwolf.c:108
+msgid "the web process terminated for an unknown reason.\n"
+msgstr ""
+
+#: badwolf.c:101
+msgid "title|Crashed"
+msgstr ""
+
+#: badwolf.c:105
+msgid "title|Out of Memory"
+msgstr ""
+
+#: badwolf.c:109
+msgid "title|Unknown Crash"
+msgstr ""