Hi David, On Wed, 2009-01-07 at 01:37 +0100, David Larlet wrote: [...] > I perfectly understand and that's why I ask for feedback and propose > to create a new filter (per language) in contrib.localflavor in the > ticket's description but it depends on needs. I agree that ticket/ > email's title is not reflecting this solution but I can propose a > pluralize_fr filter for instance if you prefer this approach? (and > renaming ticket instead of wontfix status?)
Yeah, I understand. I would prefer a solution that didn't end up with pluralize_fr, pluralize_de, pluralize_pl, ... It's adding a lot of code and not necessarily making things easier. I realise that would be a good parallel with the existing pluralize filter working just for English, but that's there for historical reasons and we can, and should, do better now that we have i18n/l10n support in Django. In an ideal world, somebody would think really hard until steam came out their ears and then come up with a nice pluralize_l10n filter that somehow "just worked". Sadly, I have no idea what that would look like or how it would work. It's going to be like art: we'll know the right solution when we see it, because it will look simple and functional. :-) Right at the moment, I'd hesitate to commit anything to Django's codebase whilst we don't have a good general solution, since it's not really going to be a showstopper for anybody (you can use filters and template tags that aren't in core, etc). So I think it's worth putting in the effort to find a better solution. And I do think it's worth putting in the effort, but I'm not necessarily saying it must be you or anybody else who does so. If you're motivated, though, I'll certainly read any proposals with interest and attention. I really, really want all this stuff to work well in Django. > In fact, I need feedback because I don't know if it's related to > French speaking people or if more languages are affected by this added > "s". In this case it'll be more complicated to find the right place in > localflavor. My feeling is that this problem is exactly as complicated as plural forms in translations (PO files). The bottom of this page has a partial summary of the situation (it classifies the French case correctly, too): http://www.gnu.org/software/automake/manual/gettext/Plural-forms.html Using (u)ngettext as inspiration for a solution might provoke some ideas. That precise API would look a bit ugly in templates, but there might be something that falls out of the sky when you think along those lines. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django 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/Django-I18N?hl=en -~----------~----~----~----~------~----~------~--~---
