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

Eddi
Tycoon
Tycoon
Posts: 7503
Joined: 17 Jan 2007 00:14

Re: NewGRF Translator

Post by Eddi »

or you could make a dummy NML file that just uses all strings in one switch, then use nmlc to convert that to NFO, and use that in your NFO project ... :p

(the switch is necessary, because nmlc "optimizes out" unused strings)
You might not exactly be interested in Ferion, but if you are, have fun :)

michael blunck
Tycoon
Tycoon
Posts: 5880
Joined: 27 Apr 2005 07:09
Contact:

Re: NewGRF Translator

Post by michael blunck »

Snail wrote: Actually, having this compatible with NFO would be really helpful. Not everyone is using NML...
... and devzone has some murky policies.

But o/c we could always set up another web-based translation service for nfo- or m4nfo-based sets, if that would be a requirement.

regards
Michael
Image

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

Re: NewGRF Translator

Post by Alberth »

Snail wrote:Actually, having this compatible with NFO would be really helpful. Not everyone is using NML...
So far the primary goal was to get this running. Together with my total lack of NFO knowledge, some available NML knowledge, and popularity of NML, it was logical to aim for that first.

Already during development I realized that NoAI language files, and NoGS language files (if they exist) would be interesting too. I somewhat separated the nml specific parts from the other code, although it is probably not perfect by any means. This would be one path, at least in theory.
I don't know what NFO language files can express or how different it is from nml language files. Ideally, it should hide all differences between nml language files and nfo language files to the translator, making the interface agnostic for the language used to write the newgrf. Depending on how big that gap is, this may be very complicated.

Another route is to convert nfo language files to nml syntax before giving them to eints, and do the reverse when getting them back from eints. The gap is just as large than, but it's probably in a limited area, so perhaps easier to achieve.


As for running your own translation service, sure, go ahead. Eints currently has a development mode (not usable in production), and a redmine interface to the user/project DB. Unless you use redmine, you likely need to write a user/project authentication Python3 file to attach eints to whatever system you use. There is also a batch-oriented up/download script for getting/putting language files between a project and eints. All program code we wrote is GPL-licensed. There are also some other libraries included, you'll have to look in the manual to check their license.

TadeuszD
Transport Coordinator
Transport Coordinator
Posts: 330
Joined: 07 Nov 2011 19:32
Location: PL

Re: NewGRF Translator

Post by TadeuszD »

