Translation tutorial

Thank you for your interest in contributing a translation to infinity. This page will teach you how.

Historical note: infinity is based on a project called vichan (pronunced 6chan) which is in turn based on an older, abandoned project called Tinyboard. Vichan uses a service called Transifex to translate their files. In earlier versions of infinity, I decided to just keep using the vichan files because the only substantial source of new strings was the homepage and the Board configuration page, neither of which were displayed to board users so the existing set of translations worked. However, as time went on and more scripts and features were contributed, strings became out of sync. I originally intended to create 8chan a Transifex account, but Transifex charges for something as simple as bulk imports, so we will use this slightly more complicated process instead. Further, despite how much their charismatic CEO tried to sugarcoat it, the Transifex company abandoned their open source repository and became proprietary software, and then immediately put limits on imports/exports. Please see this page from the Free Software Foundation for more about the philosophy behind this and the dangers of trusting SaaS with your data. Who does that server really serve?

Some of my criticism of Transifex was not accurate, I apologize. You are free to either use Transifex or follow the steps below. Here's our Transifex team page

infinity uses gettext files for translation. This is what allows us to have boards in many languages on the same site, such as /argentina/ in Spanish, /deutsch/ in German and /japan2/ in Japanese. gettext files have the .po file extension. You can edit PO files by hand, but I highly recommend using POEdit. It is very easy to make syntax errors without POEdit or similar software.

  1. Install POEdit. POEdit is free software available for Mac, Linux and Windows.
  2. Find your translation file. Go to our Github project, and in the files list click "inc", then "locale". You will see a list of languages. It's usually self explanatory which code is for which language, but if you're not sure you can check the GNU project's list of usual language codes and search for your language.

If your language is listed and you want to update the translation:

  1. Download the .po files. tinyboard.po contains the strings generated by PHP, like "Comment", "Name", et cetera. javascript.po contains the strings generated by JavaScript, like all the fields under [Options]. You can translate one or both. For example, here is the French translation of tinyboard.po. To download it, click "Raw" and then save the file to your computer.
  2. Click "Edit a translation" in POEdit. Navigate to the file you downloaded, fill in the translation boxes and save your file.

If your language is not listed and you want to add a translation for it:

  1. Download the en English .po file. (Tip: If, for example, you want to create a new Spanish dialect translation when Spanish (Spain) already exists, download es_ES and use that as the template.)
  2. Click "Create a new translation" in POEdit and select the po file you downloaded as the template file.
  3. Select your language from the dropdown when prompted.

Tip: If you would like to attribute your translation to you, you can change your Name and Email in Preferences.

Another tip: You might find that a string you want to translate is not in the files. Don't panic, I accidentally forget to put strings in {% trans %} tags and _() gettext function all the time so gettext doesn't catch them. Just email me and tell me where I forgot and I'll add it and update tinyboard.po/javascript.po. Some strings I don't want to add for legal reasons. Those are the ones at the bottom including the copyright notice.

Once you are done translating, save your .po file in POEdit and send it to admin@8chan.co, or, if you know how, open a pull request on Github with your translated file. Make sure to put the language you translated to in the subject of your email. Thanks in advance for your contribution!