Translating

Tobias Fischer edited this page May 17, 2016 · 3 revisions

Translating EpubCheck

EpubCheck 4.0 now comes with i18n support. Feel free to translate the Java messsage property files to your language and then open a Pull Request or Issue here.

Current translations and its (initial) maintainers:

Report typos and fixes

If you think the EpubCheck messages in your language need some improvement, please open a new Issue on GitHub and/or contact the localization maintainer (see list above).

Contribute new languages

via Transifex (prefered way)

We use Transifex as translation management system (see original PullRequest #479 for details) and we encourage you to join Transifex if you'd like to contribute a new language.

To do so, or to improve an existing one, please join Transifex and the epubcheck project on Transifex, request a new language and start translating the messages in their web app.

Testing

To test your changes in a development environment you need to set up the epubcheck Java repository (plus install Apache Maven, see Build for details) and install the Transifex commandline client.

Since the transifex file format and the commandline client have some issues (see 'TODOs' in #479) we have separate Bash script which wraps the Transifec Commandline Client and normalizes the message properties files on transifex pull.

To run this script you need to have a Transifex account and install the Transifex Commandline Client!

You need to run this script from the repository's root directory! e.g. ./src/build/transifex-pull.sh --all

usage: transifex-pull.sh [--all | <2-digit-country-code>]
examples:
  transifex-pull.sh --all
  transifex-pull.sh de

Note for Windows users: You need a Bash Console like Cygwin, GitBash, etc. installed in order to run the epubcheck transifex client!

Pull Request

When you're finished with translation, please open a new Issue(!) on GitHub and assign @tofi86.

@tofi86 also coordinates the Transifex localization project and can answer your questions about it.

Alternative: manual translation

If you don't want to join Transifex you can manually translate EpubCheck messages. Simply duplicate the original (english) message files (MessageBundle.properties or messages.properties) located in

to MessageBundle_XX.properties or messages_XX.properties in its respective folder and start translating.

Testing

When testing your translation on a system whose locale doesn't match the translation locale (e.g. translating pt_BR on a en_US system), try adding -Duser.language=xx -Duser.country=XX to your java or mvn commandline call – e.g. java -Duser.language=pt -Duser.country=BR -jar epubcheck.jar test.epub for trying to test your new 'brasilian portuguese' translation.

Pull Request

When you're finished with translation, please send us a PullRequest with your changes and assign @tofi86.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.