Thursday, 27 January 2022

fixes bug #0002045 on alpine linux

--- a/netsurf/frontends/gtk/gettext.c
+++ b/netsurf/frontends/gtk/gettext.c
@@ -27,14 +27,29 @@
#include "utils/messages.h"
#include "gtk/gettext.h"

+char *libintl_gettext(const char *msgid)
+{
+ return dcgettext(NULL, msgid, 0);
+}
+
char *gettext(const char *msgid)
{
return dcgettext(NULL, msgid, 0);
}

+char *libintl_dgettext(const char *domainname, const char *msgid)
+{
+ return dcgettext(domainname, msgid, 0);
+}
+
char *dgettext(const char *domainname, const char *msgid)
{
return dcgettext(domainname, msgid, 0);
+}
+
+char *libintl_dcgettext(const char *domainname, const char *msgid, int category)
+{
+ return dcgettext(domainname, msgid, category);
}

char *dcgettext(const char *domainname, const char *msgid, int category)
--- a/netsurf/frontends/gtk/gettext.h
+++ b/netsurf/frontends/gtk/gettext.h
@@ -25,6 +25,10 @@
#ifndef _NETSURF_GTK_GETTEXT_MESSAGES_H_
#define _NETSURF_GTK_GETTEXT_MESSAGES_H_

+char *libintl_gettext(const char *msgid);
+char *libintl_dgettext(const char *domainname, const char *msgid);
+char *libintl_dcgettext(const char *domainname, const char *msgid, int category);
+
char *gettext(const char *msgid);
char *dgettext(const char *domainname, const char *msgid);
char *dcgettext(const char *domainname, const char *msgid, int category);
hello there,

it looks like gtk3 on alpine linux uses libintl_*gettext functions
instead of plain *gettext, so we need to override those functions too
to get the preferences window to display correct messages.

i have attached a patch to fix it.

No comments:

Post a Comment