Showing translated strings in the picture
Showing translated strings in the picture
Hi,
We just completed our zh_TW translations for celestia. The interfaces were good, but the translated string in the picture became a lot of '?', like "Jupiter ??", "???99,064km" . Is it because of OpenGL font rendering? How to solve this problem?
Thanks,
Franklin
We just completed our zh_TW translations for celestia. The interfaces were good, but the translated string in the picture became a lot of '?', like "Jupiter ??", "???99,064km" . Is it because of OpenGL font rendering? How to solve this problem?
Thanks,
Franklin
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
Franklin,
Celestia uses its own txf font textures to display the OpenGL overlay text.
So, you'll need to build the *_zh_TW.txf files which will contain Chinese Traditional glyphs.
This can be done using ttf2txf and the codepoints_zh_TW.txt file which is generated in the
po/ dir when running the translate_resources.pl perl script.
You'll find a link to the txf utilities along with some more information about
how to build txf font textures in this thread: viewtopic.php?t=6814
I'll add this information to the Celestia Wiki i18n page ASAP.
Celestia uses its own txf font textures to display the OpenGL overlay text.
So, you'll need to build the *_zh_TW.txf files which will contain Chinese Traditional glyphs.
This can be done using ttf2txf and the codepoints_zh_TW.txt file which is generated in the
po/ dir when running the translate_resources.pl perl script.
You'll find a link to the txf utilities along with some more information about
how to build txf font textures in this thread: viewtopic.php?t=6814
I'll add this information to the Celestia Wiki i18n page ASAP.
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Re: Showing translated strings in the picture
Celestia needs a good free font with a broad Unicode coverage.
Re: Showing translated strings in the picture
Vincent wrote:Franklin,
Celestia uses its own txf font textures to display the OpenGL overlay text.
So, you'll need to build the *_zh_TW.txf files which will contain Chinese Traditional glyphs.
This can be done using ttf2txf and the codepoints_zh_TW.txt file which is generated in the
po/ dir when running the translate_resources.pl perl script.
You'll find a link to the txf utilities along with some more information about
how to build txf font textures in this thread: viewtopic.php?t=6814
I'll add this information to the Celestia Wiki i18n page ASAP.
Thanks for your help. I'll need to run the translate_resources.pl on a Windows box, right?
And it looks like I need rc.exe, link.exe also. Well, I'm not familiar with Windows platform. For msgfmt.exe I know in the Windows version of gettext, which seems to be a bit old (I could find 0.14 or 0.15 only). But rc.exe and link.exe, where can I get it?
Thanks for your help again.
Franklin
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
Franklin,Franklin wrote:I'll need to run the translate_resources.pl on a Windows box, right?
And it looks like I need rc.exe, link.exe also. Well, I'm not familiar with Windows platform. For msgfmt.exe I know in the Windows version of gettext, which seems to be a bit old (I could find 0.14 or 0.15 only). But rc.exe and link.exe, where can I get it?
You'll find some help on the Celestia Wiki i18n page: http://en.wikibooks.org/w/index.php?tit ... MS_Windows
rc.exe is part of the Windows SDK in and link.exe is included in MS Visual C++ 2008 Express edition.
So both should be already on your system if you compile Celestia on Windows using MS Visual C++ 2008.
If not, please see http://en.wikibooks.org/wiki/Celestia/D ... 2_platform for step by step
instructions. Then, you'll simply need to add perl.exe, rc.exe, link.exe and msgfmt.exe to your PATH.
Anyway, since you're not familiar with Windows, and unless you wish to regularly build Celestia on it,
I can simply send you the codepoints_zh_TW.txt file. Just let me know...
Then, you'll be able to build your font textures with ttf2txf doing something like:
Code: Select all
ttf2txf -w 512 -h 512 -f codepoints_zh_TW.txt -s 12 -o font.txf font.ttf
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Re: Showing translated strings in the picture
Vincent wrote:Franklin,
You'll find some help on the Celestia Wiki i18n page: http://en.wikibooks.org/w/index.php?tit ... MS_Windows
rc.exe is part of the Windows SDK in and link.exe is included in MS Visual C++ 2008 Express edition.
So both should be already on your system if you compile Celestia on Windows using MS Visual C++ 2008.
If not, please see http://en.wikibooks.org/wiki/Celestia/D ... 2_platform for step by step
instructions. Then, you'll simply need to add perl.exe, rc.exe, link.exe and msgfmt.exe to your PATH.
Anyway, since you're not familiar with Windows, and unless you wish to regularly build Celestia on it,
I can simply send you the codepoints_zh_TW.txt file. Just let me know...
Then, you'll be able to build your font textures with ttf2txf doing something like:Code: Select all
ttf2txf -w 512 -h 512 -f codepoints_zh_TW.txt -s 12 -o font.txf font.ttf
Hi Vincent,
I use Linux all the time, and I don't have Windows system on my computers, not to mention Visual C++ or Windows SDK.
I'll really appreciate if you can help me to create codepoints_zh_TW.txt.
It will be very useful for us to promote celestia to elementary and high schools in Taiwan.
Thanks,
Franklin
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
Franklin,
I just sent you an e-mail with the codepoints_zh_TW.txt file.
As to the next steps, you'll find some help on the Celestia Wiki i18n page.
I've updated it with some instructions about how to build the .txf font texture files.
Of course, you can still ask here if you need some more help.
I just sent you an e-mail with the codepoints_zh_TW.txt file.
As to the next steps, you'll find some help on the Celestia Wiki i18n page.
I've updated it with some instructions about how to build the .txf font texture files.
Of course, you can still ask here if you need some more help.
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
I managed to successfully build the Chinese Traditional font textures, and they're looking great on
my system (see screengrab below). However, before commiting the files to SVN, I'd like them
to be tested on Windows by any user who is natively using the zh_TW locale - Franklin is using gtk.
The translation files can be found at: http://vincent.giangiulio.perso.sfr.fr/ ... _zh_TW.zip
Thanks in advance.
my system (see screengrab below). However, before commiting the files to SVN, I'd like them
to be tested on Windows by any user who is natively using the zh_TW locale - Franklin is using gtk.
The translation files can be found at: http://vincent.giangiulio.perso.sfr.fr/ ... _zh_TW.zip
Thanks in advance.
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 274
- Joined: 29.01.2009
- Age: 29
- With us: 15 years 9 months
- Location: Suzhou, China
Re: Showing translated strings in the picture
Some words in .cel didn't display using your fonts and .cel files on my translated traditional chinese veriosn of celestia for mac.
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
Markerz,Markerz wrote:Some words in .cel didn't display using your fonts and .cel files on my translated traditional chinese veriosn of celestia for mac.
Many thanks for testing.
Could you please send me an example of .cel script from which you have missing words?
I've built an alternative set of texture fonts using the Micro Hei font package.
I'd like to test it with your .cel script.
Also, what about the size of the characters? Are they OK for you to read or should I make them a little bit bigger?
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 274
- Joined: 29.01.2009
- Age: 29
- With us: 15 years 9 months
- Location: Suzhou, China
Re: Showing translated strings in the picture
You mean you want a list of the words which are missing while i was testing the .cel scripts or something else ?
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
Please, send me the .cel script itself so that I can test it on my system.Markerz wrote:You mean you want a list of the words which are missing while i was testing the .cel scripts or something else ?
Does celestia display any question marks "?" for the missing characters?
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 274
- Joined: 29.01.2009
- Age: 29
- With us: 15 years 9 months
- Location: Suzhou, China
Re: Showing translated strings in the picture
The script of the missing words is in the attachment.
It displays nothing not display ?
And the font size is OK.
It displays nothing not display ?
And the font size is OK.
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
Markerz,Markerz wrote:The script of the missing words is in the attachment.
It displays nothing not display ?
And the font size is OK.
Thanks.
Below is the list of glyphs which are included in the zh_TW font textures I've built.
Could you please tell me if some of the characters which are used in the script are missing from this list?
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 274
- Joined: 29.01.2009
- Age: 29
- With us: 15 years 9 months
- Location: Suzhou, China
Re: Showing translated strings in the picture
Is this list for the font that you have posted. (http://vincent.giangiulio.perso.sfr.fr/ ... _zh_TW.zip)Vincent wrote:Markerz,Markerz wrote:The script of the missing words is in the attachment.
It displays nothing not display ?
And the font size is OK.
Thanks.
Below is the list of glyphs which are included in the zh_TW font textures I've built.
Could you please tell me if some of the characters which are used in the script are missing from this list?
-
- Developer
- Posts: 274
- Joined: 29.01.2009
- Age: 29
- With us: 15 years 9 months
- Location: Suzhou, China
Re: Showing translated strings in the picture
if it is. There are a lot of characters (in demo.cel and start.cel) that do not display with the font.
Chinese character
???????????????????????????????????????????????????????
other
the exclamation mark ( ! or ?)
Can forum display Chinese character?
and it should be my last post today.
Chinese character
???????????????????????????????????????????????????????
other
the exclamation mark ( ! or ?)
Can forum display Chinese character?
and it should be my last post today.
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
OK, I've added these characters to the font texture files,Markerz wrote:if it is. There are a lot of characters (in demo.cel and start.cel) that do not display with the font.
Chinese character
???????????????????????????????????????????????????????
other
the exclamation mark ( ! or ?)
and now they're correctly displayed when running the script.
You can grab the revised *_zh_TW.txf files here:
http://vincent.giangiulio.perso.sfr.fr/ ... _zh_TW.zip
Actually, the codepoints.txt files which are generated when running the
translate_resources.pl script only includes the codes for characters that
are used in the standard celestia package. That's why extra-characters
used in scripts are not displayed.
So, we'd need a more complete list of code-points for the zh_TW locale,
as described here: http://en.wikipedia.org/wiki/CJK_Unified_Ideographs
Can anybody point me to a text file that includes all the hexadecimal
code-points for the CJK Unified Ideographs standard package (no extension)?
Last edited by Vincent on 26.08.2009, 08:04, edited 1 time in total.
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 274
- Joined: 29.01.2009
- Age: 29
- With us: 15 years 9 months
- Location: Suzhou, China
Re: Showing translated strings in the picture
Sorry one more word missing
?
?
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
Markerz,Markerz wrote:Sorry one more word missing
?
Many thanks for your contribution.
The revised font textures package can be grabbed here:
http://vincent.giangiulio.perso.sfr.fr/ ... _zh_TW.zip
And the whole translation files package for Windows there:
http://vincent.giangiulio.perso.sfr.fr/ ... _zh_TW.zip
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Showing translated strings in the picture
That's an interesting point, indeed. As an example, GNU Unifont provides support for more than 40000 characters:duds26 wrote:Celestia needs a good free font with a broad Unicode coverage.
http://www.lgm.cl/trabajos/unifont/index.en.html
http://unifoundry.com/unifont.html
I've given a try at building the corresponding txf files. Each file includes 43114 glyphs and required a 4096 x 4096 texture, though.
So, I can see at least two issues with using Unifont:
- The font/ dir would get significantly larger: from ~33 Mo up to ~51 Mo
- I'm not sure it would be relevant to load 4096x4096 texture fonts for all languages that only use a restricted set of characters.
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3