You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
Reporter: StefanB [Submitted to the original trac issue database at 6.48pm, Thursday, 9th July 2009]
Currently ruby backend (with globalize2 and rails-i18n plugins) supports pluralization into only 3 forms, namely ":zero" ":one" and ":other", which is ok for English and perhaps some other languages.
It is not suitable for dynamically switching languages, serving several languages with different pluralizaton formula at the same time.
Specifically, pluralization formula for Slovenian should be something like:
backend.add_pluralizer :sl, lambda{|c|
c == 0 ? :zero : c%100 == 1 ? :one : c%100 == 2 ? :two : (3..4).include?(c%100) ? :few : :other
}
but there is no place to put it to have an effect, and not break current English website at the same time.
The text was updated successfully, but these errors were encountered:
Author: tom[at]compton.nu [Added to the original trac issue at 8.58am, Monday, 13th July 2009]
The activerecord.errors.template.header resource in vendor/plugins/rails-i18n/locale/sl.rb needs fixing to have the extra keys. I've hacked it for now by copying the :other key but you'll need to fix it properly.
Also I don't know if the globalize2 people would be interested in having the custom pluralizer upstream?
Author: StefanB [Added to the original trac issue at 12.37pm, Monday, 13th July 2009]
Tnx for putting it in, seems to wokr fine, but some additional translations are needed if i understand the error message "Error contacting gazetteer.openstreetmap.org: uninitialized constant Globalize::Backend::Pluralizing::InvalidPluralizationData" correctly.
Reporter: StefanB
[Submitted to the original trac issue database at 6.48pm, Thursday, 9th July 2009]
Currently ruby backend (with globalize2 and rails-i18n plugins) supports pluralization into only 3 forms, namely ":zero" ":one" and ":other", which is ok for English and perhaps some other languages.
It is not suitable for dynamically switching languages, serving several languages with different pluralizaton formula at the same time.
Specifically, pluralization formula for Slovenian should be something like:
backend.add_pluralizer :sl, lambda{|c|
c == 0 ? :zero : c%100 == 1 ? :one : c%100 == 2 ? :two : (3..4).include?(c%100) ? :few : :other
}
but there is no place to put it to have an effect, and not break current English website at the same time.
The text was updated successfully, but these errors were encountered: