In uc_cart_admin.inc, cart duration units (anonymous and authenticated) are not translated.
I think this is beause they are in the form :
'#summary' => t('Anonymous cart duration is @duration',
array('@duration' => variable_get('uc_cart_anon_duration', '4') .' '. variable_get('uc_cart_anon_unit', 'hours'))
)
and no translation is found for the @duration value. I think that the summary should be like this :
'#summary' => t('Anonymous cart duration is @duration @unit',
array(
'@duration' => variable_get('uc_cart_anon_duration', '4'),
'@unit' => t(variable_get('uc_cart_anon_unit', 'hours'))
)
)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 549268_translate_durations.patch | 2.32 KB | Island Usurper |
Comments
Comment #1
Island Usurper commentedThe translation tools frown on putting anything besides literal strings into t(). However, splitting the duration and units up like that seems like a good idea. I also thought there may be a way to use format_plural() so that the summaries wouldn't have the dreaded "1 minutes" error.
Comment #2
rszrama commented