uc_order doesn't make use of drupal's path API to generate a multilingual link for the invoice pop-up on the customer order page. The patch addresses this issue by generating the link with url() instead.

The patch also includes a quick fix to make order statuses appear translated on the customer order overview page. However, it would be nice to have the standard order statuses (in checkout, pending, processing, ...) translatable by default in a drupal-ish way.

Comments

tr’s picture

Hi,

1. Could you explain more about what url() does to fix things here? Would l() work too? Are there other places in Ubercart that could benefit from this change?

2. t() is only supposed to wrap string literals, so what your patch does (t($order->title)) is the wrong way to go about accomplishing what you want. Read http://www.ubercart.org/faq/8123 and http://drupal.org/node/191810 for a very brief explanation of how to translate these things in a manner compliant with Drupal standards.

account-deletion-needed’s picture

1. url() allows other modules to rewrite the URL to take into account things such as language prefixes. l() does the same thing as url(), except that it returns a fully themed HTML link, whereas url() returns the raw URL. As for other places in Ubercart, I'm not sure, only found this place so far.
2. OK thanks I'll have a look.

cha0s’s picture

StatusFileSize
new1.1 KB

I rolled another patch with only the URL change.

Island Usurper’s picture

Status: Needs review » Fixed

Looks good to me. Thanks, and committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.