The International Simutrans Forum

 

Author Topic: Complement translationable txt  (Read 377 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran jp

  • *
  • Posts: 483
  • Languages: ja
Complement translationable txt
« on: September 09, 2018, 10:25:10 AM »
Hi.(´・ω・`)
I tried to fix about some in-game texts which can not translate with tab file. These are not in standard or have been changed from standard.
I threw a pull request. Please confirm.


Text list #1:
Code: [Select]
has changed its colour scheme.
reassigned_class
reassigned_classes

.dat for simutranslator already exists. (base_texts_experimental_10.15.dat, base_texts_experimental_10.2.dat, base-texts-classes_gui_4.dat)
These can not translate because code does not correspond to.
Note that some translations may already exist but it has not been translated in game so far.


Text list #2:
Code: [Select]
%s has withdrawn access rights from %s
%s has allowed access rights to %s
These texts are added newly. I added these to base_texts_experimental_10.2.dat.


Text list #3:
Code: [Select]
The convoy has been sent\nto its home depot.\n%s\n
Convoi has been sent\nto the nearest depot\nof appropriate type.\n%s\n
No suitable depot found!\nYou need to send the\nconvoi to the depot\nmanually.\n%s\n
Depot found but could not be inserted in schedule.  This is a bug!%s\n

These could not be translated because "%s\n" (convoi name) was added at the end. I have also modified base_texts_experimental_8.0.dat in this regard.
The first two texts currently have translations already in many languages, but "%s\n" is missing. The latter two texts are added newly.


Text list #4:
Code: [Select]
Vehicle running costs per km
Vehicle maintenance costs per month
Vehicle maintenance
These texts were translatable up to now, but they were not registered in the simutranslator.
I added these to base_texts_experimental.dat, and deleted the comment "// TODO: Translation for this".




I suppose these changes so far work well.

However, since I am program noob, I could not make the following text translatable.
Code: [Select]
%s allows you to access its ways and stops
%s does not allow you to access its ways and stops
Allow %s to access your ways and stops
Withdraw %s's access your ways and stops
These are the tooltip help text in the Player List window.
These are exist in "base_texts_experimental_10.2.dat", but translation has been disabled because code does not correspond to.
These codes are in "player_frame_t.cc".

For example,
Code: [Select]
tooltip_out[i].printf(translator::translate("Withdraw %s's access your ways and stops"), player->get_name());
Making such changes will cause a crash if you open the Player List window or add new players. Please fix this and it will be very helpful. (´・ω・`)

EDIT: Fixed pushing the wrong file.
« Last Edit: September 09, 2018, 10:44:28 AM by Ranran »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Complement translationable txt
« Reply #1 on: September 09, 2018, 11:49:06 AM »
Thank you for that - that is most helpful: now incorporated.

However, please note that, in relation to the base_texts...dat files, you need to create a new file for new translation texts rather than modifying existing files, as each file is uploaded to Simutranslator only once.

If you could make a single new file incorporating all of your changes, I will upload it to Simutranslator so that translating using this file can commence.

Offline Ranran jp

  • *
  • Posts: 483
  • Languages: ja
Re: Complement translationable txt
« Reply #2 on: September 09, 2018, 01:12:37 PM »
However, please note that, in relation to the base_texts...dat files, you need to create a new file for new translation texts rather than modifying existing files, as each file is uploaded to Simutranslator only once.

If you could make a single new file incorporating all of your changes, I will upload it to Simutranslator so that translating using this file can commence.
I'm sorry about that.

I have created "base_texts_extended_forgotten_items_1.dat". All newly added and changed texts were put together there.
Check a pull request.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Complement translationable txt
« Reply #3 on: September 09, 2018, 01:29:39 PM »
The new file appears to be empty - had you forgotten to commit the contents?

Offline Ranran jp

  • *
  • Posts: 483
  • Languages: ja
Re: Complement translationable txt
« Reply #4 on: September 09, 2018, 01:37:57 PM »
The new file appears to be empty
At the bottom of here is a new file.
Will this be empty when merging? (´・ω・`)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Complement translationable txt
« Reply #5 on: September 09, 2018, 02:06:06 PM »
Thank you for that - I have now uploaded this file to Simutranslator. Once uploaded, it is not particularly important whether the file remains in the repository.