It is currently June 24th, 2017, 4:26 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: May 13th, 2015, 10:36 am 
Offline
User avatar

Joined: October 11th, 2010, 3:46 am
Posts: 3744
Location: Moscow
So in side chats with Jack, Hugh, and Aleks (molcandr), I'm hoping to actually translate or "localize" (or even "l10n" as they say in the biz) Brigador into Russian. These post-sovok kids can't get enough of World of Tanks, so I figured it couldn't hurt to do Brigador.

But how does this stuff sort of work? How do elements of an interface function? Why does text magically appear in the places where it should in other games, particularly when I switch the languages?

Regarding Brigador, I don't actually know how their interface is gonna be organized, but given everything I do at my current job (which is translating the interfaces of various programs and, well, stuff), I kinda have a vague idea. So to answer Hugh's side question about "how do you wanna do this" and to spoil the magic for the rest of you, here we go.

Let's take a portion of Hugh's recent screenshot posting of the end-of-level results, and let's imagine that every bit of text is labeled like so

Image

Now I'm only pulling three things for the sake of time and space, but in a final version, all text that appears on that particular screen might just be itemized in a neat little list. What might that list look like? Well, it might look all boring and tabled like this

Image

To explain, in the above we see three columns. The first column is "ID". Other words for this in the biz might be "key" or "segment", but the idea is that it's generally the indicator for where a piece of text will go. This text may be for anything: the label on a button, a page title, a pop up suggestion, or an entire paragraph about a pilot.

Why do we use keys/IDs/segments? Well, it's kinda so we can avoid the problem of putting the whole text as the identifier in the system and creating a massive mess to hunt through (CS enthusiasts might also know a similar problem as "labeling your layers accordingly"). Now, I'm literally not a programmer, so take all this with a massive grain of salt, because I've learned these things backwards, but this is usually done so you don't end up with the equivalent of a wall of text to hunt through, especially if, for instance, parts of the text might change depending on your results e.g. a changing value within a piece of text. The reason for this is partly so that Hugh et al aren't writing an infinitely large amount of text.

Let's say, hypothetically, there's a short text of sorts that appears at the end of a fairly good run.

Quote:
Congratulations Brigador!

You have successfully fulfilled the terms of Contract 1370-AV signed 13.05.2015

You have been deducted 2500 credits for killing 10 civilians.


Now, this is what you would see approximately on screen, but what does Brigador.exe see this as? Behind the scenes it would actually read it as multiple elements. Let's also assume Brigador.exe is coded in a bad mixture of Python and Java (hence the "\n" and "%s")

Quote:
1. Congratulations Brigador!\n (new line)
2. You have successfully fulfilled the terms of Contract
3. %s (placeholder signifying numerical value)
4. signed
5. DD.MM.YYYY\n (date game began)
6. You have been deducted
7. %s (as previous)
8. credit/credits (plural dependent on previous element i.e. IF 8. = more than 1 THEN 9. = plural)
9. for killing
10. %s (as previous)
11. civilian/civilians. (plural dependent on previous element i.e. IF 10. = 1 THEN 11. = singular)


As a result, the program would dispense those eleven IDs in their assigned order (set by the developer), and the ones that are set to change e.g. the contract number (3.), the date (5.), the deduction (7.), and single/plural instances (8. and 11.) will do so based on your performance. Huzzah! How does that then look in the program's code? Well, it might just be eleven short things depending on what their ID is but for argument's sake, lets say it ends up looking like this in the backend:

Quote:
congrats1 => "Congratulations Brigador!\n"
congrats2 => "You have successfully fulfilled the terms of Contract"
congrats3 => "etc."
congrats4
congrats5
congrats6
congrats7
congrats8
congrats9
congrats10
congrats11


Or it might be even neater than that. Fun, huh? All that Brigador.exe has to do is refer to an ID table (like the one seen above) where all the text is stored, combine it with the values from your playthrough, and boom, your complete message text is pulled from that and assembled and ready for the user to see. Let's see if I can color code the text so that you can understand the overlap of what both the program is doing, and what you're seeing (and whether or not PHP enjoys code nesting or not).

