Translating web pages

Short Step by Step Guide

This little guide should only be used if you already know the background of translations: How our pages are generated, how to find out which translations are missing or outdated and so on.

In this example, we want to translate https://fsfe.org/contribute/spreadtheword.en.html into Spanish.

  1. Scroll down the page which you want to translate and find "Source code" in the footer.
  2. Download the .xhtml file (in this case https://fsfe.org/source/contribute/spreadtheword.en.xhtml).
  3. Write a short e-mail to translators@fsfeurope.org (you should already be subscriber of this mailing list) and tell them that you start with the translation.
    Please open for each new page a new thread and add your two letter Language Code in the subject.
  4. Open the downloaded file with a text editor (gedit, Kate, Mousepad etc on Free operating systems, Notepad++ on Windows).
  5. Translate all english text outside the html tags into your language. For example:
    <p>Hi there, please visit <a href="https://fsfe.org">our website</a>.</p> should become
    <p>Hallo, bitte besuchen Sie <a href="https://fsfe.org">unsere Webseite</a>.</p>
    Please change the two letter Language Code of the translated file from "en" to the one of your language (for example Spanish = "spreadtheword.es.xhtml").
  6. Afterwards, please reply to your thread in translators@fsfeurope.org and ask other people to proofread your file. If everybody agrees, it will be uploaded by others on the mailing list.

Detailed guide: Understanding how the web pages are built

The web pages of fsfe.org are maintained as a set of XML files. The web server generates the HTML pages from these XML files automatically every ten minutes. Consequently, all editing of the pages is done in the XML files, and the HTML is never edited directly.

Every page on fsfe.org is named pagename.language.html (language being the two-letter ISO-639-1 code of the language, like "en" for English or "de" for German). The source files are named pagename.language.xhtml.

Some pages have a dynamic part. Apart from the fixed texts taken from the XHTML file, they include information from one or several XML files. Whenever such a page is built, the build system takes the translated XML files where available, and falls back to the English version of those XML files that have not yet been translated. This way, such pages can end up with parts of the text being translated and other parts still showing in English. Examples of such pages include the start page, the news page, and the events page.

Everybody can contribute translations

All source files (i.e. all XHTML and XML files) are publicly available for download, so everybody can spontaneously contribute a translation without having to register anywhere. However, whenever you start a translation and expect it to take longer, please write a short note to the Translators mailing list to avoid that somebody else starts to work on the same text simultaneously.

Contributing missing translations

If you have a page open in your web browser that has not yet been translated to your language, scroll to the end of the page, click on the Source code link and save the file you get there. You will get the English XHTML file. Rename the file to carry your language code instead of the "en" code, and open it in a text editor. Now, translate all text in the file that is outside the "<…>" marks; do not change anything inside these marks (the text inside the marks are XHTML commands that influence the structure of the resulting web page).

At the end of the file there will be a line saying </html>. Immediately above this line, add a line saying <translator>your name</translator>.

When you are done, send the translated file to the Translators mailing list. Other members of this list can proofread the translation, and somebody on that list will ultimately post it to the server.

Updating outdated translations

If you have a page open in your web browser of which the translation is outdated (indicated by a note at the top of the page), scroll to the end of the page, click on the Source code link and save the file you get there. This file is the (outdated) translated version. Next, use the English link at the top of the page to jump to the English version of the page and click on the Source code link there, too. The file you get there is the (up to date) English version. Now you can compare both files and update the translation. Please notice that everything inside the "<…>" marks may not be translated.

Alternatively, you may also use the web-based source repository on the fsfe-web trac site to create diffs, and to see the latest updates for all source files.

When you are done, send the translated file to the Translators mailing list. Other members of this list can proofread the translation, and somebody on that list will ultimately post it to the server.

Finding out what needs work

There is an autogenerated list of all languages available. On that page, each language code is a link to a separate page that lists all outdated and missing translations for that language.

The list of outdated translations provides an extra feature helpful for updating: you can not only downlad the (outdated) translated file and the (up to date) English original; you can also view the changelog of both files, a protocol of all modifications done to the respective file. Comparing the two changelogs usually makes it easy to find out which parts of the original were altered since the translation was last updated.

This translation status page is also the only way to download the XML files that are built into the dynamic pages, like files containing news items or event entries.

Downloading the complete source file tree with subversion

If it is possible for you to use subversion, you can also download the complete source file tree at once. Please see the FSFE webmaster information page for detailed instructions.