[ANN] Ruby-GetText-Package-1.92.0

Hi,

Ruby-GetText-Package-1.92.0 is now available.

Changes

  • Fixed a memory leak(again)

  • Fixed bugs.

  • Latvian support.

  • Improve to support mo-files.

    • Support revision 1 of mo-file format.
    • Freeze msgstrs.
  • msgctxt - pgettext(msgctxt, msgid) support
    (eg)
    p_(“File”, “Open”) #=> “Open” is shown in English.

  • Update translations

    • Catalan, Chinese(Simplified), Chinese(Traditional), (English),
      Esperanto, German, Greek, Hungarian, Japanese,
      Norwegian, Portuguese(pt_BR), Russian, Serbian, Spanish,
      Ukrainian, Vietnamese,
  • Rails Support

    • Support rubyonrails-2.1.0 (2.0.0 or later).
      • Add new validations for activerecord-2.1.0.
        (:greater_than, :greater_than_or_equal_to, :equal_to,
        :less_than, :less_than_or_equal_to,:odd, :even)
      • validates_(format|inclusion)of accepts %{val} as the value
        (eg)
        validates_inclusion_of :name, :in => %w(a, b), :message =>
        N
        (“%{fn} can’t be %{val}”)
      • Work Fragment caching on rails-2.1.0.
      • Support ActiveRecord::Base.abstract_class.
      • Work ActiveRecord::Errors#[]
      • Work render_partial.

Thanks to

Thanks to:
Translators:
Slobodan Paunović, Yuri Kozlov, Patrick Lenz, Malte M., Ngoc DAO
Thanh, David E.,
Antonio S. de A. Terceiro, David E., Runar Ingebrigtsen, Tamás
Tompa, Yang B., damphyr,
Ramon Salvadó, Alex Rootoff, Aivars Akots

Bug reports, suggestions and patches:
Hans de Graaff, Tatsuki S., Andreas Neuhaus, Loiseleur Michel

Website

http://rubyforge.org/projects/gettext/

What’s this?

Ruby-GetText-Package is a Localization(L10n) Library and Tools which is
modeled after GNU gettext package.

The library converts the messages to localized messages properly using
client-side locale information. And the tools for developers support
to create, use, and modify localized the message files(message catalogs)
easily.

Features:

  • Simple APIs(similar GNU gettext)
  • Singular/plural messages in each locales.
  • Extract strings automatically
    • rgettext command for creating po-files from files below:
      o ruby scripts
      o glade-2 XML file(.glade)
      o ERB file(.rhtml, .erb)
      o ActiveRecord (.rb)
      o Other files (you can write your own parser)
  • Create mo-files unless msgfmt(in GNU gettext tool)
    • rmsgfmt command for creating a mo-file from a po-file.
  • Have rgettext/rmsgfmt as module functions. It’s useful as Rake
    tasks.
  • The po-file is compatible to GNU gettext.
    You can maintain these files to use GNU getext tools.
  • The mo-file is compatible to GNU gettext(msgfmt).
  • multi-textdomain supported.
    You can bind plural textdomains to a class/module.
  • CGI support (gettext/cgi)
  • Ruby on Rails support (gettext/rails)

ScreenShots

Screenshots in 22 languages (Sample Rails blog) are:
http://www.yotabanana.com/hiki/?ruby-gettext-screenshot

Status of translations

  • Bosnian(bs) - 1.90.0 (old)
  • Catalan(ca) - 1.92.0
  • Croatian(hr) - 1.90.0 (old)
  • Chinese(zh_CN) - 1.92.0
  • Chinese(zh_TW) - 1.92.0
  • Czech(cs) - 1.9.0 (old)
  • Dutch(nl) - 1.90.0 (old)
  • English(default) - 1.90.0 (old)
  • Esperanto(eo) - 1.92.0
  • Estonian(et) - 1.9.0 (old, rails.po only)
  • French(fr) - 1.90.0 (old)
  • German(de) - 1.92.0
  • Greek(el) - 1.92.0
  • Hungarian(hu) - 1.92.0
  • Italian(it) - 1.6.0 (old)
  • Japanese(ja) - 1.92.0
  • Korean(ko) - 1.9.0 (old)
  • Latvian(lv) - 1.92.0 (new)
  • Norwegian(nb) - 1.92.0
  • Portuguese(Brazil)(pt_BR) - 1.92.0
  • Russian(ru) - 1.92.0
  • Serbian(sr) - 1.91.0 (old)
  • Spanish(es) - 1.92.0
  • Swedish(sv) - 0.8.0 (too much old)
  • Ukrainian(ua) - 1.92.0
  • Vietnamese(vi) - 1.92.0

Can you help us?/ Can we help you?

Join our ML if you are interested in:

  • Improve Ruby-GetText-Package.
  • Translators.
  • Application/library owners who think to make your apps/libs L10n.
    If you send us your po-files, we’ll translate it!

    At least, a Japanese translator is available ;).

ML:
http://rubyforge.org/mail/?group_id=855

Regards,
Masao

.:% Masao M.[email protected]

I am getting the following now with edge rails:

Loading development environment (Rails 2.1.0)
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/
active_record.rb:238:NameError: uninitialized class variable
@@default_error_messages in ActiveRecord::Errors
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/rails.rb:25:
warning: already initialized constant Rails
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/rails.rb:432:
warning: already initialized constant MESSAGESS
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/rails.rb:433:
warning: already initialized constant NMINUTES
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/rails.rb:434:
warning: already initialized constant NHOURS
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/rails.rb:435:
warning: already initialized constant NDAYS
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/rails.rb:436:
warning: already initialized constant NMONTHS
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/rails.rb:437:
warning: already initialized constant NYEARS
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/
active_record.rb:238:NameError: uninitialized class variable
@@default_error_messages in ActiveRecord::Errors

In fairness, once I did rake rails:freeze:edge I got the same with
1.91.0

Hi,

How about to use config.gem instead of requiring
gettext/rails directly?

In environment.rb:
Rails::Initializer.run do |config|
:
:
config.gem “gettext”, :lib => “gettext/rails” # This line
end

It works for me with Rails-2.1.0(not edge rails)

On Sat, 2 Aug 2008 05:58:20 -0700 (PDT)
phil [email protected] wrote:

warning: already initialized constant MESSAGESS
/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/
active_record.rb:238:NameError: uninitialized class variable
@@default_error_messages in ActiveRecord::Errors

In fairness, once I did rake rails:freeze:edge I got the same with
1.91.0


.:% Masao M.[email protected]

That definitely helps, and it knocks me down to just:

/Library/Ruby/Gems/1.8/gems/gettext-1.92.0/lib/gettext/
active_record.rb:238:NameError: uninitialized class variable
@@default_error_messages in ActiveRecord::Errors

Hi,

I see.
You use edge rails, not 2.1.0.

I think active_record i18n part breaks
their background compatibility and
ruby-gettext occurs the error.

Try to use 2.1.0.

On Sat, 2 Aug 2008 07:35:47 -0700 (PDT)
phil [email protected] wrote:

Hi,

Loading development environment (Rails 2.1.0)
warning: already initialized constant NHOURS
In fairness, once I did rake rails:freeze:edge I got the same with
1.91.0


.:% Masao M.[email protected]


.:% Masao M.[email protected]