Question #678095 on Gourmet changed:
https://answers.launchpad.net/gourmet/+question/678095
Saxon Shuttleworth posted a new comment:
Hi Ed,
Thank you for reporting these issues. I investigated issue #1.
Environment:
Gourmet 0.17.4 and master branch on Ubuntu and Windows.
Steps to reproduce:
1. Click "New" button for new recipe
2. Click "Ingredients" tab
3. Add each of the following ingredients separately to "Add ingredient" text
field:
"apple"
"an apple"
"apple juice"
"Apple juice"
"a beet"
"a dozen eggs"
"a pair of Yubari King melons"
Expected Results:
"apple"
"1 apple"
"apple juice"
"Apple juice"
"1 beet"
"12 eggs"
"2 Yubari King melons"
Actual Results:
1. The ingredients are listed as:
"apple"
"1 apple"
"1 pple juice"
"Apple juice"
"1 beet"
"12 eggs"
"2 Yubari King melons"
Notes:
If the first word in the ingredient string starts with a lower case "a", the
first letter ("a") is stripped off and substituted with quantity of "1", "a
dozen" is substituted with quantity of "12" and "a pair" is substituted with
quantity of "2".
Gourmet is designed to translate words into equivalent numbers,for example:
"a" --> "1"
"an" --> "1"
"a couple" --> "2"
"a dozen" --> "12"
"twenty" --> "20"
Conclusion:
There appears to be a bug in the ingredients parser. The ingredient parser
should only translate "a" to "1" if it is single character. In addition, the
ingredient parser is not translating capitalized number words correctly, for
example:
"A dozen" is not translated to quantity of "12".
Regards,
Saxon.
--
--
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 protected]
Unsubscribe : https://launchpad.net/~gourmet
More help : https://help.launchpad.net/ListHelp