Closed (fixed)
Project:
Ubercart Userpoints
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2010 at 19:54 UTC
Updated:
22 Jan 2011 at 14:26 UTC
In this file uc_userpoints_payment.module, this line of code (123) has a translation issue :
t('!Points (Total available via !points: ' . uc_currency_format($maxdisc) . ')', userpoints_translation())
is resulting in a non localizable string as uc_currency_format($maxdisc) is a variable.
It should be something like : (this is working for me)
// As it's using userpoints_translation() to pop the t() variables replacement array
// I push a new value to this final array.
$userpoints_translation_array = userpoints_translation();
$userpoints_translation_array['!maxdisc'] = uc_currency_format($maxdisc);
// And then call the array instead of the function.
'title' => t('!Points (Total available via !points: !maxdisc)', $userpoints_translation_array),
Thx for solving this.
Best regards
Comments
Comment #1
bmagistro commentedI am marking this closed, but don't know which commit resolved this. Code for that is now around line 162 and looks like this. Looking at past issues and code looks like this was first resolved here: http://drupal.org/node/698884. Not sure if there are other ones related.