[Suggestion] Translation STRING files + Language System

A place to record your ideas for the game.
Locked
Kaesemuffin
Joined: Fri Sep 12, 2014 2:20 pm

[Suggestion] Translation STRING files + Language System

Post by Kaesemuffin » #28346

Hey,

this is a repost from the Byond forums - then I realized it would make more sense posting it here than over there.
http://www.byond.com/forum/?post=1298288
So what’s up here? Can’t we point in the code to a string file for several languages offering like Russian, German or Swedish (and more) translations?
I am asking me that thing for years now.

I know, I know ... things got a bit messy over the years in the TG Code, but hell since reopening the project on GitHub tons of rows of code had been overhauled and redone ...

SS13 is undergoing an uplift since years, HTML5 is incoming (although I hope it wont lack features, there are some rumors that the HTML5 Byond version will not support all features ... but I don’t know which exactly)

HOWEVER Player counts are rising and now is the best point ever to open up STRING files for all the phrases and descriptions wordings in the whole game. Yeah sure there are sound files ... but hell those are simple to “replace” and even now there are annotations for all spoken sound files in the chat.

But now it’s messy so translate the whole game. It’s like:

TONS OF CODE HERE 01010 SCRIPT YADDA = Variable Player “is trying do end you life with a big” Variable Object ;8,1

So what’s the matter with opening up a STING file.
Hell it even makes your coding job easier, you can simply define objects, relations and even spelling issues.

You can merge all the text doubles in the script
Also you can add up text counting and even grammatical things:

The Clown picks up _a_ knife
The Clown picks up _an_ unknown object

PLUS we can add finally a crossword Alien language system (just for the sound of it) [EDIT: I can add up this into another suggestion thread to clearify]

The “Nyaa Nyaa Nyaa” could lead to a cross dictionary system (like WoW in Game Language Translation) by counting word length and word check sum. In one hand using that we can look for a similar word length synonym in a given dictionary with alien soundings (so we can add up more alien words, that respond to the original word length) and in the other hand we can add up alien soundings in the destination language.

TEXT: Hello World.
Old Style “Nyaa Nyaa”
New Style “Nyaa Meow” British “Nyaa Miaow”

OR the use of Syndicate spells with other languages ...
OR the use of keywords for automatic gestures ...

So ... your thoughts?
Many thanks for reading my messy wall of text.
Kind regards,

Kaesemuffin
User avatar
Remie Richards
Joined: Thu Apr 17, 2014 7:11 pm
Byond Username: CrimsonVision
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Contact:

Re: [Suggestion] Translation STRING files + Language System

Post by Remie Richards » #28395

You mean just descriptions of objects and the text the game says right?

You'd have to find the appropriate line for each piece of text before it's said, and swap out for it.
Which could mean all versions but english would lag more, due to having to mess with files.

OR

Change every single piece of text in the game to a variable like MMI_desc (or in a list) which would be swapped out while the game boots up.

Either way I don't think it's easy implementation.
私は完璧
Kaesemuffin
Joined: Fri Sep 12, 2014 2:20 pm

Re: [Suggestion] Translation STRING files + Language System

Post by Kaesemuffin » #28418

Hey Remie,

we are talking about a game localization here right (lets put the alien language stuff aside for a moment)

So in that case we don't need a script to swap text ^^
The coders need to set up a file structure and ... simple said they link each text reference to a translation file.

Basically I'm saying:

Actual:

Code: Select all

/datum/chemical_reaction/icetea
	name = "Iced Tea"
	id = "icetea"
	result = "icetea"
	required_reagents = list("ice" = 1, "tea" = 3)
	result_amount = 4

/datum/chemical_reaction/icecoffee
	name = "Iced Coffee"
	id = "icecoffee"
	result = "icecoffee"
	required_reagents = list("ice" = 1, "coffee" = 3)
	result_amount = 4

New 2 Files:

Codefile

Code: Select all

/datum/chemical_reaction/icetea
	name = food#drink#icetea
	id = food#drink#icetea
	result = food#drink#icetea
	required_reagents = list(food#reg#ice = 1, food#reg#tea = 3)
	result_amount = 4

/datum/chemical_reaction/icecoffee
	name = food#drink#icedcoffee 
  	id = food#drink#icedcoffee 
	result = food#drink#icedcoffee 
	required_reagents = list(food#reg#ice = 1, food#reg#coffee = 3)
	result_amount = 4

TranslationFile English

Code: Select all

#Translation English

food#drink#icetea = "Ice Tea"
food#drink#icedcoffee = "Iced Coffee"

food#reg#ice = "Ice"
food#reg#tea = "Tea"
food#reg#coffee = "Coffee"

This was only an example! There are better ways to that.
Dunno write a wrapper, run it _once_ over the code...
Maybe use pootle?

http://pootle.translatehouse.org/index.html
Miauw
Joined: Sat Apr 19, 2014 11:23 am
Byond Username: Miauw62

Re: [Suggestion] Translation STRING files + Language System

Post by Miauw » #30051

If this was done using DM it'd be slow as fuck and cause lots of lag.
<wb> For one, the spaghetti is killing me. It's everywhere in food code, and makes it harder to clean those up.
<Tobba> I stared into BYOND and it farted
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: [Suggestion] Translation STRING files + Language System

Post by oranges » #30791

You don't have any proof of that Miauw
Miauw
Joined: Sat Apr 19, 2014 11:23 am
Byond Username: Miauw62

Re: [Suggestion] Translation STRING files + Language System

Post by Miauw » #33599

You'd have to file2list() all of the language files, and all of this would have to be in New() since BYOND doesn't accept non-static expressions in atom definition.
<wb> For one, the spaghetti is killing me. It's everywhere in food code, and makes it harder to clean those up.
<Tobba> I stared into BYOND and it farted
Locked

Who is online

Users browsing this forum: No registered users