I18N lazy lookup

ruby /home/rubys/git/rails/railties/bin/rails testapp
      create  
      create  app/controllers
      create  app/helpers
      create  app/models
      create  app/views/layouts
      create  config/environments
      create  config/initializers
      create  config/locales
      create  db
      create  doc
      create  lib
      create  lib/tasks
      create  log
      create  public/images
      create  public/javascripts
      create  public/stylesheets
      create  script/performance
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/performance
      create  test/unit
      create  vendor
      create  vendor/plugins
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  Rakefile
      create  README
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  config/database.yml
      create  config/routes.rb
      create  config/locales/en.yml
      create  db/seeds.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/new_rails_defaults.rb
      create  config/initializers/session_store.rb
      create  config/initializers/cookie_verification_secret.rb
      create  config/environment.rb
      create  config/boot.rb
      create  config/environments/production.rb
      create  config/environments/development.rb
      create  config/environments/test.rb
      create  script/about
      create  script/console
      create  script/dbconsole
      create  script/destroy
      create  script/generate
      create  script/runner
      create  script/server
      create  script/plugin
      create  script/performance/benchmarker
      create  script/performance/profiler
      create  test/test_helper.rb
      create  test/performance/browsing_test.rb
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/index.html
      create  public/favicon.ico
      create  public/robots.txt
      create  public/images/rails.png
      create  public/javascripts/prototype.js
      create  public/javascripts/effects.js
      create  public/javascripts/dragdrop.js
      create  public/javascripts/controls.js
      create  public/javascripts/application.js
      create  doc/README_FOR_APP
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log
ruby script/generate scaffold product title:string
      exists  app/models/
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/products
      exists  app/views/layouts/
      exists  test/functional/
      exists  test/unit/
      create  test/unit/helpers/
      exists  public/stylesheets/
      create  app/views/products/index.html.erb
      create  app/views/products/show.html.erb
      create  app/views/products/new.html.erb
      create  app/views/products/edit.html.erb
      create  app/views/layouts/products.html.erb
      create  public/stylesheets/scaffold.css
      create  app/controllers/products_controller.rb
      create  test/functional/products_controller_test.rb
      create  app/helpers/products_helper.rb
      create  test/unit/helpers/products_helper_test.rb
       route  map.resources :products
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
      create    app/models/product.rb
      create    test/unit/product_test.rb
      create    test/fixtures/products.yml
      create    db/migrate
      create    db/migrate/20100109205426_create_products.rb
rake db:migrate
mv 20100109205426_create_products.rb 20100301000001_create_products.rb
(in /home/rubys/tmp/work/testapp)
==  CreateProducts: migrating =================================================
-- create_table(:products)
   -> 0.0013s
==  CreateProducts: migrated (0.0015s) ========================================
 
edit config/locales/en.yml
# Sample localization file for English. Add more files in this directory for other locales.
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
 
en:
  products:
    index:
      hello: "Hello world!"
edit app/views/products/index.html.erb
<h1>Listing products</h1>
 
<table>
  <tr>
    <th>Title</th>
  </tr>
 
<% @products.each do |product| %>
  <tr>
    <td><%=h product.title %></td>
    <td><%= link_to 'Show', product %></td>
    <td><%= link_to 'Edit', edit_product_path(product) %></td>
    <td><%= link_to 'Destroy', product, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>
 
<br />
 
<%= link_to 'New product', new_product_path %>
<p class="hello"><%= t('.hello') %></p>

Start the server.

get /products

Listing products

Title

New product

Hello world!

Environment

Sat, 09 Jan 2010 20:54:34 GMT
/home/rubys/.rvm/ruby-1.8.7-p248/bin/ruby -v
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]
gem -v
1.3.5
gem list
abstract (1.0.0)
activesupport (2.3.5)
builder (2.1.2)
bundler (0.7.2)
erubis (2.6.5)
gorp (0.15.0)
htmlentities (4.2.0)
i18n (0.3.2)
mail (1.5.0)
mime-types (1.16)
rack (1.0.1)
rack-mount (0.4.0)
rack-test (0.5.3)
rake (0.8.7)
rdoc (2.4.3)
sqlite3-ruby (1.2.5)
test-unit (2.0.5)
tzinfo (0.3.15)
will_paginate (2.3.11)
echo $RUBYLIB | sed "s/:/\n/g"
/home/rubys/git/gorp/lib
/home/rubys/git/arel/lib
/home/rubys/git/rack/lib
ruby /home/rubys/git/rails/railties/bin/rails -v
Rails 2.3.5
git log -1
commit c50609c9f04e482680cf4e14fb0f4aa079753868
Merge: 94de32b 51e6124
Author: José Valim <jose.valim@gmail.com>
Date:   Sat Jan 9 00:25:14 2010 +0100

    Merge remote branch 'eloy/2-3-stable' into 2-3-stable