gettext_rails 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5 -0
- data/README.rdoc +10 -5
- data/Rakefile +3 -3
- data/data/locale/nl/LC_MESSAGES/gettext_rails.mo +0 -0
- data/lib/gettext_rails/action_controller.rb +23 -8
- data/lib/gettext_rails/tools.rb +3 -1
- data/lib/gettext_rails/version.rb +1 -1
- data/po/nl/gettext_rails.po +17 -17
- data/sample/app/views/articles/edit.html.erb +1 -1
- data/sample/app/views/articles/new.html.erb +1 -1
- metadata +4 -4
data/ChangeLog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
= gettext_rails-2.0.2 (2009-05-07)
|
2
|
+
* Update Dutch translation [by Bart ten Brinke]
|
3
|
+
* Apply the gettext-2.0.2 changes((don't use bindtextdomain with :supported_language_tags)
|
4
|
+
* Fix the bug of sample.
|
5
|
+
|
1
6
|
= gettext_rails-2.0.1 (2009-04-18)
|
2
7
|
* Fix bugs
|
3
8
|
* ActionMailer didn't work. [Reported by Simone Carletti]
|
data/README.rdoc
CHANGED
@@ -61,15 +61,17 @@ See sample direcotries for more details.
|
|
61
61
|
Rails::Initializer.run do |config|
|
62
62
|
:
|
63
63
|
:
|
64
|
+
config.gem "locale"
|
64
65
|
config.gem "locale_rails"
|
66
|
+
config.gem "gettext"
|
65
67
|
config.gem "gettext_activerecord"
|
66
68
|
config.gem "gettext_rails"
|
67
69
|
end
|
68
70
|
|
69
71
|
==== application_controller.rb
|
70
|
-
class ApplicationController < ActionController::Base
|
72
|
+
class ApplicationController < ActionController::Base
|
71
73
|
init_gettext "blog" # replace "blog" to your textdomain name.
|
72
|
-
end
|
74
|
+
end
|
73
75
|
|
74
76
|
==== Then ...
|
75
77
|
$ rake updatepo
|
@@ -84,6 +86,7 @@ end
|
|
84
86
|
See {Ruby-GetText-Package HOWTO for Ruby on Rails}[http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html] for more details.
|
85
87
|
|
86
88
|
== Support matrix
|
89
|
+
* gettext_rails-2.0.2 - rails-2.3.2
|
87
90
|
* gettext_rails-2.0.1 - rails-2.3.2
|
88
91
|
* gettext_rails-2.0.0 - rails-2.3.2
|
89
92
|
|
@@ -92,6 +95,7 @@ This program is licenced under the same licence as Ruby.
|
|
92
95
|
(See the file 'COPYING'.)
|
93
96
|
|
94
97
|
* Copyright (C) 2001-2009 Masao Mutoh <mutoh at highwhay.ne.jp>
|
98
|
+
|
95
99
|
== Translators
|
96
100
|
* Bosnian(bs) - Sanjin Sehic <saserr at gmail.com>
|
97
101
|
* Bulgarian(bg) - Sava Chankov <sava.chankov at gmail.com>
|
@@ -104,7 +108,8 @@ This program is licenced under the same licence as Ruby.
|
|
104
108
|
* LIN CHUNG-YI <xmarsh at gmail.com>
|
105
109
|
* Croatian(hr) - Sanjin Sehic <saserr at gmail.com>
|
106
110
|
* Czech(cs) - Karel Miarka <kajism at yahoo.com>
|
107
|
-
* Dutch(nl) -
|
111
|
+
* Dutch(nl) - Bart ten Brinke<info at retrosync.com> (current)
|
112
|
+
Menno Jonkers <ruby-gettext at jonkers.com>
|
108
113
|
* Esperanto(eo) - Malte Milatz <malte at gmx-topmail.de>
|
109
114
|
* Estonian(et) - Erkki Eilonen <erkki at itech.ee>
|
110
115
|
* French(fr)
|
@@ -145,7 +150,7 @@ This program is licenced under the same licence as Ruby.
|
|
145
150
|
* Chinese(zh_CN) - 2.0.0
|
146
151
|
* Chinese(zh_TW) - 2.0.0
|
147
152
|
* Czech(cs) - 1.9.0 (old)
|
148
|
-
* Dutch(nl) -
|
153
|
+
* Dutch(nl) - 2.0.2
|
149
154
|
* English(default) - 1.90.0 (old)
|
150
155
|
* Esperanto(eo) - 2.0.0
|
151
156
|
* Estonian(et) - 2.0.0
|
@@ -154,7 +159,7 @@ This program is licenced under the same licence as Ruby.
|
|
154
159
|
* Greek(el) - 2.0.0
|
155
160
|
* Hungarian(hu) - 2.0.0
|
156
161
|
* Italian(it) - 1.6.0 (old)
|
157
|
-
* Japanese(ja) - 2.0.
|
162
|
+
* Japanese(ja) - 2.0.2
|
158
163
|
* Korean(ko) - 1.9.0 (old)
|
159
164
|
* Latvian(lv) - 2.0.0
|
160
165
|
* Norwegian(nb) - 2.0.0
|
data/Rakefile
CHANGED
@@ -71,8 +71,8 @@ spec = Gem::Specification.new do |s|
|
|
71
71
|
s.homepage = 'http://gettext.rubyforge.org/'
|
72
72
|
s.rubyforge_project = "gettext"
|
73
73
|
s.files = FileList['**/*'].to_a.select{|v| v !~ /pkg|git/}
|
74
|
-
s.add_dependency('gettext_activerecord', '>= 2.0.
|
75
|
-
s.add_dependency('locale_rails', '>= 2.0.
|
74
|
+
s.add_dependency('gettext_activerecord', '>= 2.0.2')
|
75
|
+
s.add_dependency('locale_rails', '>= 2.0.2')
|
76
76
|
s.add_dependency('rails', '>= 2.3.2')
|
77
77
|
s.require_path = 'lib'
|
78
78
|
s.has_rdoc = true
|
@@ -100,7 +100,7 @@ Rake::RDocTask.new { |rdoc|
|
|
100
100
|
}
|
101
101
|
|
102
102
|
desc "Publish the release files to RubyForge."
|
103
|
-
task :release => [
|
103
|
+
task :release => [ :package ] do
|
104
104
|
require 'rubyforge'
|
105
105
|
|
106
106
|
rubyforge = RubyForge.new
|
Binary file
|
@@ -20,19 +20,24 @@ module ActionController #:nodoc:
|
|
20
20
|
|
21
21
|
# Append a block which is called before initializing gettext on the each WWW request.
|
22
22
|
#
|
23
|
-
# (e.g.)
|
23
|
+
# (e.g.1)
|
24
24
|
# class ApplicationController < ActionController::Base
|
25
25
|
# before_init_gettext{|controller|
|
26
|
-
#
|
27
|
-
# if (cookies["lang"].nil? or cookies["lang"].empty?)
|
28
|
-
# GetText.locale = "zh_CN"
|
29
|
-
# else
|
30
|
-
# GetText.locale = cookies["lang"]
|
31
|
-
# end
|
26
|
+
# p "before_init_gettext is called."
|
32
27
|
# }
|
33
28
|
# init_gettext "myapp"
|
34
29
|
# # ...
|
35
30
|
# end
|
31
|
+
#
|
32
|
+
# (e.g.2)
|
33
|
+
# class ApplicationController < ActionController::Base
|
34
|
+
# def sample_foo
|
35
|
+
# p "sample_foo is called."
|
36
|
+
# end
|
37
|
+
# before_init_gettext :sample_foo
|
38
|
+
# init_gettext "myapp"
|
39
|
+
# # ...
|
40
|
+
# end
|
36
41
|
def self.before_init_gettext(*filters, &block)
|
37
42
|
before_init_locale(*filters, &block)
|
38
43
|
end
|
@@ -42,7 +47,7 @@ module ActionController #:nodoc:
|
|
42
47
|
# The GetText.locale is set the locale which bound to the textdomains
|
43
48
|
# when gettext is initialized.
|
44
49
|
#
|
45
|
-
# (e.g.)
|
50
|
+
# (e.g.1)
|
46
51
|
# class ApplicationController < ActionController::Base
|
47
52
|
# after_init_gettext {|controller|
|
48
53
|
# L10nClass.new(GetText.locale)
|
@@ -50,6 +55,16 @@ module ActionController #:nodoc:
|
|
50
55
|
# init_gettext "foo"
|
51
56
|
# # ...
|
52
57
|
# end
|
58
|
+
#
|
59
|
+
# (e.g.2)
|
60
|
+
# class ApplicationController < ActionController::Base
|
61
|
+
# def sample_foo
|
62
|
+
# L10nClass.new(GetText.locale)
|
63
|
+
# end
|
64
|
+
# after_init_gettext :sample_foo
|
65
|
+
# init_gettext "foo"
|
66
|
+
# # ...
|
67
|
+
# end
|
53
68
|
def self.after_init_gettext(*filters, &block)
|
54
69
|
after_init_locale(*filters, &block)
|
55
70
|
end
|
data/lib/gettext_rails/tools.rb
CHANGED
@@ -12,8 +12,10 @@ require 'gettext_activerecord/tools'
|
|
12
12
|
module GetText
|
13
13
|
extend self
|
14
14
|
|
15
|
-
alias :create_mofiles_org :create_mofiles
|
15
|
+
alias :create_mofiles_org :create_mofiles #:nodoc:
|
16
16
|
|
17
|
+
# Rails version of create_mofiles. This sets mo_root "./locale" then
|
18
|
+
# call original create_mofiles.
|
17
19
|
def create_mofiles(options = {})
|
18
20
|
opts = {:verbose => true, :mo_root => "./locale"}
|
19
21
|
create_mofiles_org(opts)
|
data/po/nl/gettext_rails.po
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# This file is distributed under the same license as the Ruby-GetText-Package.
|
7
7
|
#
|
8
|
+
# Bart ten Brinke <info at retrosync.com>, 2009.
|
8
9
|
# Menno Jonkers <ruby-gettext at jonkers.com>, 2005-2007.
|
9
10
|
#
|
10
11
|
msgid ""
|
@@ -12,7 +13,7 @@ msgstr ""
|
|
12
13
|
"Project-Id-Version: gettext_rails 1.93.0\n"
|
13
14
|
"POT-Creation-Date: 2009-02-20 20:21+0900\n"
|
14
15
|
"PO-Revision-Date: 2007-06-26 20:52+0100\n"
|
15
|
-
"Last-Translator:
|
16
|
+
"Last-Translator: Bart ten Brinke <info at retrosync.com>\n"
|
16
17
|
"Language-Team: Dutch <ruby_gettext at jonkers.com>\n"
|
17
18
|
"MIME-Version: 1.0\n"
|
18
19
|
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -22,26 +23,26 @@ msgstr ""
|
|
22
23
|
#: lib/gettext_rails/action_view/active_record_helper.rb:23
|
23
24
|
msgid "%{num} error prohibited this %{record} from being saved"
|
24
25
|
msgid_plural "%{num} errors prohibited this %{record} from being saved"
|
25
|
-
msgstr[0] "
|
26
|
-
msgstr[1] "
|
26
|
+
msgstr[0] "er is %{num} probleem gevonden in %{record}"
|
27
|
+
msgstr[1] "er zijn %{num} problemen gevonden in %{record}"
|
27
28
|
|
28
29
|
#: lib/gettext_rails/action_view/active_record_helper.rb:25
|
29
30
|
msgid "There was a problem with the following field:"
|
30
31
|
msgid_plural "There were problems with the following fields:"
|
31
|
-
msgstr[0] "Er
|
32
|
-
msgstr[1] "Er
|
32
|
+
msgstr[0] "Er is een probleem met het volgende veld:"
|
33
|
+
msgstr[1] "Er zijn problemen met de volgende velden:"
|
33
34
|
|
34
35
|
#: lib/gettext_rails/action_view/date_helper.rb:24
|
35
36
|
msgid "less than 5 seconds"
|
36
|
-
msgstr "minder dan
|
37
|
+
msgstr "minder dan vijf seconden"
|
37
38
|
|
38
39
|
#: lib/gettext_rails/action_view/date_helper.rb:24
|
39
40
|
msgid "less than 10 seconds"
|
40
|
-
msgstr "minder dan
|
41
|
+
msgstr "minder dan tien seconden"
|
41
42
|
|
42
43
|
#: lib/gettext_rails/action_view/date_helper.rb:24
|
43
44
|
msgid "less than 20 seconds"
|
44
|
-
msgstr "minder dan
|
45
|
+
msgstr "minder dan twintig seconden"
|
45
46
|
|
46
47
|
#: lib/gettext_rails/action_view/date_helper.rb:25
|
47
48
|
msgid "half a minute"
|
@@ -49,43 +50,42 @@ msgstr "een halve minuut"
|
|
49
50
|
|
50
51
|
#: lib/gettext_rails/action_view/date_helper.rb:25
|
51
52
|
msgid "less than a minute"
|
52
|
-
msgstr "minder dan
|
53
|
+
msgstr "minder dan één minuut"
|
53
54
|
|
54
55
|
#: lib/gettext_rails/action_view/date_helper.rb:25
|
55
56
|
msgid "about 1 month"
|
56
|
-
msgstr "ongeveer
|
57
|
+
msgstr "ongeveer één maand"
|
57
58
|
|
58
59
|
#: lib/gettext_rails/action_view/date_helper.rb:26
|
59
60
|
msgid "about 1 year"
|
60
|
-
msgstr "ongeveer
|
61
|
+
msgstr "ongeveer één jaar"
|
61
62
|
|
62
63
|
#: lib/gettext_rails/action_view/date_helper.rb:27
|
63
64
|
msgid "1 minute"
|
64
65
|
msgid_plural "%{num} minutes"
|
65
|
-
msgstr[0] "
|
66
|
+
msgstr[0] "één minuut"
|
66
67
|
msgstr[1] "%{num} minuten"
|
67
68
|
|
68
69
|
#: lib/gettext_rails/action_view/date_helper.rb:28
|
69
70
|
msgid "about 1 hour"
|
70
71
|
msgid_plural "about %{num} hours"
|
71
|
-
msgstr[0] "ongeveer
|
72
|
+
msgstr[0] "ongeveer één uur"
|
72
73
|
msgstr[1] "ongeveer %{num} uur"
|
73
74
|
|
74
75
|
#: lib/gettext_rails/action_view/date_helper.rb:29
|
75
76
|
msgid "1 day"
|
76
77
|
msgid_plural "%{num} days"
|
77
|
-
msgstr[0] "
|
78
|
+
msgstr[0] "één dag"
|
78
79
|
msgstr[1] "%{num} dagen"
|
79
80
|
|
80
81
|
#: lib/gettext_rails/action_view/date_helper.rb:30
|
81
82
|
msgid "1 month"
|
82
83
|
msgid_plural "%{num} months"
|
83
|
-
msgstr[0] "
|
84
|
+
msgstr[0] "één maand"
|
84
85
|
msgstr[1] "%{num} maanden"
|
85
86
|
|
86
87
|
#: lib/gettext_rails/action_view/date_helper.rb:31
|
87
|
-
#, fuzzy
|
88
88
|
msgid "over 1 year"
|
89
89
|
msgid_plural "over %{num} years"
|
90
|
-
msgstr[0] "meer dan
|
90
|
+
msgstr[0] "meer dan één jaar"
|
91
91
|
msgstr[1] "meer dan %{num} jaar"
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% form_for(@article) do |f| %>
|
6
6
|
<p>
|
7
7
|
<p><%= f.label :lastupdate %></p>
|
8
|
-
<p><%= f.date_select :lastupdate, :use_month_numbers => true %></p>
|
8
|
+
<p><%= f.date_select :lastupdate, :order => [:year, :month, :day], :use_month_numbers => true %></p>
|
9
9
|
<p><%= f.label :title, _("Title: Required.") %></p>
|
10
10
|
<p><%= f.text_field :title %></p>
|
11
11
|
<p><%= f.label :title, _("Description: More than 10 characters.") %></p>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% form_for(@article) do |f| %>
|
6
6
|
<p>
|
7
7
|
<p><%= f.label :lastupdate %></p>
|
8
|
-
<p><%= f.date_select :lastupdate, :use_month_numbers => true %></p>
|
8
|
+
<p><%= f.date_select :lastupdate, :order => [:year, :month, :day], :use_month_numbers => true %></p>
|
9
9
|
<p><%= f.label :title, _("Title: Required.") %></p>
|
10
10
|
<p><%= f.text_field :title %></p>
|
11
11
|
<p><%= f.label :title, _("Description: More than 10 characters.") %></p>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gettext_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masao Mutoh
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-05-09 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.0.
|
23
|
+
version: 2.0.2
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: locale_rails
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.0.
|
33
|
+
version: 2.0.2
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rails
|