similar to: Interesting strangeness with I18n.t

Displaying 20 results from an estimated 10000 matches similar to: "Interesting strangeness with I18n.t"

2011 Jul 22
2
ActiveSupport not including i18n?
Went to use ActiveSupport in a gem today and got an error on account of not having i18n installed. Either bundler should be installing i18n along with activesupport or docs need to be updated. quick repro: https://github.com/softwaregravy/repro_active_support_i18n bundle exec irb require ''active_support/all'' detailed steps and error: 1) add to Gemfile require
2011 Jul 22
2
ActiveSupport not including i18n?
Went to use ActiveSupport in a gem today and got an error on account of not having i18n installed. Either bundler should be installing i18n along with activesupport or docs need to be updated. quick repro: https://github.com/softwaregravy/repro_active_support_i18n bundle exec irb require ''active_support/all'' detailed steps and error: 1) add to Gemfile require
2012 Mar 31
2
I18n.t('countries.NO') broken?
Hi I''ve tried this on a virgin Rails 3.2.2 app. If you put the translations for country names in the locale file using the 2 letter ISO code, it looks something like this: en: countries: DE: "Germany" NO: "Norway" US: "USA" This works fine - but for Norway :-) I18n.t :''countries.DE'' # => "Germany" I18n.t
2009 Jan 23
0
NameError: uninitialized constant I18n
Just installed the plugin as described on the link below. http://factore.ca/on-the-floor/11-introducing-has-foreign-language-an-easy-database-internationalization-plugin If i fire up my console and then: I18n.default_locale = "en" i got the error message: NameError: uninitialized constant I18n from
2009 Aug 14
0
country select with i18n
I am trying to manage the country names with i18n. I have a countries table with the countries extension codes (us., co., ve., .bo. etc...) and the yml files with their complete names: en: countries: ar: Argentina co: Colombia . I am trying to make a form with a select option for country and came up with this: <%= f.select("country_id", Country.all.collect {|p| [ t
2008 Dec 25
0
link_to_unless_current & I18n.t
How can I use link_to_unless_current with I18n.t localization? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group,
2010 Aug 21
2
Rails 3: I18n.locale not set to I18n.default_locale in production
I have an application that uses I18n, but in the first deployment, I don''t want to enable different languages per user/request because there are very few users who all speak german). Therefore I have config.i18n.default_locale = :de in config/ application.rb. I have no code whatsoever to set/change I18n.locale in my app. In development environment, it works as expected: the
2009 Jun 24
3
I18N: allocator undefined for Proc
Hello all, I''m trying to translate my application using the I18N feature and it was working fine until I added a couple of new entries to the en.yml files. Now in every action in my application I always get the following error: TypeError in Account#login Showing app/views/account/login.rhtml where line #2 raised: allocator undefined for Proc Extracted source (around line #2): 1: 2:
2006 May 05
0
Updating Squirrelmail-i18n dependency
Because of a folder display problem caused by certain character encodings used in some email headers we had previously updated to squirrelmail-1.4.6-1 and installed squirrelmail-i18n-1.4.6-1 to cope. Yum is now trying to update our installation with the latest offical Centos release but there does not seem to be a corresponding squirrelmail-i18n rpm available in any of the repositories which is
2010 Jul 23
0
alias_method_chain with i18n
Hello, I was investigating solutions for i18n with will_paginate and I found a possible solution at http://lawrencesong.net/2009/01/enable-i18n-in-will_paginate-plugin/ The author adds to application_helper.rb the following code: ############################################# include WillPaginate::ViewHelpers def will_paginate_with_i18n(collection, options = {})
2010 Oct 01
1
I18n.with_options bloc executed TWICE
Hi, to avoid putting the whole locale scope on every I18n.t call I''m trying to use a scope, as stated in the doc (http://guides.rubyonrails.org/active_support_core_extensions.html#with_options) I tried with <%= I18n.with_options :locale => :en, :scope => ''portal.visitor_menu'' do |i18n|%> Try <%= i18n.t :fav_songs %> <% end %> But it produce
2012 Oct 10
0
Setting locale directories for I18n
Rails 3.1.3 I would like to apply i18n for my application. Since there are many yml files in config/locales directory, I have made subdirectories so that the maintenance will be easier. For example, config/locales/devise/ date/ top/ ... Each subdirectories contain corresponding locale files that are applied when users change
2010 Jul 10
0
`method_missing': undefined method `i18n' for #<Rails::Railtie::Configuration:0x000001010fce98>
I have recently upgraqded to Ruby 1.9.2-rc1 and reinstalled rails 3 beta 4 with all the dependencies. I have run bundle install in my rails project. Now I am trying to run some tests... My test_helper.rb file looks like this: # test_helper.rb require ''rubygems'' require ''test/unit'' require ''rails/all'' $ gem list i18n (0.4.1, 0.3.7)
2009 Jan 17
2
active_scaffold + i18n
Hello all, I have a project where I''m using active_scaffold and would also like to use i18n over it. While the i18n works fine if I just ignore the active_scaffold, I couldn''t get it running with it. I searched through its docs and googled quite a bit. Can I use i18n with active_scaffold? thanks cheers -- gallois aka Felipe Gallois blog: www.gallois.com.br/blog fanglib
2008 Dec 14
0
Newbee met problems when do some i18n on rails
1. I have download the zh-CN.yml file from http://github.com/svenfuchs/rails-i18n/tree/master/rails locale 2. I have put this zh-CN.yml in to my locales folder. 3. I have modified the enviorment.rb like follow: config.i18n.load_path << Dir[File.join(RAILS_ROOT, ''my'', ''locales'', ''*. {rb,yml}'')] config.i18n.default_locale =
2011 May 25
1
can't load hpricot gem in rails 3
This is in windows .. So from irb, I can load hpricot ok. (ruby 1.8.7) C:\Users\Laurence\rails-play\plug-test>irb irb(main):001:0> require ''hpricot'' LoadError: no such file to load -- hpricot from (irb):1:in `require'' from (irb):1 irb(main):002:0> require ''rubygems'' => true irb(main):003:0> require
2011 Sep 05
1
I18n.locale Setting invalid
I like this set of code: before_filter :set_language def set_language request_language = request.env[''HTTP_ACCEPT_LANGUAGE''] request_language = request_language.nil? ? nil : request_language[/[^,;]+/] I18n.locale = request_language if request_language && File.exist?("#{Rails.root.to_s}/config/locales/#{request_language}.yml") end if i setting
2009 May 03
1
Localizing attributes when using I18n
Currently I''m developing a multilingual app on rails 2.2. I liked very much the idea of Xavier Defrang to provide a locale-aware accessor for the fields that needs a translation: http://defrang.com/articles/2005/12/02/playing-with-rails-i18n I modified code a little to make it work with rails 2.2: def self.localize(*attribute_names) attribute_names.each do |attribute_name|
2010 Apr 05
0
I18n in ruby scripts
Hello, I created a ruby script for my RubyOnRails application that send a mail to my application users. This script is executed using a cron job everyday at midnight. Ok so that part works just great. My problem is that I have to use RubyOnRails I18n system to translate a large part of the emails sent and it doesn''t seems to work (translation is not done). I''m using the
2009 Nov 09
0
Is there a way to get I18n.locale on a User model?
I''m trying to validate a User model using custom :message. I always get I18n.locale default value. Is there a way to get I18n current_locale? -- Posted via http://www.ruby-forum.com/.