Page 1 of 2

Translation of modular advertisement text snippets?

Posted: Mon Oct 26, 2015 10:10 pm
by clausimu
If I want to plug in snippets of ad text randomly to create the illusion of variety, where do I define the pieces of text so they get translated properly? In the matching en.json for the script? Or is this generally a bad idea because different languages may not allow for easy substitution without having to change words that make up the static part of the text?

For example:

Code: Select all

list_of_societies = ["The <faction name> Geological Society", "The Helton Institute of Research", "The Farkhun Center for Research", "The <station name> Microbiological Society"]
list_of_desasters = ["earthquake", "hailstorm", "acid hurricane", "engine failure", "small explosion"]

ad_text = "This is <name> from the <random from list_of_societies>. Following a <random from list_of_desasters> we lost contact with one of our research vessels on planet <planet_name>. Its last known position was <lat/long>. We request immediate help to investigate the whereabouts of this ship and transport any survivors back to <station_name>."
My apologies if that has been covered before and I was just too stupid to find it.

Re: Translation of modular advertisement text snippets?

Posted: Tue Oct 27, 2015 7:31 am
by impaktor
No apologies needed.

Are you simply asking about how to put text on the BBS that can be translated? (Like all other modules are doing), or is this something specific?

The Taxi-module has a list of fake companies in it's en.json-file. Are you planning on doing something similar?

(We could have a translation module with just company names, (then parts of Taxi's en.json could be moved there as well)).

In your example some cases would spell out "the The", this is something to look out for. Also, consider other languages with different grammar, like German "the" can be either der/die/das depending on what word follows, thus it's good idea to let that be up to the translator.

So your "list_of_societies" would have to be:

Code: Select all

SOCIETY_1 = "..."
SOCIETY_2 = "..."
SOCIETY_3 = "..."
etc. in the en.json then you pick a random number to decide which to choose. The CargoRun module uses some nifty code to not have to know in advance how many "societies" there are to choose from (unlike Taxi, where it's hardcoded in the top of the file).

Re: Translation of modular advertisement text snippets?

Posted: Tue Oct 27, 2015 9:17 am
by bszlrd
Those can work quite differently in hungarian too. Like in the "from the #institute" part, in hungarian the from will go to the end of the word as "tól", "től", depending on the vowels in the name. Same for the "on" planet, "in" something, "to" somewhere, "with" something. All of thise are done with affixes and they are dependent on the vowels of the word you are affixing to.
Also "the" works as "a" or "az" depending on if the beggining letter of the word is a vowel or a consonant. Kind of like the "a" and "an" in english, but hese are for referencing directly, not generally to something.
But because these wierdnesses, I'm used to using workarounds when translating, and I guess, translators of other languages have this kind of workarounds for their languages wierdness too.
Like what impaktor said: leave out "the" from the body text, so it can be put before the institute name in the name list where needed.

Re: Translation of modular advertisement text snippets?

Posted: Tue Oct 27, 2015 10:30 am
by clausimu
like German "the" can be either der/die/das
Those can work quite differently in hungarian too.
I was afraid that because of exactly this problem substitutions other than names (such as company names (without the "the" - thanks for catching that)) would be a no-no. Substituting family members ("My mother/father/sister/brother/niece/nephew is in trouble!") for example need a different "My" in different languages too. I wasn't sure if you had decided already that it's a thing that is best avoided altogether.
(We could have a translation module with just company names, (then parts of Taxi's en.json could be moved there as well)).
I would like that. The advantage is that company names will re-appear across different scripts and scenarios. As long as we can group companies by type (research, industry, military contractors, etc.).

Re: Translation of modular advertisement text snippets?

Posted: Wed Oct 28, 2015 5:58 am
by impaktor
I will not take any action to separate out the strings from Taxi (or other modules), but if such a pull request were to appear, we would poke the sleeping robn to merge it for us, since it involves also moving all the translated strings.

Here's a text on procedural company names, which is problematic for us due to translation:
http://www.shamusyoung.com/twentysidedtale/?p=3231

EDIT: actually, if a procedural company name generation were written it could maybe go into libs/NameGen.lua? It would have to be confirmed to work in German, French, Spanigh and other "big" languages, I guess.

Re: Translation of modular advertisement text snippets?

Posted: Wed Oct 28, 2015 10:54 am
by clausimu
if a procedural company name generation were written
Thinking beyond simply adding random variety (which alone wouldn't be enough reason to invest in such a major change) - I'm always trying to figure out ways to make the universe feel really different and unique wherever you go.

What if there was a procedural company name generator (and name generator) that created a pool of names per station (or planet/or faction?). Scripts can tap into this pool in addition to random names. That way each corner of the universe will have its own major corporations, research institutes, or even people that post stuff on the BBS.

Not sure if this is feasible though because of language problems. I will have to look into that.

Re: Translation of modular advertisement text snippets?

Posted: Wed Oct 28, 2015 11:37 am
by impaktor
...or even people that post stuff on the BBS.
We have the code for persistent characters, added for this reason, but none of the scripts make use of it, beyond each individual mission.

Re: Translation of modular advertisement text snippets?

Posted: Wed Oct 28, 2015 2:29 pm
by clausimu
none of the scripts make use of it, beyond each individual mission
I guess that is why I never saw the real gold hidden there... :)

I will have to experiment around with it to see how easily it is adaptable to what I have in mind. I would really like to add life to the procedural universe, including main players (mafia bosses, infamous assassins, legendary traders, political leaders, ...) and main corporations/research centers, each with their own agendas and animosities toward each other, per area of the universe. If mission scripts had a story and relationship pool like this to choose from, local taxi missions, assassinations, ship emergencies and deliveries would then become part of a larger local story. But that's not something I will whip up in a week. :)

Re: Translation of modular advertisement text snippets?

Posted: Wed Oct 28, 2015 5:14 pm
by impaktor
There is a (current) limitation, in that the missions don't speak to each other, since they're modules. But they can get information from outside, so persistant characters and such should be doable. But Taxi doesn't know what happens in DeliverPackage or vice versa.

Maybe the crew is persistent (for a while?) after you fire them, I'm not sure.

Re: Translation of modular advertisement text snippets?

Posted: Wed Oct 28, 2015 7:38 pm
by clausimu
the missions don't speak to each other
That is fine. The persistent characters/companies would act as a common "database" that every module loads from and writes to. The only thing to figure out is how to handle things like locations for characters. If Taxi is asking for transport of character A to planet X, then Assassination can't ask you to kill character A on planet Y.