i18n: mark strings in code for translation

Marks all string in the code to be translated with gettext macros.
POTFILES.in is updated to only contain source files with translatable strings.
po/README instructions are updated so that xgettext finds all the used macros.

C_() is used to give context to a translatable string.

Issue: #78928
Change-Id: I27bd91ff12a9913ac0d41842e449daf73197d96b
Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 44710f5..a079c65 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,29 +1,22 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
 
-src/accountadvancedtab.cpp
 src/accountaudiotab.cpp
 src/accountgeneraltab.cpp
-src/accountsecuritytab.cpp
 src/accountvideotab.cpp
 src/accountview.cpp
 src/callsview.cpp
-src/choosecontactview.cpp
-src/contactpopover.cpp
 src/contactsview.cpp
-src/currentcallview.cpp
 src/dialogs.c
 src/editcontactview.cpp
 src/frequentcontactsview.cpp
 src/generalsettingsview.cpp
 src/historyview.cpp
-src/incomingcallview.cpp
-src/mediasettingsview.cpp
-src/ringmainwindow.cpp
 src/ringnotify.cpp
 src/ring_client_options.c
 src/backends/edscontactbackend.cpp
 src/utils/menus.cpp
+src/ringmainwindow.cpp
 ui/accountadvancedtab.ui
 ui/accountaudiotab.ui
 ui/accountgeneraltab.ui
diff --git a/po/README b/po/README
index 93d8509..55387ed 100644
--- a/po/README
+++ b/po/README
@@ -6,7 +6,12 @@
 In order to generate the .pot (template) file with all the translation strings,
 append all the filenames that require translation to POTFILES.in, then run the
 following command:
-xgettext -d ring-client-gnome -o ring-client-gnome.pot -k_ -D .. -f POTFILES.in
+xgettext -o ring-client-gnome.pot --keyword=_ --keyword=C_:1c,2 --keyword=N_ -D .. -f POTFILES.in
+
+Replace the first 3 lines of the generated header with:
+# Gettext PO translation template file for the GNOME client of the Ring project.
+# Copyright (C) 2015 Savoir-faire Linux Inc.
+# This file is distributed under the same license as the Ring package.
 
 The translation files are expected to be located in the /po dir using the
 following naming convention:
diff --git a/po/ring-client-gnome.pot b/po/ring-client-gnome.pot
index c368d3c..cdbd413 100644
--- a/po/ring-client-gnome.pot
+++ b/po/ring-client-gnome.pot
@@ -1,14 +1,14 @@
-# Gettext PO translation template file for the GNOME client of the Ring project.
-# Copyright (C) 2015 Savoir-faire Linux Inc.
-# This file is distributed under the same license as the Ring package.
-# Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>, 2015
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-09-10 17:56-0400\n"
+"POT-Creation-Date: 2015-09-15 15:16-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,6 +17,236 @@
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#: src/accountaudiotab.cpp:185 src/accountvideotab.cpp:194
+msgid "Enabled"
+msgstr ""
+
+#: src/accountaudiotab.cpp:191
+msgctxt "Name of the codec"
+msgid "Name"
+msgstr ""
+
+#: src/accountaudiotab.cpp:195 src/accountvideotab.cpp:204
+msgid "Bitrate"
+msgstr ""
+
+#: src/accountaudiotab.cpp:199
+msgid "Samplerate"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:210
+msgid "Alias"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:221
+msgid "Type"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:250
+msgid "auto-generating..."
+msgstr ""
+
+#: src/accountgeneraltab.cpp:269
+msgid "Hostname"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:279
+msgid "Username"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:289
+msgid "Password"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:302
+msgid "Show password"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:308
+msgid "Proxy"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:318
+msgid "Voicemail number"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:330
+msgctxt "The DHT bootstrap server url"
+msgid "Bootstrap"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:342
+msgid "Auto-answer calls"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:350
+msgid "UPnP enabled"
+msgstr ""
+
+#: src/accountgeneraltab.cpp:358
+msgid "DTMF tone type:"
+msgstr ""
+
+#: src/accountvideotab.cpp:200
+msgctxt "The name of the codec"
+msgid "Name"
+msgstr ""
+
+#: src/accountview.cpp:159
+msgctxt "Account settings"
+msgid "General"
+msgstr ""
+
+#: src/accountview.cpp:163
+msgctxt "Account settings"
+msgid "Audio"
+msgstr ""
+
+#: src/accountview.cpp:167
+msgctxt "Account settings"
+msgid "Video"
+msgstr ""
+
+#: src/accountview.cpp:171
+msgctxt "Account settings"
+msgid "Advanced"
+msgstr ""
+
+#: src/accountview.cpp:175
+msgctxt "Account settings"
+msgid "Security"
+msgstr ""
+
+#: src/accountview.cpp:229
+#, c-format
+msgid "Are you sure you want to delete account \"%s\"?"
+msgstr ""
+
+#: src/accountview.cpp:313 src/accountview.cpp:315
+msgid "New Account"
+msgstr ""
+
+#: src/accountview.cpp:386
+msgctxt "Account state column"
+msgid "Enabled"
+msgstr ""
+
+#: src/accountview.cpp:392
+msgctxt "Account alias (name) column"
+msgid "Alias"
+msgstr ""
+
+#: src/accountview.cpp:396
+msgctxt "Account status column"
+msgid "Status"
+msgstr ""
+
+#: src/callsview.cpp:233
+msgid "Current Calls"
+msgstr ""
+
+#: src/contactsview.cpp:290 src/frequentcontactsview.cpp:175
+msgid "_Copy name"
+msgstr ""
+
+#: src/contactsview.cpp:301 src/contactsview.cpp:316
+#: src/frequentcontactsview.cpp:184
+msgid "_Copy number"
+msgstr ""
+
+#: src/contactsview.cpp:342 ui/ringmainwindow.ui:222
+msgid "Contacts"
+msgstr ""
+
+#: src/dialogs.c:63
+msgid "Working..."
+msgstr ""
+
+#: src/dialogs.c:93
+#, c-format
+msgid "Gnome Ring v%d.%d.%d"
+msgstr ""
+
+#: src/dialogs.c:118
+msgctxt "Do not translate the release name"
+msgid "release: Samuel de Champlain"
+msgstr ""
+
+#: src/dialogs.c:119
+msgid ""
+"The GNOME client for Ring.\n"
+"Ring is a secured and distributed communication software."
+msgstr ""
+
+#: src/editcontactview.cpp:196
+msgctxt "Phone number category"
+msgid "home"
+msgstr ""
+
+#: src/frequentcontactsview.cpp:225
+msgid "Frequent Contacts"
+msgstr ""
+
+#: src/generalsettingsview.cpp:92
+msgid ""
+"Are you sure you want to clear all your history?\n"
+"This operation will also reset the Frequent Contacts list"
+msgstr ""
+
+#: src/historyview.cpp:184
+msgid "_Copy"
+msgstr ""
+
+#: src/historyview.cpp:361
+msgctxt "Call history"
+msgid "History"
+msgstr ""
+
+#: src/historyview.cpp:416
+msgctxt "Call history"
+msgid "Call"
+msgstr ""
+
+#: src/historyview.cpp:461
+msgctxt "Call history"
+msgid "Date"
+msgstr ""
+
+#: src/ringnotify.cpp:86
+msgid "Incoming call"
+msgstr ""
+
+#: src/ringnotify.cpp:169
+#, c-format
+msgctxt "Text message notification"
+msgid "%s says:"
+msgstr ""
+
+#: src/ring_client_options.c:79
+msgid "- GNOME client for Ring"
+msgstr ""
+
+#: src/backends/edscontactbackend.cpp:201
+msgid "Unknown EDS addressbook"
+msgstr ""
+
+#: src/backends/edscontactbackend.cpp:221
+msgctxt "Backend type"
+msgid "Contacts"
+msgstr ""
+
+#: src/utils/menus.cpp:67
+msgid "_Add to contact"
+msgstr ""
+
+#: src/ringmainwindow.cpp:643
+msgid "fetching RingID..."
+msgstr ""
+
+#: src/ringmainwindow.cpp:648
+msgid "no Ring account"
+msgstr ""
+
 #: ui/accountadvancedtab.ui:81
 msgid "Registration expire timeout (seconds):"
 msgstr ""
@@ -235,7 +465,7 @@
 msgid "End this call"
 msgstr ""
 
-#: ui/currentcallview.ui:214 ui/currentcallview.ui:408
+#: ui/currentcallview.ui:214 ui/currentcallview.ui:409
 msgid "End call"
 msgstr ""
 
@@ -244,7 +474,7 @@
 msgstr ""
 
 #: ui/currentcallview.ui:236 ui/currentcallview.ui:258
-#: ui/currentcallview.ui:399
+#: ui/currentcallview.ui:400
 msgid "Hold"
 msgstr ""
 
@@ -256,38 +486,42 @@
 msgid "Toggle mute video"
 msgstr ""
 
-#: ui/currentcallview.ui:280 ui/currentcallview.ui:390
+#: ui/currentcallview.ui:280 ui/currentcallview.ui:391
 msgid "Mute video"
 msgstr ""
 
 #: ui/currentcallview.ui:299
-msgid "Toggle record"
+msgid "Toggle record audio"
 msgstr ""
 
 #: ui/currentcallview.ui:302
-msgid "Record"
+msgid "Record audio"
 msgstr ""
 
 #: ui/currentcallview.ui:318
 msgid "Toggle show chat"
 msgstr ""
 
-#: ui/currentcallview.ui:322 ui/currentcallview.ui:372
+#: ui/currentcallview.ui:322 ui/currentcallview.ui:373
 msgid "Chat"
 msgstr ""
 
-#: ui/currentcallview.ui:338
+#: ui/currentcallview.ui:339
 msgid "Adjust outgoing video quality (bit/s)"
 msgstr ""
 
-#: ui/currentcallview.ui:343 ui/currentcallview.ui:417
+#: ui/currentcallview.ui:344 ui/currentcallview.ui:418
 msgid "Video quality"
 msgstr ""
 
-#: ui/currentcallview.ui:381
+#: ui/currentcallview.ui:382
 msgid "Mute audio"
 msgstr ""
 
+#: ui/currentcallview.ui:427
+msgid "Record"
+msgstr ""
+
 #: ui/editcontactview.ui:12
 msgid "Select addressbook"
 msgstr ""
