Bug 263498 - www/netsurf: Preferences UI builder init failed when running with LANG=pl_PL.UTF-8
Summary: www/netsurf: Preferences UI builder init failed when running with LANG=pl_PL....
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Neel Chauhan
Depends on:
Reported: 2022-04-23 20:43 UTC by Marcin Cieślak
Modified: 2022-04-28 18:26 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (nc)

use "enoptions" resource name for unknown locales (692 bytes, text/plain)
2022-04-23 20:43 UTC, Marcin Cieślak
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2022-04-23 20:43:09 UTC
Created attachment 233424 [details]
use "enoptions" resource name for unknown locales

This is a follow up to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254702

running "env LANG=pl_PL.UTF-8 netsurf-gtk3 -v" : the browser starts fine, preferences windows does not open, the logfile says

(9.232225) frontends/gtk/preferences.c:982 GtkWidget *nsgtk_preferences(struct browser_window *, GtkWindow *): Preferences UI builder init failed

running "env LANG=fr_FR.UTF-8 netsurf-gtk3 -v" : the browser starts fine, the preferences window does open in French.

I have traced this back to the issue with the patch for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254702: fallback UI resource name has been called "enoption" and not "enoptions".

FreeBSD locale problems have been also reported https://bugs.netsurf-browser.org/mantis/view.php?id=2045 maybe our solution is worth upstreaming.

I think the whole fix to the issue at hand is a bit shabby, maybe we could come up with something better.

Quick fix attached.
Comment 1 commit-hook freebsd_committer 2022-04-28 18:26:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f0f07a1e2b21fa2809ffd325e574aec73b64a57

commit 7f0f07a1e2b21fa2809ffd325e574aec73b64a57
Author:     Marcin Cieślak <saper@saper.info>
AuthorDate: 2022-04-28 18:23:54 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-04-28 18:25:12 +0000

    www/netsurf: Fix crash on preferences dialog with certain languages

    This happens with certain languages like pl_PL.UTF-8.

    PR:     263498

 www/netsurf/Makefile                                | 2 +-
 www/netsurf/files/patch-frontends_gtk_preferences.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 2 Neel Chauhan freebsd_committer 2022-04-28 18:26:32 UTC
Committed! Thanks for both your patches.