PR# 11761 Estudio overwrites general.locale preference with "zh_CN" when exit
Problem Report Summary
Submitter: prestoat2000
Category: EiffelStudio
Priority: Medium
Date: 2006/12/22
Class: Bug
Severity: Serious
Number: 11761
Release: 6.0.6.5604
Confidential: No
Status: Closed
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.0.7) Gecko/20060915 Firefox/1.5.0.7
Solaris 9 on SPARC
Synopsis: Estudio overwrites general.locale preference with "zh_CN" when exit
Description
Start estudio with preference general.locale set to "[en]". Exit estudio. Preference has been changed to [zh_CN] in file ~/.es/ecrc60. Restart estudio. Text is now displayed in Chinese, if available (or as mostly unprintable characters if Chinese is not available).
To Reproduce
Problem Report Interactions
Seems to work fine with build 66451. Closing this report.
OK, now I understand. I will check the next intermediate release both at home (where I have locale en_US but in a non-POSIX directory location) and at work (where I don't have any locales in the standard format, similar to what Manu reported). If both work correctly, I will close this report.
The 6.0.6.6309 did not look for locale in /usr/lib/locale because this is not the POSIX location for locale. The newer version do. But on my system where we do the testing I don't even have that, all I have is: C POSIX iso_8859_1 So there are two fix, the first is to look in /usr/lib/locale and the second is when nothing can be found. The first should make it work for you, whereas the second for me.
Your fix sounds like an improvement. However, on the Solaris system where I saw the problem on build 66309, it looks to me (though my knowledge is limited in this area) like locale en_US *is* present, so I don't see why it isn't used. Here is what I see on my Solaris 10 system: stoat% cd /usr/lib/locale stoat% ls -ld en_US* drwxr-xr-x 3 root bin 512 Apr 12 2006 en_US drwxr-xr-x 9 root bin 512 Apr 12 2006 en_US.ISO8859-1 drwxr-xr-x 9 root bin 512 Apr 12 2006 en_US.ISO8859-15 drwxr-xr-x 3 root bin 512 Apr 12 2006 en_US.ISO8859-15@euro drwxr-xr-x 10 root bin 512 Apr 12 2006 en_US.UTF-8 So why does estudio think locale en_US is not available? Is there something nonstandard about the directory name /usr/lib/locale (I thought I saw it in the source code, with a comment about looking there for Solaris)?
The fix is though not perfect, I would close it. A new entry "Unselected" is added to the list of general.locale. When previous selected locale or en_US is not available on the system, "Unselected" is chosen for the user. Or the user can choose it by himself to get "original text" which is English.
The issue is related on how to enumerate the possible locale on Solaris, it does not behave correctly and we choose the wrong one. For now you can rename `studio/lang' and it will always default to english.
I still have the problem with the latest weekly build 66309, except that now it comes up in Russian instead of Chinese the second time I start estudio.
Closing it because a similar problem has been fixed. If you still have the problem within next release please let us know. Thank you for reporting.
Weekly build 65604 (which is what I was using) does have a .mo file for English and it is identical to the one in the repository: marten 805% ls -l ~eiffel/Eiffel6.0.65604/studio/lang/mo_files/ total 216 -rw-r--r-- 1 eiffel 315 Dec 14 00:30 en.mo -rw-r--r-- 1 eiffel 42305 Dec 14 03:28 fr.mo -rw-r--r-- 1 eiffel 152939 Dec 12 19:23 zh_CN.mo English works fine when I start estudio with general.local preference indicating "en". But when I exit estudio, the preference is overwritten with "zh_CN".
In this case, it is possible that you don't have English package in $ISE_EIFFEL\studio\lang\mo_files. If you only have zh_CN.mo there, which means only Chinese is available. Copy en.mo or other languages (.mo) from repository, it would work.