@@ -440,10 +674,6 @@
 msgid "Settings"
 msgstr ""
 
-#: ui/ringmainwindow.ui:222
-msgid "Contacts"
-msgstr ""
-
 #: ui/ringmainwindow.ui:232
 msgid "History"
 msgstr ""
diff --git a/src/accountaudiotab.cpp b/src/accountaudiotab.cpp
index c3a2b2a..58fa68a 100644
--- a/src/accountaudiotab.cpp
+++ b/src/accountaudiotab.cpp
@@ -31,6 +31,7 @@
 #include "accountaudiotab.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include <account.h>
 #include <audio/codecmodel.h>
 #include "models/gtkqsortfiltertreemodel.h"
@@ -181,21 +182,21 @@
     gtk_tree_view_set_model(GTK_TREE_VIEW(priv->treeview_codecs), GTK_TREE_MODEL(codec_model));
 
     renderer = gtk_cell_renderer_toggle_new();
-    column = gtk_tree_view_column_new_with_attributes("Enabled", renderer, "active", 0, NULL);
+    column = gtk_tree_view_column_new_with_attributes(_("Enabled"), renderer, "active", 0, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_codecs), column);
 
     g_signal_connect(renderer, "toggled", G_CALLBACK(codec_active_toggled), view);
 
     renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("Name", renderer, "text", 1, NULL);
+    column = gtk_tree_view_column_new_with_attributes(C_("Name of the codec", "Name"), renderer, "text", 1, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_codecs), column);
 
     renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("Bitrate", renderer, "text", 2, NULL);
+    column = gtk_tree_view_column_new_with_attributes(_("Bitrate"), renderer, "text", 2, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_codecs), column);
 
     renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("Samplerate", renderer, "text", 3, NULL);
+    column = gtk_tree_view_column_new_with_attributes(_("Samplerate"), renderer, "text", 3, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_codecs), column);
 
     /* connect move codecs up/down signals */
diff --git a/src/accountgeneraltab.cpp b/src/accountgeneraltab.cpp
index e919017..97d8cc9 100644
--- a/src/accountgeneraltab.cpp
+++ b/src/accountgeneraltab.cpp
@@ -31,6 +31,7 @@
 #include "accountgeneraltab.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include <account.h>
 
 struct _AccountGeneralTab
@@ -206,7 +207,7 @@
         ++grid_row;
     } else {
         /* account alias */
-        label = gtk_label_new("Alias");
+        label = gtk_label_new(_("Alias"));
         gtk_widget_set_halign(label, GTK_ALIGN_START);
         gtk_grid_attach(GTK_GRID(priv->grid_account), label, 0, grid_row, 1, 1);
         entry_alias = gtk_entry_new();
@@ -217,7 +218,7 @@
         ++grid_row;
 
         /* account type */
-        label = gtk_label_new("Type");
+        label = gtk_label_new(_("Type"));
         gtk_widget_set_halign(label, GTK_ALIGN_START);
         gtk_grid_attach(GTK_GRID(priv->grid_account), label, 0, grid_row, 1, 1);
 
@@ -242,11 +243,11 @@
     }
 
     if (priv->account->protocol() == Account::Protocol::RING) {
-        label = gtk_label_new("Hash");
+        label = gtk_label_new("RingID");
         gtk_widget_set_halign(label, GTK_ALIGN_START);
         gtk_grid_attach(GTK_GRID(priv->grid_account), label, 0, grid_row, 1, 1);
         entry_username = gtk_entry_new();
-        gtk_entry_set_placeholder_text(GTK_ENTRY(entry_username), "auto-generating...");
+        gtk_entry_set_placeholder_text(GTK_ENTRY(entry_username), _("auto-generating..."));
         gtk_entry_set_text(GTK_ENTRY(entry_username), priv->account->username().toLocal8Bit().constData());
         g_object_set(G_OBJECT(entry_username), "editable", FALSE, NULL);
         g_object_set(G_OBJECT(entry_username), "max-width-chars", 50, NULL);
@@ -265,7 +266,7 @@
             /* SIP and IAX have the same params */
 
             /* host name */
-            label = gtk_label_new("Host name");
+            label = gtk_label_new(_("Hostname"));
             gtk_widget_set_halign(label, GTK_ALIGN_START);
             gtk_grid_attach(GTK_GRID(priv->grid_parameters), label, 0, grid_row, 1, 1);
             entry_hostname = gtk_entry_new();
@@ -275,7 +276,7 @@
             ++grid_row;
 
             /* user name */
-            label = gtk_label_new("User name");
+            label = gtk_label_new(_("Username"));
             gtk_widget_set_halign(label, GTK_ALIGN_START);
             gtk_grid_attach(GTK_GRID(priv->grid_parameters), label, 0, grid_row, 1, 1);
             entry_username = gtk_entry_new();
@@ -285,7 +286,7 @@
             ++grid_row;
 
             /* password */
-            label = gtk_label_new("Password");
+            label = gtk_label_new(_("Password"));
             gtk_widget_set_halign(label, GTK_ALIGN_START);
             gtk_grid_attach(GTK_GRID(priv->grid_parameters), label, 0, grid_row, 1, 1);
             entry_password = gtk_entry_new();
@@ -298,13 +299,13 @@
             ++grid_row;
 
             /* show password */
-            GtkWidget *checkbutton = gtk_check_button_new_with_label("Show password");
+            GtkWidget *checkbutton = gtk_check_button_new_with_label(_("Show password"));
             gtk_grid_attach(GTK_GRID(priv->grid_parameters), checkbutton, 1, grid_row, 1, 1);
             g_signal_connect(checkbutton, "toggled", G_CALLBACK(show_password), entry_password);
             ++grid_row;
 
             /* proxy */
-            label = gtk_label_new("Proxy");
+            label = gtk_label_new(_("Proxy"));
             gtk_widget_set_halign(label, GTK_ALIGN_START);
             gtk_grid_attach(GTK_GRID(priv->grid_parameters), label, 0, grid_row, 1, 1);
             entry_proxy = gtk_entry_new();
@@ -314,7 +315,7 @@
             ++grid_row;
 
             /* voicemail number */
-            label = gtk_label_new("Voicemail number");
+            label = gtk_label_new(_("Voicemail number"));
             gtk_widget_set_halign(label, GTK_ALIGN_START);
             gtk_grid_attach(GTK_GRID(priv->grid_parameters), label, 0, grid_row, 1, 1);
             entry_voicemail = gtk_entry_new();
@@ -326,7 +327,7 @@
             /* RING accoutn */
 
             /* bootstrap */
-            label = gtk_label_new("Bootstrap");
+            label = gtk_label_new(C_("The DHT bootstrap server url", "Bootstrap"));
             gtk_widget_set_halign(label, GTK_ALIGN_START);
             gtk_grid_attach(GTK_GRID(priv->grid_parameters), label, 0, grid_row, 1, 1);
             entry_hostname = gtk_entry_new();
@@ -338,7 +339,7 @@
     }
 
     /* auto answer */
