Defect #7013
closedSee {{count}} in page display rather than value with i18n 0.5.0
0%
Description
At revision 4450.
After updating redmine from trunk and migrating the database I see this on the Roadmap:
{{count}} closed (100%) 0 open (0%)
and this on the (git) repository page:
b433c9c7 {{count}} months
Neither is a show stopper but they sure are irritating. Is there a way to fix this? Am I missing a gem dependency?
Related issues
Updated by Ethan Fremen over 13 years ago
I see this issue as well - it affects other pages / macro components too. I think it has something to do with i18n...
Updated by James Byrne over 13 years ago
Funnily enough, if the count value is '1' then that shows. But no other number does.
Updated by James Byrne over 13 years ago
I wonder if the problem is in the pluralizer?
Updated by Jean-Philippe Lang over 13 years ago
I don't see this problem on trunk. Can you give a list of your installed gems please?
Updated by Kennison Martin over 13 years ago
I see this as well.
Added by {{author}} {{age}} ago. Updated {{value}} ago.
installed gems:
actionmailer (2.3.5)
actionpack (2.3.5)
activemodel (3.0.3)
activerecord (2.3.5)
activeresource (3.0.3, 2.3.5)
activesupport (3.0.3, 2.3.5)
builder (2.1.2)
eventmachine (0.12.10)
fastthread (1.0.7)
gearman-ruby (2.0.0)
gruff (0.3.6)
holidays (1.0.0)
i18n (0.5.0)
icalendar (1.1.5)
macaddr (1.0.0)
mysql (2.8.1)
passenger (2.2.10)
prawn (0.8.4)
prawn-core (0.8.4)
prawn-layout (0.8.4)
prawn-security (0.8.4)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rmagick (2.13.1)
uuid (2.2.0)
Updated by Kennison Martin over 13 years ago
also using the redmine_backlog plugin
Updated by James Byrne over 13 years ago
# gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [i686-linux] - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8 - RUBY EXECUTABLE: /usr/local/bin/ruby - EXECUTABLE DIRECTORY: /usr/local/bin - RUBYGEMS PLATFORMS: - ruby - x86-linux - GEM PATHS: - /usr/local/lib/ruby/gems/1.8 - /root/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["http://gems.rubyforge.org"] - REMOTE SOURCES: - http://gems.rubyforge.org # gem list *** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.3, 2.3.8, 2.3.5) actionpack (3.0.3, 2.3.8, 2.3.5) activemodel (3.0.3) activerecord (3.0.3, 2.3.8, 2.3.5) activeresource (3.0.3, 2.3.8, 2.3.5) activesupport (3.0.3, 2.3.8, 2.3.5) arel (2.0.5) authlogic (2.1.6) builder (2.1.2) bundler (1.0.7) daemon_controller (0.2.5) erubis (2.6.6) fastercsv (1.5.3) fastthread (1.0.7) file-tail (1.0.5) i18n (0.5.0) mail (2.2.11) mime-types (1.16) nokogiri (1.4.4) passenger (3.0.0) pg (0.9.0) polyglot (0.3.1) rack (1.2.1, 1.1.0, 1.0.1) rack-mount (0.6.13) rack-test (0.5.6) rails (3.0.3, 2.3.8, 2.3.5) railties (3.0.3) rake (0.8.7) searchlogic (2.4.27) spruz (0.2.2) thor (0.14.6) treetop (1.4.9) tzinfo (0.3.23)
Updated by Ivan Flores over 13 years ago
Hi :
I have same problema en All page with total, the system information :
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/sspp/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/
gem list
- LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (3.0.3, 2.3.5)
edavis10-object_daddy (0.4.3)
i18n (0.5.0)
mail (2.2.11)
mime-types (1.16)
mocha (0.9.10)
polyglot (0.3.1)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
shoulda (2.11.3, 2.10.3)
treetop (1.4.9)
Updated by Bruno Santos over 13 years ago
I've just made a fresh install and everything was ok.
After I install backlog plugin its when the problems start.
Updated by James Byrne over 13 years ago
I have no additional plugins installed as far as I can recall. These are all that are present in the Redmin vendor/plugins directory"
# ll vendor/plugins total 144 drwxr-xr-x 4 pas pas 4096 Feb 18 2009 acts_as_activity_provider drwxr-xr-x 4 pas pas 4096 Feb 18 2009 acts_as_attachable drwxr-xr-x 4 pas pas 4096 Feb 18 2009 acts_as_customizable drwxr-xr-x 4 pas pas 4096 May 9 2008 acts_as_event drwxr-xr-x 5 pas pas 4096 May 9 2008 acts_as_list drwxr-xr-x 4 pas pas 4096 May 9 2008 acts_as_searchable drwxr-xr-x 5 pas pas 4096 May 9 2008 acts_as_tree drwxr-xr-x 5 pas pas 4096 May 9 2008 acts_as_versioned drwxr-xr-x 4 pas pas 4096 May 9 2008 acts_as_watchable drwxr-xr-x 6 pas pas 4096 Feb 18 2009 awesome_nested_set drwxr-xr-x 5 pas pas 4096 May 9 2008 classic_pagination drwxr-xr-x 4 pas pas 4096 May 5 2010 coderay-0.9.2 drwxr-xr-x 7 pas pas 4096 May 5 2010 engines drwxr-xr-x 5 pas pas 4096 May 5 2010 gravatar drwxr-xr-x 7 pas pas 4096 Feb 18 2009 open_id_authentication drwxr-xr-x 3 pas pas 4096 May 5 2010 prepend_engine_views drwxr-xr-x 5 pas pas 4096 May 9 2008 rfpdf drwxr-xr-x 5 pas pas 4096 May 9 2008 ruby-net-ldap-0.0.4
Updated by Bruno Santos over 13 years ago
Downgraded i18n gem to 0.4.2 and it solved the problem
Updated by Eric Baker over 13 years ago
I downgraded i18n from 0.5.0 to 0.4.2, but the problem is still there.
Updated by Eric Baker over 13 years ago
UPDATE: Nevermind - I didn't actually downgrade the i18n gem... still at 0.5.0. My apologies.
Updated by Kennison Martin over 13 years ago
i18n downgrade to 0.4.2 worked for me as well.
Updated by Teodor Engqvist over 13 years ago
I got the problem when i updated my gems. When i downgrade i18n to 0.4.2 it did solve the problem.
Have you tried to uninstall i18n it will tell if there are more versions install.
Updated by Teodor Engqvist over 13 years ago
gem install i18n -v 0.4.2
check if you have another version install gem uninstall i18n
Updated by Ivan Flores over 13 years ago
The problem is fixed !!!, the solution is :
#gem install i18n -v=0.4.2
#gem uninstall i18n -v=0.5.0
Thank !!
Updated by James Byrne over 13 years ago
That will not work for me as I have another app on that server about to upgrade to Rails-3.0.0. And that requires I18n v 0.5.
If I unpack the i18n -v 0.4.2 gem into vendor in the Redmine project will that work?
Updated by James Byrne over 13 years ago
Neither unpacking the i18n v-0.4.2 gem into vendor/gems nor configuring the gem with :version => '0.4.2' had any effect. Redmine insists on using the higher numbered system i18n gem.
Updated by Jean-Philippe Lang over 13 years ago
James Byrne wrote:
Neither unpacking the i18n v-0.4.2 gem into vendor/gems nor configuring the gem with :version => '0.4.2' had any effect.
Redmine insists on using the higher numbered system i18n gem.
This is actually Rails that loads the gem and I didn't find a solution to change this behaviour.
Updated by Jean-Philippe Lang over 13 years ago
The solution would be to change the locales so that they use the new i18n interpolation syntax (#6495).
Updated by Jean-Philippe Lang over 13 years ago
- Category set to I18n
- Priority changed from Normal to High
Updated by James Byrne over 13 years ago
If the old version of i18n is vendored with rails-2.3.5 per #6495 then why is not Rails using it?
Updated by Jean-Philippe Lang over 13 years ago
In activesupport-2.3.5/lib/active_support/vendor.rb
:
begin gem 'i18n', '>= 0.1.3' rescue Gem::LoadError $:.unshift "#{File.dirname(__FILE__)}/vendor/i18n-0.1.3/lib" end
will pick any gem instead of the vendored lib.
Updated by Anonymous over 13 years ago
Easily fixed.
Just replace all {{foo}} strings in your config/locales/*.yml file of your currently used language and redmine is working with i18n 0.5.0 and above.
Maybe redmine should depend on i18n 0.5 and convert all translations.
Updated by Anonymous over 13 years ago
Thomas von Deyen wrote:
Easily fixed.
Just replace all {{foo}} strings in your config/locales/*.yml file of your currently used language and redmine is working with i18n 0.5.0 and above.
Maybe redmine should depend on i18n 0.5 and convert all translations.
Sorry :)
Just replace all {{foo}} strings with %{foo}
Updated by Jean-Philippe Lang over 13 years ago
Of course it can be easily fixed. But adding a dependency in Redmine (eg. config.gem 'i18', :version => '0.5.0'
) won't do anything because Rails 2.3.5 will have already loaded the vendored i18n 0.1.3 if no i18n gem is installed.
I think the cleanest solution is to upgrade to latest Rails 2.3.x that natively supports the new i18n interpolation format.
Updated by Csaba Molnár over 13 years ago
I also experience the problem in this Defect with 1.0.4. At first, I solved it by replacing all {{foo}} strings with %{foo} in my .yml file. I had i18n 0.5.0 installed. However, one problem still remained. In several places, dates were displayed in the format 2010.12.{{count}}.
Downgrading to i18n 0.4.2 helped to some extent. Dates are now displayed correctly on the Tasks tab and the detail view of Tasks. But the problem still occurs on the Activity tab.
I can provide a gem list, if needed.
Updated by Jean-Philippe Lang over 13 years ago
- Status changed from New to Resolved
- Target version set to 1.0.5
Fix committed in trunk in r4516. I18n 0.4.2 is now required and will be loaded before rails tries to load a more recent one. Fix will be backported to 1.0-stable.
Updated by mathew murphy over 13 years ago
Wouldn't it be better to fix the .yml files so that they work with current versions of i18n?
Updated by James Byrne over 13 years ago
Updated by Jean-Philippe Lang over 13 years ago
mathew murphy wrote:
Wouldn't it be better to fix the .yml files so that they work with current versions of i18n?
The locales are now using the new syntax (r4518). But Redmine 1.1 will use i18n 0.4.2 so that plugins don't have to migrate their locales now. I18n 0.5.0 is no longer compatible with the old syntax.
Updated by Jean-Philippe Lang over 13 years ago
- Status changed from Resolved to Closed
- Resolution set to Fixed
Updated by Jean-Philippe Lang over 13 years ago
- Subject changed from v-1.0.4 trunk - see {{count}} in page display rather than value to See {{count}} in page display rather than value with i18n 0.5.0
Updated by David Muir over 13 years ago
I had this happen when I upgraded to 1.1.3 (from 1.0.3). I only have i18n 0.4.2 and 0.4.1 installed. I've tried the various fixes suggested, but none of them have helped.
Updated by Gabriela Mota about 13 years ago
David Muir wrote:
I had this happen when I upgraded to 1.1.3 (from 1.0.3). I only have i18n 0.4.2 and 0.4.1 installed. I've tried the various fixes suggested, but none of them have helped.
I got the same problem when migrating Redmine 1.1.3 from Webrick to Passenger + Apache2.
I have i18n version 0.4.2 installed, but still seeing tags like %{author} %{age} on my Issues pages.
My list of gems:
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
i18n (0.4.2)
rack (1.1.1, 1.0.1)
rails (2.3.11)
rake (0.9.0)
Regards.