I've added the user "eints" as a member of my project (Polish PKP Set 2.0) and I've created .devzone/translations/repo2einst file, but... nothing happened. :(
Have I forgot about something?
Image

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

Re: NewGRF Translator

Post by Transportman »

TadeuszD wrote:I've added the user "eints" as a member of my project (Polish PKP Set 2.0) and I've created .devzone/translations/repo2einst file, but... nothing happened. :(
Have I forgot about something?
Did you give eints the role of "Translation Manager"?

Also, on the Settings -> Information tab, is Inherit Members checked? If you check that, your project will automatically inherit the members of the NewGRF group, which are all the translators that signed up through the Dev Zone Help Center.

Also, eints does not automatically update the translations in your project, you need to add another file to your project:
ManagingEints wrote:Automatic daily commit of translation changes

To make Eints automatically commit translation changes every day at 17:47 UTC before your nightly build, add an empty file to your repository, named ".devzone/translations/eints2repo"
Note: Eints exports complete language files with unified formatting. So, if you enable eints commits for the first time, the first commit will likely touch all translations
[EDIT]You indeed have eints as "Translation Manager", so that is correct[/EDIT]
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

TadeuszD
Transport Coordinator
Transport Coordinator
Posts: 330
Joined: 07 Nov 2011 19:32
Location: PL

Re: NewGRF Translator

Post by TadeuszD »

Transportman wrote:Also, on the Settings -> Information tab, is Inherit Members checked?
No, this option is not checked. I've added to myself the role Translator pl_PL. This is not enough?
Image

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

Re: NewGRF Translator

Post by planetmaker »

Your settings look correct. Maybe webtranslator barfed on your project name (which it shouldn't). We had fixed some name validation with "Dutch Trains 2", so maybe that came back in a similar manner. We'll have a look.

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

Re: NewGRF Translator

Post by Transportman »

TadeuszD wrote:
Transportman wrote:Also, on the Settings -> Information tab, is Inherit Members checked?
No, this option is not checked. I've added to myself the role Translator pl_PL. This is not enough?
If you want to be in control of who is translating your project you should leave the setting off and manually add translators to your project. It's just what you want.

But I see that your project is not showing up in the list at all, so I guess it is something else, maybe the bug Planetmaker is mentioning?
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

TadeuszD
Transport Coordinator
Transport Coordinator
Posts: 330
Joined: 07 Nov 2011 19:32
Location: PL

Re: NewGRF Translator

Post by TadeuszD »

planetmaker wrote:Maybe webtranslator barfed on your project name (which it shouldn't). We had fixed some name validation with "Dutch Trains 2"....
I can change the name of my project (without the dot in the name) but I'm afraid about another consequences. i.e. the name of my NewGRF should be changed on bananas too...
Image

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

Re: NewGRF Translator

Post by planetmaker »

TadeuszD wrote:
planetmaker wrote:Maybe webtranslator barfed on your project name (which it shouldn't). We had fixed some name validation with "Dutch Trains 2"....
I can change the name of my project (without the dot in the name) but I'm afraid about another consequences. i.e. the name of my NewGRF should be changed on bananas too...
Don't worry, we can solve this on the eints level; I consider that a shortcoming, or rather a 'being too strict', with the validation of project names. It only needs what I said earlier and Transportman pointed out in detail, not a big thing.

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

Re: NewGRF Translator

Post by frosch »

Albert fixed the issue, I updated the server: Polish PKP Set 2.0 is now available :)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁

TadeuszD
Transport Coordinator
Transport Coordinator
Posts: 330
Joined: 07 Nov 2011 19:32
Location: PL

Re: NewGRF Translator

Post by TadeuszD »

frosch wrote:Albert fixed the issue, I updated the server: Polish PKP Set 2.0 is now available :)
Thank You very much! :)

Unfortunatelly, I found another issue. Pushing files to the repository ends with "authorization error" if I have the role Translator pl_PL active. I need to disable the translator role to work around the problem.
Image

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

Re: NewGRF Translator

Post by Alberth »

So redmine or the hg authentication script thus seems to get confused with its roles. This sounds like a devzone issue rather than an eints issue.
I have seen other people having similar problems, maybe your information is the key to finding the root cause.

There is also an open eints issue about project owners not being owners according to eints, so some more work on roles and their interpretation is waiting :)

Thanks for your report.

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

Re: NewGRF Translator

Post by Transportman »

Alberth wrote:There is also an open eints issue about project owners not being owners according to eints, so some more work on roles and their interpretation is waiting :)
Is that the reason the Project Settings button is not working? Or at least, I can't access the Project Settings page for the Dutch Track Set, despite being the Manager of that project. Or is that button not meant for project 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 have added dummy NML language files to ISR and eints seems to be working nicely. :)
andythenorth wrote:I have a (very dirty and fragile) script that parses NML strings in some of my sets...
Thanks Andy. Some of that code should give me a good start.
Eddi wrote:or you could make a dummy NML file that just uses all strings in one switch, then use nmlc to convert that to NFO, and use that in your NFO project ... :p
Thanks Eddi. That would also work. I think a python script might be a bit more flexible so I'm going to try Andy's way first.
Image

Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: NewGRF Translator

Post by Supercheese »

Transportman wrote:Is that the reason the Project Settings button is not working? Or at least, I can't access the Project Settings page for the Dutch Track Set, despite being the Manager of that project. Or is that button not meant for project managers?
In order to manage eints Project Settings, you have to be a Translation Manager, not just a Manager.
Last edited by Supercheese on 11 Sep 2013 18:34, edited 1 time in total.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton

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

Re: NewGRF Translator

Post by Alberth »

Supercheese wrote:
Transportman wrote:Is that the reason the Project Settings button is not working? Or at least, I can't access the Project Settings page for the Dutch Track Set, despite being the Manager of that project. Or is that button not meant for project managers?
In order to manage eints Prokect Settings, you have to be a Translation Manager, not just a Manager.
At the moment indeed. I do think it is the wrong solution for the problem though, you should have to change/add role for such things.

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

Re: NewGRF Translator

Post by planetmaker »

I also have a question regarding the NewGRF Web Translator:
I had a .txt file directly translated from the en_GB file. I saw a 'upload translation' button, but didn't manage to pass the login. So I copied/pasted each string one by one, which was a bit dull (moreover, when clicking 'next string', the following string would not be the next in the .txt file, but rather a totally random one).

So my question is: Is there a way to upload a translated file directly? Or is there an easier way to input the strings?
No, there's no way for normal translators to upload a complete file. Only the "translation manager" of a project may do so - or of course any person with commit access can commit anything, including language files. We consider that a managing activity which we'd leave to the project owners, you could ask them to commit the whole file in one go in those cases.

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

Re: NewGRF Translator

Post by frosch »

An update about the permissions and roles confusion.
  • If you do not have enough permissions, you are now redirected to the overview page with a message "access denied", instead of asked again for a password.
  • Because not every translator has access to every project, there is now a filtered overview page (via 'Profile' link in the top-right), which lists only stuff you have permission for.
Anyway, I guess we will add some more roles, so Managers can also edit translations. But that is not done yet.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁

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

Re: NewGRF Translator

Post by GunChleoc »

frosch wrote:Because not every translator has access to every project, there is now a filtered overview page (via 'Profile' link in the top-right), which lists only stuff you have permission for.
It might be good to list these anyway, so a translator can request permissions if he/she wants to contribute to more projects. Maybe a separate list for this?

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google Adsense [Bot] and 24 guests