NewGRF Translator

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9415
Joined: 07 Nov 2007 22:44
Location: Sol d

NewGRF Translator

Post by planetmaker »

NewGRF translations are currently quite scattered, authors have to find people and gather through threads or e-mails for translations. And people willing to help have a hard time to actually find the projects which they would like to give a helping hand (see e.g. this thread). OpenTTD on the other hand already has a nice web translator, which makes it easy to translate.

Alberth and andythenorth and frosch and ^Spike^ and myself have been busy with some re-structuring over at the DevZone and now we can offer you something along these lines as well for projects written in NML and hosted over there:

The eints web translator.

Sign-up

Without login you can browse all pages. In order to make any changes to a language file, you need to be assigned translator by the respective project managers for the languages you want to translate and you need to authenticate with your DevZone credentials. You can do that all in one place with a common interface. And depending on the setup the manager of the individual NewGRF chose, your changes might even be comitted to the NewGRF's repository similar to how OpenTTD's translations are pushed into the repository on a daily basis.
EDIT: We created a user group for each translation. Users may apply to become part of these groups which can conveniently be added by projects managers. Thus it spares the need to apply becoming translator with each project indidually. Apply at the DevZone Help Center (sorry, direct link to application form doesn't work in this forum).

A full description, also targeting authors, is available here. Please let us know if you have any questions regarding it or problems with it.

EDIT: A few screenshots
Attachments
List of available projects
List of available projects
eints_project_view.png (27.8 KiB) Viewed 4231 times
eints_language_overview.png
Overview over strings of one language
(52.33 KiB) Downloaded 6 times
eints_fix_string.png
Editing a single string
(92.36 KiB) Downloaded 6 times

Transportman
Tycoon
Tycoon
Posts: 2746
Joined: 22 Feb 2011 18:34

Re: NewGRF Translator

Post by Transportman »

It looks very interesting. Just a suggestion: Can a failed login be handled a bit nicer? Now it just throws the login form back at me if there is a problem until I cancel it to get an access denied error. If I use the wrong username/password combination, tell me that. If I'm not a translator for a project, give me the option to open an issue at that project to indicate I want to be a translator.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

TinyMusic
Tycoon
Tycoon
Posts: 1423
Joined: 02 Feb 2013 02:03

Re: NewGRF Translator

Post by TinyMusic »

Can I just email to eints@openttdcoop.org to be a translator? Because I did that.
Formerly known as UseYourIllusion.
Java Scenario Found Here - Version 2 out
[tweɪ̂ pû tɕʰì wɔ̀ mǐlɤ lû tɕʰìŋ nì pɑ́ŋmɑ̌ŋ]

Transportman
Tycoon
Tycoon
Posts: 2746
Joined: 22 Feb 2011 18:34

Re: NewGRF Translator

Post by Transportman »

UseYourIllusion wrote:Can I just email to eints@openttdcoop.org to be a translator? Because I did that.
Your DevZone-account has to be appointed as translator for the project (and language) you want to translate, which has to be done by a manager of the project you want to translate.
ManagingEints wrote:To give someone access to a specific translation of your project, add them as member to your project with the role "Translator <iso-code>". E.g. "Translator nl_NL" for a dutch translator.
There are roles for all (finished) languages of OpenTTD.

Translator can then login at https://translator.openttdcoop.org and have fun.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9415
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NewGRF Translator

Post by planetmaker »

UseYourIllusion wrote:Can I just email to eints@openttdcoop.org to be a translator? Because I did that.
We created a user group for each translation. Users may apply to become part of these groups which can conveniently be added by projects managers. Thus it spares the need to apply becoming translator with each project indidually. Apply at the DevZone Help Center (sorry, direct link to application form doesn't work in this forum).
Mind, that the project manager still needs to choose to add these 'global translators' to their project, thus it may fail with some.

I amended this information in the first posting accordingly.
And yes, I added you already as translator :-)

TinyMusic
Tycoon
Tycoon
Posts: 1423
Joined: 02 Feb 2013 02:03

Re: NewGRF Translator

Post by TinyMusic »

planetmaker wrote:I amended this information in the first posting accordingly.
And yes, I added you already as translator :-)
Thanks for that! :)

I tried to 'start new translation' or 'upload translation', and I typed in my username and password in the box, but when I clicked enter, the box re-appeared, and clicking enter doesn't stop it from appearing again, so I can't do anything then.
Formerly known as UseYourIllusion.
Java Scenario Found Here - Version 2 out
[tweɪ̂ pû tɕʰì wɔ̀ mǐlɤ lû tɕʰìŋ nì pɑ́ŋmɑ̌ŋ]

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9415
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NewGRF Translator

Post by planetmaker »

UseYourIllusion wrote:
planetmaker wrote:I amended this information in the first posting accordingly.
And yes, I added you already as translator :-)
Thanks for that! :)

I tried to 'start new translation' or 'upload translation', and I typed in my username and password in the box, but when I clicked enter, the box re-appeared, and clicking enter doesn't stop it from appearing again, so I can't do anything then.
Hm, yes, that's the biggest rough edge left, and we're working on solving that, too. For now a translator cannot start a new translation; it needs a project developer who commits an empty language file for that language. I'll add it to the OpenGFX+ projects and Swedishrails for Indonesian, ok?

