Author Topic: Russian translating  (Read 8579 times)

0 Members and 1 Guest are viewing this topic.

Offline IvKir

  • 24
Hi, guys... got a problem here.

I, with help Kir2Yar started think about making a russian translate of OpenFS, but encounter a little problem... FS don't understand a cyrillic symbols ant Unicode... is there a way to solve this?

 

Offline SypheDMar

  • 210
  • Student, Volunteer, Savior
Unfortuntaely, FS_Open doesn't support Unicode yet, and implementing other characters have not been done yet. There was an off-shoot that did a Japanese translation, but that's not part of SCP.

 

Offline kir2yar

  • 25
Can we add this to wishlist?
Translation made by a hack of fonts - not so good.

Need support for Unicode in the briefing screens, messages, missions, and debriefing. It would be nice to have support for Unicode in the technical description room.

I may be sloppy writing in English, but I can translate to Russian. Plus ivkir promised to help. Already two translators. )

Give us the opportunity to do something useful for the community! )))

I do not ask support for Unicode in multiplayer, so that the network compatibility is not affected, I guess.
« Last Edit: February 26, 2011, 01:36:59 am by kir2yar »
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
while designing yet another serial interface stack for one of my mcu projects, i came up with sort of a solution to move 8 bit characters with only 7 bits available in a byte  (8th bit is used for sync purposes). 7-bit is good enough for the lower 128 char slots so pretty much all english characters work (point of this is configuration of firmware settings over a terminal connection), but there are situations where you want special chars of the extended set. what ive kinda done to support 8-bit chars is to use one of the seldom used escape codes to indicate that the current character is to be ignored and the next character will have 128 added to it to allow access to the special chars. this essentially requires a second byte to store the new char value.

apply this sort of thing to freespace, where an 8 bit char is used. if a character was of a specific value (a special unused character), then this character would be ignored and the next would have a pre-defined value added to it. so if you used the device control 1 character (an unused char from the dot matrix printer era), then the next char would be its value + 256, dc2 may indicate to add 512 to the value of the next char and so on (depending on how many characters you need). internally the game would just see an 8-bit string, only text rendering code need be told what these special characters mean.

as for font files, depending on how many characters are supported, you may need to have multiple font sets for the same logical font. first file would contain chars 0-255, second file would contain chars 256-511 and so on, to correspond to what control character was used before it. kind of hackish, but would allow support of character sets that would otherwise be impossible without unicode.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline PMY

  • 24
I can help with russian translation too. Of course if there will be means to do this.

 

Offline kir2yar

  • 25
while designing yet another serial interface stack for one of my mcu projects, i came up with sort of a solution to move 8 bit characters with only 7 bits available in a byte  (8th bit is used for sync purposes). 7-bit is good enough for the lower 128 char slots so pretty much all english characters work (point of this is configuration of firmware settings over a terminal connection), but there are situations where you want special chars of the extended set. what ive kinda done to support 8-bit chars is to use one of the seldom used escape codes to indicate that the current character is to be ignored and the next character will have 128 added to it to allow access to the special chars. this essentially requires a second byte to store the new char value.

apply this sort of thing to freespace, where an 8 bit char is used. if a character was of a specific value (a special unused character), then this character would be ignored and the next would have a pre-defined value added to it. so if you used the device control 1 character (an unused char from the dot matrix printer era), then the next char would be its value + 256, dc2 may indicate to add 512 to the value of the next char and so on (depending on how many characters you need). internally the game would just see an 8-bit string, only text rendering code need be told what these special characters mean.

You reinvented UTF-8 (http://en.wikipedia.org/wiki/UTF-8)

as for font files, depending on how many characters are supported, you may need to have multiple font sets for the same logical font. first file would contain chars 0-255, second file would contain chars 256-511 and so on, to correspond to what control character was used before it. kind of hackish, but would allow support of character sets that would otherwise be impossible without unicode.

...or just use system fonts for nonASCII.
« Last Edit: February 26, 2011, 08:52:41 am by kir2yar »
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline kir2yar

  • 25
I can help with russian translation too. Of course if there will be means to do this.

If in the engine Unicode is fully supported, we will have a mass of fascinating work. ) Not only the original campaign, but at least the blue planet too.

--ru
Если в движке юникод, то у нас будет масса увлекательной работы. ) Не только оригинальная кампания, но и как минимум голубую планету тоже надо перевести. ))
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline kir2yar

  • 25
I can help with russian translation too. Of course if there will be means to do this.

If in the engine Unicode is fully supported, we will have a mass of fascinating work. ) Not only the original campaign, but at least the blue planet too.

--ru
Если в движке будет юникод, то у нас будет масса увлекательной работы. ) Не только оригинальная кампания, но и как минимум голубую планету тоже надо перевести. ))
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline kir2yar

  • 25
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline PMY

  • 24
Да, там куча кампаний/модов, достойных перевода: порт FS1, ST: Reborn, Inferno, The Babylon Project и т.д..
« Last Edit: February 26, 2011, 09:16:44 am by PMY »

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
while designing yet another serial interface stack for one of my mcu projects, i came up with sort of a solution to move 8 bit characters with only 7 bits available in a byte  (8th bit is used for sync purposes). 7-bit is good enough for the lower 128 char slots so pretty much all english characters work (point of this is configuration of firmware settings over a terminal connection), but there are situations where you want special chars of the extended set. what ive kinda done to support 8-bit chars is to use one of the seldom used escape codes to indicate that the current character is to be ignored and the next character will have 128 added to it to allow access to the special chars. this essentially requires a second byte to store the new char value.

