Author Topic: i18n + unicode  (Read 17553 times)

bob0

  • Posts: 80
  • Turrets: +11/-9
i18n + unicode
« on: November 29, 2010, 10:38:29 pm »
The patch includes Lakitu7-freetype+consolecustomize.patch, which implements freetype support for ASCII (non-unicode) characters.  The code can also be found in the "i18n" branch of git://git.mercenariesguild.net/obstacle.git

The renderer has been updated to support rendering UTF-8 encoded unicode characters.  Other truetype fonts can be used, and by default ttf/DejaVuSans-Bold.ttf (which needs to be downloaded in addition to the patch) is used.  The console font can be changed by setting "cl_consoleDynFont".  For the UI, next to "font", "smallFont" and "bigFont" in an assetGlobalDef block, the fields "dynFont", "smallDynFont", and "bigDynFont", all of which the patch sets to ttf/DejaVuSans-Bold.ttf, have been added.  There is a cache with a fixed size of MAX_FACE_GLYPHS (384 for now) glyphs.  When a new glyph is rendered, an image and a shader is created for it at runtime, and it is added to the cache.  The cache has a fixed size, so eventually old glyphs will be replaced by new glyphs, and when they are, the image is freed and a new one is created, and the mutable shader is overwritten for the new glyph.  Currently, there is a problem when more than MAX_FACE_GLYPHS glyphs are rendered simultaneously, as new glyphs will continuously be generated, significantly reducing the frame rate.

Gettext is used for translation.  The path containing all the translated messages determined by concatenating the cvar "localepath", or "fs_homepath" if "localepath" is empty, with the cvar "locale". By default, "localepath" is empty and "locale" is "/locale".  Normally the environment variable LANG can be set.  Unfortunately, gettext expects this directory to really be a directory, so it can't exist in a zip package.

This patch requires both the client and the VMs to be patched.  Patched VMs are backwards-compatible with unpatched clients, so a server that includes this patch in their VMs will enable patched clients to use unicode, and unpatched clients will be unchanged.  A patched client is able to load unpatched VMs.

The Domination server (running on lojban.org) includes this patch, in addition to domination itself, in its dowloadable package, as well as ttf/DejaVuSans-Bold.ttf.  As far as I'm aware, it's the only server with vms that support unicode.

This has not been tested extensively.

Screenshots:









bob

CreatureofHell

  • Posts: 2422
  • Turrets: +430/-126
    • Tremtopia
Re: i18n + unicode
« Reply #1 on: November 29, 2010, 10:43:00 pm »
This has not been tested extensively.

Nice line.

The patch looks quite interesting.
{NoS}StalKer
Quote
<Timbo> posting on the trem forums rarely results in anything good

khalsa

  • Administrator
  • Posts: 597
  • Turrets: +187/-132
    • http://www.mercenariesguild.net
Re: i18n + unicode
« Reply #2 on: November 29, 2010, 11:03:09 pm »
Sweet, Can't wait to see the way this goes! I'll have to install trem to check it out! Good work man!
« Last Edit: November 29, 2010, 11:05:21 pm by khalsa »
}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ

SlackerLinux

  • Spam Killer
  • *
  • Posts: 555
  • Turrets: +41/-62
Re: i18n + unicode
« Reply #3 on: November 29, 2010, 11:27:53 pm »
wow just wow a dev hasnt even got trem installed

havent looked at the patch yet but the screenies look good
Slackware64 13.1
SlackersQVM/

CATAHA

  • Posts: 539
  • Turrets: +8/-18
    • Tremulous Lair
Re: i18n + unicode
« Reply #4 on: November 29, 2010, 11:41:37 pm »
Good work! That one of things 1.2 definitely should have!
Russian q3/trem mapping site: http://tremlair.krond.ru/
=[ Boxmaps suck if they have no concept ]=

Ice Trap (InstaGib)

Other maps: A.T.D*S Remake

F50

  • Posts: 740
  • Turrets: +16/-26
