networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
2.08k stars 351 forks source link

Allow configuring fallback and/or preferred langid for USB strings #2613

Open jimklimov opened 2 months ago

jimklimov commented 2 months ago

Just so we do not forget your earlier comment: the langid number (and/or name for reporting?) might be better configurable by end-users.

Low priority, gotta see if devices exist that could benefir from this at all.

_Originally posted by @jimklimov in https://github.com/networkupstools/nut/pull/2604#discussion_r1739625756_

See also: https://github.com/networkupstools/nut/pull/2604#issuecomment-2315816062 about use of existing *langid* options.

jimklimov commented 2 months ago

Per subsequent discussions in other issues, there is also a possibility that a device would serve several locales for some or all strings. A program is then free to extract each data point in desired locale (may be different locales for different queries), typically this happens in user-interfacing programs based on their run-time choice of locale. This may apply to NUT drivers as well, although it feels better to let the user prefer a locale (list?) explicitly.