apply this sort of thing to freespace, where an 8 bit char is used. if a character was of a specific value (a special unused character), then this character would be ignored and the next would have a pre-defined value added to it. so if you used the device control 1 character (an unused char from the dot matrix printer era), then the next char would be its value + 256, dc2 may indicate to add 512 to the value of the next char and so on (depending on how many characters you need). internally the game would just see an 8-bit string, only text rendering code need be told what these special characters mean.

You reinvented UTF-8 (http://en.wikipedia.org/wiki/UTF-8)

as for font files, depending on how many characters are supported, you may need to have multiple font sets for the same logical font. first file would contain chars 0-255, second file would contain chars 256-511 and so on, to correspond to what control character was used before it. kind of hackish, but would allow support of character sets that would otherwise be impossible without unicode.

...or just use system fonts for nonASCII.

its not quite the same as utf-8. utf-8 uses the most significant bit to indicate non-ascii character is in use. so if its one then the number of ones indicate the length of the sequence, and every other byte starts with 10 as its most significant bits, extending the character with the remaining bits. its somewhat less efficient for other languages and require 3 or 4 byte sequences for them, but its reverse compatable with ascii. my method involved using at most 2 bytes per character, and depending on available control codes could probably pull off a 12 bit equivalent character set (a 9 or 10 bit equivalent font would probably cover the char set for any languages).

the real issue is freespace's raster font format. it currently only supports 8-bit fonts. my idea would would use the same raster format. languages that cant be represented with ascii would need to load alternative font files, and languages that cant be represented with 8 bit char sets would use the encoding method above and load extra font files to represent the  +256, +512, and so on characters.

actually there was talk of a utf-8 implementation in order to support asian languages awhile back. though im not entirely sure its gone anywhere. though simply allowing that encoding method doesn't eliminate the issue with the 8 bit raster fonts, which are somewhat non-standard. i think our options are to support a standard format for font rendering (meaning freespace fonts would need to be created in those formats), or extend the existing raster font. you must also consider that reverse compatibility (the mantra of the scp) with retail fonts must be preserved. it might just be easier to support language specific 8-bit fonts with non-standard mapping and the existing format. then use special encoding and extended fonts for languages that need them.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline kir2yar

  • 25
actually there was talk of a utf-8 implementation in order to support asian languages awhile back. though im not entirely sure its gone anywhere. though simply allowing that encoding method doesn't eliminate the issue with the 8 bit raster fonts, which are somewhat non-standard. i think our options are to support a standard format for font rendering (meaning freespace fonts would need to be created in those formats), or extend the existing raster font. you must also consider that reverse compatibility (the mantra of the scp) with retail fonts must be preserved. it might just be easier to support language specific 8-bit fonts with non-standard mapping and the existing format. then use special encoding and extended fonts for languages that need them.

Em... Can we use raster font for eu_US locale, and the system fonts to other locales?
As far as I know, for the subtitles, we use the system font.

Also, if freespace can use 8-bit fonts, then we can just use the localized code page, such as cp1251 or koi8-r. But in my opinion - it over time will create more problems for us.
« Last Edit: February 26, 2011, 03:09:55 pm by kir2yar »
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline kir2yar

  • 25
Question for developers: The engine can use characters from 128 to 255? That is, whether it is possible to draw a bitmap font, without breaking compatibility with the standard?
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
This is a very interesting thread. :)

Kir2yar, as you have probably figured out, the engine does not currently support Unicode.  However, our group has a long-term goal of adding Unicode support.  This will most likely be done through the wxWidgets toolkit.  Is this something that you might be interested to help with?

In the short term, I am not sure whether the font supports characters from 128 to 255.  I think it does, provided the font.vf file has bitmaps in those locations.  (The English font has blank bitmaps for characters above 128.)

 

Offline kir2yar

  • 25
This is a very interesting thread. :)

Kir2yar, as you have probably figured out, the engine does not currently support Unicode.  However, our group has a long-term goal of adding Unicode support.  This will most likely be done through the wxWidgets toolkit.  Is this something that you might be interested to help with?

In the short term, I am not sure whether the font supports characters from 128 to 255.  I think it does, provided the font.vf file has bitmaps in those locations.  (The English font has blank bitmaps for characters above 128.)

I can translate text, but i don't familiar with wxWidgets, so i don't think i can help with it.
Also - is there any way to edit fonts.vf?

And one more thing - is there any way to separate texts in mission from mission itself... i  mean - description and briefing ant etc is in one file with mission file. Can we separate it?
« Last Edit: March 09, 2011, 08:55:23 am by kir2yar »
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
There is a custom font creation tool, it's a bit tricky to use, but there's a thread around here somewhere with some detailed instructions on how to best work with it.  I believe it makes those .vf files.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline kir2yar

  • 25
There is a custom font creation tool, it's a bit tricky to use, but there's a thread around here somewhere with some detailed instructions on how to best work with it.  I believe it makes those .vf files.

If I can edit the fonts, then I can start translating using cp1251 or koi8-r.
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
And one more thing - is there any way to separate texts in mission from mission itself... i  mean - description and briefing ant etc is in one file with mission file. Can we separate it?

You shouldn't ever be editing the mission file. strings.tbl and tstrings.tbl are what you want to be translating.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline kir2yar

  • 25
You shouldn't ever be editing the mission file. strings.tbl and tstrings.tbl are what you want to be translating.

Thank you. Strangely, when I experimented with FRED, my text saved in the mission.

I understand the font is edited by volution tool kit?
That means the first thing I should do - to draw cp1251-compatible font.
Once I do that, it will be possible to begin the translation itself. Most likely, it does not even require any changes to the code.
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]

  

Offline kir2yar

  • 25
Original FS and FS2 translated by Fargus. As soon as I find the CD, I'll see can I use the fonts from there.
I am from Russia. Sorry for my English.
I use Google Translator.

jabber: [email protected]