Re: i18n + unicode
« Reply #5 on: November 30, 2010, 02:16:47 am »
Welcome to a whole new level of pain in trying to find which unpronounceable slurpee of characters belongs to the greifer, and which to the poor innocent noob you just banned.

This could be very good for those of us who don't want to have to type in English but...sorry in advance.
"Any sufficiently advanced stupidity is indistinguishable from malice." -- Grey's Law


KillerWhale

  • Spam Killer
  • *
  • Posts: 469
  • Turrets: +63/-26
Re: i18n + unicode
« Reply #6 on: November 30, 2010, 02:21:17 am »
Holy shit Unicode fuck yes.

@F50: Slot numbers.

Undeference

  • Tremulous Developers
  • *
  • Posts: 1254
  • Turrets: +122/-45
Re: i18n + unicode
« Reply #7 on: November 30, 2010, 04:51:12 am »
A few things on first glance
  • This is not the place for it; this is
  • A new blank translation is not copyrightable (and since that file also contains others' copyrights, your notice in jbo.po is pretty bogus)
  • Obviously all of the strings need to manually checked and updated so they make sense for translation ("'s %s" doesn't translate well, many of the strings should not be translated in part or at all, etc.) and some things are not translated that should be
  • Various functions would need to be updated that were not
  • The typeface should probably be specified by config, not the menus
  • Your patch does a few more things than what it says
  • You tend to screw up code format
Need help? Ask intelligently. Please share solutions you find.

Thats what we need, helpful players, not more powerful admins.

Aelita

  • Posts: 742
  • Turrets: +147/-34
Re: i18n + unicode
« Reply #8 on: November 30, 2010, 10:45:42 am »
Quote from: khalsa
I'll have to install trem to check it out!

DevilishFreak

  • Posts: 17
  • Turrets: +2/-1
    • Tremulous Argentina
Re: i18n + unicode
« Reply #9 on: December 02, 2010, 02:55:18 pm »
This is very nice! Good work!
Finally we can speak spanish in trem with good spelling  ;D

Edit: the patch doesn't work with svn 2065 :/
« Last Edit: December 02, 2010, 03:41:35 pm by DevilishFreak »

Haraldx

  • Posts: 373
  • Turrets: +15/-69
Re: i18n + unicode
« Reply #10 on: December 15, 2010, 04:13:21 pm »
lol, "I don't speak Russian" wrote in pure Russian.  :laugh:
...princibles of judgement do not apply to me.
I JUST MINED ANIMATED CREATURES

prent

  • Guest
Re: i18n + unicode
« Reply #11 on: December 24, 2010, 10:17:42 am »
no you shouldn't do it that way...

SamOz

  • Posts: 143
  • Turrets: +2/-677
    • Samurai Tremulous
Re: i18n + unicode
« Reply #12 on: January 23, 2011, 08:02:23 pm »
Can this also allow Japanese, Chinese, and Korean writing?
Read about SamOz's MImod or download it here. Warning, It's BIG!!!
MImod is a new mod for Tremulous, with flashy script effects & High-Def textures in an Oriental-influenced theme.

CATAHA

  • Posts: 539
  • Turrets: +8/-18
    • Tremulous Lair
Re: i18n + unicode
« Reply #13 on: January 23, 2011, 09:59:15 pm »
Its Unicode, lol. =)
Russian q3/trem mapping site: http://tremlair.krond.ru/
=[ Boxmaps suck if they have no concept ]=

Ice Trap (InstaGib)

Other maps: A.T.D*S Remake

SamOz

  • Posts: 143
  • Turrets: +2/-677
    • Samurai Tremulous
Re: i18n + unicode
« Reply #14 on: January 27, 2011, 09:33:41 am »
Its Unicode, lol. =)

It's a patch, not a magic wand. Sometimes these ideas and patches don't work out. I still worry what the patch will do to the server otherwise.

I noticed the line "This has not been tested extensively"

See my point here?


