Re: [Tuxpaint-devel] *SDL2* translation does not work on the latest MinGW/MSYS2
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Shin-ichi T. <sh...@wm...> - 2022-01-30 13:19:08
|
Hi!
I tried a test code as follows.
$ cat test.c
#include <stdio.h>
#include <libintl.h>
int main(void)
{
setlocale(LC_ALL, "");
bindtextdomain("tuxpaint", "locale");
bind_textdomain_codeset("tuxpaint", "UTF-8");
textdomain("tuxpaint");
puts(gettext("Yes, I'm done!"));
return 0;
}
$ gcc test.c -o test.exe -lintl
I copied this .exe file to the bdist directory and executed it from
windows command prompt.
Then, it DOES translate.
I am quite at a loss what is happening....
On Sun, 30 Jan 2022 00:31:53 +0100, Pere Pujal i Carabantes wrote:
>El ds. 29 de 01 de 2022 a les 10:31 +0900, en/na Shin-ichi TOYAMA va escriure:
>> Hi!
>>
>> I noticed an interesting thing about this issue.
>>
>> You can install tuxpaint in /usr/local/bin on MSYS2 environment
>> as follows.
>>
>> $ make && make install
>
>I get permission denied, strange
> /usr/local/bin/tuxpaint.exe --help
>bash: /usr/local/bin/tuxpaint.exe: Permission denied
>
>>
>> Then it has NO problem with translation!!
>>
>> Next, I tried deleting all the .dll files in /mingw64/bin/ except
>> for those are copied to the win32/bdist directory, suspecting that
>> there might be some dll(s) newly required by gettext.
>>
>> As a result, it still worked fine!
>>
>> Considering above, it may not be a library loading issue.
>
>I did a different test that seems to lead also to this conclusion:
>compile a bdist dir with the old mingw, make a backup of it
>compile another bdist with the new mingw, also backup it
>create an empty dir and copy there the backup of the non working bdist,
>then one by one copy the dlls of the working bdist into it
>until the translations works.
>
>the least dlls that I had to copy from the old, working bdist dir are
>libintl and harfbuzz(wich depends on libintl)
>
>>
>> Could it be that tuxpaint fails to find the translation (.mo) files ?
>
>Maybe, but even putting the full locale path in i18n.c I could not get it working
>
> Replacing bindtextdomain("tuxpaint", LOCALEDIR); with
> bindtextdomain("tuxpaint", "/e/home/tuxpaint-sdl2/win32/bdist/locale/");
>did not solve things for me.
|