Hi Mike,
That can be done but it won't help when you have dynamic keys like
I18n.t("users.show.#{current_user.favorite_meal}")
Cheers,
Andrés Mejía
On Wed, Oct 13, 2010 at 11:54 AM, Michael Bensoussan <[email protected]>wrote:
> Hi Iain,
> Thanks for the reply,
> I was thinking of the 2nd solution but it fails if we forget
> translations in the main language.
> I was hoping there's maybe a way to scan the code via a rake task,
> find ALL the keys used in the code and compare them to the one
> declared in locales but it's maybe way more work ...
> Thanks for your help.
>
> cheers,
> Mike
>
> On Oct 12, 9:42 pm, Iain Hecker <[email protected]> wrote:
> > Hi,
> >
> > My first guess:
> > When you have view specs or controller specs with
> > render_views/integrate_views you could make I18n raise an error when
> > its missing a translation. Then run every spec in every locale and
> > you'll see where there are missing. This might be a lot of work and
> > you won't get translations that have a default (like
> > human_attribute_name).
> >
> > So, my second guess:
> > You'll probably have one base locale, the one you work in. If you
> > consider that one to be complete, you can compare the keys from each
> > translation. You'll have to flatten them first though. This isn't easy
> > too.
> >
> > So, I hope you have some ideas from this. Good luck, and share the
> > answer if you find it :)
> >
> > cheers,
> > iain
> >
> >
> >
> > On Tue, Oct 12, 2010 at 11:35, Michael Bensoussan <[email protected]>
> wrote:
> > > Hi,
> > > We have a multilingual application using I18n,
> > > How would you test your application have no translations missings ?
> > > Would you test it view by view ? or have you a better solution ?
> >
> > > Thanks,
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups "rails-i18n" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> [email protected]<rails-i18n%[email protected]>
> .
> > > For more options, visit this group athttp://
> groups.google.com/group/rails-i18n?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "rails-i18n" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rails-i18n%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rails-i18n?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"rails-i18n" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-i18n?hl=en.