Created attachment 223757 [details] update netsurf port to 3.10_1 GTK will not use a custom supplied gettext function with Builder xml ui on FreeBSD, which causes the the preferences dialog to have translation keys instead of English, etc, readable text. Netsurf uses a translation scheme with key/value pairs in a gzipped file instead of using gettext po files, so when the ui is loaded by GTK the calls to translate using gettext() fail because it cannot find the po translation files. This fix generates a language specific ui for this dialog during buildtime so on-the-fly translation is not required on the preferences dialog. The program selects the ui file which corresponds to their locale setting in env.
LGTM. Will commit once the ports tree has converted to git (which we are in the process in).
Committed!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c7d712568cc4dbe35df64f48f576498361160333 commit c7d712568cc4dbe35df64f48f576498361160333 Author: Neel Chauhan <nc@FreeBSD.org> AuthorDate: 2021-04-06 16:23:54 +0000 Commit: Neel Chauhan <nc@FreeBSD.org> CommitDate: 2021-04-06 16:26:55 +0000 www/netsurf: Fix preferences dialog bug and fix build warnings PR: 254702 Submitted by: waitman AT waitman DOT net www/netsurf/Makefile | 39 +++++----- www/netsurf/files/Makefile.config | 2 +- www/netsurf/files/buildui.pl (new) | 82 ++++++++++++++++++++++ www/netsurf/files/patch-Makefile | 50 ++++++++++++- .../files/patch-frontends_gtk_Makefile.defaults | 8 ++- .../files/patch-frontends_gtk_preferences.c (new) | 33 +++++++++ .../files/patch-frontends_gtk_resources.c (new) | 22 ++++++ www/netsurf/pkg-plist | 5 ++ 8 files changed, 218 insertions(+), 23 deletions(-)
The fallback to English for known locales but not yet translated in netsurf does not really work. I have submitted a fix at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263498