EPUBCheck Developer Guide

Translating EPUBCheck

EPUBcheck is a fundamental piece of the digital publishing chain, that's why from EPUBCheck 4.0 we added i18n support.

§ Contribute new languages

§ via Transifex (preferred way)

We use Transifex as translation management system 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 the Transifex 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 a separate Bash script which wraps the Transifex Commandline Client and normalizes the message properties files upon a transifex pull.

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

Next you need to set up your Transifex API key in ~/.transifexrc:

[https://www.transifex.com]
api_hostname=https://api.transifex.com
hostname=https://www.transifex.com
password=FILL_IN_YOUR_API_KEY_HERE
username=api

Then you need to run the wrapper script from EPUBCheck repo root directory!
e.g. ./src/build/transifex-pull.sh --all

usage: transifex-pull.sh [--all | <locale>]
examples:
  transifex-pull.sh --all
  transifex-pull.sh de
  transifex-pull.sh ko_KR

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) add the --locale xx_YY argument added with EPUBCheck 4.1.0 to your java or mvn commandline call – e.g. java -jar epubcheck.jar --locale pt_BR test.epub 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.

§ Report typos and fixes

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

§ Current translations and its (initial) maintainers: