Hi,

the custom continue shopping link text in module uc_cart is not sent through t()-function for translation.

file: uc_cart.module
function uc_cart_view_form($form_state, $items = NULL) {
...
$cs_text = variable_get('uc_continue_shopping_text', '') ? variable_get('uc_continue_shopping_text', '') : t('Continue shopping');
...
}

Comments

JacobSteelsmith’s picture

Priority: Normal » Minor
Status: Needs work » Closed (works as designed)

Please see http://api.drupal.org/api/function/t/6

"However tempting it is, custom data from user input or other non-code sources should not be passed through t(). Doing so leads to the following problems and errors:

The t() system doesn't support updates to existing strings. When user data is updated, the next time it's passed through t() a new record is created instead of an update. The database bloats over time and any existing translations are orphaned with each update.

The t() system assumes any data it receives is in English. User data may be in another language, producing translation errors.

The "Built-in interface" text group in the locale system is used to produce translations for storage in .po files. When non-code strings are passed through t(), they are added to this text group, which is rendered inaccurate since it is a mix of actual interface strings and various user input strings of uncertain origin."

TS79’s picture

Category: bug » feature
Status: Closed (works as designed) » Needs work

If found a quite smart solution for the problem: internationalization module i18n (http://drupal.org/node/133977) provides the required feature for translation of user defined strings.

A good description is given here: http://drupal.org/node/313293
The Notification module shows an implementation example: http://drupal.org/node/609364

By the way: the two major contributed modules 'views' and 'panels' pass user defined strings (colum-header of tables...) through t(). But there are i18n plugins in place for each module.

tr’s picture

Status: Needs work » Closed (fixed)