Open ngoeddel-openi opened 8 months ago
This is arguably a bug since we removed most of the gettext (translation) stuff some time ago due to the heavy maintenance load. So it should not translate at all.
Amusingly the string you see there is not even in the repo, it is auto translated it seems to me.
It auto-translates? I didn't know such stuff is possible, haha. For me it would be fine if everything is just plain English instead of seeing wrong character encodings.
surprises me too :-)
I really don't know where the text comes from :-) There I am not really sure what do to about it.
@ngoeddel-openi Did you, by any chance, find out how this works? And how we could possible improve the situation?
@ngoeddel-openi Did you, by any chance, find out how this works? And how we could possible improve the situation?
Sorry, I did not look further into this.
Translations where removed, see #1947. As virtually any output by plugins nevertheless still gets processed by gettext's _(...)
function, most likely the German translations you see are still found somewhere on your system from an older installation.
In your case I would try to run
$ strace /home/nicolas/bin/monitoring-plugins/libexec/check_http --help 2>&1 | grep locale
to narrow down the list of potential candidates.
This is what I get:
$ strace /home/nicolas/bin/monitoring-plugins/libexec/check_http --help 2>&1 | grep locale
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/home/nicolas/bin/monitoring-plugins/share/locale/de_DE.UTF-8/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/home/nicolas/bin/monitoring-plugins/share/locale/de_DE.utf8/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/home/nicolas/bin/monitoring-plugins/share/locale/de_DE/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/home/nicolas/bin/monitoring-plugins/share/locale/de.UTF-8/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/home/nicolas/bin/monitoring-plugins/share/locale/de.utf8/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/home/nicolas/bin/monitoring-plugins/share/locale/de/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/locale-langpack/de_DE.UTF-8/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/locale-langpack/de_DE.utf8/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/locale-langpack/de_DE/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/locale-langpack/de.UTF-8/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/locale-langpack/de.utf8/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/locale-langpack/de/LC_MESSAGES/monitoring-plugins.mo", O_RDONLY) = 3
So there are 3 files here:
I was mostly interested in the last one and a quick apt-file search
reveals:
language-pack-de-base: /usr/share/locale-langpack/de/LC_MESSAGES/monitoring-plugins.mo
I don't think I want to remove that package. :thinking:
I just cloned this repository and installed it in my user directory:
If I now run
/home/nicolas/bin/monitoring-plugins/libexec/check_http --help
it looks like so:Especially in the long description texts you can see that a lot of characters a wrong. It looks like it encodes it with
latin1
orISO-8859-1
instead ofutf-8
.Either there is anything I missed during compilation or this is a bug.
Additional information: In my environment there is only
LANG=de_DE.UTF-8
set.