News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Translation fix of "%s has built a new %s %s %s."

Started by RESTRICTED ACCOUNT, December 10, 2018, 01:43:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RESTRICTED ACCOUNT

Hi. (´・ω・`)

%s has built a new %s %s %s.
This text displayed when the player constructs a station/stop in the network mode.
The corresponding code is in simtool.cc, but this text is not passed to the translation function.
So this text could not be translated so far.
And wrong text which is mixed in double quotes has registered in simutranslator.

However, just adding translator::translate() like this will cause problems.

message.printf(translator::translate("%s has built a new %s %s %s."), player->get_name(), "Dock", preposition, city_name);

The content of the variable "preposition" is "in" or "near", and this is passed to %s.
That is like, "Player has built a new stop near (city_name)."
but when translating this to Japanese like...
プレイヤーは新しい駅をnear(都市名)に建設しました。
It means that "in" or "near" can not translate to other than English in this text.
In order to solve this, I added two translatable words after dividing into "in" and "near".

In relation to this, I also made the word "open countryside" translatable. There is already a translatable word "Open countryside", but since it is not at the beginning of the sentence, the difference is that the first letter is lowercase.

I threw a pull request.

And I attach .dat file for simutranslator in this post.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

RESTRICTED ACCOUNT

Have you pushed?
Exe's revision has not changed from #2e81572.

RESTRICTED ACCOUNT

I found untranslatable word - "building" appears in the message text. (´・ω・`)
It will be displayed at the beginning of the month when such like a new type platform or bus stop or extension building appeared.

I made it possible to translate. Please check again.

Many language already have translation word of "building" in ".tab" so translators do not need to translate it newly.

jamespetts

Apologies for having missed this earlier. Can I clarify - do you mean that your changes from the first post still have not been incorporated; or does your most recent post add further changes?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

RESTRICTED ACCOUNT

Quotedo you mean that your changes from the first post still have not been incorporated
Yes, the first change was not comitted in the master branch.

Quotedoes your most recent post add further changes?
Also yes. I added another fix. It contained the "building" which can not be translated like 新しい building が使用可能になりました。%s.

Pull request #96 contains both fix.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.