Translation Howto

Introduction

You find Wiclear is a good piece of soft and you find it easy to use, but alas, it is not traducted in your language. This should not be very hard to translate it to your language if you're willing to do it.

Partially translated interface

If this is an existing lang, contact the author or the mailing list. If the interface is partially traducted, that means somebody is already translating it. You can bring in your help because the person may be busy or because it has stopped translating.

Unknown language

Nobody has ever contributed this language. You can start right now contributing one, but better ask to the author or the mailing list if nobody's already doing it (this will avoid duplication of works and frustration)

Tools needed

  1. wiclear package
  2. perl
  3. a text editor

Preparing for translation

  1. Go to wiclear/i18n/
    $> cd wiclear/i18n
    $> touch es.lang
  2. launch the perl script to update translation strings from PHP source files
    $> ../scripts/create_translation_template.pl ../inc ../themes/
    All translation files have been updated to newly/modified found strings. As I do not like full automatic update, .lang.new files have been created instead of directly trashing old .lang files.
     $> ls es.*
     es.lang
     es.lang.new
         
  3. Launch your favorite text editor and contribute missing translations

Terminology

BNF like syntax

A .lang file has the following syntax
 IGNORE_PERL_STYLE_COMMENTS ON
 FILE := (TR_NODE)*

 TR_NODE :=
   '[' STRING_TO_TRANSLATE ']' '
' TRANSLATION '
' '
'

 STRING_TO_TRANSLATE :=
   STRING

 TRANSLATION :=
   STRING
 |
   EMPTY_STRING
 

Example :

 $> cat fr.test.lang
 [Welcome]
 Bienvenu

 [You must enter a comment]

 #Fuzzy
 [EMail]
 EMail
 $>
 

Comments

Comments can be inserted in the file. Comments start with a '#' and ends with the ends of the line.

Untranslated string

If the translation string is empty (like in "You must enter a comment" in the example), then the string is untranslated.

Fuzzy strings

Fuzzy strings are marked with a "Fuzzy" comment by the script. That means the original string has changed and the script has not found an exact match in the current lang file. So it tried to find a partial match using a dummy heuristic (currently, it's the string which at least contains 70% of same words)

Sending the lang file

Make sure you have a recent version of Wiclear (use tla !), don't wait to complete the translation, but send the lang file each time you make some progress (e.g : each night before going to bed ! :-). This allows to work in parallel and have other users benefits from your work early.

Thank you !


Generated on Mon Feb 19 19:11:58 2007 for Wiclear by  doxygen 1.4.7