Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Function fmtfmt(), translate(), and localized messages #1233

Open
@krader1961

Description

@krader1961

This project does not contain any localized message files. That is, translations of English messages embedded in the code. This came to my attention because function fmtfmt() (which has a modest amount of lint warnings) is only called by translate(). Yet the project contains no localized versions of the various messages it emits. Thus none of the unit tests exercise the code to translate messages, error or otherwise, emitted by ksh.

Googling various phrases such as "ksh message localization" did not return any results that would imply anyone has actually created a localized version of the English messages embedded in the code. Other projects I've worked on (e.g., the fish shell) contain localized message sets. Which makes it relatively easy to know when changing an existing message, or adding a new, requires localization updates. Am I missing something patently obvious with respect to how localization of ksh messages is handled?

The most relevant document I could find was from @fpmurphy in 2009: https://blog.fpmurphy.com/2009/05/ksh93-message-localization.html. That it makes it pretty clear that the current code does not support localization of messages in scripts and the existing code makes adding such support difficult. Note that fish uses the GNU gettext internally. In scripts it uses the command of the same name if possible else it just echos the untranslated message. Is there some reason this project shouldn't take the same approach to the problem?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions