[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Request for Duration library localizations

Matthew Harris

12/21/2007 2:30:00 PM

If you speak another language and would like to contribute to the
Duration library, you can contribute largely by writing short
translation files!

You can install Duration like-so:
$ gem install -r duration (may need to be root)

The default English localization can be used as a sample reference to
building your own. Currently there are two localizations, English and
Korean.

The English localization can be found at:
http://pastie.caboo...

Thanks in advance to anyone who comes up with translations :)
Also, since I can't verify the correctness of anyone's translations, I
would also appreciate any feedback it (because I only speak two languages).

--
Matthew Harris
http://matthew...


5 Answers

I. P.

12/21/2007 5:44:00 PM

0

|Matthew Harris|

MH> The English localization can be found at:
MH> http://pastie.caboo...
Other languages may have more than 1 plural form. See for example
http://archives.mandrivalinux.com/cooker-i18n/2006-12/ms...

--
I. P. 2007-12-21T20:42


F. Senault

12/21/2007 9:04:00 PM

0

Le 21 décembre 2007 à 15:30, Matthew Harris a écrit :

> The default English localization can be used as a sample reference to
> building your own. Currently there are two localizations, English and
> Korean.

French is quite straightforward :

class Duration
module Localizations
# French localization
module French
LOCALE = :french
PLURALS = %w(secondes minutes heures jours semaines)
SINGULARS = %w(seconde minute heure jour semaine )
FORMAT = proc do |duration|
str = duration.format('%w %~w, %d %~d, %h %~h, %m %~m, %s %~s')
str.sub(/^0 [a-z]+,?/i, '').gsub(/ 0 [a-z]+,?/i, '').chomp(',').sub(/, (\d+ [a-z]+)$/i, ' et \1').strip
# Produit un message du genre :
# 10 semaines, 2 jours, 3 heures, 4 minutes et 5 secondes
end
end
end
end

Fred
--
I'd like to stay But every day
Everything pushes me farther away If you could show
Help me to know How it's supposed to be
Where did it go ? (Nine Inch Nails, Where Is Everybody)

Siep Korteling

12/21/2007 9:59:00 PM

0

Matthew Harris wrote:
> If you speak another language and would like to contribute to the
> Duration library, you can contribute largely by writing short
> translation files!
>
dutch.rb is attached.

Attachments:
http://www.ruby-...attachment/119...

--
Posted via http://www.ruby-....

Marcin Raczkowski

12/22/2007 10:19:00 PM

0

Polish should be simple too, problem might be "Å?" which is polish
diacritical.

http://pastie.caboo...

Benjamin Stiglitz

1/8/2008 8:11:00 PM

0

> Thanks in advance to anyone who comes up with translations :)
> Also, since I can't verify the correctness of anyone's translations, =20=

> I would also appreciate any feedback it (because I only speak two =20
> languages).

I=91m late to the game. Here=92s the German:
http://pastie.caboo...

-Ben=