Defect #27
closedproject summary(/projects/show/*) returns error when running as CGI
0%
Description
but it works fine when running with webrick(same app, same DB, same RAILS_ENV).
error log is:
--
ActionView::TemplateError (Translation value "open" with arguments [0] caused error 'too many arguments for
format string') on line #29 of app/views/projects/show.rhtml:
26: <li><%= link_to tracker.name, :controller => 'projects', :action => 'list_issues', :id =>
Herve Harster,
27: :set_filter => 1,
28: "tracker_id" => tracker.id >:
29: <= @open_issues_by_tracker[tracker] || 0 > <= lwr(:label_open_issues, @open_issues_by_tracker[tracker]
|| 0) >
30: <= l(:label_on) > <= @total_issues_by_tracker[tracker] || 0 ></li>
31: < end %>
32: </ul>
#{RAILS_ROOT}/vendor/plugins/gloc-1.1.0/lib/gloc-internal.rb:93:in `_l'
#{RAILS_ROOT}/vendor/plugins/gloc-1.1.0/lib/gloc.rb:44:in `lwr_'
#{RAILS_ROOT}/vendor/plugins/gloc-1.1.0/lib/gloc.rb:36:in `lwr'
#{RAILS_ROOT}/app/views/projects/show.rhtml:29:in `_run_rhtml_47app47views47projects47show46rhtml'
#{RAILS_ROOT}/app/views/projects/show.rhtml:25:in `each'
#{RAILS_ROOT}/app/views/projects/show.rhtml:25:in `_run_rhtml_47app47views47projects47show46rhtml'
--
Is it caused from wrong CGI settings...?
My environment:
redmine trunk(r388) with MySQL on FreeBSD4.1
Updated by Satoru KURASHIKI over 17 years ago
I think this modification make the thing well, though I
could't identify why webrick/mongrel treats this correctly...
Index: app/views/projects/show.rhtml
=================================================================
==
--- app/views/projects/show.rhtml (revision 439)
+++ app/views/projects/show.rhtml (working copy)@ -29,7 +29,7
@
<li><%= link_to tracker.name, :controller =>
'projects', :action => 'list_issues', :id => Herve Harster,
:set_filter
=> 1,
"tracker_id" => tracker.id >:
- <= @open_issues_by_tracker[tracker] || 0 > <=
lwr(:label_open_issues, @open_issues_by_tracker[tracker] ||
0) >
+ <= @open_issues_by_tracker[tracker] || 0 > <=
lwr(:label_open_issues) >
<= l(:label_on) > <=
@total_issues_by_tracker[tracker] || 0 ></li>
< end %>
</ul>
Second tag calls 'lwr' gloc method with argument
'@open_issues_by_tracker'.
But translation messages of ':label_open_issues' have no
variables(%d) in each lang.yml.
--
Additionary, this way may be imaginable.
show.rhtml:
<%= lwr(:label_open_issues,
@open_issues_by_tracker[tracker] || 0) >
<= lwr(:label_on, @total_issues_by_tracker[tracker] ||
0) %>
lang.yml:
label_open_issues: %d open
label_open_issues_plural %d open
label_on: on %d
+ label_on_plural: on %d
Updated by Satoru KURASHIKI almost 17 years ago
Though I couldn't trace down the reason after all,
I get good result in this trouble with r1048.
I'll turn down this old issue.
--
OS: FreeBSD 6.1-RELEASE-p19
Ruby: self compiled 1.8.6(p111)
Gem: 1.0.1
Rails: 2.0.2
DB: MySQL
I run 'rails test', and replace Redmine's config/boot.rb
with generated one.