Skip to content

wall-clock: Use LC_TIME for strftime format string translations

Florian Müllner requested to merge wip/fmuellner/lctime-format-strings into master

In order to handle the clock's various display setting correctly for different locales, we mark strftime format strings for translation. However those translations are looked up according to the locale defined by LC_MESSAGES, while the conversion characters themselves are resolved according to LC_TIME, with rather odd results when mixing locales. The correct solution would be to install translations for format strings in the LC_TIME catalogue and look them up with dcgettext(), but we don't have the infrastructure to do that easily. Work around this by adding a helper method that looks up a string in LC_MESSAGES using the locale defined by LC_TIME and use that to translate the format strings, which has the same result.

Fixes #11 (closed)

Merge request reports