Opened 14 years ago

Closed 5 years ago

#25733 closed defect (fixed)

nvi-1.81.6: message catalog not configured correctly

Reported by: geekosaur Owned by: tobypeterson
Priority: Low Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: qbarnes (Quentin Barnes)
Port: nvi

Description

On startup, nex/nvi in a default OSX Terminal environment will print

./en_US.UTF-8: No such file or directory

This involves two bugs: (1) "set msgcat" defaults to "./" instead of "/opt/local/share/nvi/catalog/", which is where its message catalogs live; (2) the default $LANG is en_US.UTF-8, but the catalog installed with nvi is called "english" and lacks symlinks to any usual locale values on OSX.

If I change "set msgcat" and add a symlink from "english" to "en_US.UTF-8" then the error doesn't occur and the message catalog is found and used. I am not sure if this is an OSX-specific problem; I've never seen it on Linux but don't know if it's using what on OSX appears to be its own message catalogs or something more Linux-standard.

nex/nvi functions fine even if the message catalog isn't loaded, but of course will not be properly localized.

Attachments (1)

nvilangmsg.patch (2.4 KB) - added by qbarnes (Quentin Barnes) 14 years ago.
nvi patch to fix "./en_US.UTF-8: No such file or directory" error message.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 14 years ago by geekosaur

Correction: the message catalogs are in "/opt/local/share/vi/catalog/".

comment:2 Changed 14 years ago by qbarnes (Quentin Barnes)

Cc: qbarnes@… added

Cc Me!

comment:3 Changed 14 years ago by qbarnes (Quentin Barnes)

I disagree somewhat with the original reporter. The exact same message does appear on Linux. I'd check which version of the db4 library you're using and what your $LANG is set to. If $LANG is unset, you won't see the message.

I do agree with the original reporter that this is a complicated bug. The i18n message catalogs aren't set up right.

Rather than try it figure out how to fix the catalog mess and standardize it correctly, I took the other approach and just fixed msg_open() so that if the db_open() call fails, db4 doesn't output the error message to stderr.

The patch is logically dependent on the patch I made up for nvi in #22228.

Changed 14 years ago by qbarnes (Quentin Barnes)

Attachment: nvilangmsg.patch added

nvi patch to fix "./en_US.UTF-8: No such file or directory" error message.

comment:4 Changed 14 years ago by jmroot (Joshua Root)

Cc: toby@… removed
Owner: changed from macports-tickets@… to toby@…

comment:5 Changed 5 years ago by tobypeterson

Resolution: fixed
Status: newclosed

In 8f955697a854cad25916867e798a9c0972db3713/macports-ports (master):

nvi: fix locale warning at startup
fixes #25733

Note: See TracTickets for help on using tickets.