Jump to content


Photo

Translating the TDM GUI


  • Please log in to reply
488 replies to this topic

#1 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 23 June 2011 - 02:15 PM

Moin!

The language barrier might prevent a few people from either playing TDM; or enjoying it like they should. For someone fluent in English, this problem doesn't even exist, or cross their mind - but just imagine that TDM is released in Norsk only :-) Anyway, a lot of people here are not English native speakers, and they reported problems understanding texts, esp. if it are longer texts.

We already have a few FMs that were translated by kind people to other languages, but so far neither the menu, nor the shop, or the ingame HUD have been translated. Since the longer we wait the worse the problem will get, I thought I'd make a head start on this create the nec. code support.

That turned out to be a lot more work than anticipated (isn't it always? :) , but apart from two (rather large, I must admit) technical problems, it is now almost done.

Here is what I did:
slimmed down the D3 supplied english.lang from >5400 strings to the about 180 we actually used
  • added literally hundreds of strings that we did need to translate, but actually had hardcoded all over the place in our def files, the gui files, AND in the C++ code
  • fixed all the places in the def, gui etc files where we had hard-coded strings
  • to test that the translation basically works, added an example German translation (it's about 95% complete)
  • created a strings/all.lang that contains all the strings for all languages, which makes it easier to see if something is missing or untranslated. Also wrote a script that converts this UTF-8 file to the individual .lang files, plus checking the format, warning about double entries, converting the encoding to ISO-8859-1 etc. Atm it also transcribes German Umlauts from "ä" to "ae" (see below)
  • fixed a few dozend places in the code where the code was reading out strings and pushing them into the GUI untranslated (so you ended up with "#str_12345" instead of "Kompass")
  • fixed the problem that key binds caused, namely they tried to find the item/category by the english name (e.g. Compass), but the item or category was now named "#str_12345". Made it work with "Lantern" as well as "#str_02398", too.
  • Added a way to switch the language in the menu. This requires NO restart when switching between western languages, but requires one to switch from/to Russian (due to D3 bugs with fonts).
  • FM specific translations are supported via strings/fm/english.lang etc.
  • The translation code is in its own object, so it can be more easily extended/used.
  • The GUI has been converted from choiceDef (which don't work with foreign characters) to windowDef + code handling the changes
  • Russian fonts have been added.
  • The menu font Carleton uses now the special character map and has thus Umlauts and accented chars.
  • Character remapping has been implemented (so we can have Czech and Polish etc. at the same time)
Plus a lot of smaller tasks that I already forgot :)

The entire ordeal is tracked here: http://bugs.angua.at/view.php?id=2779 (including a few child-bugs)

Things that are not working yet:

* Only a few languages are done (German, Italian, French, Polish, Portuguese, Russian, Czech and Spanish are done).

Here is the current status:

czech.lang...		  42324 bytes, 1135 entries, 145 ( 12.8%) not yet translated.
english.lang...		41688 bytes, 1135 entries.
french.lang...		 42532 bytes, 1135 entries,  60 (  5.3%) not yet translated.
german.lang...		 43531 bytes, 1135 entries,  64 (  5.6%) not yet translated.
italian.lang...		45029 bytes, 1135 entries,  62 (  5.5%) not yet translated.
polish.lang...		 41912 bytes, 1135 entries, 149 ( 13.1%) not yet translated.
portuguese.lang...	 43431 bytes, 1135 entries, 107 (  9.4%) not yet translated.
russian.lang...		44077 bytes, 1135 entries,  77 (  6.8%) not yet translated.
spanish.lang...		43119 bytes, 1135 entries,  41 (  3.6%) not yet translated.

Since v1.07, we have also fixed a lot of D3 bugs (font rendering, font loading) and improved the translations even further.

Last updated: 2012-02-28


Screenshots follow in the next post:
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#2 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 23 June 2011 - 02:26 PM

As promised:

Attached File  trans_0001.jpg   22.43KB   67 downloads Attached File  trans_0002.jpg   120.02KB   65 downloads Attached File  trans_0003.jpg   121.67KB   57 downloads
Attached File  trans_0004.jpg   129.92KB   56 downloads Attached File  trans_0005.jpg   115.45KB   60 downloads Attached File  trans_0006.jpg   119.64KB   60 downloads
Attached File  quit_german.jpg   37.2KB   14 downloads Attached File  german_new3.jpg   147.76KB   26 downloads Attached File  german_new2.jpg   163.56KB   27 downloads

Last updated: 2011-09-18
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#3 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12855 posts

Posted 23 June 2011 - 02:33 PM

Quite a task!

I remember internationalizing some project in my past. It's a ton of work when done after-the-fact.

Thanks, Tels.

#4 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 23 June 2011 - 02:47 PM

Here are two more, showing the shop, and the French variant:

Attached File  trans_0011.jpg   110.78KB   53 downloads Attached File  french_new.jpg   151.99KB   13 downloads

Last update: 2011-09-18
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#5 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13881 posts

Posted 23 June 2011 - 02:50 PM

Here are two more, showing the shop, and the French variant:

Attached File  trans_0011.jpg   110.78KB   53 downloads


Looks like German to me.

#6 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 23 June 2011 - 02:52 PM

Looks like German to me.


Don't the other languages all look like German? :D What I meant was "the shop _and_ another shot in french" :) Thus the shop is indeed in German, but the other one is in French (it is very incomplete as you can see).
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#7 Shadowhide

Shadowhide

    Advanced Member

  • Member
  • PipPipPip
  • 1282 posts

Posted 23 June 2011 - 03:02 PM

The language barrier might prevent a few people from either playing TDM



darkmod laggy as fuck , actually high system requirements is preventing more people from playing TDM

so i prefer team members to work on code cleanup and optimization





Proceed with caution!

#8 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 23 June 2011 - 03:12 PM

darkmod laggy as fuck , actually high system requirements is preventing more people from playing TDM

so i prefer team members to work on code cleanup and optimization


Congratulations, you are the third person to enter my Ignore List on this forum. Good luck with the rest of your life.
  • vvGarrettvv likes this
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#9 Mortem Desino

Mortem Desino

    Uber member

  • Development Role
  • PipPipPipPip
  • 2443 posts

Posted 23 June 2011 - 04:15 PM

Related to troll:
Spoiler


AND on topic:

I study all of the wrong languages to help ye with localization. Except german, but I suspect you're a lot more fluent than this little American is. :P This is a pretty big task.

[edit] And, while you said it might be early, this is a nice easy thing for someone in the community to volunteer for.
yay seuss crease touss dome in ouss nose tair

#10 Shadowhide

Shadowhide

    Advanced Member

  • Member
  • PipPipPip
  • 1282 posts

Posted 23 June 2011 - 05:10 PM

Congratulations, you are the third person to enter my Ignore List on this forum. Good luck with the rest of your life.

damn :( who was the first two ?

Related to troll:


i'm not troll

Add sophisticated AI, Robust 100% dynamic lighting, advanced shaders, real physics engines, high-poly environments, 3D rendered skyboxes, alpha-tested textures, ragdoll physics, and stim & response handshakes. Then see if an engine isn't "laggy as fuck".


well far cry game (2004 year too) have that all except stims and it can render map with 30K entities (or more) and it playable on P3-650 mhz

i don't blame TDM team at all ! i blame this lazy guy called john carmack , who didn't write his engines from scratch,he modified previous (idtech1->2->3->4 from 1996 to 2004) so idtech4 is advanced idtech1 engine fork











Proceed with caution!

#11 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 23 June 2011 - 05:22 PM

I study all of the wrong languages to help ye with localization. Except german, but I suspect you're a lot more fluent than this little American is. :P This is a pretty big task.

[edit] And, while you said it might be early, this is a nice easy thing for someone in the community to volunteer for.


Hm, maybe we could add a Latin translation? I wouldn't be able to read it, but it sounds like fun. (You know, like when you switch Wikipedia to Swedish and dieroll laughing on the floor :laugh:

Anyway, as for volunteering, you are right, we need someone to the other languages.

So far I got from 7upman (Thanx!) a few files, and he will also proofread the German translation (and fix my mistakes :)

He sent me a french translation from Hyeron (already added about 40 strings from it, sorry that it took almost two years before we used your work, Hyeron!) and french/italian/spanish from original D3. These will not give us more than a handful strings (like for key names or things like "fullscreen"), but it is better than nothing :)

So we still need someone who can complete any other language than English or German. European languages are prefered, since D3 cannot do Unicode and we could f.i. not use any Asian languages, or anything that deviates too much like Cyrillic or greek. For these languages we need a new font first.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#12 Chiron

Chiron

    Member

  • Member
  • PipPip
  • 192 posts

Posted 23 June 2011 - 07:16 PM

Shadowhide response:

Spoiler



@Tels

Sorry for the Offtopic reply to SH, but I couldn't resist.
Unfortunately I cannot add anything to the Translations.
German and English are taken, and my Tengwar and Klingon aren't what they used to be!
I could pitch in when it comes to Latin though !

Edited by Chiron, 23 June 2011 - 07:28 PM.


#13 Mortem Desino

Mortem Desino

    Uber member

  • Development Role
  • PipPipPipPip
  • 2443 posts

Posted 23 June 2011 - 07:25 PM

I could pitch in when it comes to Latin though !

Hooray! :laugh:
yay seuss crease touss dome in ouss nose tair

#14 jaxa

jaxa

    Advanced Member

  • Member
  • PipPipPip
  • 1402 posts

Posted 23 June 2011 - 07:36 PM

De mortuo structores religionis.

(Brought to you by Gooooogle)


#15 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13881 posts

Posted 23 June 2011 - 07:59 PM

i don't blame TDM team at all ! i blame this lazy guy called john carmack , who didn't write his engines from scratch,he modified previous (idtech1->2->3->4 from 1996 to 2004) so idtech4 is advanced idtech1 engine fork


Lazy? idtech 4 is more than a simple fork of idtech 1,2,3. lol Those engines were written in C...idtech4 is written in C++. When developing the D3 engine, Carmack first stripped the Quake 3 engine down to the bare minimum, leaving some primary systems so he could have a functional engine to work with while developing the new renderer. After the renderer was completed, the rest of the engine was refactored and completely rewritten in C++.

There are some snippets of the Q3 code left...but hardly enough to make such a silly statement. Most developers continue refining their engines, rather than start from scratch every time they make a new game. Cryengine 2 and 3 are no doubt rewrites of Cryengine 1. You don't just toss away all your work when you have a good foundation.

It's possible that you misinterpreted what some of the articles about idtech4 development actually meant...but it's certainly more than an advanced fork, as you called it.

It's not uncommon for developers to use their previous work as a starting point for their next engine...case in point...Thief 2 was a fork of the Thief 1 engine...and SS2 was a fork of those engines. Had Thief 3 been developed by Looking Glass Studios, guess what it was supposed to have been built on? The Siege Engine. Siege was an enhanced fork of the Dark Engine.

#16 Nosslak

Nosslak

    Advanced Member

  • Member
  • PipPipPip
  • 680 posts

Posted 23 June 2011 - 08:16 PM

I could probably have a go with translating it to Swedish, so you can laugh while playing TDM too.

#17 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9428 posts

Posted 23 June 2011 - 08:19 PM

Spoiler


Great work Tels. :)

I imagine this is a prelude to Closed Caption support?

Edited by nbohr1more, 23 June 2011 - 08:20 PM.

Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#18 greebo

greebo

    Heroic Coder

  • Root
  • 16055 posts

Posted 23 June 2011 - 11:28 PM

Our menu contains a lot of pre-rendered buttons, these are not translatable (unless we either render new buttons, or find a way to replace them with text). This is something I need to think about a bit more.

We can handle that the same way as our add-ons: pack all the german stuff into tdm_gui_german.zip and rename it to .pk4 when switching language. Once the correct PK4 is "active" all the default menu graphics will be overridden by the tdm_gui_german.pk4.

It's a lot of work though to create the graphics, and the text width might not fit (German words are usually longer).

#19 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16736 posts

Posted 24 June 2011 - 12:43 AM

I have a bad feeling that changing existing fonts is likely to mess up the text format in existing readables because I had to manually fix the spacing of a lot of characters. Apart from looking bad this is likely to push some text off the bottom of the pages and so unreadable.

#20 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 24 June 2011 - 03:52 AM

We can handle that the same way as our add-ons: pack all the german stuff into tdm_gui_german.zip and rename it to .pk4 when switching language. Once the correct PK4 is "active" all the default menu graphics will be overridden by the tdm_gui_german.pk4.

It's a lot of work though to create the graphics, and the text width might not fit (German words are usually longer).


ATM I am leaning to not replace the graphics, because:

* it is a lot of work, unless we somehow automate this.
* there seems to be only one person (springheel) who can do this
* the switch-pk4s complicates matter, too
* we have to redo it for every language, too
* and if there is a typo or a change, we start over, again

Unfortunately, I don't think D3 font-rendering is up to the task, yet. But I have to experiement more with it. For now, the graphics have to remain.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#21 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 24 June 2011 - 03:54 AM

I have a bad feeling that changing existing fonts is likely to mess up the text format in existing readables because I had to manually fix the spacing of a lot of characters. Apart from looking bad this is likely to push some text off the bottom of the pages and so unreadable.


Hyeron made a new font which wa almost pixel-perfect on the normal letters, so this seemed to work. Otherwise, _adding_ letters to the existing fonts should not disturb the normal letters. If Q3font (or whatever) is not up to the task, then I probably need to write my own utility that only changes one letter, but leaves the others as they are. Can't be that hard, as we have the source codefor some of the utilities, right? :mellow:
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#22 Shadowhide

Shadowhide

    Advanced Member

  • Member
  • PipPipPip
  • 1282 posts

Posted 24 June 2011 - 04:53 AM

And the minimal requirements was ~1 Ghz CPU. On a 650 Mhz machine, how did that work?


far cry work fine on my old P3 650 mhz without lags on medium settings

Physics that TDM uses?

doom3 have ugly physics , much worse than far cry

Edited by Shadowhide, 24 June 2011 - 04:55 AM.

Proceed with caution!

#23 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 24 June 2011 - 05:24 AM

I've written a script that can take our mix of translated/untranslated strings, the doom original english file, as well as a new file (in this case either the D3 original translation, or Hyerons translation) and figure out which string we miss and where there is a new translation. All in all this netted us some 100 strings for Italian, Spanish and French, mostly the basic things like names of keys, settings like "Fullscreen" etc.

So here is the statistics:

Generating english.lang... done, written 16129 bytes, 413 entries.
Generating french.lang... done, written 16215 bytes, 413 entries, 284 not yet translated.
Generating german.lang... done, written 16100 bytes, 413 entries, 184 not yet translated.
Generating italian.lang... done, written 16253 bytes, 413 entries, 309 not yet translated.
Generating polish.lang... done, written 16071 bytes, 413 entries, 406 not yet translated.
Generating russian.lang... done, written 16129 bytes, 413 entries, 413 not yet translated.
Generating spanish.lang... done, written 16469 bytes, 413 entries, 260 not yet translated.

(A high number of strings are things that you don't need to translate, like names of keys, so despite the "184 not yet translated", the German translation is already almost complete. Likewise, the other languages each need about 150 or so strings not translated, either)

Anything else is now left to the community.

I'll take care of the font issue and think about what to do with the graphics.

Also, I'll figure out how to do easier translation in FMs, it would be probably a good idea if authors could just specify "#str_1XXXXX" and then deliver individual strings/my_XXXXXX.lang files. That way someone could translate an FM after-the-fact without having to alter the FM package. At the moment that does not work as each author would have to override our own lang files, but then updates to these lang files would not work. And extra lang files are not taken into account by the code at all.
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

"Remember: If the game lets you do it, it's not cheating." -- Xarax

#24 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13881 posts

Posted 24 June 2011 - 07:12 AM

far cry work fine on my old P3 650 mhz without lags on medium settings


Why don't you start a new thread? This isn't really the appropriate thread to be dragging all this out.

Out of curiosity, how did TDS run on that system? You keep bringing up far cry, but far cry was a shooter. Compared to a Thief game, it did not have very sophisticated AI...nor did it have a lightgem calculation to compute...nor sound prop and everything else that goes into making a Thief game. It's a completely different type of game.

so i prefer team members to work on code cleanup and optimization


As we have said before, TDM has been optimized as well as it's going to be optimized until we have the full source code. At that point, we can look at decreasing load times, and finding ways to better optimized the lighting tricks.

#25 Shadowhide

Shadowhide

    Advanced Member

  • Member
  • PipPipPip
  • 1282 posts

Posted 24 June 2011 - 12:59 PM

Out of curiosity, how did TDS run on that system? You keep bringing up far cry, but far cry was a shooter. Compared to a Thief game, it did not have very sophisticated AI...nor did it have a lightgem calculation to compute...nor sound prop and everything else that goes into making a Thief game. It's a completely different type of game.


i didn't tried TDS on my old PC
Proceed with caution!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users