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.
