OK , there is a fault in the French .po file for cartridge if anybody is
interested.
French is somewhat anomalous in defining the plural form for ngettext as n
> 1 ( i.e. zero gets the singular translation string returned ) , so
blindly copying the patterns from other language .po files would never work
here.
i.e.
msgstr[0] "1 produit"
should be
msgstr[0] "%(cart_quantity)s produit"
And likewise for the 'wishlist contains' translation string.
good luck to anybody reading this
hc
On Tuesday, December 2, 2014 6:00:46 PM UTC+1, Halfconscious Presumptious
wrote:
>
> I dunno if somebody could point me in the right direction with this one...
> I've found an oddity in evaluation of the following line (7 of
> user_panel.html) using the French translation
>
> {% blocktrans count request.cart.total_quantity as cart_quantity %}1
> item{% plural %}{{ cart_quantity }} items{% endblocktrans %}
> {% trans "in cart" %}
>
> When no items are in the cart using English translation this produces "0
> items in cart"
>
> But with the French translation I get "1 produit ajouté au panier" . As
> a sanity check I have tried the german translation, which works fine for
> me. The wish list info, produced by the same template file exhibits the
> same fault in the French translation only.
>
> My language settings in settings.py are:en
>
> USE_I18N = True
> LANGUAGE_CODE = "fr"
> LANGUAGES = (
> ('fr', _('French')),
> )
>
> I installed cartridge from pip in a virtualenv yesterday. Output of pip
> freeze attached.
>
> Grateful for any ideas. The template language looks like goobledy-gook to
> me. I have compared the .po files in English,German and French and cannot
> see a problem for the strings concerned.
>
> Many thanks
>
> hc
>
>
>
>
>
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.