gettext 1.2.0-mswin32 → 1.3.0-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +74 -0
- data/NEWS +16 -0
- data/README +9 -9
- data/data/locale/cs/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
- data/lib/gettext.rb +9 -4
- data/lib/gettext/locale.rb +11 -5
- data/lib/gettext/locale_cgi.rb +2 -5
- data/lib/gettext/locale_object.rb +68 -21
- data/lib/gettext/poparser.rb +2 -2
- data/lib/gettext/rails.rb +150 -30
- data/lib/gettext/version.rb +1 -1
- data/po/cs/rails.po +27 -27
- data/po/cs/rgettext.po +8 -8
- data/po/de/rails.po +28 -28
- data/po/de/rgettext.po +8 -8
- data/po/el/rails.po +25 -25
- data/po/el/rgettext.po +8 -8
- data/po/es/rails.po +25 -25
- data/po/es/rgettext.po +8 -8
- data/po/fr/rails.po +26 -26
- data/po/fr/rgettext.po +8 -8
- data/po/it/rgettext.po +8 -8
- data/po/ja/rails.po +23 -23
- data/po/ja/rgettext.po +8 -8
- data/po/ko/rails.po +23 -23
- data/po/ko/rgettext.po +8 -8
- data/po/nl/rails.po +25 -25
- data/po/nl/rgettext.po +8 -8
- data/po/pt_BR/rails.po +25 -25
- data/po/pt_BR/rgettext.po +8 -8
- data/po/rails.pot +25 -25
- data/po/rgettext.pot +8 -8
- data/po/sv/rgettext.po +8 -8
- data/samples/rails/README +3 -2
- data/samples/rails/Rakefile +6 -217
- data/samples/rails/app/controllers/application.rb +1 -0
- data/samples/rails/app/models/article.rb +7 -16
- data/samples/rails/config/database.yml +2 -1
- data/samples/rails/lib/tasks/gettext.rake +18 -0
- data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/po/ja/blog.po +12 -0
- data/samples/rails/public/index.html +15 -17
- data/samples/rails/public/javascripts/controls.js +30 -1
- data/samples/rails/public/javascripts/dragdrop.js +210 -145
- data/samples/rails/public/javascripts/effects.js +261 -399
- data/samples/rails/public/javascripts/prototype.js +131 -72
- data/test/gettext_test.rb +5 -0
- data/test/gettext_test_locale.rb +133 -9
- metadata +5 -4
- data/samples/rails/script/benchmarker +0 -19
- data/samples/rails/script/profiler +0 -34
data/po/sv/rgettext.po
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
msgid ""
|
10
10
|
msgstr ""
|
11
11
|
"Project-Id-Version: ruby-gettext 1.2.0\n"
|
12
|
-
"POT-Creation-Date: 2006-
|
12
|
+
"POT-Creation-Date: 2006-03-04 22:50+0900\n"
|
13
13
|
"PO-Revision-Date: 2004-11-04 20:49+0100\n"
|
14
14
|
"Last-Translator: Nikolai Weibull\n"
|
15
15
|
"Language-Team: Swedish\n"
|
@@ -17,37 +17,37 @@ msgstr ""
|
|
17
17
|
"Content-Type: text/plain; charset=UTF-8\n"
|
18
18
|
"Content-Transfer-Encoding: 8bit\n"
|
19
19
|
|
20
|
-
#: lib/gettext/rmsgmerge.rb:
|
20
|
+
#: lib/gettext/rmsgmerge.rb:402
|
21
21
|
msgid "Usage: %s def.po ref.pot [-o output.pot]"
|
22
22
|
msgstr "Användning: %s def.po ref.pot [-o output.pot]"
|
23
23
|
|
24
|
-
#: lib/gettext/rmsgmerge.rb:
|
24
|
+
#: lib/gettext/rmsgmerge.rb:405
|
25
25
|
msgid ""
|
26
26
|
"Merges two Uniforum style .po files together. The def.po file is an existing "
|
27
27
|
"PO file with translations. The ref.pot file is the last created PO file with "
|
28
28
|
"up-to-date source references. ref.pot is generally created by rgettext."
|
29
29
|
msgstr ""
|
30
30
|
|
31
|
-
#: lib/gettext/rmsgmerge.rb:
|
31
|
+
#: lib/gettext/rmsgmerge.rb:407 lib/gettext/rgettext.rb:132
|
32
32
|
#: lib/gettext/rmsgfmt.rb:50
|
33
33
|
msgid "Specific options:"
|
34
34
|
msgstr ""
|
35
35
|
|
36
|
-
#: lib/gettext/rmsgmerge.rb:
|
36
|
+
#: lib/gettext/rmsgmerge.rb:409 lib/gettext/rgettext.rb:134
|
37
37
|
#: lib/gettext/rmsgfmt.rb:52
|
38
38
|
msgid "write output to specified file"
|
39
39
|
msgstr ""
|
40
40
|
|
41
|
-
#: lib/gettext/rmsgmerge.rb:
|
41
|
+
#: lib/gettext/rmsgmerge.rb:420 lib/gettext/rgettext.rb:143
|
42
42
|
#: lib/gettext/rmsgfmt.rb:56
|
43
43
|
msgid "display version information and exit"
|
44
44
|
msgstr ""
|
45
45
|
|
46
|
-
#: lib/gettext/rmsgmerge.rb:
|
46
|
+
#: lib/gettext/rmsgmerge.rb:445
|
47
47
|
msgid "definition po is not given."
|
48
48
|
msgstr ""
|
49
49
|
|
50
|
-
#: lib/gettext/rmsgmerge.rb:
|
50
|
+
#: lib/gettext/rmsgmerge.rb:447
|
51
51
|
msgid "reference pot is not given."
|
52
52
|
msgstr ""
|
53
53
|
|
data/samples/rails/README
CHANGED
@@ -44,8 +44,9 @@ http://localhost:3000/blog
|
|
44
44
|
Files
|
45
45
|
-----
|
46
46
|
|
47
|
-
*
|
48
|
-
- a
|
47
|
+
* lib/tasks/gettext.rake
|
48
|
+
- a rake file for Ruby-GetText-Package.
|
49
|
+
You need to modify this for your application.
|
49
50
|
":makemo" task which creates mo files from po files.
|
50
51
|
":updatepo" task which updates pot/po files from po files.
|
51
52
|
If there is no po/*pot files, it creates po/*.pot.
|
data/samples/rails/Rakefile
CHANGED
@@ -1,221 +1,10 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
5
|
+
|
1
6
|
require 'rake'
|
2
7
|
require 'rake/testtask'
|
3
8
|
require 'rake/rdoctask'
|
4
9
|
|
5
|
-
|
6
|
-
TEST_CHANGES_SINCE = Time.now - 600
|
7
|
-
|
8
|
-
desc "Run all the tests on a fresh test database"
|
9
|
-
task :default => [ :test_units, :test_functional ]
|
10
|
-
|
11
|
-
|
12
|
-
desc 'Require application environment.'
|
13
|
-
task :environment do
|
14
|
-
unless defined? RAILS_ROOT
|
15
|
-
require File.dirname(__FILE__) + '/config/environment'
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
desc "Generate API documentation, show coding stats"
|
20
|
-
task :doc => [ :appdoc, :stats ]
|
21
|
-
|
22
|
-
|
23
|
-
# Look up tests for recently modified sources.
|
24
|
-
def recent_tests(source_pattern, test_path, touched_since = 10.minutes.ago)
|
25
|
-
FileList[source_pattern].map do |path|
|
26
|
-
if File.mtime(path) > touched_since
|
27
|
-
test = "#{test_path}/#{File.basename(path, '.rb')}_test.rb"
|
28
|
-
test if File.exists?(test)
|
29
|
-
end
|
30
|
-
end.compact
|
31
|
-
end
|
32
|
-
|
33
|
-
desc 'Test recent changes.'
|
34
|
-
Rake::TestTask.new(:recent => [ :clone_structure_to_test ]) do |t|
|
35
|
-
since = TEST_CHANGES_SINCE
|
36
|
-
touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } +
|
37
|
-
recent_tests('app/models/*.rb', 'test/unit', since) +
|
38
|
-
recent_tests('app/controllers/*.rb', 'test/functional', since)
|
39
|
-
|
40
|
-
t.libs << 'test'
|
41
|
-
t.verbose = true
|
42
|
-
t.test_files = touched.uniq
|
43
|
-
end
|
44
|
-
task :test_recent => [ :clone_structure_to_test ]
|
45
|
-
|
46
|
-
desc "Run the unit tests in test/unit"
|
47
|
-
Rake::TestTask.new("test_units") { |t|
|
48
|
-
t.libs << "test"
|
49
|
-
t.pattern = 'test/unit/**/*_test.rb'
|
50
|
-
t.verbose = true
|
51
|
-
}
|
52
|
-
task :test_units => [ :clone_structure_to_test ]
|
53
|
-
|
54
|
-
desc "Run the functional tests in test/functional"
|
55
|
-
Rake::TestTask.new("test_functional") { |t|
|
56
|
-
t.libs << "test"
|
57
|
-
t.pattern = 'test/functional/**/*_test.rb'
|
58
|
-
t.verbose = true
|
59
|
-
}
|
60
|
-
task :test_functional => [ :clone_structure_to_test ]
|
61
|
-
|
62
|
-
desc "Generate documentation for the application"
|
63
|
-
Rake::RDocTask.new("appdoc") { |rdoc|
|
64
|
-
rdoc.rdoc_dir = 'doc/app'
|
65
|
-
rdoc.title = "Rails Application Documentation"
|
66
|
-
rdoc.options << '--line-numbers --inline-source'
|
67
|
-
rdoc.rdoc_files.include('doc/README_FOR_APP')
|
68
|
-
rdoc.rdoc_files.include('app/**/*.rb')
|
69
|
-
}
|
70
|
-
|
71
|
-
desc "Generate documentation for the Rails framework"
|
72
|
-
Rake::RDocTask.new("apidoc") { |rdoc|
|
73
|
-
rdoc.rdoc_dir = 'doc/api'
|
74
|
-
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
|
75
|
-
rdoc.title = "Rails Framework Documentation"
|
76
|
-
rdoc.options << '--line-numbers --inline-source'
|
77
|
-
rdoc.rdoc_files.include('README')
|
78
|
-
rdoc.rdoc_files.include('CHANGELOG')
|
79
|
-
rdoc.rdoc_files.include('vendor/rails/railties/CHANGELOG')
|
80
|
-
rdoc.rdoc_files.include('vendor/rails/railties/MIT-LICENSE')
|
81
|
-
rdoc.rdoc_files.include('vendor/rails/activerecord/README')
|
82
|
-
rdoc.rdoc_files.include('vendor/rails/activerecord/CHANGELOG')
|
83
|
-
rdoc.rdoc_files.include('vendor/rails/activerecord/lib/active_record/**/*.rb')
|
84
|
-
rdoc.rdoc_files.exclude('vendor/rails/activerecord/lib/active_record/vendor/*')
|
85
|
-
rdoc.rdoc_files.include('vendor/rails/actionpack/README')
|
86
|
-
rdoc.rdoc_files.include('vendor/rails/actionpack/CHANGELOG')
|
87
|
-
rdoc.rdoc_files.include('vendor/rails/actionpack/lib/action_controller/**/*.rb')
|
88
|
-
rdoc.rdoc_files.include('vendor/rails/actionpack/lib/action_view/**/*.rb')
|
89
|
-
rdoc.rdoc_files.include('vendor/rails/actionmailer/README')
|
90
|
-
rdoc.rdoc_files.include('vendor/rails/actionmailer/CHANGELOG')
|
91
|
-
rdoc.rdoc_files.include('vendor/rails/actionmailer/lib/action_mailer/base.rb')
|
92
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/README')
|
93
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/CHANGELOG')
|
94
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service.rb')
|
95
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/*.rb')
|
96
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/api/*.rb')
|
97
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/client/*.rb')
|
98
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/container/*.rb')
|
99
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/dispatcher/*.rb')
|
100
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/protocol/*.rb')
|
101
|
-
rdoc.rdoc_files.include('vendor/rails/actionwebservice/lib/action_web_service/support/*.rb')
|
102
|
-
rdoc.rdoc_files.include('vendor/rails/activesupport/README')
|
103
|
-
rdoc.rdoc_files.include('vendor/rails/activesupport/CHANGELOG')
|
104
|
-
rdoc.rdoc_files.include('vendor/rails/activesupport/lib/active_support/**/*.rb')
|
105
|
-
}
|
106
|
-
|
107
|
-
desc "Report code statistics (KLOCs, etc) from the application"
|
108
|
-
task :stats => [ :environment ] do
|
109
|
-
require 'code_statistics'
|
110
|
-
CodeStatistics.new(
|
111
|
-
["Helpers", "app/helpers"],
|
112
|
-
["Controllers", "app/controllers"],
|
113
|
-
["APIs", "app/apis"],
|
114
|
-
["Components", "components"],
|
115
|
-
["Functionals", "test/functional"],
|
116
|
-
["Models", "app/models"],
|
117
|
-
["Units", "test/unit"]
|
118
|
-
).to_s
|
119
|
-
end
|
120
|
-
|
121
|
-
desc "Recreate the test databases from the development structure"
|
122
|
-
task :clone_structure_to_test => [ :db_structure_dump, :purge_test_database ] do
|
123
|
-
abcs = ActiveRecord::Base.configurations
|
124
|
-
case abcs["test"]["adapter"]
|
125
|
-
when "mysql"
|
126
|
-
ActiveRecord::Base.establish_connection(:test)
|
127
|
-
ActiveRecord::Base.connection.execute('SET foreign_key_checks = 0')
|
128
|
-
IO.readlines("db/#{RAILS_ENV}_structure.sql").join.split("\n\n").each do |table|
|
129
|
-
ActiveRecord::Base.connection.execute(table)
|
130
|
-
end
|
131
|
-
when "postgresql"
|
132
|
-
ENV['PGHOST'] = abcs["test"]["host"] if abcs["test"]["host"]
|
133
|
-
ENV['PGPORT'] = abcs["test"]["port"].to_s if abcs["test"]["port"]
|
134
|
-
ENV['PGPASSWORD'] = abcs["test"]["password"].to_s if abcs["test"]["password"]
|
135
|
-
`psql -U "#{abcs["test"]["username"]}" -f db/#{RAILS_ENV}_structure.sql #{abcs["test"]["database"]}`
|
136
|
-
when "sqlite", "sqlite3"
|
137
|
-
`#{abcs[RAILS_ENV]["adapter"]} #{abcs["test"]["dbfile"]} < db/#{RAILS_ENV}_structure.sql`
|
138
|
-
when "sqlserver"
|
139
|
-
`osql -E -S #{abcs["test"]["host"]} -d #{abcs["test"]["database"]} -i db\\#{RAILS_ENV}_structure.sql`
|
140
|
-
else
|
141
|
-
raise "Unknown database adapter '#{abcs["test"]["adapter"]}'"
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
desc "Dump the database structure to a SQL file"
|
146
|
-
task :db_structure_dump => :environment do
|
147
|
-
abcs = ActiveRecord::Base.configurations
|
148
|
-
case abcs[RAILS_ENV]["adapter"]
|
149
|
-
when "mysql"
|
150
|
-
ActiveRecord::Base.establish_connection(abcs[RAILS_ENV])
|
151
|
-
File.open("db/#{RAILS_ENV}_structure.sql", "w+") { |f| f << ActiveRecord::Base.connection.structure_dump }
|
152
|
-
when "postgresql"
|
153
|
-
ENV['PGHOST'] = abcs[RAILS_ENV]["host"] if abcs[RAILS_ENV]["host"]
|
154
|
-
ENV['PGPORT'] = abcs[RAILS_ENV]["port"].to_s if abcs[RAILS_ENV]["port"]
|
155
|
-
ENV['PGPASSWORD'] = abcs[RAILS_ENV]["password"].to_s if abcs[RAILS_ENV]["password"]
|
156
|
-
`pg_dump -U "#{abcs[RAILS_ENV]["username"]}" -s -x -O -f db/#{RAILS_ENV}_structure.sql #{abcs[RAILS_ENV]["database"]}`
|
157
|
-
when "sqlite", "sqlite3"
|
158
|
-
`#{abcs[RAILS_ENV]["adapter"]} #{abcs[RAILS_ENV]["dbfile"]} .schema > db/#{RAILS_ENV}_structure.sql`
|
159
|
-
when "sqlserver"
|
160
|
-
`scptxfr /s #{abcs[RAILS_ENV]["host"]} /d #{abcs[RAILS_ENV]["database"]} /I /f db\\#{RAILS_ENV}_structure.sql /q /A /r`
|
161
|
-
`scptxfr /s #{abcs[RAILS_ENV]["host"]} /d #{abcs[RAILS_ENV]["database"]} /I /F db\ /q /A /r`
|
162
|
-
else
|
163
|
-
raise "Unknown database adapter '#{abcs["test"]["adapter"]}'"
|
164
|
-
end
|
165
|
-
end
|
166
|
-
|
167
|
-
desc "Empty the test database"
|
168
|
-
task :purge_test_database => :environment do
|
169
|
-
abcs = ActiveRecord::Base.configurations
|
170
|
-
case abcs["test"]["adapter"]
|
171
|
-
when "mysql"
|
172
|
-
ActiveRecord::Base.establish_connection(:test)
|
173
|
-
ActiveRecord::Base.connection.recreate_database(abcs["test"]["database"])
|
174
|
-
when "postgresql"
|
175
|
-
ENV['PGHOST'] = abcs["test"]["host"] if abcs["test"]["host"]
|
176
|
-
ENV['PGPORT'] = abcs["test"]["port"].to_s if abcs["test"]["port"]
|
177
|
-
ENV['PGPASSWORD'] = abcs["test"]["password"].to_s if abcs["test"]["password"]
|
178
|
-
`dropdb -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}`
|
179
|
-
`createdb -T template0 -U "#{abcs["test"]["username"]}" #{abcs["test"]["database"]}`
|
180
|
-
when "sqlite","sqlite3"
|
181
|
-
File.delete(abcs["test"]["dbfile"]) if File.exist?(abcs["test"]["dbfile"])
|
182
|
-
when "sqlserver"
|
183
|
-
dropfkscript = "#{abcs["test"]["host"]}.#{abcs["test"]["database"]}.DP1".gsub(/\\/,'-')
|
184
|
-
`osql -E -S #{abcs["test"]["host"]} -d #{abcs["test"]["database"]} -i db\\#{dropfkscript}`
|
185
|
-
`osql -E -S #{abcs["test"]["host"]} -d #{abcs["test"]["database"]} -i db\\#{RAILS_ENV}_structure.sql`
|
186
|
-
else
|
187
|
-
raise "Unknown database adapter '#{abcs["test"]["adapter"]}'"
|
188
|
-
end
|
189
|
-
end
|
190
|
-
|
191
|
-
desc "Clears all *.log files in log/"
|
192
|
-
task :clear_logs => :environment do
|
193
|
-
FileList["log/*.log"].each do |log_file|
|
194
|
-
f = File.open(log_file, "w")
|
195
|
-
f.close
|
196
|
-
end
|
197
|
-
end
|
198
|
-
|
199
|
-
desc "Migrate the database according to the migrate scripts in db/migrate (only supported on PG/MySQL). A specific version can be targetted with VERSION=x"
|
200
|
-
task :migrate => :environment do
|
201
|
-
ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/db/migrate/', ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
|
202
|
-
end
|
203
|
-
|
204
|
-
#
|
205
|
-
# Added for Ruby-GetText-Package
|
206
|
-
#
|
207
|
-
|
208
|
-
require 'gettext/utils'
|
209
|
-
desc "Create mo-files for L10n"
|
210
|
-
task :makemo do
|
211
|
-
GetText.create_mofiles(true, "po", "locale")
|
212
|
-
end
|
213
|
-
|
214
|
-
desc "Update pot/po files to match new version."
|
215
|
-
task :updatepo do
|
216
|
-
GetText.update_pofiles("blog", Dir.glob("{app,lib}/**/*.{rb,rhtml}"),
|
217
|
-
"blog 1.1.0")
|
218
|
-
|
219
|
-
GetText.update_pofiles("gettext_plugin", Dir.glob("vendor/**/*.{rb,rhtml}"),
|
220
|
-
"gettext_plugin 1.1.0")
|
221
|
-
end
|
10
|
+
require 'tasks/rails'
|
@@ -6,26 +6,17 @@ class Article < ActiveRecord::Base
|
|
6
6
|
# With your own message with L10n.
|
7
7
|
# old style(Backward compatibility).
|
8
8
|
# blog.po in RAILS_ROOT/po/*/ is used.
|
9
|
-
# validates_presence_of :title, :message =>
|
10
|
-
# validates_length_of :description, :minimum => 10, :message =>
|
9
|
+
# validates_presence_of :title, :message => N_("can't be empty")
|
10
|
+
# validates_length_of :description, :minimum => 10, :message => N_("is too short (min is %d characters)")
|
11
11
|
|
12
12
|
# new style (you can use %{fn} and %d freely in the message)
|
13
13
|
# blog.po in RAILS_ROOT/po/*/ is used.
|
14
|
-
# validates_presence_of :title, :message =>
|
15
|
-
# validates_length_of :description, :minimum => 10, :message =>
|
14
|
+
# validates_presence_of :title, :message => N_("%{fn} can't be empty!")
|
15
|
+
# validates_length_of :description, :minimum => 10, :message => N_("%{fn} is too short (min is %d characters)")
|
16
16
|
|
17
|
-
#
|
18
17
|
# you can also redefined the title/explanation of the top of the error message.
|
19
18
|
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
# {:num => num, :record => record}
|
24
|
-
# end
|
25
|
-
#
|
26
|
-
# def error_message_explanation(num)
|
27
|
-
# n_("There was a problem with the following field:",
|
28
|
-
# "There were problems with the following fields:", num) % {:num => num}
|
29
|
-
# end
|
30
|
-
|
19
|
+
# set_error_message_title(N_("An error is occured on %{record}"),
|
20
|
+
# N_("%{num} errors are occured on %{record}"))
|
21
|
+
# set_error_message_explanation(N_("The error is:"), N_("The errors are:"))
|
31
22
|
end
|
@@ -6,7 +6,7 @@ development:
|
|
6
6
|
host: localhost
|
7
7
|
encoding: utf8
|
8
8
|
username: root
|
9
|
-
password:
|
9
|
+
password:
|
10
10
|
|
11
11
|
#development:
|
12
12
|
# adapter: postgresql
|
@@ -34,5 +34,6 @@ production:
|
|
34
34
|
# socket: /tmp/mysql.sock
|
35
35
|
database: blog
|
36
36
|
host: localhost
|
37
|
+
encoding: utf8
|
37
38
|
username: root
|
38
39
|
password:
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#
|
2
|
+
# Added for Ruby-GetText-Package
|
3
|
+
#
|
4
|
+
|
5
|
+
require 'gettext/utils'
|
6
|
+
desc "Create mo-files for L10n"
|
7
|
+
task :makemo do
|
8
|
+
GetText.create_mofiles(true, "po", "locale")
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Update pot/po files to match new version."
|
12
|
+
task :updatepo do
|
13
|
+
GetText.update_pofiles("blog", Dir.glob("{app,lib}/**/*.{rb,rhtml}"),
|
14
|
+
"blog 1.1.0")
|
15
|
+
|
16
|
+
GetText.update_pofiles("gettext_plugin", Dir.glob("vendor/**/*.{rb,rhtml}"),
|
17
|
+
"gettext_plugin 1.1.0")
|
18
|
+
end
|
Binary file
|
data/samples/rails/po/ja/blog.po
CHANGED
@@ -108,3 +108,15 @@ msgstr "削除"
|
|
108
108
|
msgid "Are you sure?"
|
109
109
|
msgstr "よろしいですか?"
|
110
110
|
|
111
|
+
#: app/models/article.rb:30
|
112
|
+
msgid "An error is occured on %{record}"
|
113
|
+
msgstr "ukkikki!"
|
114
|
+
msgid "%{num} errors are occured on %{record}"
|
115
|
+
msgstr "ukki!"
|
116
|
+
|
117
|
+
#: app/models/article.rb:32
|
118
|
+
msgid "The error is:"
|
119
|
+
msgstr "foo:"
|
120
|
+
|
121
|
+
msgid "The errors are:"
|
122
|
+
msgstr "bar:"
|
@@ -197,7 +197,7 @@
|
|
197
197
|
window.onload = function() {
|
198
198
|
$('search-text').value = '';
|
199
199
|
$('search').onsubmit = function() {
|
200
|
-
$('search-text').value = 'site:rubyonrails.
|
200
|
+
$('search-text').value = 'site:rubyonrails.org ' + $F('search-text');
|
201
201
|
}
|
202
202
|
}
|
203
203
|
</script>
|
@@ -209,7 +209,7 @@
|
|
209
209
|
<li>
|
210
210
|
<form id="search" action="http://www.google.com/search" method="get">
|
211
211
|
<input type="hidden" name="hl" value="en" />
|
212
|
-
<input type="text" id="search-text" name="q" value="site:rubyonrails.
|
212
|
+
<input type="text" id="search-text" name="q" value="site:rubyonrails.org " />
|
213
213
|
<input type="submit" value="Search" /> the Rails site
|
214
214
|
</form>
|
215
215
|
</li>
|
@@ -217,23 +217,21 @@
|
|
217
217
|
<li>
|
218
218
|
<h3>Join the community</h3>
|
219
219
|
<ul class="links">
|
220
|
-
<li><a href="http://www.rubyonrails.
|
221
|
-
<li><a href="http://weblog.rubyonrails.
|
220
|
+
<li><a href="http://www.rubyonrails.org/">Ruby on Rails</a></li>
|
221
|
+
<li><a href="http://weblog.rubyonrails.org/">Official weblog</a></li>
|
222
222
|
<li><a href="http://lists.rubyonrails.org/">Mailing lists</a></li>
|
223
|
-
<li><a href="http://wiki.rubyonrails.
|
224
|
-
<li><a href="http://wiki.rubyonrails.
|
225
|
-
<li><a href="http://dev.rubyonrails.
|
223
|
+
<li><a href="http://wiki.rubyonrails.org/rails/pages/IRC">IRC channel</a></li>
|
224
|
+
<li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
|
225
|
+
<li><a href="http://dev.rubyonrails.org/">Bug tracker</a></li>
|
226
226
|
</ul>
|
227
227
|
</li>
|
228
228
|
|
229
229
|
<li>
|
230
230
|
<h3>Browse the documentation</h3>
|
231
231
|
<ul class="links">
|
232
|
-
<li><a href="http://
|
233
|
-
<li><a href="http://
|
234
|
-
<li><a href="http://
|
235
|
-
<li><a href="http://ap.rubyonrails.com/">Action Pack</a></li>
|
236
|
-
<li><a href="http://as.rubyonrails.com/">Active Support</a></li>
|
232
|
+
<li><a href="http://api.rubyonrails.org/">Rails API</a></li>
|
233
|
+
<li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
|
234
|
+
<li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
|
237
235
|
</ul>
|
238
236
|
</li>
|
239
237
|
</ul>
|
@@ -241,7 +239,7 @@
|
|
241
239
|
|
242
240
|
<div id="content">
|
243
241
|
<div id="header">
|
244
|
-
<h1>Welcome aboard</
|
242
|
+
<h1>Welcome aboard</h1>
|
245
243
|
<h2>You’re riding the Rails!</h2>
|
246
244
|
</div>
|
247
245
|
|
@@ -256,18 +254,18 @@
|
|
256
254
|
|
257
255
|
<ol>
|
258
256
|
<li>
|
259
|
-
<h2>Create your databases and edit <tt>database.yml</tt></h2>
|
260
|
-
<p>
|
257
|
+
<h2>Create your databases and edit <tt>config/database.yml</tt></h2>
|
258
|
+
<p>Rails needs to know your login and password.</p>
|
261
259
|
</li>
|
262
260
|
|
263
261
|
<li>
|
264
262
|
<h2>Use <tt>script/generate</tt> to create your models and controllers</h2>
|
265
|
-
<p>
|
263
|
+
<p>To see all available options, run it without parameters.</p>
|
266
264
|
</li>
|
267
265
|
|
268
266
|
<li>
|
269
267
|
<h2>Set up a default route and remove or rename this file</h2>
|
270
|
-
<p>
|
268
|
+
<p>Routes are setup in config/routes.rb.</p>
|
271
269
|
</li>
|
272
270
|
</ol>
|
273
271
|
</div>
|