Add/remove units

Asked by Harald Franzen

Hi, I have just found this software and I am very interested in it's capabilities.
I am running Ubuntu 13.10
Playing around a little bit with my first two recipes, I see that I can add ingredients in certain units (pull down menu). I would like to remove some unites (the non-metric ones) and would like to add new units too; like "pce." (so if a recipe calls for a can of tomatoes, the software lets me add "1 pce tomatoes, canned" and hence with the grocery list, it would display "6 pce tomatoes, canned", if I need 2 cans for recipe A and 4 for recipe B.
How can I change/add/modify the list of units?

Thanks for your reply!

Best regards,

Harald

Question information

Language:
English Edit question
Status:
Solved
For:
Gourmet Edit question
Assignee:
No assignee Edit question
Solved by:
Harald Franzen
Solved:
Last query:
Last reply:
Revision history for this message
Thomas M. Hinkle (thomas-hinkle) said :
#1

There isn't a way to remove units by default, but you can type in any unit
you like. Once you've added a unit by hand, I believe it should show up in
the dropdown list in the future.

Tom

On Wed, Feb 5, 2014 at 9:16 AM, Harald Franzen <
<email address hidden>> wrote:

> New question #243402 on Gourmet:
> https://answers.launchpad.net/gourmet/+question/243402
>
> Hi, I have just found this software and I am very interested in it's
> capabilities.
> I am running Ubuntu 13.10
> Playing around a little bit with my first two recipes, I see that I can
> add ingredients in certain units (pull down menu). I would like to remove
> some unites (the non-metric ones) and would like to add new units too; like
> "pce." (so if a recipe calls for a can of tomatoes, the software lets me
> add "1 pce tomatoes, canned" and hence with the grocery list, it would
> display "6 pce tomatoes, canned", if I need 2 cans for recipe A and 4 for
> recipe B.
> How can I change/add/modify the list of units?
>
> Thanks for your reply!
>
> Best regards,
>
> Harald
>
> --
> You received this question notification because you are a member of
> Gourmet Recipe Manager, which is an answer contact for Gourmet.
>

Revision history for this message
Harald Franzen (harald-franzen-lotcavediving) said :
#2

Thank you Tom, for your reply.
Yes, I saw I can add units, but they will not show up in the pull down menu later on.
That would be a feature request then ;-)
Cheers,
Harald

Revision history for this message
Bernhard Reiter (ockham-razor) said :
#3

Yeah, units are a bit more complicated, than, say, cuisine or category as they require conversion factors.
Anyway, filed https://github.com/thinkle/gourmet/issues/739

Revision history for this message
Eisenfaust (eisenfaust-frank) said :
#4

Hi there ! I want to add several units too. (like : "cuillère à café", "cuillère à soupe", "pincée" that are very usefull in French cooking, and some others too like : "Goutte", "lampée", "noix", etc..), but I need to retype it every time. How can I add them definitely ? Or can I download an "all/full french units list" somewhere ?

Revision history for this message
Thomas Hinkle (tmhinkle) said :
#5

The key would be to update the defaults_fr.py file in the defaults folder.
That includes a bunch of language customization code that goes beyond
what's supported by normal gettext, which simply translates text in a
straightforward way.

I'm noticing a commented out unit table at around line 800 of that file --
not sure how/why that got that way. If you can provide a new table, I can
put it in the source code.

The table is formatted as follows:

("unit1", "unit2") : number,

where UNIT1 contains NUMBER of UNIT2.

Here's the one the last translator commented out for whatever reason:
# CONVERTER_TABLE = {
# ("tasse","c. à table"):16,
# ("lb","oz"):16,
# ("c. à table","c. à thé"):3,
# ("chop","tasse"):2,
# ("pte","tasse"):4,
# ("gallon","pte"):4,
# ("l","pte"):1.057,
# ("l","ml"):1000,
# ("l","cl"):100,
# ("l","dl"):10,
# ("oz","g"):28.35,
# ("kg","g"):1000,
# ("g","mg"):1000,
# ("c. à thé","goutte"):76,
# ("oz","dram"):16
# }

On Mon, Oct 9, 2017 at 2:14 AM, Eisenfaust <
<email address hidden>> wrote:

> Question #243402 on Gourmet changed:
> https://answers.launchpad.net/gourmet/+question/243402
>
> Eisenfaust posted a new comment:
> Hi there ! I want to add several units too. (like : "cuillère à café",
> "cuillère à soupe", "pincée" that are very usefull in French cooking,
> and some others too like : "Goutte", "lampée", "noix", etc..), but I
> need to retype it every time. How can I add them definitely ? Or can I
> download an "all/full french units list" somewhere ?
>
> --
> You received this question notification because your team Gourmet Recipe
> Manager is an answer contact for Gourmet.
>
> --
> Mailing list: https://launchpad.net/~gourmet
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~gourmet
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Eisenfaust (eisenfaust-frank) said :
#6

Thanks. I will go to see this file and trying to modify it. I'll come back to you if i found a solution with it.