Skip to content

Translations

Bajusz Tamás edited this page Nov 30, 2020 · 9 revisions

Introdution

This page intends to help people translating PyChess for their native language through a service named Transifex.

Getting started

PyChess page in Transifex is https://www.transifex.com/gbtami/pychess-variants/. In this page you can see the status of current translations.

To start translating, you'll need a Transifex account. Go to https://www.transifex.com/accounts/signin/?next=/home/

For more information see Getting Started.

Tips

Variabilized strings are marked differently in server (.py .html) and client (.js) side code because they use different tools for translation.

Strings coming from .js code may look like "%1 game in play"

Strings coming from .html code may look like "1%(count)s game"

Plural forms need special attention. Example translation of "%1 hour ago" and "%1 hours ago" %1 hour ago %1 hours ago

You have to preserve the "%1 " and "1%(count)s " parts unmodified in your translations (including trailing space!)

Developers

  1. Never mark variant names translatable!

  2. Never commit translations to GitHub /lang/xy/LC_MESSAGES/*.po files! We always update translations from Transifex.

  3. On server side PyChess uses Babel to mark strings translatable in Jinja2 templates. You can read about it here

  4. On client side PyChess uses gettext.js

Clone this wiki locally