resource links on itself and results in a infinite loop

4 views
Skip to first unread message

Maechi

unread,
Dec 15, 2010, 11:03:17 AM12/15/10
to I18n Routing
Hi,

I just installed the newest version of I18n Routing 0.4.5. I try to
run it for one ressource first. The routes are getting set while start
up as expected, but if I want to enter this route it ends up in a
infinite loop as the browser reports this...

I have no idea why this could be. I just added:

localized(I18n.available_locales, :verbose => true) do
resource :catalogues
end

Is anybody familiar with this issue?

Maechi

Guillaume Luccisano

unread,
Dec 15, 2010, 10:54:03 PM12/15/10
to i18n-r...@googlegroups.com
Hum, this is strange, which version of Rails do you use ?

2010/12/15 Maechi <mha...@gmail.com>

Guillaume Luccisano

unread,
Dec 15, 2010, 10:54:22 PM12/15/10
to i18n-r...@googlegroups.com
And what's the verbose output ?

2010/12/15 Guillaume Luccisano <guillaume...@gmail.com>

Maechi

unread,
Dec 16, 2010, 3:21:43 AM12/16/10
to I18n Routing
I use Rails 3.0.3. I'm not shure what verbose output is... is it this
one at startup?

[I18n] > localize resource : catalogues
(en) => /catalogues
[I18n] > localize resource : catalogues
(de) => /katalog

Thanks,
Markus

On 16 Dez., 04:54, Guillaume Luccisano <guillaume.luccis...@gmail.com>
wrote:
> And what's the verbose output ?
>
> 2010/12/15 Guillaume Luccisano <guillaume.luccis...@gmail.com>
>
>
>
> > Hum, this is strange, which version of Rails do you use ?
>
> > 2010/12/15 Maechi <mhae...@gmail.com>

Guillaume Luccisano

unread,
Dec 16, 2010, 12:19:19 PM12/16/10
to i18n-r...@googlegroups.com
Yes it's that one, and you get the infinite loop when try to translate in de ? or in en ?
Did you try in the console first ?

I18n.locale = :de
catalogues_path # => /katalog
I18n.locale = :en
catalogues_path # => /catalogues

2010/12/16 Maechi <mha...@gmail.com>

Maechi

unread,
Dec 16, 2010, 12:30:35 PM12/16/10
to I18n Routing
I receive the infinite loop en de and in en!

How can I try it in the console?

On 16 Dez., 18:19, Guillaume Luccisano <guillaume.luccis...@gmail.com>
wrote:
> Yes it's that one, and you get the infinite loop when try to translate in de
> ? or in en ?
> Did you try in the console first ?
>
> I18n.locale = :de
> catalogues_path # => /katalog
> I18n.locale = :en
> catalogues_path # => /catalogues
>
> 2010/12/16 Maechi <mhae...@gmail.com>

Guillaume Luccisano

unread,
Dec 16, 2010, 12:34:33 PM12/16/10
to i18n-r...@googlegroups.com
"rails c"  to open the rails3 console

2010/12/16 Maechi <mha...@gmail.com>

Maechi

unread,
Dec 17, 2010, 9:45:18 AM12/17/10
to I18n Routing
Hey Guillaume,

I fixed my problem... Its possible that somebody else experience the
same problem:

I just needed to write resources in plural...

A rather stupid one!

Thanks for your answer!

On 16 Dez., 18:34, Guillaume Luccisano <guillaume.luccis...@gmail.com>
wrote:
> "rails c"  to open the rails3 console
>
> 2010/12/16 Maechi <mhae...@gmail.com>

Guillaume Luccisano

unread,
Dec 17, 2010, 10:22:47 AM12/17/10
to i18n-r...@googlegroups.com
Ah cool, I'm glad you found the issue.
Yeah you are right, I should have seen that bug :)

You are welcome.

2010/12/17 Maechi <mha...@gmail.com>

Markus Häcki

unread,
Dec 17, 2010, 10:29:52 AM12/17/10
to i18n-r...@googlegroups.com
Never the less thanks a lot!
Reply all
Reply to author
Forward
0 new messages