Posts: 1,038
Threads: 96
Joined: Jun 2010
29 Jun 14, 04:41PM
(This post was last modified: 29 Jun 14, 04:42PM by Andrez.)
Internationalization sucks, that's a matter of fact, so I was thinking of a system like this to implement complete self-standing strings instead of linking existing ones, because you realize that neo-latin languages don't absolutely work like English/German. So I found this on the internet:
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
int main(){
//load the text file and put it into a single string:
std::ifstream in("language_strings.txt");
std::stringstream buffer;
buffer << in.rdbuf();
std::string test = buffer.str();
std::cout << test << std::endl << std::endl;
//create variables that will act as "cursors". we'll take everything between them.
size_t pos1 = 0;
size_t pos2;
//create the array to store the strings.
std::string str[4];
for (int x=0; x<=3; x++){
pos2 = test.find("|", pos1); //search for the bar "|". pos2 will be where the bar was found.
str[x] = test.substr(pos1, (pos2-pos1)); //make a substring, wich is nothing more
//than a copy of a fragment of the big string.
std::cout << str[x] << std::endl;
pos1 = pos2+1; // sets pos1 to the next character after pos2.
//so, it can start searching the next bar |.
}
}
This script basicly reads strings (separated by a "|") from a plain .txt and stores them in an array. Pretty simple for those who are active in C++. Can't we use this system to output ingame statements that are read by this file, so that anyone can translate much easier in their language?
Please note that I'm really starting C++-ing, so that's my raw idea.
Posts: 376
Threads: 32
Joined: Apr 2014
Could you point out the benefits of having a worldwide played online multiplayer game with players who don't know five words of a common language? Why would anyone want to translate the game in the first place? Given the already small playerbase, does it make sense, to additionally establish language barriers?
PS: that piece of code certainly does not translate anything. How would "reading strings from a file" aid i18n better than gettext does? Gettext at least keeps the source code itself readable...
Posts: 1,038
Threads: 96
Joined: Jun 2010
30 Jun 14, 02:29PM
(This post was last modified: 30 Jun 14, 02:40PM by Andrez.)
I'm pretty much new to C++, so that was a raw idea to get to the point:
- reading strings from a text file
- storing them in an array
- using those arrays for statements
There is not a true benefit at all, except that a text file can be really edited by anyone and of course, for those who are really retards with English understanding (hence: Brazilians) can get something more. Just throwing the idea out there.
EDIT: I forgot the most important reason... The translation I posted long time ago (.po file) was TERRIBLY adapted to the context, because makkE or whoever did the job, didn't consider that words concatenation in Italian != English.
Posts: 1,033
Threads: 85
Joined: Oct 2013
(30 Jun 14, 09:27AM)stef Wrote: Could you point out the benefits of having a worldwide played online multiplayer game with players who don't know five words of a common language? Why would anyone want to translate the game in the first place? Given the already small playerbase, does it make sense, to additionally establish language barriers?
PS: that piece of code certainly does not translate anything. How would "reading strings from a file" aid i18n better than gettext does? Gettext at least keeps the source code itself readable...
I would be happy to try my hand at coding Chinese input and display...
Posts: 1,038
Threads: 96
Joined: Jun 2010
For instance, another relevant problem is about 'you' messages...
For example, only one key for 'you' is used, while it can be written in many many many ways in Italian:
- you fragged x --> hai fraggato x
- you were fragged by x --> sei stato fraggato da x
Why can't all of these be included in one (or more) bigass text file?
Posts: 964
Threads: 78
Joined: Dec 2010
openmind - opensource
F1 Andrez
---- To make AC a better international game we should have it in several languages.
AssaultCube in PT-Br \ 0 /
I do not know why someone would find this bad ...
Posts: 376
Threads: 32
Joined: Apr 2014
"Why can't all of these be included in one (or more) bigass text file?"
That is, what gettext basically does.
Are you trying to tell me, that there are players who do not understand "you fragged x" in english?
Posts: 1,038
Threads: 96
Joined: Jun 2010
(30 Jun 14, 08:31PM)stef Wrote: Are you trying to tell me, that there are players who do not understand "you fragged x" in english? It wouldn't be so surprising to believe; I'm here since 2008, and only God (ironic ofc) knows how many Portuguese/French posts this forum has gone through for lack of English skills.
Also, AC is not made of only of 'you fragged x' and 'you were fragged'.
Posts: 376
Threads: 32
Joined: Apr 2014
Translating the game makes it easier for players, who can't understand anyone else in the game. You really have to keep in mind, that it is a multiplayer game without language ghettos. We do not want servers for other languages only. (I know, that there are such servers, but we don't want to encourage that)
Also, localised game messages make it more or less impossible to help someone with a problem. Also, all tutorials and other documentation would have to be translated - and be kept up to date. You can't translate the game and be done.
If it were up to me, I would remove gettext instantly.
Posts: 964
Threads: 78
Joined: Dec 2010
It's a programmers ghetto . ftw
Confusing menus. Command sequence via terminal(ingame). A lot of scripts. And now they want to remove the serverwizzard.
Accept. Make this game a popular game is not the AC project intent.
The point here is to show who knows more about programming ... who can make the best script ... who knows more about linux ... whatever. The same people of always blocking new ideas ...and in the end they will do whatever they want in the next version.
"Translating the game makes it easier for players, who can't understand anyone else in the game."
Realize the kind of thinking! He believes that only players who speak English playing AC. I can understand all Brazilians who play AC! The world plays AC. Who wants to create a ghetto is you.
Every day we have less players. The number of Brazilian players decreased a lot.
I think in the near future will stay in the game only those who speak English. Maybe that's the goal .. how do we know?
open mind - open source and do it
"...Binaries
compiled from source are compatible with the official binaries. This means, the client can
easily be hacked, on the other hand, you can compile AssaultCube for different platforms and
fix bugs yourself.
You MUST NOT connect to servers that are not yours with a modified client that contains changes
that were not made for platform-compatibility or to fix bugs. This would be cheating. Thank you
for supporting fair play gaming."
*please.. i dont trying to be rude. Im not a native english speaker like you guys...
Posts: 1,038
Threads: 96
Joined: Jun 2010
(01 Jul 14, 09:16AM)stef Wrote: Also, all tutorials and other documentation would have to be translated - and be kept up to date. You can't translate the game and be done.
That's why text files should be used. Who wants to do that, does it, who doesn't, just doesn't. I remember at the time me and Apollo translating tons of pages in the AC wiki (respectively Italian and German), and I'm not considering translated menus. You realize that translating a menu and not ingame messages is like going to a whore and asking for a hug.
Please note that I'm asking for making it easier and more accessible, not for a real translation of the game!
Posts: 376
Threads: 32
Joined: Apr 2014
The goal is, to have people play the game together. To do that, they have to know at least a few words of a common language. It may be unfair to you, if it is not your native language that is used as common language, but there's nothing I can do about that.
Neither the menus nor the game messages use complicated language. It is as simple as it can get - all together a few dozen different words. The bar is not set too high. If you want to help players who have trouble understanding typical game phrases, make them a cheat sheet with the words and sentences that they will need the most. Understanding those few words is a game requirement, just as it is a requirement, that you can use keyboard and mouse. We will not make an "assaultcube for touchscreens".
1Cap - would you care to elaborate, how it is /me/ who wants to create a ghetto? By having everyone playing together?
Posts: 964
Threads: 78
Joined: Dec 2010
Interesting.
Maybe a help balloon for each menu option. This balloon could be a multilingual help. The game identifies or we could choose the language.
There is a tutorial in the game. We could remake this tutorial in several languages using texts explaining.
And more.
We could have a forum here for other languages.
The idea of making the game more accessible is very good!
Posts: 205
Threads: 6
Joined: Oct 2012
I support the idea of the incorporation of unicode strings into the game but just for menus and perhaps only the voicecoms. For in-game chat unicode text I think it is a bad idea since it would introduce more language barriers.
Posts: 1,038
Threads: 96
Joined: Jun 2010
(01 Jul 14, 06:27PM)1Cap Wrote: We could have a forum here for other languages. This^
I guess a subsection called 'AC International' with the most prominent languages wouldn't be bad..
...
--Off-topic
--AC International
--- Portuguese
--- French
--- Spanish
--- Italian
--- Others
At least for supporting people who can't ask/understand help in English and such!
Posts: 1,504
Threads: 34
Joined: Jun 2013
why divide a small community into smaller ones
Posts: 1,038
Threads: 96
Joined: Jun 2010
I give up. I say A and people understands B because of C. You can close this thread, I'll go in on with translations on my own.
Posts: 160
Threads: 2
Joined: May 2011
02 Jul 14, 06:08PM
(This post was last modified: 02 Jul 14, 06:16PM by *H1TM4N*.)
(01 Jul 14, 08:51PM)Andrez Wrote: (01 Jul 14, 06:27PM)1Cap Wrote: We could have a forum here for other languages. This^
I guess a subsection called 'AC International' with the most prominent languages wouldn't be bad..
...
--Off-topic
--AC International
--- Portuguese
--- French
--- Spanish
--- Italian
--- Others
At least for supporting people who can't ask/understand help in English and such!
Excellent idea. F1
(02 Jul 14, 04:12AM)Cemer Wrote: why divide a small community into smaller ones
New players need help, do you agree? Ok, and new players who do not understand English? They need help in their language, it will not split the AC community, will only increase it.
|