Page 1 of 1

Working localized version for Windows

Posted: 15.02.2006, 22:30
by Christophe
With Vincent's help, I've put together a version of Celestia which uses gettext for localization. That means that we can now share the translators' work between Linux/OSX and Windows.

Screenshot:
Image

A precompiled binary and patch is available here.

I'm now looking for:
1 - Feedback
2 - Translators, check the currently supported languages, your language is not on the list or incomplete? Fix it! A unicode capable editor is all that is needed.
3 - Windows developers (I am not a windows developer). We need to finish this up:
__a - Fix the dialogs to display localized names, see the Solar System Browser for a working hack.
__b - Provide a mean to include translated resources, see MSDN on the subject.
__c - Fix the build system to optionaly compile in gettext support and compile and install catalog files.

Posted: 17.02.2006, 14:56
by tech2000
Excause my ignorance in this matter but I reallt don't know much about the developmentteam behind Celestia so: is this localization going into Celestia in the next release? or will this be a patch that has to be applyed manually?

And also; will there be localization for the menus too.
(File, Navigation, Time, Render, View, Bookmarks, Help)

Posted: 17.02.2006, 16:09
by dirkpitt
Christophe is on the dev team, so I dare say this will become a more or less "official" patch eventually.

Sorry for being slightly off topic here, but just wanted to add a quick note that a fully localized (menus, hud messages, etc) version of Celestia is being worked on also for OS X and significant progress has been made.

Posted: 18.02.2006, 00:36
by Sui Ota
Many thanks, Christophe and Vincent!
It's a great step!!!

I made ja.po personally, and worked fine! :D
(Using txf font including Japanese which I have once made.)
Image
Translated messages are shown, including some planet's and satellite's names...

And I noticed translated object's name is displayed correctly in the Solar System Browser.
Perhaps this feature may be also in other languages...
But fixing the dialogs to display localized names is needed, I think.
Image
I think more strings in the Celestia code should be translatable, like words in warning dialogs.

But, I can't choose translated name directly in "Target name:" because of not supporting CJK and other multi-byte characters in the mode.
For example, when I input the word which means 'Earth' in Japanese('??°?

Posted: 18.02.2006, 13:17
by Christophe
Yes, except if we run in a major show stopper, this will be part of the next release.

Translations for menus and dialogs will be included as well, a solution has been agreed upon by Chris.

About the display of localized names in the Solar System Browser, this is just a test (which leaks memory), but it can be fixed and used for the other dialogs. I wanted to see if it worked well on other systems, and Sui Ota's test is a very good news.

The next major fix needed is CJK input, I don't have a solution for this yet.

Posted: 19.02.2006, 14:27
by dirkpitt
Christophe wrote:The next major fix needed is CJK input, I don't have a solution for this yet.


The OS X Celestia doesn't support CJK input yet either. There are two problems - getting correct unicode character input from the gui (I'm working on it), and seeing if CelestiaCore recognizes unicode input (not sure).

Posted: 20.02.2006, 00:25
by dirkpitt
I'm not sure if this applies to other platforms too, but a quick test with UTF-8 CJK input reveals that CelestiaCore::charEntered() certainly has problems on OS X. The isalpha(), isdigit() test filters out non-alphabetic (latin) input. A possible fix might be to simply remove the isalpha check altogether.

Posted: 20.02.2006, 21:36
by Christophe
dirkpitt wrote:I'm not sure if this applies to other platforms too, but a quick test with UTF-8 CJK input reveals that CelestiaCore::charEntered() certainly has problems on OS X. The isalpha(), isdigit() test filters out non-alphabetic (latin) input. A possible fix might be to simply remove the isalpha check altogether.


You can't simply remove the test, you'd have to check that the character entered is not one of the control characters: TAB, Backspace, etc...

The problem on Windows is that CelestiaCore::charEntered(const char* utf8_char) isn't used, it's the older ASCII interface CelestiaCore::charEntered(char ascii_char) which is used.

iswalpha as used on Linux is Unicode and locale aware so unicode input should work (and it does at least with European locales). The use of iswalpha was disabled on OSX by Hank in December 2004. Maybe it has been fixed on more recent versions of OSX?