def describe_cost(self, cost, hide_time=False): cpu_cost = g.to_cpu(cost[cpu]) cash_cost = g.to_money(cost[cash]) labor_cost = "" if not hide_time: labor_cost = ", %s" % g.to_time(cost[labor]).replace(" ", u"\xA0") return u"%s\xA0CPU, %s\xA0money%s" % (cpu_cost, cash_cost, labor_cost)
def describe_cost(self, cost, hide_time=False): cpu_label = _("%s CPU") % g.to_cpu(cost[cpu]) cash_label = _("%s money") % g.to_money(cost[cash]) labor_label = ", %s" % g.to_time(cost[labor]).replace(" ", u"\xA0") if hide_time: labor_label = "" return u"%s, %s%s" % (cpu_label.replace( " ", u"\xA0"), cash_label.replace(" ", u"\xA0"), labor_label)
def describe_cost(self, cost, hide_time=False): cpu_label = _("%s CPU") % g.to_cpu(cost[cpu]) cash_label = _("%s money") % g.to_money(cost[cash]) labor_label = ", %s" % g.to_time(cost[labor]).replace(" ", u"\xA0") if hide_time: labor_label = "" return u"%s, %s%s" % (cpu_label.replace(" ", u"\xA0"), cash_label.replace(" ", u"\xA0"), labor_label)