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'))
  )
)
CommentFileSizeAuthor
#1 549268_translate_durations.patch2.32 KBIsland Usurper

Comments

Island Usurper’s picture

Status: Active » Needs review
StatusFileSize
new2.32 KB

The 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.

rszrama’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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