[Scilab-Dev] Localization for Windows Multilanguage

Yung-Jang Lee yjlee123 at gmail.com
Fri Jan 30 10:02:20 CET 2009


Allan,

As I say, output of 'gettext'  becomes un-predicable ,  some of output
messages are converted to unrecognized strings.

To see this, under my Chinese-Traditional (Zh-TW) Windows, with

http://www.scilab.org/download/dailyDownload.php?filename=scilab-master-1233250238.exe&date=2009-01-30

installed. After

   setdefaultlanguage(' ru_RU')

, for  Russian version , message '&File'  became unrecognized strings.

and with

  setdefaultlanguage(' zh_CN')

, for Chinese-Simpilfied version, message '&Resume'  became
unrecognized strings.

And I believe that most of the messages that can display on the Java
Console with  "scilab-master-1233250238.exe"  is due to a sole reason
that that they  fail to converted in function localeToUTF, you can
check this with a debug breakpoint.

So we need a gettext library with  "bind_textdomain_codeset" provided
and also a "putenv" wrap function ("gettext_putenv") to resolve this
bug.

I did this patch just because you said this is VERY important  for
Vista and XP's  Multilanguage enviroments.

For most users, this bug is NOT SO important  for them.

Regards,

Yung-Jang Lee



2009/1/30 Allan CORNET <allan.cornet at scilab.org>:
> Hi,
>
> Please notice that on current master, with Sylvestre and Antoine modifications
> http://bugzilla.scilab.org/show_bug.cgi?id=4005
>
> http://gitweb.scilab.org/?p=scilab;a=commit;h=67660b64ac3914055233035fa1ee3c04eaa41ed4
>
> I have no more this problem with menus grayed.
> I checked with this version: http://www.scilab.org/download/dailyDownload.php?filename=scilab-master-1233250238.exe&date=2009-01-30
>
> Current version used by scilab of libintl for Windows is 0.14.
> This version was built with Visual studio 2008 for x86 and x64.
>
> I will update libintl to 0.17 for scilab 5.2
> (quickly on master)
>
> Thanks you for your help
>
> Best regards
>
> Allan
>
> -----Message d'origine-----
> De : Yung-Jang Lee [mailto:yjlee123 at gmail.com]
> Envoyé : vendredi 30 janvier 2009 05:21
> À : Scilab dev list; Sylvestre Ledru; Allan CORNET
> Objet : [Scilab-Dev] Localization for Windows Multilanguage
>
> Sylvestre  and all,
>
> Allan reported a  localization bug for Windows  Multilanguage environment ( http://lists.scilab.org/cgi-bin/ezmlm-browse?list=dev&cmd=showmsg&msgnum=1169
> ).
>
> This bug is not easy fixed with current Prequirements, for the GETTEXT library is too old and lack function I needed for a patch.
>
> I just fixed this bug with a new  Prequirements library for  iconv.dll ,GNU_gettext.dll. Attached is the patch for Scilab as well as Prequirements libraries.
>
> There is a ReadMe file in  'src' directory of the Prequirements patch, that describe how to create these libraries.
>
>
> The reason to update the Prequirements  libraries is,
>
>   The output string of  'gettext'  provided by current Prequirements
> (GNU_gettext.dll) is fixed to system installed  encoding. If user change default language in Scilab or select other language form the "Regional and Language options" in control panel Windows,  the outputs
>  of 'gettext'   are  unpredictable. Some of them are in unconverted
> UTF8 format and some of them being  badly converted to unrecognized strings.
>
> We need a 'gettext' version that always return  UTF8 string.
> According to documentation of GNU gettext library, this can be provided with function  'bind_textdomain_codeset'. I just to set output encoding to "UTF-8" as
>
>             bind_textdomain_codeset ('scilab',"UTF-8");
>
> and "gettext"  , "dgettext"  will always return string in UTF-8 format. With this way, I don't need to wrap 'gettext' with 'localeToUTF'.
>
> But GNU_gettext  in Prequirements  is too old to have function 'bind_textdomain_codeset' , I need to  update it,
>
> I had test this patch with Chinese-Traditional(zh_TW) Windows Xp with
> default language set to   "fr_FR","zh_CN" and "ru_RU". Scilab's
> localization  function work well in this tests.
>
>
> Best regards,
>
> Yung-Jang Lee
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ru_RU_BaseOnZH_TW.png
Type: image/png
Size: 10133 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090130/725caa5f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zh_CN_BaseOnZH_TW.png
Type: image/png
Size: 834877 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090130/725caa5f/attachment-0001.png>


More information about the dev mailing list