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!

CommentFileSizeAuthor
#1 uc_shipping.admin_.inc_.patch2.5 KBanrikun
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anrikun’s picture

Assigned: Unassigned » anrikun
Status: Active » Needs review
FileSize
2.5 KB

Here's a patch fixing this issue.

TR’s picture

Status: Needs review » Fixed

Thanks. This should have been done long ago! Committed fix to 6.x-2.x and 7.x-3.x.

Status: Fixed » Closed (fixed)

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