https://bugzilla.redhat.com/show_bug.cgi?id=1418635
Bug ID: 1418635
Summary: gettext() does not work on aarch64
Product: Fedora
Version: 25
Component: gettext
Assignee: praiskup(a)redhat.com
Reporter: christophm30(a)gmail.com
QA Contact: extras-qa(a)fedoraproject.org
CC: dueno(a)redhat.com, i18n-bugs(a)lists.fedoraproject.org,
petersen(a)redhat.com, praiskup(a)redhat.com
Created attachment 1247091
-->
https://bugzilla.redhat.com/attachment.cgi?id=1247091&action=edit
Code to reproduce the bug
I was not able to get the proper translation from gettext() on an aarch64
machine.
The same code however works fine on x86_64.
To reproduce the issue one can use the following instructions:
1) Create the following directory structure:
mkdir -p fi/LC_MESSAGES
2) Create the file fi/LC_MESSAGES/messages.po with the following content:
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Basic test"
msgstr "Perustesti"
3) Compile a mo:
msgfmt -o fi/LC_MESSAGES/messages.mo fi/LC_MESSAGES/messages.po
4) Compile the attached file and run it (no special compiler flags used).
The code essentially does:
a. setlocale(LC_ALL, "fi_FI");
b. bindtextdomain("messages", "./locale");
c. textdomain("messages");
d. gettext("Basic test")
On aarch64 this results in "Basic test".
On x86_64 this results in "Perustesti".
FWIW, I was able to reproduce this bug on the following aarch64 Linux
distributions as well:
* Ubuntu Xenial
* CentOS 7
* OpenSUSE Leap 42.2
--
You are receiving this mail because:
You are on the CC list for the bug.