Quote:
Congratulations Brigador!

You have successfully fulfilled the terms of Contract 1370-AV signed 13.05.2015

You have been deducted 2500 credits for killing 10 civilians.


Everyone bar the sleep-deprived individual who wrote this is none the wiser.

On a slight tangent, getting back to the point about the columns, the other two are, as can be seen, English and Russian.

Image

These two columns are the "values" for the ID it's assigned to. Don't think of the word "value" in the monetary sense. Instead, here, we mean it in the programming sense, where the "value" is its... well... its current state or property i.e. at its most basic in binary it's either ON or OFF. With our results example, we have two available values for the three selected IDs (or keys/segments) - Russian or English.

Now, you might be thinking, why put all this shit in a table if I'm localizing it? Isn't it simpler just to translate the whole text and only substitute the values that change? Well, I'm glad you asked! Here's the funny thing about languages, and where I dispense with my bad knowledge of programming and begin talking about what I do know something about.

Word order in English is important. We can say "The cat sat on the mat", but we can't really say "The cat sat mat on the" or "the mat sat the cat on", because that sounds like gibberish. To a lesser extent with EFIGS in general (English, French, Italian, German, Spanish), this also applies, but with other languages like Russian or Turkish? You can totally get away with putting words in whatever order you want as long as you adhere to a few rules, because the individual words themselves contain the grammatical info, which does not necessarily need to be inferred by either word order or prepositions. There are downsides to this (certainly when Russians attempt to translate to English, but still "think" in Russian, and vice versa), but the upshot is that you can restructure sentences however you see fit, which brings us back to our table of stuff and IDs/keys/segments.

If every element of an interface that contains text is its own thing, rather than just a whole body of text containing placeholders, then it's much easier to work with said interface and essentially drag and drop them wherever you want them to be. It's linked to a very common "user experience" (or UX) issue that crops up, i.e. two designers may be at odds with one another as to where, lets say, the "subtitles" option goes. Should it go under the graphics submenu? Or the audio submenu? What if we change our mind entirely and put it somewhere else entirely? Who's calling it the "graphics" menu anyway? Why isn't it "visuals"? And so on.

If the text is already contained within a key or segment, then it's relatively easy to both move that element around and change it accordingly. For instance, in most languages, numbers might precede the noun it's counting (Five people), but in some cases, for whatever reason, the number might go after the text, though it's more likely that you get situations where a text in English would be:

"Five people were killed during the mission"

but in Russian, it's probably better to phrase it as a passive construction (though seeing as most of you don't speak Russian, this example might fall flat), meaning it would be rendered as something like

"During the mission, five people were killed" (but in Russian)

Generally the biggest problem with interface translation is assuming you can translate verbatim, word-by-word, but it doesn't always work that way (or rather, it rarely works at all). If your localization has the relative freedom to restructure the text without completely screwing up the interface, or without the text running off the screen in an awful manner, then using this database system I've poorly described above can be extremely liberating. Why? Because your text isn't buried away in some morass of code, it's in its own folder of sorts, but the downside is that you (the translator) need to have some familiarity with the programming language, as well as access to both the database of text, and the ability to show off the Russian version relatively easily (and then asking an actual native speaker to check it).

And I've ran out of steam talking about this. Maybe I'll ramble further later.


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: May 13th, 2015, 2:28 pm 
Offline
User avatar

Joined: August 24th, 2010, 7:39 pm
Posts: 421
awesome duder. my mind has expanded, also I now know how to do my job better. I'll see about getting this stuff set up once we really start writing things out.


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: May 14th, 2015, 9:33 am 
Offline
User avatar

Joined: October 11th, 2010, 3:46 am
Posts: 3744
Location: Moscow
Oh, I actually forgot (one of) the best parts.

Plurality in languages other than English can get complicated. In English we think of singular and plural as simply that. You have one brigador, you have two/three/four/many brigadors.

