mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Correct food
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
import {each, defaults} from 'lodash';
|
import {each, defaults} from 'lodash';
|
||||||
|
import capitalize from 'lodash.capitalize';
|
||||||
|
import camelCase from 'lodash.camelcase';
|
||||||
import t from '../helpers/translator';
|
import t from '../helpers/translator';
|
||||||
|
|
||||||
const CAN_BUY = false;
|
const CAN_BUY = false;
|
||||||
@@ -48,10 +50,13 @@ let cake = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
each(cake, (food, name) => {
|
each(cake, (food, name) => {
|
||||||
|
let camelName = camelCase(name);
|
||||||
|
let capitalizedName = capitalize(camelName);
|
||||||
|
|
||||||
defaults(food, {
|
defaults(food, {
|
||||||
canBuy: CAN_BUY,
|
canBuy: CAN_BUY,
|
||||||
canDrop: CAN_DROP,
|
canDrop: CAN_DROP,
|
||||||
text: t(`food${name}`),
|
text: t(`food${capitalizedName}`),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user