Development - Translations
Bluefish has been translated into more than 15 different languages and this is only the beginning.
Translation process is not a difficult task but you will need some time because there are more than one thousand strings to be translated. The good news are you don't need to be a programmer to make Bluefish speak your language and the only tool you need is a text editor (Vim, Emacs, bluefish, etc.)
Bluefish uses po (Portable Object) files. A po file is just a plain text file that you can edit with your favorite text editor.
8.2. PO files basics
In a typical po file there are five major types of entries:
- Those which begin with "#:" showing the places in the source code that contains the string being translated (there may be one or more) as: '#: ../src/about.c:123'
- Those which begin with "#," containing some flags (not always present) as: '#, c-format'
- Those which begin with "msgid" containing the English string being translated (it may be spanned in several lines) as: 'msgid "Authentication is required for %s."'
- Those which begin with "msgstr" containing the translated string as: 'msgstr "Une autorisation est requise pour accéder à %s."'
- Those which begin with "#~ " containing obsolete strings as: '#~ msgid "Save document as"'
You have to make sure the translation is correct and then delete either the "#, fuzzy" line if this is the only flag on the line, or the ", fuzzy" part of the line if there are some other flags on the same line, like in "#, fuzzy, c-format".
As far as obsolete strings are concerned, it is up to you to decide if you want to remove them. On one hand they can be reused in a latter version of the po file, on the other hand they make the po file bigger.
Hence, your task as a translator is to:
- Translate all empty msgstr entries
- Check all fuzzy entries, correct them if they are wrong and remove all fuzzy tags
- Optionally, remove obsolete strings
- Check that the po file ends with a blank line
8.3. Shortcut keys
Shortcut keys, known as hotkeys or even accelerator keys, are defined as follows (look at the underscore, please):
# src/toolbars.c:482 #: ../src/filebrowser.c:1453 msgid "/_Refresh" msgstr "/_Actualizar"
It means that in the English locale the user have to press Alt+R to activate this particular GUI element. On the other hand if your locale is Spanish your shortcut key will be Alt+A.
8.4. How to contribute
It is really easy. Just drop me a line at wecharri(at)arnet.com.ar and I will send you your po file ready to be translated. When you have finished the translation work, just send it me back (use gzip or bzip2 if possible, please). Then I will check it and if everything is right I will add it into SVN.
About ten days before a new release I will send a new fresh po copy to each translator to repeat this process.
All po files will be named as follows:
date-foo.po.gz (date: day-month-year)
12-12-2004.es.po.gz (for Spanish po file)
- Do not rename it (I need it for tracking stuff)
- Send it me back as soon as possible in zipped format too.
- Do not mix it without any local copy you have.
- Remember they are in UTF-8 format
- Subject in my mail will be ***New Bluefish PO File !***
And at last, do not start a new translation before contacting me or contact Olivier and do not post your po file at the list, please.
If you have some doubts, do not hesitate contact me at wecharri(at)arnet.com.ar.