[ruby-list:46008] Re: [ANN] locale-2.0.3, locale_rails-2.0.3, gettext-2.0.3, gettext_activerecord-2.0.3, gettext_rails-2.0.3
From:
Masao Mutoh <mutomasa@...>
Date:
2009-05-11 15:02:40 UTC
List:
ruby-list #46008
okkezさん
むとうです。
ご報告ありがとうございました。
パッチいただきます!
On Mon, 11 May 2009 05:26:15 +0900
okkez <okkez000@gmail.com> wrote:
> こんにちは。
> okkez です。
>
> gettext_activerecord のテストが通らなかったので調べてみました。
> # 気付いたのは Rails(2.3.2) でアプリを作っててエラーメッセージが意図どおり
> # 出力されなかったからです。
>
> 環境は以下です。
>
> $ ruby -v
> ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
> $ gem1.8 search "gettext|locale"
>
> *** LOCAL GEMS ***
>
> gettext (2.0.3, 2.0.2, 2.0.1, 1.93.0, 1.91.0)
> gettext_activerecord (2.0.3, 2.0.2)
> gettext_rails (2.0.3, 2.0.2)
> locale (2.0.3, 2.0.2, 2.0.1)
> locale_rails (2.0.3, 2.0.2)
>
> String#% の引数がハッシュの場合、キーワード置換が発生しなかったら nil を返すように
> なっているようでしたのでパッチを書きました。
> 手元では gettext_activerecord のテストは通るようになりました。
> また、エラーメッセージも意図しているものが表示されるようになりました。
>
> diff --git a/lib/gettext/core_ext/string.rb b/lib/gettext/core_ext/string.rb
> index fa8149c..9eb6d51 100644
> --- a/lib/gettext/core_ext/string.rb
> +++ b/lib/gettext/core_ext/string.rb
> @@ -64,6 +64,7 @@ class String
> args.has_key?(key) ? sprintf("%#{$3}", args[key]) : match
> end
> }
> + ret
> else
> ret = gsub(/%([{<])/, '%%\1')
> begin
>
>
> あと別件ですが、gettext_activerecord を git clone した場所で rake test を
> しようとしてもできなかったのでパッチを書きました。
> # 古い gettext も残しておきたかったので。
>
> diff --git a/test/Rakefile b/test/Rakefile
> index 01b598f..569ff9b 100644
> --- a/test/Rakefile
> +++ b/test/Rakefile
> @@ -2,7 +2,9 @@ $LOAD_PATH.unshift "../lib"
> require 'rubygems'
>
> gettext_path = File.join(ENV["GETTEXT_PATH"] || "../../gettext/", "lib")
> +locale_path = File.join(ENV["LOCALE_PATH"] || "../../locale/", "lib")
> $LOAD_PATH.unshift gettext_path
> +$LOAD_PATH.unshift locale_path
>
> task :default => :test
>
>
>
> 2009/05/10 0:00 Masao Mutoh <mutomasa@gmail.com>:
> > むとうです。
> >
> > Ruby-LocaleとRuby-GetText-Packageファミリの
> > 2.0.3をリリースしました。
> >
> > * locale - Locale IDの管理・自動取得、ISO-639-3, 3166データ
> > * locale_rails - localeを使ったRailsサポート
> > * gettext - メッセージのローカライズ
> > * gettext_activerecord - ActiveRecordのローカライズ
> > * gettext_rails - その他のRails向けサポート(actionpack, actionmailer)
> >
> > 変更点
> > -------
> > == locale-2.0.3
> > * バージョンの更新のみです。
> > == locale_rails-2.0.3
> > * フラグメントキャッシュが動作しない不具合の修正 [Reported by Andy Lo-A-Foe]
> > * gemの依存関係が古い不具合の修正 [Reported by Hans de Graaff]
> > == gettext-2.0.3, gettext_activerecord-2.0.3, gettext_rails-2.0.3
> > * gemの依存関係が古い不具合の修正 [Reported by Hans de Graaff]
> >
> > Website
> > -------
> > * homepage
> > http://www.yotabanana.com/hiki/ja/ruby-locale.html
> > http://www.yotabanana.com/hiki/ruby-gettext.html
> > * rubyforge
> > http://rubyforge.org/projects/locale
> > http://rubyforge.org/projects/gettext
> > * github
> > http://github.com/mutoh/locale/tree/master
> > http://github.com/mutoh/locale_rails/tree/master
> > http://github.com/mutoh/gettext/tree/master
> > http://github.com/mutoh/gettext_activerecord/tree/master
> > http://github.com/mutoh/gettext_rails/tree/master
> >
> > * Download
> > http://rubyforge.org/frs/?group_id=855&release_id=2856
> > http://rubyforge.org/frs/?group_id=1997&release_id=32471
> > --
> > Masao Mutoh <mutomasa@gmail.com>
> >
> >
>
>
>
> --
> okkez
> okkez000@gmail.com
>
--
Masao Mutoh <mutomasa@gmail.com>