|
@@ -1380,9 +1380,12 @@ class CloudStorageView(View):
|
|
|
if has_unused == 1:
|
|
|
unuseds = Unused_Uid_Meal.objects.filter(uid=uid).annotate(unused_id=F('id')) \
|
|
|
.values("unused_id","uid","bucket__content","num","bucket__id","expire")
|
|
|
+ month = 'month' if lang != 'cn' else '个月'
|
|
|
for ub in unuseds:
|
|
|
- storage_time = ub['num'] * ub['expire']
|
|
|
- storage = "{storage_time}个月".format(storage_time=storage_time)
|
|
|
+ storage_time = ub['num'] * ub['expire']
|
|
|
+ if lang != 'cn' and storage_time > 1: # 英文大于一个月使用复数
|
|
|
+ month += 's'
|
|
|
+ storage = "{storage_time}{month}".format(storage_time=storage_time, month=month)
|
|
|
unused_dict = {
|
|
|
"id":ub['unused_id'],
|
|
|
"uid":ub['uid'],
|