open-eats / OpenEats

:pizza: Self Hosted Recipe Management App :hamburger:
https://open-eats.github.io/
MIT License
670 stars 102 forks source link

Ingredients duplicated #102

Open lavacaquerie opened 5 years ago

lavacaquerie commented 5 years ago

Hi, When I have 2 recipes that use an ingredient, for example 1 onion, this ingredient is listed twice, one for the recipe A and other for the recipe B so I have to maintain 2 separate ingredients and its measurements. If I add to a grocery list recipe A and recipe B, I expected to have 1 entry of "2 onion" (1 of the recipe A and other of the recipe B) but I have 2 entries of 1 onion. Is this working correctly or am I doing something wrong? Thank you

P.D.: I see that the spanish translation isn't completed (some menus are in spanish and some menus in english). I'd like to finish the translation so you can add it to the project. Is this possible?

RyanNoelk commented 5 years ago

The lists aren't that smart. This is mainly because a recipe can have something like:

It's hard to convert this different types of measurements. But for simple things, it should be better. I'll have some time in a couple months to add this.

RyanNoelk commented 5 years ago

The Spanish translation file can be found here: https://github.com/open-eats/openeats-web/blob/master/modules/locale/es.json

Any help on it would be welcome. :)

toddobryan commented 4 years ago

I'd be interested in helping out with the combining ingredients into one item and, while we're at it, categorizing ingredients by where they are in the store (produce, canned vegetables, dairy, etc.)

I think the way Gourmet Recipe Manager https://thinkle.github.io/gourmet/ does it is by parsing an ingredient into a number, a unit, and an ingredient and then assigning the ingredient to a "reference" ingredient.

For example, if I type "1 cup chopped onion", it figures out that the number is "1", the unit is "cup", and the reference ingredient is "onion". Then behind the scenes there are lots of equivalency and converter codes that can match things together. I'm not sure if it's smart enough to know that 1 medium onion is roughly equivalent to 1 cup chopped onion, but if it's not then it should be. As you can imagine, there's also something somewhere that tells it an onion is in the produce section of the supermarket.

I'm going to be pretty busy with work until after the New Year, but I'm happy to help out where I can.

RyanNoelk commented 4 years ago

I'm happy for any help you can offer, let me know if you have any questions.