-    checkbutton_autoanswer = gtk_check_button_new_with_label("Auto-answer calls");
+    checkbutton_autoanswer = gtk_check_button_new_with_label(_("Auto-answer calls"));
     gtk_widget_set_halign(checkbutton_autoanswer, GTK_ALIGN_START);
     gtk_grid_attach(GTK_GRID(priv->grid_parameters), checkbutton_autoanswer, 0, grid_row, 1, 1);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_autoanswer), priv->account->isAutoAnswer());
@@ -346,7 +347,7 @@
     ++grid_row;
 
     /* upnp */
-    checkbutton_upnp = gtk_check_button_new_with_label("UPnP enabled");
+    checkbutton_upnp = gtk_check_button_new_with_label(_("UPnP enabled"));
     gtk_widget_set_halign(checkbutton_upnp, GTK_ALIGN_START);
     gtk_grid_attach(GTK_GRID(priv->grid_parameters), checkbutton_upnp, 0, grid_row, 1, 1);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_upnp), priv->account->isUpnpEnabled());
@@ -354,7 +355,7 @@
     ++grid_row;
 
     /* DTMF tone type */
-    label = gtk_label_new("DTMF tone type:");
+    label = gtk_label_new(_("DTMF tone type:"));
     gtk_widget_set_halign(label, GTK_ALIGN_START);
     gtk_grid_attach(GTK_GRID(priv->grid_parameters), label, 0, grid_row, 1, 1);
 
diff --git a/src/accountvideotab.cpp b/src/accountvideotab.cpp
index f58adbb..e9b4466 100644
--- a/src/accountvideotab.cpp
+++ b/src/accountvideotab.cpp
@@ -31,6 +31,7 @@
 #include "accountvideotab.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include <account.h>
 #include <audio/codecmodel.h>
 #include "models/gtkqsortfiltertreemodel.h"
@@ -190,17 +191,17 @@
     gtk_tree_view_set_model(GTK_TREE_VIEW(priv->treeview_codecs), GTK_TREE_MODEL(codec_model));
 
     renderer = gtk_cell_renderer_toggle_new();
-    column = gtk_tree_view_column_new_with_attributes("Enabled", renderer, "active", 0, NULL);
+    column = gtk_tree_view_column_new_with_attributes(_("Enabled"), renderer, "active", 0, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_codecs), column);
 
     g_signal_connect(renderer, "toggled", G_CALLBACK(codec_active_toggled), view);
 
     renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("Name", renderer, "text", 1, NULL);
+    column = gtk_tree_view_column_new_with_attributes(C_("The name of the codec", "Name"), renderer, "text", 1, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_codecs), column);
 
     renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("Bitrate", renderer, "text", 2, NULL);
+    column = gtk_tree_view_column_new_with_attributes(_("Bitrate"), renderer, "text", 2, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_codecs), column);
 
     /* enable video checkbutton */
diff --git a/src/accountview.cpp b/src/accountview.cpp
index 9eadb1d..fd6746e 100644
--- a/src/accountview.cpp
+++ b/src/accountview.cpp
@@ -31,6 +31,7 @@
 #include "accountview.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include <accountmodel.h>
 #include <audio/codecmodel.h>
 #include <protocolmodel.h>
