ok i figured out what my problem is but still no idea how to fix it

my pages are looking fr a key like hobo.forgot_password.email and not
hobo.page.forgot_password.email
and my actions were looking for .actions.* not .action.* so
doing :actions in the translation fixed the buttons.

I still have no idea why doesn't it fall back to hobo.page.* and just
to hobo.* i've been looking for the key to change it I've had no luck
with a search in the project

PS. I never modified the keys by hand they were generated like that.

Any help?

On Oct 2, 4:11 pm, Scorpio <[email protected]> wrote:
> I'm having partial success here. the error messages from the pl.yml
> for rails load ok but hobo actions still remain the English versions
> such as Edit Delete tho I've added the definitions for the default
> hobo actions based on other locale files and basically just translated
> the hobo en locale to polish. (I didn't do the grammar forms yet.
> first i want to make it load). please note that nearly every page is
> heavily customized (extended) and the auto rapid definitions are not
> in effect for most pages.
>
> # FILE CONTENT FOR config/initializers/pluralization.rb
>
> module I18n::Backend::Pluralization
>   # rules taken from 
> :http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html
>   def pluralize(locale, entry, n)
>     return entry unless entry.is_a?(Hash) && n
>     if n == 0 && entry.has_key?(:zero)
>       key = :zero
>     else
>       key = case locale
>               when :pl # Polish
>                 n==1 ? :one : n%10>=2 && n%10<=4 && (n%100<10 || n
> %100>=20) ? :few : :other
>               else
>                 n==1 ? :one : :other # default :en
>             end
>     end
>     raise I18n::InvalidPluralizationData.new(entry, n) unless
> entry.has_key?(key)
>     entry[key]
>   end
> end
>
> # config/initializers/pluralization.rb
> I18n::Backend::Simple.send(:include, I18n::Backend::Pluralization)
>
> #EOF config/initializers/pluralization.rb
>
> # environment.rb
>
>   # The default locale is :en and all translations from config/locales/
> *.rb,yml are auto loaded.
>    config.i18n.load_path += Dir[Rails.root.join('config', 'locales',
> '**', '*.{rb,yml}')]
>    config.i18n.default_locale = :pl
>
> On Oct 2, 1:53 pm, Tiago Franco <[email protected]> wrote:
>
> > Hi Tom, Domizio et al
>
> > Please find in the pt-PT locale file 
> > inhttp://hobousers.googlegroups.com/web/hobo.pt-PT%20(2).yml?gsc=lK8xdQ...
>
> > Thanks,
> >   TF
>
> > On Oct 2, 12:33 pm, Domizio Demichelis <[email protected]> wrote:
>
> > > > Looks like this dev's already done some of it:
>
> > > >http://dev.netizer.pl/rails-i18n-and-zero-one-two-few-many-other.html
>
> > > > There's also this link (from the comments on the above post), but I 
> > > > can't
> > > > read Polish so I'm just eyeballing the code...
>
> > > >http://blog.zabiello.com/2010/08/02/pluralization-rails
>
> > > didn't I already posted those links? 8-O
>
> > > dd

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to