Working localized version for Windows

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Working localized version for Windows

Post #1by Christophe » 15.02.2006, 22:30

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.
Christophe

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #2by tech2000 » 17.02.2006, 14:56

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)

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #3by dirkpitt » 17.02.2006, 16:09

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.

Sui Ota
Posts: 75
Joined: 05.10.2005
With us: 19 years 1 month
Location: Saitama, Japan

Post #4by Sui Ota » 18.02.2006, 00:36

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('??°?

Topic author
Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #5by Christophe » 18.02.2006, 13:17

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.
Christophe

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #6by dirkpitt » 19.02.2006, 14:27

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).

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #7by dirkpitt » 20.02.2006, 00:25

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.

Topic author
Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 4 months
Location: Lyon (France)

Post #8by Christophe » 20.02.2006, 21:36

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?
Christophe


Return to “Development”