The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: Ranran(retired) on December 10, 2018, 01:43:50 PM

Title: Translation fix of "%s has built a new %s %s %s."
Post by: Ranran(retired) on December 10, 2018, 01:43:50 PM
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 (https://github.com/jamespetts/simutrans-extended/pull/96).

And I attach .dat file for simutranslator in this post.
Title: Re: Translation fix of "%s has built a new %s %s %s."
Post by: jamespetts on December 10, 2018, 10:20:23 PM
Thank you very much for that - now incorporated.
Title: Re: Translation fix of "%s has built a new %s %s %s."
Post by: Ranran(retired) on December 14, 2018, 02:41:04 PM
Have you pushed?
Exe's revision has not changed from #2e81572.
Title: Fix one more untranslatable word - "building".
Post by: Ranran(retired) on December 15, 2018, 02:51:11 PM
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. (https://github.com/jamespetts/simutrans-extended/pull/96)

Many language already have translation word of "building" in ".tab" so translators do not need to translate it newly.
Title: Re: Translation fix of "%s has built a new %s %s %s."
Post by: jamespetts on December 24, 2018, 10:18:02 PM
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?
Title: Re: Translation fix of "%s has built a new %s %s %s."
Post by: Ranran(retired) on December 24, 2018, 11:35:13 PM
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 (https://github.com/jamespetts/simutrans-extended/pull/96) contains both fix.
Title: Re: Translation fix of "%s has built a new %s %s %s."
Post by: jamespetts on December 24, 2018, 11:57:56 PM
Now incorporated - thank you for this!