When it comes to Russian, number matters considerably. When I talked earlier about sentence structure mattering less, this is a two-edged sword, in the sense that the words themselves can have multiple forms or endings.

In English we do have an ending, it's just -s (or -es depending on the word, or even nothing, such as non-countable nouns e.g. sheep).

In Russian, we have a separate singular ending for when there is 1 of something (including 21, but not 11), a different plural ending when there is 2, 3, or 4 of something (this counts for 22, 33, 44 etc.), and yet another plural ending for 5 and above (well, any digit ending in 5, such as 25, but also applies for the number range from 5-20). Is your total number of things one million and one (1,000,001)? Then you use the supposed "singular" ending.

Oh, did I mention that there's three genders? That means your potential number list of endings can be:

1. Masculine singular (1)
2. Masculine plural (2,3,4)
3. Masculine plural (5+)
4. Feminine singular (1)
5. Feminine plural (2,3,4)
6. Feminine plural (5+)
7. Neuter singular (1)
8. Neuter plural (2,3,4)
9. Neuter plural (5+)

Oh did I also mention that there's also six different cases (Subject, Object, Dative, Genitive, Prepositional, and Instrumental)? So just multiply that above list by 6 and you have most Russian word endings covered.

Hopefully this goes a way to explaining why the table/id/key/segment system comes into effect. The funny thing is that there's a weird off-balance in two languages. A simple noun in English, such as a day of the week (e.g. "Monday") can vary considerably depending on the context. The English value of the [dayofweek] segment will almost always be Monday (or "Mondays" or "on Monday"), but the Russian value of [dayofweek] can be up to about 54 different variants. Fun times!


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: May 14th, 2015, 1:40 pm 
Offline
User avatar

Joined: October 23rd, 2010, 6:49 am
Posts: 639
Location: Zagreb
Slightly off-topic from this technical introduction to localization, but if the whole process won't be too painful for the translator, I'm offering my translation services once the game's out. I mean, if your desired fonts will be able to handle cyrillic, then they'll handle the few odd letters in Croatian.


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: May 15th, 2015, 7:15 am 
Offline
User avatar

Joined: October 11th, 2010, 3:46 am
Posts: 3744
Location: Moscow
As yet another addendum, no, there doesn't need to be at most 54 versions of all words of the interface, only the ones we have in English. The scope of the work is defined by the source language.


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: May 18th, 2015, 4:22 am 
Offline
User avatar

Joined: October 11th, 2010, 3:46 am
Posts: 3744
Location: Moscow
For those still confused, y'all can see something put up by Mozilla regarding Localization and Plural rules

https://developer.mozilla.org/en-US/doc ... ural_Rules


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: November 18th, 2015, 1:37 am 
Offline

Joined: November 18th, 2015, 1:35 am
Posts: 2
Remember to use good Because the Internet is an important life


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: November 18th, 2015, 5:44 am 
Offline
User avatar

Joined: August 6th, 2011, 3:48 am
Posts: 869
Location: Angleterre
I will happily offer my services in translating the Brigador UI into British English.


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: November 22nd, 2015, 5:25 pm 
Offline
User avatar

Joined: August 24th, 2010, 7:39 pm
Posts: 421
Fonic wrote:
I will happily offer my services in translating the Brigador UI into British English.

Very generous of you. I look forward to the Brigador UI mentioning how Spacers are "proper cunts" and the inexplicable addition of biscuits to all the descriptions.


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: November 23rd, 2015, 2:43 am 
Offline
User avatar

Joined: September 14th, 2011, 5:10 pm
Posts: 1484
Don't forget the Tea you cunt.


Top
 Profile  
 
 Post subject: Re: Brigador UI Localization, Or "HOW DOES IT WORK"
PostPosted: November 23rd, 2015, 4:53 am 
Offline
User avatar

Joined: October 11th, 2010, 3:46 am
Posts: 3744
Location: Moscow


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL