ManagingEints

Overview

Eints is a Translation tool, which allows easy translation for GameScripts and NewGRF projects using NML. Support for NewGRF using NFO can be done with some magic (see Industrial Stations Renewal).

Eints can interact with Mercurial repositories hosted on the DevZone. (While other repository types can be supported if needed, external repositories won't work; at least not for pushing to the repository.)

If enabled, Eints will read commits from the repository automatically and update the base language and all translations in the Translator when stuff changes in the repository.

You can approve translators to your project, who can then login to Eints and update their translation. Eints keeps track of changes to translations, validates translations and offers several analysis tools to translators.

If enabled, Eints will also push all translation changes automatically to your repository every 24 hours, which is useful if you have nightly builds enabled.
However, if automatic commits worry you, you can also manually download the translations to your local computer, and commit them yourself the usual way. This might be useful if you (only) want to update translations before every release, and not on a daily schedule. There is also a Python tool (lang_sync) available to automate downloading of all languages to your local checkout.

Signing up as translator

If you want to become a translator for a specific language, please request membership via http://dev.openttdcoop.org/projects/home

After being granted access, you can then login at https://translator.openttdcoop.org and have fun.

Enabling the WebTranslator for your project

Creating project and configuring Eints to fetch updates from the repository

  • Make the user "eints" a member of your project and give it the role "Translation Manager" (it must be exactly this role).
  • Add a file to your repository, named ".devzone/translations/type". It should contain either the line "newgrf" (default) or "game-script".
  • Add an empty file to your repository, named ".devzone/translations/repo2eints"

After these two steps Eints should create a project in the WebTranslator at https://translator.openttdcoop.org and upload all present translations within 5 minutes.

Unusual repository layouts or base languages

By default Eints assumes that the base language is en_GB, and that all language files are in folder "lang" relative to the repository root. If your project differs from these values, you can supply different values via following files:
  • ".devzone/translations/langdir": Put the relative path to the language folder into this file. E.g. "lang"
  • ".devzone/translations/baselang": Put the ID of the base language into this file. E.g. "0x01"

Appointing translators

There are two methods to appoint translators to your project depending on how much micro management you want.

Grant access to all centrally signed up translators

The "NewGRF" resp. "Game Scripts" project, which is superordinate to all NewGRF resp. GameScript projects, has a central list of translators, which is maintained by the DevZone administrators. Translators can apply to become member of this list, they are all members of http://dev.openttdcoop.org/projects/grfdev resp. http://dev.openttdcoop.org/projects/gamescripts

You can grant all translators of this project access to your project by enabling the "Inherit members" setting of your project. This basically means that you won't have to bother about granting any access rights to any translators anymore, access is managed centrally.

This method is the easiest for everyone.

Manually granting access to specific translators

If you want to retain rights for a specific language and do not want to allow centrally appointed translators onto your project, then you can alternatively add single users or groups of users manually.

To give a single user 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.

You can also grant access to the users "Translator <iso-code> (language name)", which is the centrally managed list of all translators for a language.

For completeness sake:
  • The role "Translator" without any iso-code has no meaning to your project. It is only used for administrating the DevZone, where it is used as a template role to configure permissions for all Translator roles.
  • The role "Translation Manager" has read/write/delete access to all languages. Eints needs this role, and if needed you can also assign it to yourself and other Managers.

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
  • Strings are reordered to match the base language.
  • Line endings will use Unix style \n.
  • If you want to keep other line endings, you can use the http://mercurial.selenic.com/wiki/EolExtension to specify a line ending for the language files.

Manual download of all translations

To manually download all translations to your local machine, you can use the script "lang_sync", which is available in the Eints project (https://dev.openttdcoop.org/projects/eints/).

Translator credits

If eints commits translation changes to your repository, it lists the involved translators in the commit message. These credits can be accumulated automatically. Note:
  • The generated file only contains translators from eints commits. If you added translations via commits (before eints existed, or for other reasons), you have to add them yourself.

Administration of the Eints WebTranslator

Generally check /home/eints/readme.txt