@@ -155,23 +156,23 @@
         auto general_tab = create_scrolled_account_view(account_general_tab_new(account));
         gtk_notebook_append_page(GTK_NOTEBOOK(priv->current_account_notebook),
                                  general_tab,
-                                 gtk_label_new("General"));
+                                 gtk_label_new(C_("Account settings", "General")));
         auto audio_tab = create_scrolled_account_view(account_audio_tab_new(account));
         gtk_notebook_append_page(GTK_NOTEBOOK(priv->current_account_notebook),
                                  audio_tab,
-                                 gtk_label_new("Audio"));
+                                 gtk_label_new(C_("Account settings", "Audio")));
         auto video_tab = create_scrolled_account_view(account_video_tab_new(account));
         gtk_notebook_append_page(GTK_NOTEBOOK(priv->current_account_notebook),
                                  video_tab,
-                                 gtk_label_new("Video"));
+                                 gtk_label_new(C_("Account settings", "Video")));
         auto advanced_tab = create_scrolled_account_view(account_advanced_tab_new(account));
         gtk_notebook_append_page(GTK_NOTEBOOK(priv->current_account_notebook),
                                  advanced_tab,
-                                 gtk_label_new("Advanced"));
+                                 gtk_label_new(C_("Account settings", "Advanced")));
         auto security_tab = create_scrolled_account_view(account_security_tab_new(account));
         gtk_notebook_append_page(GTK_NOTEBOOK(priv->current_account_notebook),
                                  security_tab,
-                                 gtk_label_new("Security"));
+                                 gtk_label_new(C_("Account settings", "Security")));
 
         /* set the tab displayed to the same as the prev account selected */
         gtk_notebook_set_current_page(GTK_NOTEBOOK(priv->current_account_notebook), priv->current_page);
@@ -225,7 +226,7 @@
     GtkWidget *dialog = gtk_message_dialog_new(NULL,
                             (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT),
                             GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL,
-                            "Are you sure you want to delete account \"%s\"?",
+                            _("Are you sure you want to delete account \"%s\"?"),
                             account->alias().toLocal8Bit().constData());
 
     gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE);
@@ -309,9 +310,9 @@
             GtkWidget *working = ring_dialog_working(GTK_WIDGET(view), NULL);
             gtk_window_present(GTK_WINDOW(working));
 
-            auto account = AccountModel::instance()->add(QString("New Account"), protocol_idx);
+            auto account = AccountModel::instance()->add(QString(_("New Account")), protocol_idx);
             if (account->protocol() == Account::Protocol::RING)
-                account->setDisplayName("New Account");
+                account->setDisplayName(_("New Account"));
 
             /* now save after a short timeout to make sure that
              * the save doesn't happen before the "working" dialog is presented
@@ -382,17 +383,17 @@
     gtk_tree_view_set_model(GTK_TREE_VIEW(priv->treeview_account_list), GTK_TREE_MODEL(account_model));
 
     renderer = gtk_cell_renderer_toggle_new();
-    column = gtk_tree_view_column_new_with_attributes("Enabled", renderer, "active", 0, NULL);
+    column = gtk_tree_view_column_new_with_attributes(C_("Account state column", "Enabled"), renderer, "active", 0, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_account_list), column);
 
     g_signal_connect(renderer, "toggled", G_CALLBACK(account_active_toggled), view);
 
     renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("Alias", renderer, "text", 1, NULL);
+    column = gtk_tree_view_column_new_with_attributes(C_("Account alias (name) column", "Alias"), renderer, "text", 1, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_account_list), column);
 
     renderer = gtk_cell_renderer_text_new();
-    column = gtk_tree_view_column_new_with_attributes("Status", renderer, "text", 3, NULL);
+    column = gtk_tree_view_column_new_with_attributes(C_("Account status column", "Status"), renderer, "text", 3, NULL);
     gtk_tree_view_append_column(GTK_TREE_VIEW(priv->treeview_account_list), column);
 
     /* the registration state is an enum, we want to display it as a string */
diff --git a/src/backends/edscontactbackend.cpp b/src/backends/edscontactbackend.cpp
index 6f8f035..e8018b1 100644
--- a/src/backends/edscontactbackend.cpp
+++ b/src/backends/edscontactbackend.cpp
@@ -30,6 +30,7 @@
 
 #include "edscontactbackend.h"
 
+#include <glib/gi18n.h>
 #include <person.h>
 #include <personmodel.h>
 #include <contactmethod.h>
@@ -194,10 +195,10 @@
         auto addressbook = e_source_get_display_name(source);
 
         gchar *name = g_strdup_printf("%s (%s)", addressbook, backend);
-        name_ = QObject::tr(name);
+        name_ = name;
         g_free(name);
     } else
-        name_ = QObject::tr("Unknown EDS addressbook");
+        name_ = _("Unknown EDS addressbook");
 }
 
 EdsContactBackend::~EdsContactBackend()
@@ -217,7 +218,7 @@
 
 QString EdsContactBackend::category() const
 {
-    return QObject::tr("Contacts");
+    return C_("Backend type", "Contacts");
 }
 
 bool EdsContactBackend::isEnabled() const
diff --git a/src/callsview.cpp b/src/callsview.cpp
index 5271438..59468d7 100644
--- a/src/callsview.cpp
+++ b/src/callsview.cpp
@@ -31,6 +31,7 @@
 #include "callsview.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include "models/gtkqtreemodel.h"
 #include <callmodel.h>
 #include <QtCore/QItemSelectionModel>
