← Back to team overview

gourmet team mailing list archive

Re: [Question #243402]: Add/remove units

 

Question #243402 on Gourmet changed:
https://answers.launchpad.net/gourmet/+question/243402

Thomas Hinkle posted a new comment:
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 <
question243402@xxxxxxxxxxxxxxxxxxxxx> 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     : gourmet@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~gourmet
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team Gourmet Recipe
Manager is an answer contact for Gourmet.