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/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 */