thinkle / gourmet

Gourmet Recipe Manager
GNU General Public License v2.0
340 stars 140 forks source link

Decimals in MealMaster import #651

Closed ockham closed 11 years ago

ockham commented 11 years ago

Converted from SourceForge issue 1474566, submitted by SourceForge user mera461 on 2006-04-22 09:18:30 UTC.

Importing a MealMaster file with the following lines

105.5 oz cans purple plums 0.5 c water

The amounts are imported as 10550 oz. and 50 c. which gives recipes for a really big party :-)

The complete recipe is here:

MMMMM----- Recipe via Meal-Master --

  Title: Five Spice Plum Sorbet

Categories: ceideburg 2, desserts Yield: 6 servings

105.5 oz cans purple plums 0.5 c water 0.25 c dry sherry 0.75 ts chinese five-spice powder whole star anise seeds -- ( -optional)

Drain plums, reserving liquid. Remove pits from plums. In food processor or blender, combine plums, reserved liquid, water, Sherry and spice powder. Process until very smooth (there should be no flecks of plum peel). Freeze in ice cream maker according to manufacturer's directions. Serve garnished with star anise, if desired. Serves 6 to 8.

MMMMM

ockham commented 11 years ago

Submitted by SourceForge user leggewie on 2008-04-21 13:45:25 UTC.

Logged In: YES user_id=1159152 Originator: NO

amounts are still off with 0.13.7 on ubuntu

ockham commented 11 years ago

Submitted by SourceForge user thomas_hinkle on 2007-09-02 03:28:05 UTC.

Logged In: YES user_id=1030390 Originator: NO

Can you confirm whether this bug happens with the latest development/unstable release?

ockham commented 11 years ago

Submitted by SourceForge user nobody on 2007-09-02 02:05:30 UTC.

Logged In: NO

I have the same problem using version 0.13.4 on ububutu 7.04. Language setting is german. An additional problem I have with importing fractures, here 1/4 is "converted" to 25. (krecipes imports correctly)

Thanks in advance! Nikolaus

the recipe: MMMMM--------------Meal-Master Recipe by www.cuisine.at-----------------

 Title: Moehrentorte

Categories: Kuchen, Gebaeck, Pralinen Yield: 1 Form

450 g  Moehren
200 g  Gemahlene Mandeln
200 g  Gemahlene Haselnuesse
  1    Pack. Backpulver
  7    Eier
       Abgeriebene Schale einer
       -unbehandelten Zitrone
  3 tb Frisch gepresster
       -Orangensaft
 10 tb Agavendicksaft
  1    Prise/n Salz
       Etwas Butter zum Einfetten
       -der Backform

MMMMM---------------------Zum Aprikotieren---------------------------- 2 tb Aprikosen-Fruchtaufstrich 1 tb Wasser

MMMMM--------------------Fuer Den Schokoguss--------------------------- 150 g Zartbitterkuvertuere 1 ts Kokosfett

MMMMM------------------Fuer Die Marzipan-Moehren------------------------ 120 g Honig-Marzipan

  1. Moehren vom Gruen befreien und dieses fuer die Verzierung beiseite legen. Moehren putzen, duenn schaelen, waschen und fein raspeln.
  2. Mandeln, Haselnuesse und Backpulver in eine Schuessel geben und gut verruehren. Eier trennen. Eigelbe mit Zitronenschale, Zitronensaft und der Haelfte des Agavendicksaftes mit dem Handruehrgeraet etwa 5 Minuten cremig schlagen. Dann nach und nach die Nuesse sowie den restlichen Agavendicksaft unterruehren. Moehrenraspeln unterheben. Eiweisse mit einer Prise Salz steif schlagen und mit einem Schneebesen vorsichtig unter die Teigmasse heben.
  3. Springform (Durchmesser 26 cm) einfetten und den Boden mit Backtrennpapier auslegen. Teig in die Form fuellen, glatt streichen und auf der mittleren Einschubleiste in den Backofen schieben. Kuchen bei 200 Grad (Heissluft 180 Grad) ca. 55 Minuten backen.
  4. Nach 30 Minuten den Kuchen abdecken (mit Kuchenblech oder Backtrennpapier), damit er nicht zu dunkel wird. Den Kuchen nach dem Backen auf ein Gitter stuerzen, Backtrennpapier abziehen. Kuchen erkalten lassen.
  5. Aprikosenaufstrich bei Bedarf durch ein Sieb streichen und zusammen mit dem Wasser unter Ruehren aufkochen lassen. Kuchen mit der Glasur bestreichen.
  6. Schokoguss: Zartbitterschokolade zusammen mit dem Kokosfett im Wasserbad schmelzen. Kuchen mit dem Guss ueberziehen.
  7. Honig-Marzipan in 12 gleich grosse Stuecke zerteilen. Aus den Marzipanstuecken kleine Moehrchen formen. Vom Gruen der Bundmoehren 12 kleine Straeusschen abzupfen, waschen und in die Marzipanmoehren stecken. Sobald der Guss trocken ist, den Kuchen mit den Moehren verzieren. :Stichworte : Backen :Notizen (**) : Gepostet von: Max Thiell : : Email: max.thiell@gmx.de

