[EN | DE] I18N - Language, Langage, Sprache, 语言 - and what it says about eRep.

Day 1,369, 13:17 Published in Germany Germany by Mr. Enya

[German translation below - Deutsche Übersetzung weiter unten]
Hello again,
this time I'd like to address a more serious issue again. An issue where I think that it's obvious that the game developers are either lazy or incompentent. What I'm concerned about is internationalization (i18n). What's that, you ask? Well, read the linked wikipedia article, and/or continue here.

The eRepublic game structure consists of a lot of small text components, like "Eat food", "Fight", "My Land", "Hard Worker", "Weapons", "Vote", "Subscribe" or ", our resistance forces have fought bravely against trying to liberate ." Okay so far? Now, the developers can make a list of all those text components:
text00001: "Eat food"
text00002: "Fight"
text00003: "My Land"
text00004: "Hard Worker"
And so on (of course they do this a bit more structured, I just want to give you the idea.) Then, they go into the source code of the eRep game, and replace all the text strings with the codes. And they write a little program that looks up the "text00002" and replaces it with "Fight", and the user (us!) will only see the label.

Now, all they have to do is to translate the list into German:
text00001: "Essen"
text00002: "Kämpfen"
text00003: "Mein Land"
text00004: "Schwerarbeiter"
or into French:
text00001: "Mange!"
text00002: "Se battre"
text00003: "Mes places"
text00004: "Travailleur de Force"
or into Chinese:
text00001: "吃饭"
text00002: "战斗"
text00003: "我的土地"
text00004: "重体力工作者"
I hope you get my point here. Basically, that's all that they need to do for a COMPLETE translation of eRep into any language. The source code is always the same, only the representation is different according to which language you want to display.

I tried and used several languages: /en, /de, /fr, /pl, /es, /pt, /it, /ro, /gr, /ru, /hr, /sr, /tr, /sv, /bg, /hu.
All you have to do is change the /en/ of "erepublik.com/en/" into your intended language shortname. These are maybe all that exist, given that I couldn't find /dk, /ar, /zh, /jp, /cz. I tried some more language codes, but they also didn't work out.
If you try these, you'll find that the eRep team has made its first steps towards i18n, aka international translation. It's a very halfbaked version at best, and even worse, the arrangement is broken in some parts. Broken like this: (German and Greek examples)



Some bugs: The german market menu is called "info", while the war tab is called "market". In the community tab, we find mixed english/german entries. The starting page consists almost completely of english text components. Tiny detail: The translation for leaving a party is wrong (translating back to english it reads "retreat from office")...
On the other hand, the newspaper module and a large lump of the political system is just fine.

I know what I'm speaking of: been there, done that. (For a program that was at least as wordy as eRep is.) It's tedious, boring work, but it's incredibly easy. Yes, one programmer can easily change all the hard-coded words of the programs code, so that they refer to a list. He'll need one or two days if the program is coded properly. Once he's done that, he can deliver the list to a translator, who translates all the english texts into any other language. Deliver the same list to 20 translators, and your game/program supports 20 languages.

