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 ""