@@ -229,7 +230,7 @@
     gtk_container_add(GTK_CONTAINER(self), box);
 
     /* current calls label */
-    GtkWidget *label = gtk_label_new("Current Calls");
+    GtkWidget *label = gtk_label_new(_("Current Calls"));
     gtk_box_pack_start(GTK_BOX(box), label, FALSE, TRUE, 10);
 
     GtkWidget *scrolled_window = gtk_scrolled_window_new(NULL, NULL);
diff --git a/src/choosecontactview.cpp b/src/choosecontactview.cpp
index ecbe4bf..0259112 100644
--- a/src/choosecontactview.cpp
+++ b/src/choosecontactview.cpp
@@ -152,7 +152,6 @@
     /* photo and name/contact method colparentumn */
     GtkCellArea *area = gtk_cell_area_box_new();
     GtkTreeViewColumn *column = gtk_tree_view_column_new_with_area(area);
-    gtk_tree_view_column_set_title(column, "Name");
 
     /* photo renderer */
     GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new();
diff --git a/src/contactsview.cpp b/src/contactsview.cpp
index 4058d14..b017cf9 100644
--- a/src/contactsview.cpp
+++ b/src/contactsview.cpp
@@ -31,6 +31,7 @@
 #include "contactsview.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include "models/gtkqsortfiltertreemodel.h"
 #include <categorizedcontactmodel.h>
 #include <personmodel.h>
@@ -286,7 +287,7 @@
 
             /* copy name */
             gchar *name = g_strdup_printf("%s", c->formattedName().toUtf8().constData());
-            GtkWidget *item = gtk_menu_item_new_with_mnemonic("_Copy name");
+            GtkWidget *item = gtk_menu_item_new_with_mnemonic(_("_Copy name"));
             gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
             g_object_set_data_full(G_OBJECT(item), COPY_DATA_KEY, name, (GDestroyNotify)g_free);
             g_signal_connect(item,
@@ -297,7 +298,7 @@
             /* copy number if there is only one */
             if (c->phoneNumbers().size() == 1) {
                 gchar *number = g_strdup_printf("%s",c->phoneNumbers().first()->uri().toUtf8().constData());
-                GtkWidget *item = gtk_menu_item_new_with_mnemonic("_Copy number");
+                GtkWidget *item = gtk_menu_item_new_with_mnemonic(_("_Copy number"));
                 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
                 g_object_set_data_full(G_OBJECT(item), COPY_DATA_KEY, number, (GDestroyNotify)g_free);
                 g_signal_connect(item,
@@ -312,7 +313,7 @@
         if (var_n.isValid()) {
             ContactMethod *n = var_n.value<ContactMethod *>();
             gchar *number = g_strdup_printf("%s",n->uri().toUtf8().constData());
-            GtkWidget *item = gtk_menu_item_new_with_mnemonic("_Copy number");
+            GtkWidget *item = gtk_menu_item_new_with_mnemonic(_("_Copy number"));
             gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
             g_object_set_data_full(G_OBJECT(item), COPY_DATA_KEY, number, (GDestroyNotify)g_free);
             g_signal_connect(item,
@@ -338,7 +339,7 @@
     /* need to be able to focus on widget so that we can auto-scroll to it */
     gtk_widget_set_can_focus(GTK_WIDGET(self), TRUE);
 
-    GtkWidget *label_contacts = gtk_label_new("Contacts");
+    GtkWidget *label_contacts = gtk_label_new(_("Contacts"));
     gtk_box_pack_start(GTK_BOX(self), label_contacts, FALSE, TRUE, 10);
 
     GtkWidget *treeview_contacts = gtk_tree_view_new();
@@ -373,7 +374,6 @@
     /* photo and name/contact method column */
     GtkCellArea *area = gtk_cell_area_box_new();
     GtkTreeViewColumn *column = gtk_tree_view_column_new_with_area(area);
-    gtk_tree_view_column_set_title(column, "Name");
 
     /* photo renderer */
     GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new();
diff --git a/src/dialogs.c b/src/dialogs.c
index 657057c..da9a0a1 100644
--- a/src/dialogs.c
+++ b/src/dialogs.c
@@ -31,6 +31,7 @@
 #include "dialogs.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include <glib/gprintf.h>
 #include "config.h"
 
@@ -59,7 +60,7 @@
     if (msg) {
         message = gtk_label_new(msg);
     } else {
-        message = gtk_label_new("Working...");
+        message = gtk_label_new(_("Working..."));
     }
 
     gtk_box_pack_start(GTK_BOX(content_area), message, FALSE, TRUE, 0);
@@ -89,7 +90,7 @@
         g_clear_error(&error);
     }
 
-    gchar *name = g_strdup_printf("Gnome Ring v%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
+    gchar *name = g_strdup_printf(_("Gnome Ring v%d.%d.%d"), VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
 
     const gchar *authors[] = {
         [0] = "Adrien Béraud",
@@ -114,8 +115,8 @@
         "copyright", "© 2015 Savoir-faire Linux",
         "license-type", GTK_LICENSE_GPL_3_0,
         "logo", logo,
-        "version", "release: Samuel de Champlain",
-        "comments", "The GNOME client for Ring.\nRing is a secured and distributed communication software.",
+        "version", C_("Do not translate the release name", "release: Samuel de Champlain"),
+        "comments", _("The GNOME client for Ring.\nRing is a secured and distributed communication software."),
         "authors", authors,
         "website", "http://www.ring.cx/",
         "website-label", "www.ring.cx",
diff --git a/src/editcontactview.cpp b/src/editcontactview.cpp
index 1acbcb7..e581b16 100644
--- a/src/editcontactview.cpp
+++ b/src/editcontactview.cpp
@@ -30,6 +30,7 @@
 
 #include "editcontactview.h"
 
+#include <glib/gi18n.h>
 #include <contactmethod.h>
 #include <personmodel.h>
 #include <numbercategorymodel.h>
@@ -192,7 +193,7 @@
                              (QAbstractItemModel *)NumberCategoryModel::instance(), NULL);
 
     /* set "home" as the default number category */
-    const auto& idx = NumberCategoryModel::instance()->nameToIndex("home");
+    const auto& idx = NumberCategoryModel::instance()->nameToIndex(C_("Phone number category", "home"));
     if (idx.isValid())
         gtk_combo_box_set_active_index(GTK_COMBO_BOX(priv->combobox_detail), idx);
 
diff --git a/src/frequentcontactsview.cpp b/src/frequentcontactsview.cpp
index 74be6ac..1373bb2 100644
--- a/src/frequentcontactsview.cpp
+++ b/src/frequentcontactsview.cpp
@@ -31,6 +31,7 @@
 #include "frequentcontactsview.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include "models/gtkqtreemodel.h"
 #include "utils/calling.h"
 #include <memory>
@@ -171,7 +172,7 @@
 
     /* copy name */
     gchar *name = g_strdup_printf("%s", c.value<QString>().toUtf8().constData());
-    GtkWidget *item = gtk_menu_item_new_with_mnemonic("_Copy name");
+    GtkWidget *item = gtk_menu_item_new_with_mnemonic(_("_Copy name"));
     gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
     g_object_set_data_full(G_OBJECT(item), COPY_DATA_KEY, name, (GDestroyNotify)g_free);
     g_signal_connect(item,
@@ -180,7 +181,7 @@
                      NULL);
 
     gchar *number = g_strdup_printf("%s", n.value<QString>().toUtf8().constData());
-    item = gtk_menu_item_new_with_mnemonic("_Copy number");
+    item = gtk_menu_item_new_with_mnemonic(_("_Copy number"));
     gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
     g_object_set_data_full(G_OBJECT(item), COPY_DATA_KEY, number, (GDestroyNotify)g_free);
     g_signal_connect(item,
@@ -221,7 +222,7 @@
     gtk_orientable_set_orientation(GTK_ORIENTABLE(self), GTK_ORIENTATION_VERTICAL);
 
     /* frequent contacts/numbers */
-    GtkWidget *label_frequent = gtk_label_new("Frequent Contacts");
+    GtkWidget *label_frequent = gtk_label_new(_("Frequent Contacts"));
     gtk_box_pack_start(GTK_BOX(self), label_frequent, FALSE, TRUE, 10);
 
     GtkWidget *treeview_frequent = gtk_tree_view_new();
@@ -247,7 +248,6 @@
     /* photo and name/contact method column */
     GtkCellArea *area = gtk_cell_area_box_new();
     GtkTreeViewColumn *column = gtk_tree_view_column_new_with_area(area);
-    gtk_tree_view_column_set_title(column, "Name");
 
     /* photo renderer */
     GtkCellRenderer *renderer = gtk_cell_renderer_pixbuf_new();
diff --git a/src/generalsettingsview.cpp b/src/generalsettingsview.cpp
index 95354be..6955f37 100644
--- a/src/generalsettingsview.cpp
+++ b/src/generalsettingsview.cpp
@@ -31,6 +31,7 @@
 #include "generalsettingsview.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include <categorizedhistorymodel.h>
 #include "utils/files.h"
 
@@ -88,8 +89,7 @@
     GtkWidget *dialog = gtk_message_dialog_new(NULL,
                             (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT),
                             GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL,
-                            "Are you sure you want to clear all your history?\n" \
-                            "This operation will also reset the Frequen Contacts list");
+                            _("Are you sure you want to clear all your history?\nThis operation will also reset the Frequent Contacts list"));
 
     gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE);
 
diff --git a/src/historyview.cpp b/src/historyview.cpp
index bf52620..b107e02 100644
--- a/src/historyview.cpp
+++ b/src/historyview.cpp
@@ -31,6 +31,7 @@
 #include "historyview.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include "models/gtkqsortfiltertreemodel.h"
 #include <categorizedhistorymodel.h>
 #include <QtCore/QSortFilterProxyModel>
@@ -180,7 +181,7 @@
     GtkWidget *menu = gtk_menu_new();
 
     /* copy */
-    GtkWidget *item = gtk_menu_item_new_with_mnemonic("_Copy");
+    GtkWidget *item = gtk_menu_item_new_with_mnemonic(_("_Copy"));
     gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
     g_signal_connect(item, "activate", G_CALLBACK(copy_history_item), treeview);
 
@@ -357,7 +358,7 @@
     /* need to be able to focus on widget so that we can auto-scroll to it */
     gtk_widget_set_can_focus(GTK_WIDGET(self), TRUE);
 
-    GtkWidget *label_history = gtk_label_new("History");
+    GtkWidget *label_history = gtk_label_new(C_("Call history", "History"));
     gtk_box_pack_start(GTK_BOX(self), label_history, FALSE, TRUE, 10);
 
     GtkWidget *treeview_history = gtk_tree_view_new();
@@ -412,7 +413,7 @@
     /* call direction, photo, name/number column */
     GtkCellArea *area = gtk_cell_area_box_new();
     GtkTreeViewColumn *column = gtk_tree_view_column_new_with_area(area);
-    gtk_tree_view_column_set_title(column, "Call");
+    gtk_tree_view_column_set_title(column, C_("Call history", "Call"));
 
     /* call direction */
     GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
@@ -457,7 +458,7 @@
     /* date column */
     area = gtk_cell_area_box_new();
     column = gtk_tree_view_column_new_with_area(area);
-    gtk_tree_view_column_set_title(column, "Date");
+    gtk_tree_view_column_set_title(column, C_("Call history", "Date"));
 
     /* time renderer */
     renderer = gtk_cell_renderer_text_new ();
diff --git a/src/ring_client_options.c b/src/ring_client_options.c
index fde8c16..6901a03 100644
--- a/src/ring_client_options.c
+++ b/src/ring_client_options.c
@@ -76,7 +76,7 @@
     /* TODO: for some reason the given description and added options aren't printed
      * when '--help' is invoked... possibly a GTK bug.
      */
-    GOptionContext *context = g_option_context_new("- GNOME client for Ring");
+    GOptionContext *context = g_option_context_new(_("- GNOME client for Ring"));
     g_option_context_set_ignore_unknown_options(context, TRUE);
 
     /* TODO: add translation domain */
diff --git a/src/ringmainwindow.cpp b/src/ringmainwindow.cpp
index bb3271d..8a75f2a 100644
--- a/src/ringmainwindow.cpp
+++ b/src/ringmainwindow.cpp
@@ -31,6 +31,7 @@
 #include "ringmainwindow.h"
 
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 #include "models/gtkqtreemodel.h"
 #include <callmodel.h>
 #include <call.h>
@@ -637,10 +638,14 @@
             gtk_label_set_label(GTK_LABEL(priv->label_ring_id), hash.toUtf8().constData());
         } else {
             g_warning("got ring account, but Ring id is empty");
-            gtk_label_set_label(GTK_LABEL(priv->label_ring_id), "<span fgcolor=\"gray\">fetching Ring ID...</span>");
+            gtk_label_set_label(GTK_LABEL(priv->label_ring_id),
+                                g_strdup_printf("<span fgcolor=\"gray\">%s</span>",
+                                                _("fetching RingID...")));
         }
     } else {
-        gtk_label_set_label(GTK_LABEL(priv->label_ring_id), "<span fgcolor=\"gray\">no Ring account</span>");
+        gtk_label_set_label(GTK_LABEL(priv->label_ring_id),
+                            g_strdup_printf("<span fgcolor=\"gray\">%s</span>",
+                                            _("no Ring account")));
     }
 
 }
diff --git a/src/ringnotify.cpp b/src/ringnotify.cpp
index fcfd59e..bf0f5e1 100644
--- a/src/ringnotify.cpp
+++ b/src/ringnotify.cpp
@@ -32,6 +32,7 @@
 #include "config.h"
 
 #if USE_LIBNOTIFY
+#include <glib/gi18n.h>
 #include <libnotify/notify.h>
 #include <memory>
 #include <globalinstances.h>
@@ -82,7 +83,7 @@
 
     gchar *body = g_strdup_printf("%s", call->formattedName().toUtf8().constData());
     std::shared_ptr<NotifyNotification> notification(
-        notify_notification_new("Incoming call", body, NULL), g_object_unref);
+        notify_notification_new(_("Incoming call"), body, NULL), g_object_unref);
     g_free(body);
 
     /* get photo */
@@ -165,7 +166,7 @@
 
     GHashTable *chat_table = ring_notify_get_chat_table();
 
-    gchar *title = g_strdup_printf("%s says:", call->formattedName().toUtf8().constData());
+    gchar *title = g_strdup_printf(C_("Text message notification", "%s says:"), call->formattedName().toUtf8().constData());
     gchar *body = g_strdup_printf("%s", msg["text/plain"].toUtf8().constData());
 
     /* check if a notification already exists for this call */
diff --git a/src/utils/menus.cpp b/src/utils/menus.cpp
index ffb1ccc..ab498c8 100644
--- a/src/utils/menus.cpp
+++ b/src/utils/menus.cpp
@@ -30,6 +30,7 @@
 
 #include "menus.h"
 
+#include <glib/gi18n.h>
 #include <contactmethod.h>
 #include "../contactpopover.h"
 
@@ -63,7 +64,7 @@
 {
     g_return_val_if_fail(cm, NULL);
 
-    auto add_to = gtk_menu_item_new_with_mnemonic("_Add to contact");
+    auto add_to = gtk_menu_item_new_with_mnemonic(_("_Add to contact"));
 
     /* save the parent widget in the item object, so we can retrieve
      * it in the callback */