That's the theory. Translating the existing lists in any language is a cakewalk, the hard thing is the separation of program and text. Now, as anyone can see, eRep is programmed using javascript and jQuery for the client side, and I don't know about the server side - I guess they have an SQL-type database and php there. Sorting out the separation of program and text during initial development is the best approach (I guess they didn't do that, at least not first). Doing it later will result in searching hard for the text that needs to be replaced with the referral codes. That's still not a problem, if you have a well-developed, well-documented and well-maintained code. In this case, you will just need - estimated - up to five times longer than you would need if you thought of i18n in the first place: Instead of two, maybe three days, the poor programmers will need ten or fifteen. But then it's DONE, and all further changes could be maintained just regularly.
BUT...
...if you already have a system running for 2-4 years, and you completely changed said system 20 times over, and your code is a complete mess, and not documented at all, and you can't handle it at all because your programmers are incompentent... then i18n will FAIL. Also, in this case, i18n is the least of your problems, because your system is falling apart on the slightest touch.

I'm not telling you that this is the case with eRep. I don't know what their code looks like, I don't know on what they're working on at the moment, and I don't know how big their development staff is...
I'm just saying that the i18n fail of eRep (translation was started/done in 2010!) is indicating that EITHER they gave up on providing another language than english OR that they can't handle their code. o_O

eRepublic Developers: It's not all bad - but fix your i18n!

Thanks for reading, Mr. Enya
Please vote and/or subscribe, or link at this article in your articles, or republish this article in your country and language, if you like.


GERMAN VERSION
Heute geht's bei mir wieder um ein ernstes Thema. Ein Thema, bei dem die eRep-Entwicklungsabteilung schlecht wegkommt, weil sie scheinbar entweder faul oder inkompetent sind. Was mir Sorgen macht, ist Internationalization (i18n). Was das ist? Nun, lest den verlinkten Wikipedia-Artikel oder einfach diesen Text.

Die eRepublik-Spielstruktur besteht aus einem Haufen kleiner Textbausteine, wie "Eat food", "Fight", "My Land", "Hard Worker", "Weapons", "Vote", "Subscribe" oder ", our resistance forces have fought bravely against trying to liberate ." Soweit klar? Also, die Entwickler können diese Textbausteine in Listen auslagern.
text00001: "Eat food"
text00002: "Fight"
text00003: "My Land"
text00004: "Hard Worker"
Und so weiter (natürlich etwas strukturierter, ich will hier nur die Idee rüberbringen) Als nächstes ändert man (also die Entwicklungsabteilung von eRep!) den Quellcode des Spiels, und ersetzt alle Textbausteine, die dort im Klartext stehen, mit den Textcodes. Dann schreiben sie ein kleines Programm, das den Verweis "text00002" in der Liste nachguckt und korrekt mit "Fight" ersetzt. Der Spieler (wir!) wird nur diese Aufschrift auf dem Button sehen.

Jetzt gehen sie hin und übersetzen die ganze List ins Deutsche:
text00001: "Essen"
text00002: "Kämpfen"
text00003: "Mein Land"
text00004: "Schwerarbeiter"
oder Französische:
text00001: "Mange!"
text00002: "Se battre"
text00003: "Mes places"
text00004: "travailleur de force"
oder Chinesische:
text00001: "吃饭"
text00002: "战斗"
text00003: "我的土地"
text00004: "重体力工作者"
Ich hoffe, ihr versteht, um was es mir geht. Das ist im Prinzip alles, was getan werden muss, für eine KOMPLETTE Übersetzung von eRep in jede Sprache. Der Quellcode ist immer derselbe, nur die Darstellung ist unterschiedlich, je nachdem welche Sprache der Benutzer gezeigt bekommen will.

Ich habe nun viele Sprachen ausprobiert: /en, /de, /fr, /pl, /es, /pt, /it, /ro, /gr, /ru, /hr, /sr, /tr, /sv, /bg, /hu.
Alles, was man tun muss, ist das /en/ von "erepublik.com/en/" in die gewünschte Sprach-Kürzel umzuändern. Diese Internationalisierung ist bestenfalls halbgar, und noch schlimmer, einige Teile sind falsch angeordnet. SO falsch (Deutsches und griechisches Beispiel)



Weitere Fehler: Das deutsche Markt-Menü wird "Info" genannt, und der Kriegsreiter wird "Markt" genannt. Im Community-Reiter zeigt englisch/deutsche Einträge gemischt an, die Startseite ist fast komplett englisch. Detail: Die Übersetzung von "aus Partei austreten" ist "Zurücktreten", was man ja eigentlich eher bei politischen Ämtern erwartet.
Andererseits kann ich sagen, dass das Zeitungsmodul und ein ordentlicher Teil des Politikmoduls ziemlich sauber un gut gemacht ist.

Ich weiß wovon ich rede, ich habs schonmal gemacht. (Für ein Programm mit mindestens demselben Umfang wie es eRep hat.) Es ist anstrengende, langweilige Arbeit, aber es ist unglaublich einfach. Ja, ein Programmierer kann einfach alle hartkodierten Texte im Quellcode in die Text-Variablen umändern. Sobald das getan ist, braucht er nur die Liste an einen Übersetzer schicken, der alle englischen Texte in die jeweilige Sprache übersetzt. Dieselbe Liste an 20 Übersetzer, und das Programm unterstützt 20 Sprachen.

Soweit in der Theory. Die existierenden Listen in eine Sprache zu Übersetzen ist ein Kinderspiel, das Problem ist die vorherige Auftrennung von Programm und Text. Wie jedermann sehen kann, ist eRep in Javascript und jQuery programmiert auf der Client-Seite, was auf der Serverseite passiert weiß ich nicht - ich nehme an, sie haben eine SQL-Datenbank und PHP. Die Trennung von Programm und Text während der erstmaligen Programmierung ist die beste Herangehensweise (ich nehme mal an, das haben sie nicht gemacht, zumindest nicht von Anfang an). Wenn man das später macht, muss man ordentlich nach den Texten suchen, die man dann in die Listen überträgt. Das ist immer noch kein Problem, wenn man einen gut entwickelten, gut dokumentierten und gut gewarteten Code hat. In diesem Fall dauert es - geschätzt - bis zu fünfmal länger als wenn man von Anfang an an i18n gedacht hätte. Anstatt zwei oder drei Tagen, werden die Programmierer vielleicht zehn oder fünfzehn Tage brauchen. Aber dann ist man FERTIG, und alle weiteren Änderungen können einfach regulär nachgezogen (und gewartet und dokumentiert) werden.

ABER...
...wenn man schon ein System 2 oder 4 Jahre lang betreibt, und dieses System 20 Mal überarbeitet und geändert hat, und wenn dein Code dann ein einziges Tohuwabohu ist, und gar nicht dokumentiert, und niemand kann es reparieren, weil alle Programmierer inkompetent sind... dann wird i18n SCHEITERN. Übrigens, in diesem Fall ist i18n das geringste der Probleme, weil das Programm bei den leichtesten Änderungen den Geist aufgeben kann.

Was ich hier nicht behaupte ist, dass dies bei eRep der Fall wäre. Ich weiß nicht, wie ihr Code aussieht, ich weiß nicht, woran sie gerade arbeiten, und ich weiß nicht wie groß ihre Entwicklungsabteilung ist...
Ich sage nur, dass der i18n-Fail von eRep (die Übersetzung wurde schon in 2010 gemacht/gestartet!) darauf hinweist dass eRep ENTWEDER den Versuch aufgegeben hat, andere Sprachen als Englisch zu unterstützen, ODER dass sie sich im eigenen Code nicht mehr zurechtfinden. o_O

eRepublik-Entwicklung: Es ist nicht komplett kaputt - aber bringt eure i18n in Ordnung!

Danke fürs Lesen, Mr. Enya
Bitte voten und abonnieren, oder in eurer Zeitung einen Link auf diesen Artikel setzen, oder diesen Artikel in eurem Land und eurer Sprache neu veröffentlichen.