mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
Change string to str
This commit is contained in:
parent
cb4b2e43bf
commit
d2e61bf5ef
1 changed files with 4 additions and 4 deletions
|
|
@ -216,9 +216,9 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||
var gems = User.user.balance * 4;
|
||||
|
||||
var itemList = Content.itemList;
|
||||
var string = type;
|
||||
var str = type;
|
||||
if (itemList[type]) {
|
||||
string = window.env.t(itemList[type].localeKey)
|
||||
str = window.env.t(itemList[type].localeKey)
|
||||
}
|
||||
|
||||
var price = ((((item.specialClass == "wizard") && (item.type == "weapon")) || item.gearSet == "animal") + 1);
|
||||
|
|
@ -230,12 +230,12 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||
}
|
||||
}
|
||||
if (gems < price) return $rootScope.openModal('buyGems');
|
||||
var message = window.env.t('buyThis', {text: string, price: price, gems: gems})
|
||||
var message = window.env.t('buyThis', {text: str, price: price, gems: gems})
|
||||
if($window.confirm(message))
|
||||
User.user.ops.purchase({params:{type:"gear",key:item.key}});
|
||||
} else {
|
||||
if(gems < item.value) return $rootScope.openModal('buyGems');
|
||||
var message = window.env.t('buyThis', {text: string, price: item.value, gems: gems})
|
||||
var message = window.env.t('buyThis', {text: str, price: item.value, gems: gems})
|
||||
if($window.confirm(message))
|
||||
User.user.ops.purchase({params:{type:type,key:item.key}});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue