Translation

From Freenet Wiki
Jump to: navigation, search

Contents

FProxy

Improving a translation or adding a new languange

Transifex

We have a Transifex project.

Translating over Freenet

If you don't want to use Transifex, Freenet has support for writing translations.

To begin a translation for a language which is not yet included, do this first
  1. Go to Configuration > Core settings.
  2. Under "The language Freenet will use to display messages" select "unlisted".
  3. Click "Apply".
To edit a translation
  1. Go to Configuration > Translation.
  2. Update translations as desired with the "update the translation" links.
To submit your translation to the developers
  1. Go to Configuration > Translation.
  2. Click "Download your translations file".
  3. Contact the developers:
    1. IRC
    2. Mailing list
    3. Pull request

List of FProxy translators

Please add yourself to the list if you start working on a translation.

language contact status
Chinese yongjhen <yongjhen@alqualonde.freemail>  ??
Danish mastersrp <mastersrp@t3hgamer.freemail> ??
Dutch ?? ??
Farsi ?? ??
Finnish ?? ??
French Morrio Started
German ?? ??
Italian ?? ??
Japanese koriiroxx on Freenode <korii.roxx@gmail.com> Started
Norwegian ?? ??
Polish ?? ??
Russian NightAn <rdp21122012@gmail.com> ??
Slovak ?? ??
Swedish ?? ??

See here for string updates.

Windows installer

Translations for the Windows installer is managed in the beta branch of the wininstaller-staging tree in git. You can either update translations directly into the tree, or mail them to the developer mailing list.

List of existing translations: https://github.com/freenet/wininstaller-staging/tree/master/src/include_translator (look for "Include_Lang_<id>.inc" files)

Updating an existing translation: Update the existing translation file located at https://github.com/freenet/wininstaller-staging/tree/master/src/include_translator

Creating a new translation: Please read the "Getting started" guide inside the translation template at https://github.com/freenet/wininstaller-staging/blob/master/src/include_translator/TranslationTemplate.inc

Linux/Mac installer

To translate the Linux/Mac installer, please do as following:

  1. Get the l10n file associated to the language you want to translate to from : https://github.com/freenet/java_installer-staging/tree/master/langpacks
  2. Translate the strings, taking care of NOT breaking the encoding specified on top of the file.
  3. Ensure that the following ids are defined:
   <str id="base.description" txt=""/>
   <str id="license.description" txt=""/>
   <str id="windows.description" txt=""/>
   <str id="unix.description" txt=""/>
   <str id="uninstall.description" txt=""/>
   <str id="autoupdater.description" txt=""/>
   <str id="stun.description" txt=""/>
   <str id="librarian.description" txt=""/>
   <str id="jsite.description" txt=""/>
   <str id="frost.description" txt=""/>
   <str id="thaw.description" txt=""/>

Finally, send the file to devl at freenetproject dot org

Website

To translate the website, you need to download the current copy at: http://github.com/freenet/website-staging
You can either use git, or click on the "download source" button on the top right of the page.

Once done, you'll see this file tree:

  • images/
  • includes/
  • js/
  • legacy_pages/
  • pages/
    • de/
    • en/
    • fr/
    • sv/
  • papers/
  • ss/
  • ...

If you're updating a translation, there is almost nothing to do. Just go under pages/language/ and update the page you want to. Then, if you have write right, commit your changes, or if you don't, send us the file to devl at freenetproject do org.

If you're creating a new translation, create a new directory under pages/ (for instance, pages/es/). Then, copy all the files from pages/en/ to the newly created directory.
Then, for each file you have translated, you need to change the corresponding .inc.php file located in the includes/ directory. Let's see an example:
Let's say I translated the index.php file in french. In the includes/ directory, I see the index.inc.php file. Here is what it looks like:

<?php

$pages = array(

'en' => 'pages/en/index.php',
'sv' => 'pages/sv/index.php'

)

?>

I have to add a 'fr' entry. So, the file will look like this:


<?php

$pages = array(

'en' => 'pages/en/index.php',
'sv' => 'pages/sv/index.php', // DON'T FORGET THE COMMA
'fr' => 'pages/fr/index.php'

)

?>

If this language is not yet visible on the site, it must also be added to the "lang" div in index.php and the "for lang" line in make-pages.sh.

Now, it's done. The system know that he have to look in pages/fr/index.php if the requested language if french. Once all that is done, contact us to submit your changes.

Useful resources

Personal tools