RajatShukla / getpaid

Automatically exported from code.google.com/p/getpaid
0 stars 0 forks source link

Some parts of the checkout page are not translated #200

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add items to cart
2. Go to shopping cart (@@getpaid-cart)

What is the expected output? What do you see instead?
Some parts of the interface are not translated :
 Quantity    Name    Price       Total
SubTotal    
Shipping
Tax
Total

I tried adding i18n code to the python files, but had some problems.

* Problem 1: column titles
PloneGetPaid/browser/cart.py line 204
Field titles are defined with _(), but that doesn't work. Possibly related
to how the table is rendered (the i18n message string must not be
contatenated in python, since that will convert it back to a string).
One way would be to use zope.i18n.translate() to translate the message, but
that's not possible since columns are defined at class initialization time,
but the translation need to be done at each request.

* Problem 2: Subtotal, shipping, tax,...
PloneGetPaid/browser/cart.py line 169
Here the strings don't even have _(). 
I tried using zope.i18n.translate but that doesn't seem to do anything, I
don't know what I'm doing wrong. It could be a better idea to make this
code use a template instead of hard-coded strings, that would fix the
problem. I don't know if that's a good idea or if it would cause problems
though.

I can (try to) help with this, but right now I'm stuck :(

Original issue reported on code.google.com by jpho...@gmail.com on 28 Apr 2008 at 8:17

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by jpho...@gmail.com on 28 Apr 2008 at 8:17