The International Simutrans Forum

 

Author Topic: Translation fix of "%s has built a new %s %s %s."  (Read 486 times)

0 Members and 1 Guest are viewing this topic.

Online Ranran jp

  • *
  • Posts: 352
  • Languages: ja
Translation fix of "%s has built a new %s %s %s."
« 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.
Code: [Select]
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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Translation fix of "%s has built a new %s %s %s."
« Reply #1 on: December 10, 2018, 10:20:23 PM »
Thank you very much for that - now incorporated.

Online Ranran jp

  • *
  • Posts: 352
  • Languages: ja
Re: Translation fix of "%s has built a new %s %s %s."
« Reply #2 on: December 14, 2018, 02:41:04 PM »
Have you pushed?
Exe's revision has not changed from #2e81572.

Online Ranran jp

  • *
  • Posts: 352
  • Languages: ja
Fix one more untranslatable word - "building".
« Reply #3 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.

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

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Translation fix of "%s has built a new %s %s %s."
« Reply #4 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?

Online Ranran jp

  • *
  • Posts: 352
  • Languages: ja
Re: Translation fix of "%s has built a new %s %s %s."
« Reply #5 on: December 24, 2018, 11:35:13 PM »
Quote
do 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.

Quote
does 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Translation fix of "%s has built a new %s %s %s."
« Reply #6 on: December 24, 2018, 11:57:56 PM »
Now incorporated - thank you for this!