mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-15 04:06:22 +00:00
update API's monthly Gem cap messages to use the friendly website version (#12150)
* allow subscribers to buy their final monthly gem * replace old montly Gem cap messages with friendlier new ones
This commit is contained in:
parent
1c94c1a968
commit
aeba14f2e9
3 changed files with 3 additions and 4 deletions
|
|
@ -119,7 +119,7 @@ describe('shared.ops.buyGem', () => {
|
|||
buyGem(user, { params: { type: 'gems', key: 'gem' } });
|
||||
} catch (err) {
|
||||
expect(err).to.be.an.instanceof(NotAuthorized);
|
||||
expect(err.message).to.equal(i18n.t('reachedGoldToGemCap', { convCap: planGemLimits.convCap }));
|
||||
expect(err.message).to.equal(i18n.t('maxBuyGems', { convCap: planGemLimits.convCap }));
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@
|
|||
"buyGemsGold": "Buy Gems with Gold",
|
||||
"buyGemsGoldText": "Alexander the Merchant will sell you Gems at a cost of 20 Gold per Gem. His monthly shipments are initially capped at 25 Gems per month, but for every 3 consecutive months that you are subscribed, this cap increases by 5 Gems, up to a maximum of 50 Gems per month!",
|
||||
"mustSubscribeToPurchaseGems": "Must subscribe to purchase gems with GP",
|
||||
"reachedGoldToGemCap": "You've reached the Gold=>Gem conversion cap <%= convCap %> for this month. We have this to prevent abuse / farming. The cap resets within the first three days of each month.",
|
||||
"reachedGoldToGemCapQuantity": "Your requested amount <%= quantity %> exceeds the Gold=>Gem conversion cap <%= convCap %> for this month. We have this to prevent abuse / farming. The cap resets within the first three days of each month.",
|
||||
"reachedGoldToGemCapQuantity": "Your requested amount <%= quantity %> exceeds the amount you can buy for this month (<%= convCap %>). The full amount becomes available within the first three days of each month. Thanks for subscribing!",
|
||||
"retainHistory": "Retain additional history entries",
|
||||
"retainHistoryText": "Makes completed To-Dos and task history available for longer.",
|
||||
"doubleDrops": "Daily drop caps doubled",
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export class BuyGemOperation extends AbstractGoldItemOperation { // eslint-disab
|
|||
super.canUserPurchase(user, item);
|
||||
|
||||
if (user.purchased.plan.gemsBought >= this.convCap) {
|
||||
throw new NotAuthorized(this.i18n('reachedGoldToGemCap', { convCap: this.convCap }));
|
||||
throw new NotAuthorized(this.i18n('maxBuyGems', { convCap: this.convCap }));
|
||||
}
|
||||
|
||||
if (user.purchased.plan.gemsBought + this.quantity > this.convCap) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue