<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">1366</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-11-03T17:54:42+00:00</created-at>
  <creator-id type="integer">1366</creator-id>
  <milestone-due-on type="datetime">2009-01-12T00:00:00+00:00</milestone-due-on>
  <milestone-id type="integer">21487</milestone-id>
  <number type="integer">23</number>
  <permalink>rails-i18</permalink>
  <priority type="integer">5</priority>
  <project-id type="integer">16213</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>published</state>
  <tag>guides i18n</tag>
  <title>Rails I18n</title>
  <updated-at type="datetime">2010-02-04T00:21:21+00:00</updated-at>
  <user-id type="integer">25224</user-id>
  <user-name>omarqureshi</user-name>
  <creator-name>Pratik</creator-name>
  <assigned-user-name>Pratik</assigned-user-name>
  <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
  <milestone-title>Guides Batch 2</milestone-title>
  <original-body>Guide that covers all public facing features of Rails I18 that'll help people to write plugins on top of them or use it directly in theor apps. Also cover the best practices and useful plugins.</original-body>
  <latest-body>Guide that covers all public facing features of Rails I18 that'll help people to write plugins on top of them or use it directly in theor apps. Also cover the best practices and useful plugins.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;Guide that covers all public facing features of Rails I18
that'll help people to write plugins on top of them or use it
directly in theor apps. Also cover the best practices and useful
plugins.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Guide that covers all public facing features of Rails I18 that'll help people to write plugins on top of them or use it directly in theor apps. Also cover the best practices and useful plugins.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Guide that covers all public facing features of Rails I18
that'll help people to write plugins on top of them or use it
directly in theor apps. Also cover the best practices and useful
plugins.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-11-03T17:54:42+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>available</state>
      <tag nil="true"></tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2008-11-03T17:54:45+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This is being worked on by Sven.</body>
      <body-html>&lt;div&gt;&lt;p&gt;This is being worked on by Sven.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-11-03T17:54:58+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:state: available
</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag nil="true"></tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2008-11-03T17:55:01+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Ping</body>
      <body-html>&lt;div&gt;&lt;p&gt;Ping&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-12-31T14:49:32+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag nil="true"></tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2008-12-31T14:49:35+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I've updated the introduction section a bit and am starting re-writing the &quot;Setting and passing locale&quot; section. Any feedback appreciated.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I've updated the introduction section a bit and am starting
re-writing the &quot;Setting and passing locale&quot; section. Any feedback
appreciated.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-01-17T21:08:09+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 
</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-01-17T21:08:11+00:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Some notes :

- This guide needs to talk about http://github.com/rails/rails/commit/a98cd7ca9b2f24a4500963e58ba5c37d6bdf9259 somewhere
- Browser screenshots need to get rid of the shadow
- The current TODO has &quot;Using GeoIP (or similar) database&quot; and &quot;User profile&quot;. I don't think those belong to the guide. Probably just 1-2 lines without code.
- &quot;request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first&quot; -- maybe that should be in core ?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Some notes :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This guide needs to talk about &lt;a href=&quot;http://github.com/rails/rails/commit/a98cd7ca9b2f24a4500963e58ba5c37d6bdf9259&quot;&gt;
http://github.com/rails/rails/co...&lt;/a&gt; somewhere&lt;/li&gt;
&lt;li&gt;Browser screenshots need to get rid of the shadow&lt;/li&gt;
&lt;li&gt;The current TODO has &quot;Using GeoIP (or similar) database&quot; and
&quot;User profile&quot;. I don't think those belong to the guide. Probably
just 1-2 lines without code.&lt;/li&gt;
&lt;li&gt;&quot;request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first&quot;
-- maybe that should be in core ?&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-01-26T15:22:28+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-01-26T15:22:32+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>hi guys,

regarding this part of the guide :

&quot;(For instance, in the :en-US locale you would have $ as a currency symbol, while in :en-UK, you would have &#8364;.&quot;

I don't think en-UK buddies will appreciate have &#8364; as their official money :D
Looks like it's more &#163;

thanks
Philippe</body>
      <body-html>&lt;div&gt;&lt;p&gt;hi guys,&lt;/p&gt;
&lt;p&gt;regarding this part of the guide :&lt;/p&gt;
&lt;p&gt;&quot;(For instance, in the :en-US locale you would have $ as a
currency symbol, while in :en-UK, you would have &amp;#8364;.&quot;&lt;/p&gt;
&lt;p&gt;I don't think en-UK buddies will appreciate have &amp;#8364; as
their official money :D Looks like it's more &amp;pound;&lt;/p&gt;
&lt;p&gt;thanks Philippe&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-04T10:42:01+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-02-04T10:42:05+00:00</updated-at>
      <user-id type="integer">19160</user-id>
      <user-name>Gravis</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>@Gravis -- Thanks, fixed in http://github.com/lifo/docrails/commit/e0d79fbf041033b5dc97aaf2df8a84fefdb91470

--karmi</body>
      <body-html>&lt;div&gt;&lt;p&gt;@Gravis -- Thanks, fixed in &lt;a href=&quot;http://github.com/lifo/docrails/commit/e0d79fbf041033b5dc97aaf2df8a84fefdb91470&quot;&gt;
http://github.com/lifo/docrails/...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;--karmi&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-04T11:11:35+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-02-04T11:11:37+00:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Hey,

I'm still waiting for the fixes on my feedback.

Thanks :)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;I'm still waiting for the fixes on my feedback.&lt;/p&gt;
&lt;p&gt;Thanks :)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-07T03:07:29+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-02-07T03:07:30+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Hi Pratik,

sorry, you're right.

&gt; Localized templates
Hm... I was asking on #docrails -- should we put this in when it's still in flux and appears to be buggy as well (http://groups.google.com/group/rubyonrails-core/browse_thread/thread/391fac6373e0fbf9?hl=en). I am waiting for how things settle down in release.

&gt;&#160;Browser screenshots need to get rid of the shadow

O rlly? :) OK, will try.

&gt;&#160;The current TODO has &quot;Using GeoIP (or similar) database&quot; and &quot;User profile&quot;

As you see in the guide, I've put just some basic info there, so people know you've got more options with regard to locale then to stick ?locale=en into every URL.

&gt;&#160;&quot;request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first&quot; -- maybe that should be in core ?

That's just a naive implementation for the guide. Iaian's plugin and Ryan's middleware solve that very well...

I plan to incorporate also this feedback: http://groups.google.com/group/rails-i18n/msg/7b4513b3ca8abbf5?hl=en into it.

Cheers,

Karel</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hi Pratik,&lt;/p&gt;
&lt;p&gt;sorry, you're right.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Localized templates Hm... I was asking on #docrails -- should we
put this in when it's still in flux and appears to be buggy as well
(&lt;a href=&quot;http://groups.google.com/group/rubyonrails-core/browse_thread/thread/391fac6373e0fbf9?hl=en&quot;&gt;http://groups.google.com/group/r...&lt;/a&gt;).
I am waiting for how things settle down in release.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Browser screenshots need to get rid of the shadow&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;O rlly? :) OK, will try.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;The current TODO has &quot;Using GeoIP (or similar) database&quot;
and &quot;User profile&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As you see in the guide, I've put just some basic info there, so
people know you've got more options with regard to locale then to
stick ?locale=en into every URL.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
&amp;nbsp;&quot;request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first&quot;
-- maybe that should be in core ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That's just a naive implementation for the guide. Iaian's plugin
and Ryan's middleware solve that very well...&lt;/p&gt;
&lt;p&gt;I plan to incorporate also this feedback: &lt;a href=&quot;http://groups.google.com/group/rails-i18n/msg/7b4513b3ca8abbf5?hl=en&quot;&gt;
http://groups.google.com/group/r...&lt;/a&gt; into it.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Karel&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-07T09:38:16+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-02-07T09:38:19+00:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>About the &quot;5.1.1 Error message scopes&quot;, I think this part is not very clear for first readers really.</body>
      <body-html>&lt;div&gt;&lt;p&gt;About the &quot;5.1.1 Error message scopes&quot;, I think this part is not
very clear for first readers really.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-16T00:05:13+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-02-16T00:05:14+00:00</updated-at>
      <user-id type="integer">31905</user-id>
      <user-name>droide</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Is the application supposed to reset I18n.locale after each request? The guide doesn't mention this.

People are reporting that, if they set I18n.locale in a before filter, subsequent requests that don't have that before filter will have the same locale as the one last set. This doesn't happen in Mongrel because Mongrel uses a different thread for each request, and I18n.locale is thread-local, so people think that this is a Passenger bug. I think it's not.

In any case, Rails doesn't seem to reset I18n.locale automatically after every request. This makes me wonder whether this behavior is intentional or a bug.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Is the application supposed to reset I18n.locale after each
request? The guide doesn't mention this.&lt;/p&gt;
&lt;p&gt;People are reporting that, if they set I18n.locale in a before
filter, subsequent requests that don't have that before filter will
have the same locale as the one last set. This doesn't happen in
Mongrel because Mongrel uses a different thread for each request,
and I18n.locale is thread-local, so people think that this is a
Passenger bug. I think it's not.&lt;/p&gt;
&lt;p&gt;In any case, Rails doesn't seem to reset I18n.locale
automatically after every request. This makes me wonder whether
this behavior is intentional or a bug.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-19T21:43:16+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-02-19T21:43:23+00:00</updated-at>
      <user-id type="integer">10679</user-id>
      <user-name>Hongli Lai</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Take a look at http://groups.google.com/group/phusion-passenger/t/6202fb4d8f750c31?hl=en for the Phusion Passenger problem report by users.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Take a look at &lt;a href=&quot;http://groups.google.com/group/phusion-passenger/t/6202fb4d8f750c31?hl=en&quot;&gt;
http://groups.google.com/group/p...&lt;/a&gt; for the Phusion Passenger
problem report by users.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-19T21:48:12+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18</title>
      <updated-at type="datetime">2009-02-19T21:48:15+00:00</updated-at>
      <user-id type="integer">10679</user-id>
      <user-name>Hongli Lai</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Please consider reading this post: http://www.ruby-forum.com/topic/...

Brief: hash paths from the guide seem to be different from the actual ones being used.

Full description of the issue is in the post at ruby-forum.

Alex</body>
      <body-html>&lt;div&gt;&lt;p&gt;Please consider reading this post: &lt;a href=&quot;http://www.ruby-forum.com/topic/...%3C/p&quot;&gt;http://www.ruby-forum.com/topic/...&lt;/a&gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;Brief: hash paths from the guide seem to be different from the
actual ones being used.&lt;/p&gt;
&lt;p&gt;Full description of the issue is in the post at ruby-forum.&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-23T02:03:42+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:title: Rails I18
</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>I18n hash lookup paths seem to be wrong</title>
      <updated-at type="datetime">2009-02-23T02:03:43+00:00</updated-at>
      <user-id type="integer">48352</user-id>
      <user-name>Alex Fortuna</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-23T02:04:08+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:title: I18n hash lookup paths seem to be wrong
</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-23T02:04:10+00:00</updated-at>
      <user-id type="integer">48352</user-id>
      <user-name>Alex Fortuna</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Sorry for occasionally changing the title. I thought that was my comment's title. Please fix as appropriate.


Alex</body>
      <body-html>&lt;div&gt;&lt;p&gt;Sorry for occasionally changing the title. I thought that was my
comment's title. Please fix as appropriate.&lt;/p&gt;
&lt;p&gt;Alex&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-23T02:05:51+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-23T02:05:54+00:00</updated-at>
      <user-id type="integer">48352</user-id>
      <user-name>Alex Fortuna</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>@Alex: Please post correct URL for the discussion or paste here... Thanks!</body>
      <body-html>&lt;div&gt;&lt;p&gt;@Alex: Please post correct URL for the discussion or paste
here... Thanks!&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-23T08:27:39+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-23T08:27:43+00:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Karel

This is the post:
http://www.ruby-forum.com/topic/179273

If it fails this time, I'll re-post the body here.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Karel&lt;/p&gt;
&lt;p&gt;This is the post: &lt;a href=&quot;http://www.ruby-forum.com/topic/179273&quot;&gt;http://www.ruby-forum.com/topic/...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If it fails this time, I'll re-post the body here.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-23T16:03:02+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-23T16:03:08+00:00</updated-at>
      <user-id type="integer">48352</user-id>
      <user-name>Alex Fortuna</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>&gt; 3.3 Organization of locale files

@@@
For example, your config/locale directory could look like this:
|-defaults
|---es.rb
|---en.rb
|-models
|---book
|-----es.rb
|-----en.rb
|-views
|---defaults
|-----es.rb
|-----en.rb
...
@@@

Anyone tried that kind of structure? I tried placing those `.rb` files under listed locations -- it looks like nobody's reading them. `I18n.load_path` doesn't seem to be anyhow aware.

What is meant by the words _could look like this_? If it isn't available by default, I guess we should write what's needed to make it work.</body>
      <body-html>&lt;div&gt;&lt;blockquote&gt;
&lt;p&gt;3.3 Organization of locale files&lt;/p&gt;
&lt;/blockquote&gt;


&lt;pre&gt;&lt;code&gt;
For example, your config/locale directory could look like this:
|-defaults
|---es.rb
|---en.rb
|-models
|---book
|-----es.rb
|-----en.rb
|-views
|---defaults
|-----es.rb
|-----en.rb
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Anyone tried that kind of structure? I tried placing those
&lt;code&gt;.rb&lt;/code&gt; files under listed locations -- it looks like
nobody's reading them. &lt;code&gt;I18n.load_path&lt;/code&gt; doesn't seem to
be anyhow aware.&lt;/p&gt;
&lt;p&gt;What is meant by the words &lt;em&gt;could look like this&lt;/em&gt;? If it
isn't available by default, I guess we should write what's needed
to make it work.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-23T18:40:25+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-23T18:40:26+00:00</updated-at>
      <user-id type="integer">48352</user-id>
      <user-name>Alex Fortuna</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>We have a structure that is similar to that for our 2.2 app, and added a line (in locale.rb initializer) to do:

@@@
I18n.load_path += Dir.glob(File.join(RAILS_ROOT, 'config', 'locales', '**', '*.{rb,yml}'))
@@@</body>
      <body-html>&lt;div&gt;&lt;p&gt;We have a structure that is similar to that for our 2.2 app, and
added a line (in locale.rb initializer) to do:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
I18n.load_path += Dir.glob(File.join(RAILS_ROOT, 'config', 'locales', '**', '*.{rb,yml}'))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-23T19:09:17+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-23T19:09:20+00:00</updated-at>
      <user-id type="integer">22258</user-id>
      <user-name>Mike Champion</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>@Alex: Indeed, the default Rails loading mechanism does not load nested locales like this. You have to add the glob `**`&#160;like @Mike was kind enough to advice. I'll update the guide accordingly.

Your locale organization _could_ look like this, if you'd need such deeply nested structure. There're uses when single `es.yml` file would be more than enough.

Please report any other issues you would have with the guide,

best,

Karel</body>
      <body-html>&lt;div&gt;&lt;p&gt;@Alex: Indeed, the default Rails loading mechanism does not load
nested locales like this. You have to add the glob
&lt;code&gt;**&lt;/code&gt;&amp;nbsp;like @Mike was kind enough to advice. I'll
update the guide accordingly.&lt;/p&gt;
&lt;p&gt;Your locale organization &lt;em&gt;could&lt;/em&gt; look like this, if you'd
need such deeply nested structure. There're uses when single
&lt;code&gt;es.yml&lt;/code&gt; file would be more than enough.&lt;/p&gt;
&lt;p&gt;Please report any other issues you would have with the
guide,&lt;/p&gt;
&lt;p&gt;best,&lt;/p&gt;
&lt;p&gt;Karel&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-25T07:46:35+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-25T07:46:39+00:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>@Alex: Regarding the ActiveRecord namespace lookup, there is probably some issue or bug in implementation. It should work as the guide states, but it does not. Please file a separate ticket for this...

Karel</body>
      <body-html>&lt;div&gt;&lt;p&gt;@Alex: Regarding the ActiveRecord namespace lookup, there is
probably some issue or bug in implementation. It should work as the
guide states, but it does not. Please file a separate ticket for
this...&lt;/p&gt;
&lt;p&gt;Karel&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-25T08:15:36+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-25T08:15:42+00:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks, good guide. Couple things though.

Following code didn't work as such when pasted to console (raises undefined method error when trying to test):
@@@
module I18n
  def just_raise_that_exception(*args)
    raise args.first
  end
end
I18n.exception_handler = :just_raise_that_exception
@@@

It could be e.g.:
@@@
module I18n
  class &lt;&lt; self
    def just_raise_that_exception(*args)
      raise args.first
    end
  end
end
I18n.exception_handler = 'just_raise_that_exception'
@@@


I would also add links to different backends. You mention globalize so you could also link to that one, i.e. http://github.com/joshmh/globalize2/tree/master</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks, good guide. Couple things though.&lt;/p&gt;
&lt;p&gt;Following code didn't work as such when pasted to console
(raises undefined method error when trying to test):&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
module I18n
  def just_raise_that_exception(*args)
    raise args.first
  end
end
I18n.exception_handler = :just_raise_that_exception
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It could be e.g.:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
module I18n
  class &amp;lt;&amp;lt; self
    def just_raise_that_exception(*args)
      raise args.first
    end
  end
end
I18n.exception_handler = 'just_raise_that_exception'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I would also add links to different backends. You mention
globalize so you could also link to that one, i.e. &lt;a href=&quot;http://github.com/joshmh/globalize2/tree/master&quot;&gt;http://github.com/joshmh/globali...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-26T21:50:25+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-02-26T21:50:30+00:00</updated-at>
      <user-id type="integer">48866</user-id>
      <user-name>holli</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>@Alex: The issue with AR error messages lookup has been fixed now: http://github.com/lifo/docrails/commit/61656cf7702f46fcbb810a70bf0298ac5ea6c0d3

Many thanks for the bug report.

--karmi</body>
      <body-html>&lt;div&gt;&lt;p&gt;@Alex: The issue with AR error messages lookup has been fixed
now: &lt;a href=&quot;http://github.com/lifo/docrails/commit/61656cf7702f46fcbb810a70bf0298ac5ea6c0d3&quot;&gt;
http://github.com/lifo/docrails/...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Many thanks for the bug report.&lt;/p&gt;
&lt;p&gt;--karmi&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-01T12:05:11+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-03-01T12:05:14+00:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Hello all,

I have put some fixes in:

* [Fixed incorrect examples of ActiveRecord error message lookup in the I18N guide [Thanks Alex Fortuna]](http://github.com/lifo/docrails/commit/61656cf7702f46fcbb810a70bf0298ac5ea6c0d3)

* [Added information about &quot;lazy lookup&quot; inside views (`t '.foo'`) in I18N guide](http://github.com/lifo/docrails/commit/a6f1e42c096a626b8a071094545d35f90d19ab55)

* [Clarified info about &quot;pragmatic approach to locale codes&quot; and removed speculation about &quot;locale inheritance&quot; in the I18N guide [thanks Kip]](http://github.com/lifo/docrails/commit/959b827e40248691864221d9d8561f17fb5755a6)

* [Added information about &quot;Localized views&quot; into I18N guide](http://github.com/lifo/docrails/commit/92dd9b3e9f7bffe16ec53aeefd048d7da4eb1543)

* [Added note how to configure Rails loading mechanism to look for nested locale files (+config/locales/models/book/es.yml+, etc) to the I18N guide](http://github.com/lifo/docrails/commit/48d4c0f0116117e45fd268f9fa8ae502d7f15cc7)

* [Get rid of drop shadows in screenshots for the I18N guide](http://github.com/lifo/docrails/commit/e1c0763e47f76b916324c5a062b50ede41a51e3c)

More feedback appreciated!

--karmi</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;I have put some fixes in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/lifo/docrails/commit/61656cf7702f46fcbb810a70bf0298ac5ea6c0d3&quot;&gt;
Fixed incorrect examples of ActiveRecord error message lookup in
the I18N guide [Thanks Alex Fortuna]&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/lifo/docrails/commit/a6f1e42c096a626b8a071094545d35f90d19ab55&quot;&gt;
Added information about &quot;lazy lookup&quot; inside views (&lt;code&gt;t
'.foo'&lt;/code&gt;) in I18N guide&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/lifo/docrails/commit/959b827e40248691864221d9d8561f17fb5755a6&quot;&gt;
Clarified info about &quot;pragmatic approach to locale codes&quot; and
removed speculation about &quot;locale inheritance&quot; in the I18N guide
[thanks Kip]&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/lifo/docrails/commit/92dd9b3e9f7bffe16ec53aeefd048d7da4eb1543&quot;&gt;
Added information about &quot;Localized views&quot; into I18N guide&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/lifo/docrails/commit/48d4c0f0116117e45fd268f9fa8ae502d7f15cc7&quot;&gt;
Added note how to configure Rails loading mechanism to look for
nested locale files (+config/locales/models/book/es.yml+, etc) to
the I18N guide&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/lifo/docrails/commit/e1c0763e47f76b916324c5a062b50ede41a51e3c&quot;&gt;
Get rid of drop shadows in screenshots for the I18N guide&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More feedback appreciated!&lt;/p&gt;
&lt;p&gt;--karmi&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-01T14:57:57+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-03-01T14:57:59+00:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Karel, thanks for all the awesome work on the guide. You totally rock :)

Pratik, I think the guide is ready.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Karel, thanks for all the awesome work on the guide. You totally
rock :)&lt;/p&gt;
&lt;p&gt;Pratik, I think the guide is ready.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-08T23:07:01+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-03-08T23:07:05+00:00</updated-at>
      <user-id type="integer">7400</user-id>
      <user-name>Sven Fuchs</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-14T16:47:39+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 1366
</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>taken</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-03-14T16:47:42+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-03-14T22:04:50+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:state: taken
</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-03-14T22:04:53+00:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Well written guide. Couple of things though:

* Guide mentions relative path of 'config/locale' in some places and 'config/locales' in others. Looking at the comment in enviroment.rb and from experience it should be 'config/locales' in all instances.
* The sentence which reads 'The default environment.rb files has instruction how to add locales from another directory and how to set a different default locale.' would read better as 'The default environment.rb file has instructions on how to add locales from another directory and how to set a different default locale.'
* The sentence beginning 'As a user you should always only access the public methods...' _may_ read better as 'As a user you should only ever access the public methods...'</body>
      <body-html>&lt;div&gt;&lt;p&gt;Well written guide. Couple of things though:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Guide mentions relative path of 'config/locale' in some places
and 'config/locales' in others. Looking at the comment in
enviroment.rb and from experience it should be 'config/locales' in
all instances.&lt;/li&gt;
&lt;li&gt;The sentence which reads 'The default environment.rb files has
instruction how to add locales from another directory and how to
set a different default locale.' would read better as 'The default
environment.rb file has instructions on how to add locales from
another directory and how to set a different default locale.'&lt;/li&gt;
&lt;li&gt;The sentence beginning 'As a user you should always only access
the public methods...' &lt;em&gt;may&lt;/em&gt; read better as 'As a user you
should only ever access the public methods...'&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-04-24T21:23:48+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-04-24T21:23:51+01:00</updated-at>
      <user-id type="integer">55143</user-id>
      <user-name>Paul Gillard</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Paul would you like to contribute those changes yourself? If that was the case please just PM lifo to join docrails.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Paul would you like to contribute those changes yourself? If
that was the case please just PM lifo to join docrails.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-04-24T22:36:31+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-04-24T22:36:32+01:00</updated-at>
      <user-id type="integer">11378</user-id>
      <user-name>Xavier Noria</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Hello Paul,

thanks for the report! I have fixed the `config/locale(s)` issue, and put your better wording of environment.rb example in.

* http://github.com/lifo/docrails/commit/7163b64d32fa57ce9bd78710aea2fe0d2283522f
* http://github.com/lifo/docrails/commit/4f623f5f89b5d2e3299f16314880e3c75d6b2c6a

I would keep the last item as it is now. As a user one definitely _should_ only access public methods, but there are quite valid cases for &quot;disobeying&quot; .). Eg. force-initializing the locale loading/parsing, etc.

Thanks again!,

Karel</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hello Paul,&lt;/p&gt;
&lt;p&gt;thanks for the report! I have fixed the
&lt;code&gt;config/locale(s)&lt;/code&gt; issue, and put your better wording of
environment.rb example in.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/lifo/docrails/commit/7163b64d32fa57ce9bd78710aea2fe0d2283522f&quot;&gt;
http://github.com/lifo/docrails/...&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/lifo/docrails/commit/4f623f5f89b5d2e3299f16314880e3c75d6b2c6a&quot;&gt;
http://github.com/lifo/docrails/...&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I would keep the last item as it is now. As a user one
definitely &lt;em&gt;should&lt;/em&gt; only access public methods, but there
are quite valid cases for &quot;disobeying&quot; .). Eg. force-initializing
the locale loading/parsing, etc.&lt;/p&gt;
&lt;p&gt;Thanks again!,&lt;/p&gt;
&lt;p&gt;Karel&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-04-25T10:36:24+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-04-25T10:36:27+01:00</updated-at>
      <user-id type="integer">16364</user-id>
      <user-name>Karel Mina&#345;&#237;k</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>One thing the guide doesn't mention is the use of I18n in model constant during production mode.

When the models are loaded, I18n hasn't loaded the app locales, so a translation missing text gets put there instead.

Then the model is cached in production mode and every subsequent request returns that missing text.

I haven't found a solution that works without modification to all calls to the constant. Any ideas?</body>
      <body-html>&lt;div&gt;&lt;p&gt;One thing the guide doesn't mention is the use of I18n in model
constant during production mode.&lt;/p&gt;
&lt;p&gt;When the models are loaded, I18n hasn't loaded the app locales,
so a translation missing text gets put there instead.&lt;/p&gt;
&lt;p&gt;Then the model is cached in production mode and every subsequent
request returns that missing text.&lt;/p&gt;
&lt;p&gt;I haven't found a solution that works without modification to
all calls to the constant. Any ideas?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-08T00:21:02+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-07-08T00:21:07+01:00</updated-at>
      <user-id type="integer">26790</user-id>
      <user-name>Kieran P</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Furthermore, the above issues with translations not being loaded also affects validations. :message =&gt; I18n.t('')  doesn't work for example (missing translation). Not sure whether this is a bug, or something to work around...</body>
      <body-html>&lt;div&gt;&lt;p&gt;Furthermore, the above issues with translations not being loaded
also affects validations. :message =&amp;gt; I18n.t('') doesn't work
for example (missing translation). Not sure whether this is a bug,
or something to work around...&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-08T00:38:51+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-07-08T00:38:57+01:00</updated-at>
      <user-id type="integer">26790</user-id>
      <user-name>Kieran P</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7211</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>@Kieran using constants for storing strings won't work, since as you point out it won't observe the current locale. A similar issue with the message validations, since the &quot;I18n.t&quot; is evaluated to form the message at class-loading time.</body>
      <body-html>&lt;div&gt;&lt;p&gt;@Kieran using constants for storing strings won't work, since as
you point out it won't observe the current locale. A similar issue
with the message validations, since the &quot;I18n.t&quot; is evaluated to
form the message at class-loading time.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-08T01:09:28+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-07-08T01:09:34+01:00</updated-at>
      <user-id type="integer">22258</user-id>
      <user-name>Mike Champion</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Mike Gunderloy</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Hi, small chages, work's for me on rails 2.3.2:
http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the-domain-name
&lt;code&gt;
def set_locale
  I18n.locale = extract_locale_from_tld
end

def extract_locale_from_tld # !! there is _uri call and _tld definition in guide
  parsed_domain = request.host.split('.').last
  locale = DOMAIN_LOCALE_MAP.has_key?(parsed_domain) ? DOMAIN_LOCALE_MAP[parsed_domain] : parsed_domain
  (I18n.available_locales.include? locale.to_sym) ? locale : nil
end
&lt;/code&gt;
Where DOMAIN_LOCALE_MAP is hash in environment:
&lt;code&gt;
# Map 1. level domain on locale
DOMAIN_LOCALE_MAP = {
  'com' =&gt; 'cz',
  'eu' =&gt; 'en'
}
&lt;/code&gt;</body>
      <body-html>&lt;div&gt;&lt;p&gt;Hi, small chages, work's for me on rails 2.3.2:&lt;br&gt;
&lt;a href=
&quot;http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the-domain-name&quot;&gt;
http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the...&lt;/a&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
def set_locale&lt;br&gt;
I18n.locale = extract_locale_from_tld end&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;def extract_locale_from_tld # !! there is &lt;em&gt;uri call and&lt;/em&gt;
tld definition in guide&lt;br&gt;
parsed_domain = request.host.split('.').last locale =
DOMAIN_LOCALE_MAP.has_key?(parsed_domain) ?
DOMAIN_LOCALE_MAP[parsed_domain] : parsed_domain
(I18n.available_locales.include? locale.to_sym) ? locale : nil
end&lt;br&gt;
&lt;br&gt;
Where DOMAIN_LOCALE_MAP is hash in environment:&lt;br&gt;
&lt;code&gt;&lt;br&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h1&gt;Map 1. level domain on locale&lt;/h1&gt;
&lt;p&gt;= { 'com' =&amp;gt; 'cz', 'eu' =&amp;gt; 'en' }&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-23T15:52:39+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 7211
</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-07-23T15:52:43+01:00</updated-at>
      <user-id type="integer">63782</user-id>
      <user-name>PEpe</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>my first post, sorry for formatting, again:

Hi, small chages, work's for me on rails 2.3.2: http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the-domain-name

@@@ ruby
def set_locale
  I18n.locale = extract_locale_from_tld
end

def extract_locale_from_tld # !! there is uri call and tld definition in guide
  parsed_domain = request.host.split('.').last
  locale = DOMAIN_LOCALE_MAP.has_key?(parsed_domain) ? DOMAIN_LOCALE_MAP[parsed_domain] : parsed_domain
  (I18n.available_locales.include? locale.to_sym) ? locale : nil
end
@@@

Where DOMAIN_LOCALE_MAP is hash in environment:

@@@ ruby
# Map 1. level domain on locale
DOMAIN_LOCALE_MAP = { 'com' =&gt; 'cz', 'eu' =&gt; 'en' }
@@@</body>
      <body-html>&lt;div&gt;&lt;p&gt;my first post, sorry for formatting, again:&lt;/p&gt;
&lt;p&gt;Hi, small chages, work's for me on rails 2.3.2: &lt;a href=
&quot;http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the-domain-name&quot;&gt;
http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the...&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;def set_locale
  I18n.locale = extract_locale_from_tld
end

def extract_locale_from_tld # !! there is uri call and tld definition in guide
  parsed_domain = request.host.split('.').last
  locale = DOMAIN_LOCALE_MAP.has_key?(parsed_domain) ? DOMAIN_LOCALE_MAP[parsed_domain] : parsed_domain
  (I18n.available_locales.include? locale.to_sym) ? locale : nil
end&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Where DOMAIN_LOCALE_MAP is hash in environment:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;# Map 1. level domain on locale
DOMAIN_LOCALE_MAP = { 'com' =&amp;gt; 'cz', 'eu' =&amp;gt; 'en' }&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-23T15:58:11+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-07-23T15:58:14+01:00</updated-at>
      <user-id type="integer">63782</user-id>
      <user-name>PEpe</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I think the existing example in the guide is both clear and brief. It is written in a way that supports &quot;.com&quot; by returning nil.

If the reader has specific needs for other TLDs like &quot;.eu&quot; I think she can extend the example easily like your did. In my opinion the example is fine as is.

Nevertheless, I added the .to_sym bits and removed some stuff related to Rails 2.2.

Thanks!</body>
      <body-html>&lt;div&gt;&lt;p&gt;I think the existing example in the guide is both clear and
brief. It is written in a way that supports &quot;.com&quot; by returning
nil.&lt;/p&gt;
&lt;p&gt;If the reader has specific needs for other TLDs like &quot;.eu&quot; I
think she can extend the example easily like your did. In my
opinion the example is fine as is.&lt;/p&gt;
&lt;p&gt;Nevertheless, I added the .to_sym bits and removed some stuff
related to Rails 2.2.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-25T10:09:13+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-07-25T10:09:16+01:00</updated-at>
      <user-id type="integer">11378</user-id>
      <user-name>Xavier Noria</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>detail, but there is still call extract_locale_from_**uri** and def extract_locale_from_**tld** method</body>
      <body-html>&lt;div&gt;&lt;p&gt;detail, but there is still call
extract_locale_from&lt;em&gt;&lt;strong&gt;uri&lt;/strong&gt; and def
extract_locale_from&lt;/em&gt;&lt;strong&gt;tld&lt;/strong&gt; method&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-31T17:40:17+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-07-31T17:40:20+01:00</updated-at>
      <user-id type="integer">63782</user-id>
      <user-name>PEpe</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks for the great guide!

One minor comment though: I guess something has changed in the URLs of the the I18n wiki pages, since all URLs starting with
 http://rails-i18n.org/wiki/pages/
are broken and work when replaced with
 http://rails-i18n.org/wiki/wikipages/</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks for the great guide!&lt;/p&gt;
&lt;p&gt;One minor comment though: I guess something has changed in the
URLs of the the I18n wiki pages, since all URLs starting with&lt;br&gt;
&lt;a href=
&quot;http://rails-i18n.org/wiki/pages/&quot;&gt;http://rails-i18n.org/wiki/pages/&lt;/a&gt;
are broken and work when replaced with&lt;br&gt;
&lt;a href=
&quot;http://rails-i18n.org/wiki/wikipages/&quot;&gt;http://rails-i18n.org/wiki/wikipages/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-12-24T20:47:42+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-12-24T20:47:47+00:00</updated-at>
      <user-id type="integer">80709</user-id>
      <user-name>veger</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thank you verger, it is fixed in the repo now.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thank you verger, it is fixed in the repo now.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-12-25T22:06:00+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2009-12-25T22:06:03+00:00</updated-at>
      <user-id type="integer">11378</user-id>
      <user-name>Xavier Noria</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Rails 2.3.5
vendored activesupport i18n (comes with Rails 2.3.5) AND gem i18n (0.3.3)

Reiterating what holli said (Feb 25th 2009)

Example snippet taken from http://guides.rubyonrails.org/i18n.html

@@@ ruby

## environment.rb

module I18n
  def just_raise_that_exception(*args)
    raise args.first
  end
end

I18n.exception_handler = :just_raise_that_exception

##&#160;some_view_file.html.erb

&lt;%= t '.bad_key' %&gt;

@@@

Does not appear to re-raise the exception using the exception handler that I have just set, nor does it seem to use the default_exception_handler.

Also did not work from the console when calling translate with a bad key:

@@@ bash

&gt;&gt; I18n.t '.bad_key'
NoMethodError: undefined method `just_raise_that_exception' for I18n:Module
  from /Library/Ruby/Gems/1.8/gems/i18n-0.3.3/lib/i18n.rb:261:in `send'
  from /Library/Ruby/Gems/1.8/gems/i18n-0.3.3/lib/i18n.rb:261:in `handle_exception'
  from /Library/Ruby/Gems/1.8/gems/i18n-0.3.3/lib/i18n.rb:211:in `t'
  from (irb):1


@@@

First problem is that the exception handler needs to be defined as:

@@@ ruby

module I18n
  def self.just_raise_that_exception(*args)
  ...
  end
end

@@@

However, this STILL doesn't work in a Rails app proper when using the translate helper.

The reason for this is due to ActionView helpers trying to rescue the exception as such: 

@@@ ruby

## ActionView::Helpers::TranslationHelper

def translate(key, options = {})
  options[:raise] = true
  I18n.translate(scope_key_by_partial(key), options)
rescue I18n::MissingTranslationData =&gt; e
  keys = I18n.send(:normalize_translation_keys, e.locale, e.key, e.options[:scope])
  content_tag('span', keys.join(', '), :class =&gt; 'translation_missing')
end
alias :t :translate

@@@

There are two workarounds that I can see for this - either overwrite the existing helper method, or to use I18n.t instead

Could the segment about exception handling please be rewritten to reflect the above?

Thanks</body>
      <body-html>&lt;div&gt;&lt;p&gt;Rails 2.3.5&lt;br&gt;
vendored activesupport i18n (comes with Rails 2.3.5) AND gem i18n
(0.3.3)&lt;/p&gt;
&lt;p&gt;Reiterating what holli said (Feb 25th 2009)&lt;/p&gt;
&lt;p&gt;Example snippet taken from &lt;a href=
&quot;http://guides.rubyonrails.org/i18n.html&quot;&gt;http://guides.rubyonrails.org/i18n.html&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;
## environment.rb

module I18n
  def just_raise_that_exception(*args)
    raise args.first
  end
end

I18n.exception_handler = :just_raise_that_exception

## some_view_file.html.erb

&amp;lt;%= t '.bad_key' %&amp;gt;&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Does not appear to re-raise the exception using the exception
handler that I have just set, nor does it seem to use the
default_exception_handler.&lt;/p&gt;
&lt;p&gt;Also did not work from the console when calling translate with a
bad key:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;bash&quot;&gt;
&amp;gt;&amp;gt; I18n.t '.bad_key'
NoMethodError: undefined method `just_raise_that_exception' for I18n:Module
  from /Library/Ruby/Gems/1.8/gems/i18n-0.3.3/lib/i18n.rb:261:in `send'
  from /Library/Ruby/Gems/1.8/gems/i18n-0.3.3/lib/i18n.rb:261:in `handle_exception'
  from /Library/Ruby/Gems/1.8/gems/i18n-0.3.3/lib/i18n.rb:211:in `t'
  from (irb):1&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;First problem is that the exception handler needs to be defined
as:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;
module I18n
  def self.just_raise_that_exception(*args)
  ...
  end
end&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;However, this STILL doesn't work in a Rails app proper when
using the translate helper.&lt;/p&gt;
&lt;p&gt;The reason for this is due to ActionView helpers trying to
rescue the exception as such:&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;
## ActionView::Helpers::TranslationHelper

def translate(key, options = {})
  options[:raise] = true
  I18n.translate(scope_key_by_partial(key), options)
rescue I18n::MissingTranslationData =&amp;gt; e
  keys = I18n.send(:normalize_translation_keys, e.locale, e.key, e.options[:scope])
  content_tag('span', keys.join(', '), :class =&amp;gt; 'translation_missing')
end
alias :t :translate&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;There are two workarounds that I can see for this - either
overwrite the existing helper method, or to use I18n.t instead&lt;/p&gt;
&lt;p&gt;Could the segment about exception handling please be rewritten
to reflect the above?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2010-02-04T00:21:18+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">21487</milestone-id>
      <number type="integer">23</number>
      <permalink>rails-i18</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>published</state>
      <tag>guides i18n</tag>
      <title>Rails I18n</title>
      <updated-at type="datetime">2010-02-04T00:21:21+00:00</updated-at>
      <user-id type="integer">25224</user-id>
      <user-name>omarqureshi</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/23</url>
      <milestone-title>Guides Batch 2</milestone-title>
    </version>
  </versions>
</ticket>
