Localization mechanism.
Frederick Ros
sl33p3r at free.fr
Sat Nov 19 06:19:27 EST 2005
Hi all,
Just a quick mail to indicate that I've introduced a new localization
mechanism in order to ease the work of translators.
For the time being it's on rubyforge CVS, in the wpgtr-intl module
(instead of the wpgtr). I do not know if why is planning to use it/move
it to subversion, but I think that it could help the work of
translators.
To start a new translation you'll need to create 2 files: the YAML file
for the book, as well as a ruby file for the localization object.
Let's suppose I want to translate the book to French. I will create the
files:
- poignant-fr.yml: with translation of the book, using the same YAML
markup as the original book (renamed
poignant-en.yml by the way)
- localization-fr.rb: this file contains the following stuff:
Localization.add( 'fr' ) {
next_page "suivante"
previous_page "précédente"
encoding 'ISO-8859-15'
locale 'fr'
turn_page 'Tournez la page'
header_title 'Le guide <span class="hilite">(poignant)</span> de
why vers ruby'
}
i.e all the local stuff needed by the Erb files.
Then by calling:
rake fr ../poignant-site
I'll generate the HTML pages for the French translation in
../poignant-site/fr.
Note that calling
rake all <path>
will create all localizations in <path> (i.e. <path>/en , <path>/fr ...
Hope it will ease the tasks of the translators.
By the way the 1st 3rd chapters of the French translation are available
in the CVS (I did not yet find tile to publish them on my site in the
nice way).
Best Regards,
--
Frederick Ros aka Sleeper -- sleeper at jabber.fr
Use data arrays to avoid repetitive control sequences.
- The Elements of Programming Style (Kernighan & Plaugher)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/poignant-translators/attachments/20051119/6fa2f372/attachment.bin
More information about the poignant-translators
mailing list