Request for Duration library localizations

Discussion in 'Ruby' started by Matthew Harris, Dec 21, 2007.

  1. 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
    Matthew Harris, Dec 21, 2007
    #1
    1. Advertising

  2. Matthew Harris

    I. P. Guest

    I. P., Dec 21, 2007
    #2
    1. Advertising

  3. Matthew Harris

    F. Senault Guest

    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)
    F. Senault, Dec 21, 2007
    #3
  4. Siep Korteling, Dec 21, 2007
    #4
  5. Marcin Raczkowski, Dec 22, 2007
    #5
  6. > 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=
    Benjamin Stiglitz, Jan 8, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    1,992
    John Saunders
    Oct 16, 2003
  2. Aaron

    duration

    Aaron, May 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    526
    Zuzar Lakdawala
    May 17, 2004
  3. Thomas

    User control cache duration

    Thomas, Jul 22, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    665
    Thomas
    Jul 23, 2004
  4. z. f.
    Replies:
    0
    Views:
    417
    z. f.
    Feb 10, 2005
  5. z. f.
    Replies:
    5
    Views:
    4,602
    Juan T. Llibre
    Feb 10, 2005
Loading...

Share This Page