.
« Last Edit: January 27, 2011, 09:36:44 am by SamOz »
Read about SamOz's MImod or download it here. Warning, It's BIG!!!
MImod is a new mod for Tremulous, with flashy script effects & High-Def textures in an Oriental-influenced theme.

Tremulant

  • Spam Killer
  • *
  • Posts: 1039
  • Turrets: +370/-58
Re: i18n + unicode
« Reply #15 on: January 27, 2011, 05:03:31 pm »
See my point here?
It's unicode, of course it can potentially allow any of those, see the point there?

You never asked about anything else, what kind of thing do you expect it to "do to the server otherwise"?
my knees by my face and my ass is being hammered

SamOz

  • Posts: 143
  • Turrets: +2/-677
    • Samurai Tremulous
Re: i18n + unicode
« Reply #16 on: January 27, 2011, 07:01:02 pm »
See my point here?
It's unicode, of course it can potentially allow any of those, see the point there?

You never asked about anything else, what kind of thing do you expect it to "do to the server otherwise"?

Screw-up the server, perhaps?

"potentially" is a very vague thing, btw. Clarity is an excellent method to take in communication. Politicians and salesmans love to handwave problems away by never clearly answering questions too. Do I have to add anything else besides the patch, or will the patch alone provide the fonts for those Asian languages? Is the patch going to interfere with anything else? Blithe answers don't really answer.

I notice there's also no clear instructions on how the patch is installed, or applied.
« Last Edit: January 27, 2011, 07:07:21 pm by SamOz »
Read about SamOz's MImod or download it here. Warning, It's BIG!!!
MImod is a new mod for Tremulous, with flashy script effects & High-Def textures in an Oriental-influenced theme.

Tremulant

  • Spam Killer
  • *
  • Posts: 1039
  • Turrets: +370/-58
Re: i18n + unicode
« Reply #17 on: January 27, 2011, 09:01:25 pm »
Well no, were you expecting to be able to use the patch as-is, does it look particularly finished? it looks like a very rough around the edges proof of concept to me, did you assume otherwise?

So, where were we? oh yeah, it's unicode, it is designed to allow one to use any number of different character sets, how well this individual patch does so is something you'll have to either check for yourself or wait for the author to respond about.
my knees by my face and my ass is being hammered

SamOz

  • Posts: 143
  • Turrets: +2/-677
    • Samurai Tremulous
Re: i18n + unicode
« Reply #18 on: January 28, 2011, 01:09:45 am »
Well no, were you expecting to be able to use the patch as-is, does it look particularly finished? it looks like a very rough around the edges proof of concept to me, did you assume otherwise?

So, where were we? oh yeah, it's unicode, it is designed to allow one to use any number of different character sets, how well this individual patch does so is something you'll have to either check for yourself or wait for the author to respond about.

So, being flippant replaces clear answers for you. Thanks. I expected that. Sorry, no, I have no idea what the patch really looks like - rough, polished, wierd, strange - since I have no patches to compare it against - should I get some and stare at them too for some mysterious meaning?

Thank you for being so obfuscating.

Read about SamOz's MImod or download it here. Warning, It's BIG!!!
MImod is a new mod for Tremulous, with flashy script effects & High-Def textures in an Oriental-influenced theme.

Tremulant

  • Spam Killer
  • *
  • Posts: 1039
  • Turrets: +370/-58
Re: i18n + unicode
« Reply #19 on: January 28, 2011, 03:53:12 am »
Sorry, no, I have no idea what the patch really looks like - rough, polished, wierd, strange - since I have no patches to compare it against - should I get some and stare at them too for some mysterious meaning?
I'd only looked at the screenshots myself, it doesn't look like a polished product from those alone, undeference has commented on the state of the code but that means nothing to me. Sure, go ahead and stare at some patches, if you feel that it'll prove enjoyable.
Thank you for being so obfuscating.
No problem, I shall continue in my endeavour to cause you inexplicable confusion and bewilderment at every turn.
my knees by my face and my ass is being hammered