rpms/rubygem-gettext_rails/devel gettext_rails-2.1.0-rails-2.3.5-compat.patch, NONE, 1.1 rubygem-gettext_rails.spec, 1.4, 1.5
Mamoru Tasaka
mtasaka at fedoraproject.org
Sat May 8 16:51:31 UTC 2010
- Previous message: rpms/rubygem-gettext_rails/F-13 gettext_rails-2.1.0-rails-2.3.5-compat.patch, NONE, 1.1 rubygem-gettext_rails.spec, 1.4, 1.5
- Next message: rpms/libnfc/F-13 .cvsignore, 1.5, 1.6 libnfc.spec, 1.4, 1.5 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mtasaka
Update of /cvs/extras/rpms/rubygem-gettext_rails/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv9612/devel
Modified Files:
rubygem-gettext_rails.spec
Added Files:
gettext_rails-2.1.0-rails-2.3.5-compat.patch
Log Message:
* Sun May 9 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.1.0-3
- Apply a patch from git to make translation compatible with
actionpack 2.3.5
gettext_rails-2.1.0-rails-2.3.5-compat.patch:
README.rdoc | 1
lib/gettext_rails/action_view/date_helper.rb | 5
lib/gettext_rails/version.rb | 4
po/bg/gettext_rails.po | 73 ++++++++----
po/bs/gettext_rails.po | 77 ++++++++-----
po/ca/gettext_rails.po | 73 ++++++++----
po/cs/gettext_rails.po | 78 ++++++++-----
po/de/gettext_rails.po | 79 ++++++++-----
po/el/gettext_rails.po | 73 ++++++++----
po/eo/gettext_rails.po | 73 ++++++++----
po/es/gettext_rails.po | 73 ++++++++----
po/et/gettext_rails.po | 73 ++++++++----
po/fr/gettext_rails.po | 77 ++++++++-----
po/gettext_rails.pot | 70 +++++++-----
po/hr/gettext_rails.po | 77 ++++++++-----
po/hu/gettext_rails.po | 73 ++++++++----
po/it/gettext_rails.po | 70 +++++++-----
po/ja/gettext_rails.po | 70 +++++++-----
po/ko/gettext_rails.po | 64 ++++++-----
po/lv/gettext_rails.po | 76 ++++++++-----
po/nb/gettext_rails.po | 73 ++++++++----
po/nl/gettext_rails.po | 73 ++++++++----
po/pt_BR/gettext_rails.po | 73 ++++++++----
po/ru/gettext_rails.po | 80 ++++++++-----
po/sr/gettext_rails.po | 80 ++++++++-----
po/ua/gettext_rails.po | 86 +++++++++------
po/vi/gettext_rails.po | 73 ++++++++----
po/zh/gettext_rails.po | 66 +++++++----
po/zh_TW/gettext_rails.po | 66 +++++++----
test/app/views/users/distance_of_time_in_words.html.erb | 5
test/test/functional/users_controller_test.rb | 9 -
test/test/result/en/distance_of_time_in_words.html | 7 -
test/test/result/en/distance_of_time_in_words.html.2.3.4 | 33 +++++
test/test/result/ja/distance_of_time_in_words.html | 7 -
test/test/result/ja/distance_of_time_in_words.html.2.3.4 | 33 +++++
test/test/test_helper.rb | 2
36 files changed, 1292 insertions(+), 733 deletions(-)
--- NEW FILE gettext_rails-2.1.0-rails-2.3.5-compat.patch ---
commit 1eefe45fa54b436dc40714467f10e2e1f6365a17
Author: Masao Mutoh <mutomasa at gmail.com>
Date: Tue Mar 2 23:53:22 2010 +0900
Support Rails 2.3.5.
diff --git a/README.rdoc b/README.rdoc
index 6dea443..da7e09d 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -86,6 +86,7 @@ See sample direcotries for more details.
See {Ruby-GetText-Package HOWTO for Ruby on Rails}[http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html] for more details.
== Support matrix
+* gettext_rails-2.2.0 - rails-2.3.2,2.3.3,2.3.4,2.3.5
* gettext_rails-2.1.0 - rails-2.3.2,2.3.3,2.3.4
* gettext_rails-2.0.2 - rails-2.3.2
* gettext_rails-2.0.1 - rails-2.3.2
diff --git a/lib/gettext_rails/action_view/date_helper.rb b/lib/gettext_rails/action_view/date_helper.rb
index 9387c37..9bbade8 100644
--- a/lib/gettext_rails/action_view/date_helper.rb
+++ b/lib/gettext_rails/action_view/date_helper.rb
@@ -26,13 +26,16 @@ module ActionView #:nodoc:
NMINUTES = [/^(\d+) minutes?$/, Nn_('1 minute', '%{num} minutes')]
NHOURS = [/^about (\d+) hours?$/, Nn_('about 1 hour', 'about %{num} hours')]
NDAYS = [/^(\d+) days?$/, Nn_('1 day', '%{num} days')]
+ AMONTHS = [/^about (\d+) months?$/, Nn_('about 1 month', 'about %{num} months')]
NMONTHS = [/^(\d+) months?$/, Nn_('1 month', '%{num} months')]
+ AYEARS = [/^about (\d+) years?$/, Nn_('about 1 year', 'about %{num} years')]
NYEARS = [/^over (\d+) years?$/, Nn_('over 1 year', 'over %{num} years')]
+ ALYEARS = [/^almost (\d+) years?$/, Nn_('almost 1 year', 'almost %{num} years')]
def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false)
msg = distance_of_time_in_words_without_gettext_rails(from_time, to_time, include_seconds)
match = false
- [NMINUTES, NHOURS, NDAYS, NMONTHS, NYEARS].each do |regexp, nn|
+ [NMINUTES, NHOURS, NDAYS, AMONTHS, NMONTHS, AYEARS, NYEARS, ALYEARS].each do |regexp, nn|
if regexp =~ msg
match = true
msg = n_(nn, $1.to_i) % {:num => $1}
diff --git a/lib/gettext_rails/version.rb b/lib/gettext_rails/version.rb
index d557057..3679055 100644
--- a/lib/gettext_rails/version.rb
+++ b/lib/gettext_rails/version.rb
@@ -8,6 +8,6 @@
=end
module GetTextRails
- RAILS_VERSION = "2.3.4"
- VERSION = "2.1.0"
+ RAILS_VERSION = "2.3.5"
+ VERSION = "2.2.0"
end
diff --git a/po/bg/gettext_rails.po b/po/bg/gettext_rails.po
index 30cf677..23d520e 100644
--- a/po/bg/gettext_rails.po
+++ b/po/bg/gettext_rails.po
@@ -8,8 +8,8 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gettext_rails 1.93.0\n"
-"POT-Creation-Date: 2009-02-20 20:21+0900\n"
+"Project-Id-Version: gettext_rails 2.1.0\n"
+"POT-Creation-Date: 2010-03-02 00:47+0900\n"
"PO-Revision-Date: 2008-07-11 11:35+0300\n"
"Last-Translator: Sava Chankov <sava.chankov at gmail.com>\n"
"Language-Team: Bulgarian <ruby-on-rails-bulgaria at googlegroups.com>\n"
@@ -18,59 +18,55 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: lib/gettext_rails/action_view/active_record_helper.rb:23
-msgid "%{num} error prohibited this %{record} from being saved"
-msgid_plural "%{num} errors prohibited this %{record} from being saved"
-msgstr[0] "Поради %{num} грешка %{record} не беше записан"
-msgstr[1] "Поради %{num} грешки %{record} не беше записан"
-
-#: lib/gettext_rails/action_view/active_record_helper.rb:25
-msgid "There was a problem with the following field:"
-msgid_plural "There were problems with the following fields:"
-msgstr[0] "Проблемът се дължи на:"
-msgstr[1] "Проблемите се дължат на:"
-
-#: lib/gettext_rails/action_view/date_helper.rb:24
+#: lib/gettext_rails/action_view/date_helper.rb:23
msgid "less than 5 seconds"
msgstr "по-малко от 5 секунди"
-#: lib/gettext_rails/action_view/date_helper.rb:24
+#: lib/gettext_rails/action_view/date_helper.rb:23
msgid "less than 10 seconds"
msgstr "по-малко от 10 секунди"
-#: lib/gettext_rails/action_view/date_helper.rb:24
+#: lib/gettext_rails/action_view/date_helper.rb:23
msgid "less than 20 seconds"
msgstr "по-малко от 20 секунди"
-#: lib/gettext_rails/action_view/date_helper.rb:25
+#: lib/gettext_rails/action_view/date_helper.rb:24
msgid "half a minute"
msgstr "половин минута"
-#: lib/gettext_rails/action_view/date_helper.rb:25
+#: lib/gettext_rails/action_view/date_helper.rb:24
msgid "less than a minute"
msgstr "по-малко от минута"
-#: lib/gettext_rails/action_view/date_helper.rb:25
+#: lib/gettext_rails/action_view/date_helper.rb:29
+#: lib/gettext_rails/action_view/date_helper.rb:24
+#, fuzzy
msgid "about 1 month"
-msgstr "около 1 месец"
+msgid_plural "about %{num} months"
+msgstr[0] "около 1 месец"
+msgstr[1] "около 1 месец"
-#: lib/gettext_rails/action_view/date_helper.rb:26
+#: lib/gettext_rails/action_view/date_helper.rb:31
+#: lib/gettext_rails/action_view/date_helper.rb:25
+#, fuzzy
msgid "about 1 year"
-msgstr "около 1 година"
+msgid_plural "about %{num} years"
+msgstr[0] "около 1 година"
+msgstr[1] "около 1 година"
-#: lib/gettext_rails/action_view/date_helper.rb:27
+#: lib/gettext_rails/action_view/date_helper.rb:26
msgid "1 minute"
msgid_plural "%{num} minutes"
msgstr[0] "1 минута"
msgstr[1] "%{num} минути"
-#: lib/gettext_rails/action_view/date_helper.rb:28
+#: lib/gettext_rails/action_view/date_helper.rb:27
msgid "about 1 hour"
msgid_plural "about %{num} hours"
msgstr[0] "около час"
msgstr[1] "около %{num} часа"
-#: lib/gettext_rails/action_view/date_helper.rb:29
+#: lib/gettext_rails/action_view/date_helper.rb:28
msgid "1 day"
msgid_plural "%{num} days"
msgstr[0] "1 ден"
@@ -82,8 +78,31 @@ msgid_plural "%{num} months"
msgstr[0] "1 месец"
msgstr[1] "%{num} месеци"
-#: lib/gettext_rails/action_view/date_helper.rb:31
+#: lib/gettext_rails/action_view/date_helper.rb:32
msgid "over 1 year"
msgid_plural "over %{num} years"
msgstr[0] "повече от година"
msgstr[1] "повече %{num} години"
+
+#: lib/gettext_rails/action_view/date_helper.rb:33
+#, fuzzy
+msgid "almost 1 year"
+msgid_plural "almost %{num} years"
+msgstr[0] "около 1 година"
+msgstr[1] "около 1 година"
+
+#: lib/gettext_rails/action_view/form_builder.rb:20
+msgid "\"#{@object.class}|#{method.to_s.humanize}\""
+msgstr ""
+
+#: lib/gettext_rails/action_view/active_record_helper.rb:24
+msgid "%{num} error prohibited this %{record} from being saved"
+msgid_plural "%{num} errors prohibited this %{record} from being saved"
+msgstr[0] "Поради %{num} грешка %{record} не беше записан"
+msgstr[1] "Поради %{num} грешки %{record} не беше записан"
+
+#: lib/gettext_rails/action_view/active_record_helper.rb:26
+msgid "There was a problem with the following field:"
+msgid_plural "There were problems with the following fields:"
+msgstr[0] "Проблемът се дължи на:"
+msgstr[1] "Проблемите се дължат на:"
diff --git a/po/bs/gettext_rails.po b/po/bs/gettext_rails.po
index 23139b5..d14a3e4 100644
--- a/po/bs/gettext_rails.po
+++ b/po/bs/gettext_rails.po
@@ -9,8 +9,8 @@
# Sanjin Sehic <saserr at gmail.com>, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: gettext_rails 1.93.0\n"
-"POT-Creation-Date: 2009-02-20 20:21+0900\n"
+"Project-Id-Version: gettext_rails 2.1.0\n"
+"POT-Creation-Date: 2010-03-02 00:47+0900\n"
"PO-Revision-Date: 2007-06-26 19:02+0200\n"
"Last-Translator: Sanjin Sehic <saserr at gmail.com>\n"
"Language-Team: Bosnian <saserr at gmail.com>\n"
@@ -21,63 +21,57 @@ msgstr ""
"%100>=20) ? 1 : 2;\n"
"X-Generator: KBabel 1.11.4\n"
[...3184 lines suppressed...]
msgid_plural "about %{num} hours"
msgstr[0] "大約%{num}小時"
-#: lib/gettext_rails/action_view/date_helper.rb:29
+#: lib/gettext_rails/action_view/date_helper.rb:28
msgid "1 day"
msgid_plural "%{num} days"
msgstr[0] "%{num}天"
@@ -80,7 +76,27 @@ msgid "1 month"
msgid_plural "%{num} months"
msgstr[0] "%{num}个月"
-#: lib/gettext_rails/action_view/date_helper.rb:31
+#: lib/gettext_rails/action_view/date_helper.rb:32
msgid "over 1 year"
msgid_plural "over %{num} years"
msgstr[0] "超过%{num}年"
+
+#: lib/gettext_rails/action_view/date_helper.rb:33
+#, fuzzy
+msgid "almost 1 year"
+msgid_plural "almost %{num} years"
+msgstr[0] "大約%{num}年"
+
+#: lib/gettext_rails/action_view/form_builder.rb:20
+msgid "\"#{@object.class}|#{method.to_s.humanize}\""
+msgstr ""
+
+#: lib/gettext_rails/action_view/active_record_helper.rb:24
+msgid "%{num} error prohibited this %{record} from being saved"
+msgid_plural "%{num} errors prohibited this %{record} from being saved"
+msgstr[0] "有%{num}個錯誤發生,“%{record}”無法儲存"
+
+#: lib/gettext_rails/action_view/active_record_helper.rb:26
+msgid "There was a problem with the following field:"
+msgid_plural "There were problems with the following fields:"
+msgstr[0] "下面欄位有問題:"
diff --git a/test/app/views/users/distance_of_time_in_words.html.erb b/test/app/views/users/distance_of_time_in_words.html.erb
index 20fdeed..b4aea1d 100644
--- a/test/app/views/users/distance_of_time_in_words.html.erb
+++ b/test/app/views/users/distance_of_time_in_words.html.erb
@@ -14,5 +14,6 @@
<%= distance_of_time_in_words(from, from + 59.days + 23.hours + 59.minutes + 30.seconds) %><br/>
<%= distance_of_time_in_words(from, from + 1.years - 30.seconds) %><br/>
<%= distance_of_time_in_words(from, from + 2.years - 30.seconds) %><br/>
- <%= distance_of_time_in_words(from, from + 4.years - 30.seconds) %><br/>
-
+ <%= distance_of_time_in_words(from, from + 10.years + 3.months - 1.day) %><br/>
+ <%= distance_of_time_in_words(from, from + 10.years + 3.months + 1.day) %><br/>
+ <%= distance_of_time_in_words(from, from + 10.years + 9.months + 1.day) %><br/>
diff --git a/test/test/functional/users_controller_test.rb b/test/test/functional/users_controller_test.rb
index f9ebfa2..53e898d 100644
--- a/test/test/functional/users_controller_test.rb
+++ b/test/test/functional/users_controller_test.rb
@@ -20,15 +20,12 @@ class UsersControllerTest < ActionController::TestCase
test "should get localized distance_of_time_in_words" do
get :distance_of_time_in_words, :lang => "ja"
- assert_html("ja/distance_of_time_in_words.html")
+ version = (Rails.version < "2.3.5") ? ".2.3.4" : ""
+ assert_html("ja/distance_of_time_in_words.html#{version}")
assert_response :success
get :distance_of_time_in_words, :lang => "en"
- assert_html("en/distance_of_time_in_words.html")
- assert_response :success
-
- get :distance_of_time_in_words, :lang => "fr"
- assert_html("fr/distance_of_time_in_words.html")
+ assert_html("en/distance_of_time_in_words.html#{version}")
assert_response :success
end
diff --git a/test/test/result/en/distance_of_time_in_words.html b/test/test/result/en/distance_of_time_in_words.html
index 00867e9..2a09097 100644
--- a/test/test/result/en/distance_of_time_in_words.html
+++ b/test/test/result/en/distance_of_time_in_words.html
@@ -22,9 +22,10 @@
about 1 month<br/>
2 months<br/>
about 1 year<br/>
- over 2 years<br/>
- over 4 years<br/>
-
+ about 2 years<br/>
+ about 10 years<br/>
+ over 10 years<br/>
+ almost 11 years<br/>
<a href="/">Back to Top</a>
diff --git a/test/test/result/en/distance_of_time_in_words.html.2.3.4 b/test/test/result/en/distance_of_time_in_words.html.2.3.4
new file mode 100644
index 0000000..0ba1987
--- /dev/null
+++ b/test/test/result/en/distance_of_time_in_words.html.2.3.4
@@ -0,0 +1,33 @@
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <title>Ruby-GetText-Package Test Application</title>
+ <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
+</head>
+<body>
+<p style="color: green"></p>
+
+<h2>test for distance_of_time_in_words</h2>
+
+ less than 5 seconds<br/>
+ less than 10 seconds<br/>
+ half a minute<br/>
+ less than a minute<br/>
+ 1 minute<br/>
+ 2 minutes<br/>
+ about 1 hour<br/>
+ about 2 hours<br/>
+ 1 day<br/>
+ 2 days<br/>
+ about 1 month<br/>
+ 2 months<br/>
+ about 1 year<br/>
+ over 2 years<br/>
+ over 10 years<br/>
+ over 10 years<br/>
+ over 10 years<br/>
+
+
+<a href="/">Back to Top</a>
+</body>
+</html>
diff --git a/test/test/result/ja/distance_of_time_in_words.html b/test/test/result/ja/distance_of_time_in_words.html
index 578bfeb..84ed155 100644
--- a/test/test/result/ja/distance_of_time_in_words.html
+++ b/test/test/result/ja/distance_of_time_in_words.html
@@ -22,9 +22,10 @@
約1ヵ月<br/>
2ヶ月<br/>
約1年<br/>
- 2年以上<br/>
- 4年以上<br/>
-
+ 約2年<br/>
+ 約10年<br/>
+ 10年以上<br/>
+ ほぼ11年<br/>
<a href="/">Back to Top</a>
diff --git a/test/test/result/ja/distance_of_time_in_words.html.2.3.4 b/test/test/result/ja/distance_of_time_in_words.html.2.3.4
new file mode 100644
index 0000000..b11b7bf
--- /dev/null
+++ b/test/test/result/ja/distance_of_time_in_words.html.2.3.4
@@ -0,0 +1,33 @@
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <title>Ruby-GetText-Package Test Application</title>
+ <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
+</head>
+<body>
+<p style="color: green"></p>
+
+<h2>test for distance_of_time_in_words</h2>
+
+ 5秒以内<br/>
+ 10秒以内<br/>
+ 30秒前後<br/>
+ 1分未満<br/>
+ 1分<br/>
+ 2分<br/>
+ 約1時間<br/>
+ 約2時間<br/>
+ 1日<br/>
+ 2日<br/>
+ 約1ヵ月<br/>
+ 2ヶ月<br/>
+ 約1年<br/>
+ 2年以上<br/>
+ 10年以上<br/>
+ 10年以上<br/>
+ 10年以上<br/>
+
+
+<a href="/">Back to Top</a>
+</body>
+</html>
diff --git a/test/test/test_helper.rb b/test/test/test_helper.rb
index a0ac057..f8743b0 100644
--- a/test/test/test_helper.rb
+++ b/test/test/test_helper.rb
@@ -2,6 +2,8 @@ ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
+puts "Rails version : #{Rails.version}"
+
class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
Index: rubygem-gettext_rails.spec
===================================================================
RCS file: /cvs/extras/rpms/rubygem-gettext_rails/devel/rubygem-gettext_rails.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- rubygem-gettext_rails.spec 3 Feb 2010 19:30:23 -0000 1.4
+++ rubygem-gettext_rails.spec 8 May 2010 16:51:31 -0000 1.5
@@ -14,14 +14,19 @@
%global do_check 1
%endif
+# Upstream git repo
+# http://github.com/mutoh/gettext_rails
+
Summary: Localization support for Ruby on Rails by Ruby-GetText-Package
Name: rubygem-%{gemname}
Version: 2.1.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: Development/Languages
License: GPLv2 or Ruby
URL: http://www.yotabanana.com/hiki/ruby-gettext-rails.html
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
+# From upstream git
+Patch0: gettext_rails-2.1.0-rails-2.3.5-compat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ruby(abi) = %{rubyabi}
@@ -65,7 +70,6 @@ This package contains documentation for
%prep
%setup -q -c -T
-%build
mkdir -p .%{gemdir}
gem install \
--local \
@@ -76,6 +80,11 @@ gem install \
%{SOURCE0}
pushd .%{geminstdir}
+%patch0 -p1 -b .rails235
+popd
+
+%build
+pushd .%{geminstdir}
# Recreate gettext .mo files
find . -name \*.mo | xargs rm -f
rake --trace makemo
@@ -148,15 +157,7 @@ export GEM_PATH=$(pwd)/%{gemdir}
cd .%{geminstdir}/test
export TZ="Asia/Tokyo"
-
-#
-# The result of distance_of_time_in_words() in ActionView::Helpers::DateHelper
-# in lib/action_view/helpers/date_helper.rb changed between
-# 2.3.4 -> 2.3.5.
-# Now ignoring test failure as this failure is not critical, however
-# NEED FIXING
-#
-rake test ||:
+rake test
%files -f %{gemname}.lang
%defattr(-,root,root,-)
@@ -180,6 +181,10 @@ rake test ||:
%changelog
+* Sun May 9 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.1.0-3
+- Apply a patch from git to make translation compatible with
+ actionpack 2.3.5
+
* Thu Jan 28 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.1.0-2
- Ignore test failure due to distance_of_time_in_words change for now
- Previous message: rpms/rubygem-gettext_rails/F-13 gettext_rails-2.1.0-rails-2.3.5-compat.patch, NONE, 1.1 rubygem-gettext_rails.spec, 1.4, 1.5
- Next message: rpms/libnfc/F-13 .cvsignore, 1.5, 1.6 libnfc.spec, 1.4, 1.5 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list