Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Request for Duration library localizations

Reply
Thread Tools

Request for Duration library localizations

 
 
Matthew Harris
Guest
Posts: n/a
 
      12-21-2007
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.se/131325

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://matthewharris.org


 
Reply With Quote
 
 
 
 
I. P.
Guest
Posts: n/a
 
      12-21-2007
|Matthew Harris|

MH> The English localization can be found at:
MH> http://pastie.caboo.se/131325
Other languages may have more than 1 plural form. See for example
http://archives.mandrivalinux.com/co...2/msg00010.php

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


 
Reply With Quote
 
 
 
 
F. Senault
Guest
Posts: n/a
 
      12-21-2007
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)
 
Reply With Quote
 
Siep Korteling
Guest
Posts: n/a
 
      12-21-2007
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-forum.com/attachment/1190/dutch.rb

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

 
Reply With Quote
 
Marcin Raczkowski
Guest
Posts: n/a
 
      12-22-2007
Polish should be simple too, problem might be "Å„" which is polish
diacritical.

http://pastie.caboo.se/131743

 
Reply With Quote
 
Benjamin Stiglitz
Guest
Posts: n/a
 
      01-08-2008
> 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.se/136835

-Ben=

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call Manager limit call duration nazgulero Cisco 0 10-25-2005 06:58 AM
Exam duration Girish Hegde MCSD 1 01-13-2004 02:47 AM
PIX 501 - SYN Timeout Duration 0:02:01 Rik Bain Cisco 11 11-03-2003 11:50 PM
Re: Accessing Request.InputStream / Request.BinaryRead *as the request is occuring*: How??? Brian Birtle ASP .Net 2 10-16-2003 02:11 PM
Work Duration sunil chandra MCSD 2 08-28-2003 04:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57