Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
4 May 2010 at 13:20 UTC
Updated:
1 Aug 2011 at 07:02 UTC
Jump to comment: Most recent file
I found an ugly line of code in uc_shipping.admin.inc:
<?php
foreach (array_keys($shipping_types_products) as $type) {
$options[$type] = ucwords(str_replace('_', ' ', $type)); // Here is the ugly line.
}
$form['shipping_type'] = array('#type' => 'select',
'#title' => t('Shipping type'),
'#options' => $options,
'#default_value' => $package->shipping_type,
);
?>Building the shipping type title out of its ID is really a bad practice.
Seeing that, it is not surprising that I could not translate shipping types!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_shipping.admin_.inc_.patch | 2.5 KB | anrikun |
Comments
Comment #1
anrikun commentedHere's a patch fixing this issue.
Comment #2
tr commentedThanks. This should have been done long ago! Committed fix to 6.x-2.x and 7.x-3.x.