MMMMM

The 4500 g Moehren 2000 g Gemahlene Mandeln 2000 g Gemahlene Haselnuesse 10 Pack. Backpulver 70 Eier Abgeriebene Schale einer unbehandelten Zitrone 30 tbs. Frisch gepresster Orangensaft 100 tbs. Agavendicksaft 10 Prise/n Salz Etwas Butter zum Einfetten der Backform

Zum Aprikotieren 20 tbs. Aprikosen-Fruchtaufstrich 10 tbs. Wasser

Fuer Den Schokoguss 1500 g Zartbitterkuvertuere 10 tsp. Kokosfett

Fuer Die Marzipan 1200 g Honig-Marzipan

ockham commented 11 years ago

Submitted by SourceForge user kkappel on 2006-06-21 07:28:52 UTC.

Logged In: YES user_id=95415

no this is not a locales-dependent problem:

imported 1000 MM-receipes with various decimal effects (10x, 100x, correct). first import using de_DE, second import using: en_US

here 2 examples:

==== SOURCE ================================= Yield: 1 Portion

  1    Paprikaschotte rot

  1    Zwiebel

  7    Oliven schwarz

  2    Tomaten

 50    Allgaeuer Emmentaler

  2 tb Schnittlauchroellchen

MMMMM--------------------------SAUCE--------------------------------

  2 ts Molkekonzentrat

  2 tb Sahne suess

  1 ts Kraeutersalz

  1 ts Frutilose

  1 tb Olivenoel kaltgepresst

100 ml Wasser

==== IMPORTED by Gourmet v 0.11.2 as (en_US) =============

10 Paprikaschotte rot 10 Zwiebel 70 Oliven schwarz 20 Tomaten 500 Allgaeuer Emmentaler 1 1/4 c Schnittlauchroellchen --------------------------------SAUCE-------------------------------- 6 2/3 tb Molkekonzentrat 1 1/4 c Sahne suess 3 1/3 tb Kraeutersalz 3 1/3 tb Frutilose 5/8 c Olivenoel kaltgepresst 1 l. Wasser

...by the way, where is the YIELD-Field?

expl. 2:

MMMMM----------- MEAL-MASTER Format (Uwe's Kochbuch, V3.8 )

 Title: Apfelkuchen vom Blech

Categories: Backen, Kuchen, Apfel, Trennkost

 Yield: 20 stueck

MMMMM----------------------FUER DEN TEIG----------------------------

150 g  Butter; zerlassen

100 g  Honig

250 g  Quark, 20% Fett

  1 tb Zitronenschale; gerieben

  1    Eigelb

       ; Meersalz

  1 pk Weinsteinbackpulver

350 g  Dinkelmehl

       Butter; fuer das Blech

MMMMM----------------------FUER DEN BELAG---------------------------

  7    Muerbe Aepfel

100 g  Rosinen, ungeschwefelt

MMMMM----------------------FUER DEN GUSS----------------------------

100 g  Butter

100 g  Honig

1.5 ts Zimt

200 g  Sahne suess

MMMMM------------------------AUSSERDEM------------------------------

100 g  Mandelblaettchen

==== IMPORTED by Gourmet v 0.11.2 (en_US) as ===============

MMMM----- Recipe via Meal-Master (tm)

   Title: Apfelkuchen vom Blech

Categories: Backen, Kuchen, Apfel, Trennkost

----------------------------FUER DEN TEIG---------------------------- 150 g Butter; zerlassen 100 g Honig 250 g Quark, 20% Fett 1 tb Zitronenschale; gerieben 1 Eigelb Meersalz 1 pk Weinsteinbackpulver 350 g Dinkelmehl Butter; fuer das Blech

----------------------------FUER DEN BELAG---------------------------- 7 Muerbe Aepfel 100 g Rosinen, ungeschwefelt

----------------------------FUER DEN GUSS---------------------------- 100 g Butter 100 g Honig 1 1/2 t Zimt 200 g Sahne suess

------------------------------AUSSERDEM------------------------------ 100 g Mandelblaettchen

ockham commented 11 years ago

Submitted by SourceForge user thomas_hinkle on 2006-04-24 17:13:49 UTC.

Logged In: YES user_id=1030390

"Interesting problem. It can not be the importers language settings, but rather the exports settings that matters. MealMaster recipes are exported all over the world, and how does an import program cope with different language settings in the exported recipes?"

It seems like it is often safe to assume that import and export will be the same -- that is, usually Spanish speakers are importing Spanish recipes, English speakers English recipes and so on. That said, obviously there are exceptions (and there are languages for which the decimal and thousands separators differ by location). Gourmet's solution is usually to try both cases -- in many cases, the use is unambiguous and Gourmet can figure out how to do the right thing regardless.

1.111.111 will always be handled correctly 1,234,567 will always be handled correctly 1.234,45 will always be handled correctly 1,234 will be handled differently in different locales.

I've seen other bug reports that appear to center on i18n problems with Windows -- I currently have an English-only windows set up (used just for testing Gourmet) and a bilingual linux set up. I know that these bugs aren't reproduceable on linux... so I guess what's needed is someone to test stuff on Windows with a non-English set-up, ideally who can run from source (so we can try out fixes more quickly).

You game?

ockham commented 11 years ago

Submitted by SourceForge user mera461 on 2006-04-24 15:57:16 UTC.

Logged In: YES user_id=1466926

I'm running on windows in Danish with "." as thousands delimeter.

Interesting problem. It can not be the importers language settings, but rather the exports settings that matters. MealMaster recipes are exported all over the world, and how does an import program cope with different language settings in the exported recipes?

ockham commented 11 years ago

Submitted by SourceForge user mera461 on 2006-04-24 15:56:45 UTC.

Logged In: YES user_id=1466926

I'm running on windows in Danish with "." as thousands delimeter.

Interesting problem. It can not be the importers language settings, but rather the exports settings that matters. MealMaster recipes are exported all over the world, and how does an import program cope with different language settings in the exported recipes?

ockham commented 11 years ago

Submitted by SourceForge user mera461 on 2006-04-24 15:56:02 UTC.

Logged In: YES user_id=1466926

I'm running on windows in Danish with "." as thousands delimeter.

Interesting problem. It can not be the importers language settings, but rather the exports settings that matters. MealMaster recipes are exported all over the world, and how does an import program cope with different language settings in the exported recipes?

ockham commented 11 years ago

Submitted by SourceForge user mera461 on 2006-04-24 15:54:34 UTC.

Logged In: YES user_id=1466926

I'm running on windows in Danish with "." as thousands delimeter.

Interesting problem. It can not be the importers language settings, but rather the exports settings that matters. MealMaster recipes are exported all over the world, and how does an import program cope with different language settings in the exported recipes?

ockham commented 11 years ago

Submitted by SourceForge user thomas_hinkle on 2006-04-22 13:10:28 UTC.

Logged In: YES user_id=1030390

Okay, my first theory appears to be wrong -- running this with LANG=es_ES.utf8 (which has a , for a decimal separator and a . for a thousands separator), I import the above file correctly.

ockham commented 11 years ago

Submitted by SourceForge user thomas_hinkle on 2006-04-22 13:02:50 UTC.

Logged In: YES user_id=1030390

I get a proper import here, though I'm noticing Gourmet's somewhat unhelpfully converting 105.5 oz. to 6.59 lb. My guess is that this is i18n related (especially since I see your other bug is related to unicode). What locale are you running in? It's possible Gourmet is getting confused, thinking that . is a thousands delimeter (nonetheless, that wouldn't explain how 0.5 became 50., unless it was actually 0.50(?)