View Issue Details

IDProjectCategoryView StatusLast Update
00019521003.1(2024)/Issue8Shell and Utilitiespublic2025-11-13 17:02
ReporterLove4Boobies Assigned To 
PrioritynormalSeverityObjectionTypeOmission
Status ResolvedResolutionAccepted As Marked 
NameBogdan Barbu
Organization
User Reference
Sectiongettext, ngettext
Page Numberhttps://pubs.opengroup.org/onlinepubs/9799919799/utilities/gettext.html
Line NumberN/A
Interp Status---
Final Accepted Textsee 0001952:0007323
Summary0001952: (n)gettext and NLSPATH
DescriptionOn XSI systems, gettext and ngettext require NLSPATH to take precedence over TEXTDOMAINDIR. This is undesirable because it means every one-off script using translations has to install its translation files in the system's global locale directory. Should such scripts instead choose to change NLSPATH to, say, a local subdirectory then all other utilities used by the script (including gettext/ngettext) would lose access to their own translations. Imagine a situation where in order to use an install script you have to first install its messages/catalogs.
Desired ActionNLSPATH should control gettext/ngettext's own translations (e.g., diagnostics messages).
TEXTDOMAINDIR should control the translations requested of gettext/ngettext. If it's not set, maybe then fall back to NLSPATH.
Tagstc1-2024

Activities

nick

2025-11-13 17:00

manager   bugnote:0007323

As described on page 1193, lines 40723-40732, NLSPATH is used first, but (if set) is not the only means to locate a messages object. Additionally, NLSPATH is a path like string ... with multiple directories separated by ':'. Thus an application can extend NLSPATH if it wants to add a temporary messages object, such as might be used by an installer.

On p173 line 6080 change
NLSPATH has precedence over TEXTDOMAINDIR

to
If a messages object can be found via both NLSPATH and TEXTDOMAINDIR, NLSPATH has precedence over TEXTDOMAINDIR

(XSI shaded)

Issue History

Date Modified Username Field Change
2025-10-27 15:02 Love4Boobies New Issue
2025-11-13 17:00 nick Note Added: 0007323
2025-11-13 17:01 nick Status New => Resolution Proposed
2025-11-13 17:01 nick Resolution Open => Accepted As Marked
2025-11-13 17:01 nick Interp Status => ---
2025-11-13 17:01 nick Final Accepted Text => see 0001952:0007323
2025-11-13 17:02 nick Tag Attached: tc1-2024
2025-11-13 17:02 nick Status Resolution Proposed => Resolved