Transportman
Tycoon
Tycoon
Posts: 2746
Joined: 22 Feb 2011 18:34

Re: NewGRF Translator

Post by Transportman »

Is there somewhere a list of translators? Maybe I'm missing it, but I can't find it.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

frosch
OpenTTD Developer
OpenTTD Developer
Posts: 981
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NewGRF Translator

Post by frosch »

You can see the translators for a project on each project page, e.g. for FIRS: https://dev.openttdcoop.org/projects/firs

For the list of all centrally registered translators, take a look at this page: https://dev.openttdcoop.org/projects/grfdev
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁

GunChleoc
Engineer
Engineer
Posts: 106
Joined: 21 Dec 2012 12:34
Contact:

Re: NewGRF Translator

Post by GunChleoc »

Thanks! Ths will rock once the kinks are worked out :D

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9415
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NewGRF Translator

Post by planetmaker »

GunChleoc wrote:Thanks! Ths will rock once the kinks are worked out :D
Now signed-up translators also can start a translation on their own. Thus every participating project can be translated now - without any initial setup action needed by anyone except the translators pressing "start new translation" :-) Thanks frosch and Alberth :-)

Transportman
Tycoon
Tycoon
Posts: 2746
Joined: 22 Feb 2011 18:34

Re: NewGRF Translator

Post by Transportman »

Would it be possible to set certain strings to "No translation needed" within a project? Things like URLs, {Title}, strings only containing names/numbers and other things that just don't make sense to translate? For example the Dutch Train Set shows up with a number of missing strings, but those strings are all numbers/names/URLs and thus don't need to be translated.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9415
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NewGRF Translator

Post by planetmaker »

Transportman wrote:Would it be possible to set certain strings to "No translation needed" within a project? Things like URLs, {Title}, strings only containing names/numbers and other things that just don't make sense to translate? For example the Dutch Train Set shows up with a number of missing strings, but those strings are all numbers/names/URLs and thus don't need to be translated.
We discussed that and decided against that. IMHO the only thing missing is a 'copy from base language' button. While they may then be the same in all languages, there are little means to sensibly define 'no translation needed'. EDIT: And already a 20x20 sprite is worth up to 400 characters of string. So this won't bloat a NewGRF :-)

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: NewGRF Translator

Post by Alberth »

The underlying problem is that you cannot express "no need to translate" in the NML language files, which is ultimately what eints uses to decide what to offer to the translators.
The NML language file format is quite limited, unfortunately. I have tried to extend it a few times, but failed to get a useful result. It gets ugly to work with very quickly (the solution is worse than the original problem).

If you are really worried about those few bytes, it may be worthwhile to look into string processing by NML, detect such duplicates, and eliminate them again. That would also catch all cases where the translator did make a copy of the original string (which seems to be the common approach, at least in the projects I am involved in).

Transportman
Tycoon
Tycoon
Posts: 2746
Joined: 22 Feb 2011 18:34

Re: NewGRF Translator

Post by Transportman »

Okay, that's clear. It isn't that much work to copy those strings and very unlikely that those strings will change. It wasn't about those few bytes one would win with less text, but more out of convenience for translators and set managers.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

User avatar
mart3p
Tycoon
Tycoon
Posts: 1032
Joined: 31 Oct 2005 21:00
Location: UK

Re: NewGRF Translator

Post by mart3p »

I understand that the eints web translator is not compatible with NFO projects.

But, if I was to add dummy NML language files to the ISR repo, couldn’t these then be used by eints? :wink:

Of course, I would have to copy the NML translations back into NFO manually, but that is no more work than I do currently when I receive a language update.
Image

User avatar
andythenorth
Tycoon
Tycoon
Posts: 5233
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NewGRF Translator

Post by andythenorth »

You could probably get your compile script (?) to use nml lang files? NFO versions of my projects had something similar, with the strings in their own file.

User avatar
mart3p
Tycoon
Tycoon
Posts: 1032
Joined: 31 Oct 2005 21:00
Location: UK

Re: NewGRF Translator

Post by mart3p »

andythenorth wrote:You could probably get your compile script (?) to use nml lang files?
Yes that would be even better. :) I'm going to have to learn python. :wink:
Image

User avatar
Snail
Tycoon
Tycoon
Posts: 1243
Joined: 28 Apr 2003 18:52
Contact:

Re: NewGRF Translator

Post by Snail »

Actually, having this compatible with NFO would be really helpful. Not everyone is using NML...
The French Narrow Gauge Train Set is now released! Get it here

User avatar
andythenorth
Tycoon
Tycoon
Posts: 5233
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NewGRF Translator

Post by andythenorth »

mart3p wrote:Yes that would be even better. :) I'm going to have to learn python. :wink:
I have a (very dirty and fragile) script that parses NML strings in some of my sets.

You need parse_base_lang in the file linked below. It only parses english currently, but could be passed a list of known lang files.
http://dev.openttdcoop.org/projects/fis ... c/utils.py

The output is a dict in form {STRING_ID: string}. This could easily then be rewritten to an nfo language format.

That parse_base_lang method doesn't write anything out to a file, but there are examples for that in the render_docs (line 118) here:
http://dev.openttdcoop.org/projects/fis ... er_docs.py

Give me a shout if you want help :)

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 13 guests