Difference between revisions of "Global storage taxonomy"

From Open Food Facts wiki
Jump to navigation Jump to search
Tags: Mobile edit Mobile web edit
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=== How it works ===
 
=== How it works ===
 +
[[Category:Food waste]]
 
[[Category:Translations]]
 
[[Category:Translations]]
 
[[Category:Multilingual]]
 
[[Category:Multilingual]]
Line 7: Line 8:
  
 
== Current status ==
 
== Current status ==
Draft
+
Draft. Not live yet.
== Taxonomy definition ==
+
 
 +
=== Script ===
 +
 
 +
The taxonomy is generated with this script:
 +
 
 +
<pre>
 +
 
 +
#!/usr/bin/perl -w
 +
 
 +
use strict;
 +
 
 +
my $entry_format = <<TXT
 +
en:Once opened, consume within <i> days
 +
fr:A consommer <i> jours après ouverture
 +
numeric_days:en:<i>
 +
TXT
 +
;
 +
 
 +
for (my $i = 1; $i <= 4 * 12; $i++) {
 +
 
 +
my $entry = $entry_format;
 +
$entry =~ s/<i>/$i/g;
 +
print $entry . "\n";
 +
}
 +
 
 +
</pre>
 +
===Days===
 +
<pre>
 +
en:1 day, 1day
 +
fr:1 jour, 1jour
 +
 
 +
en:2 days, 2days
 +
fr:2 jours, 2jours
 +
</pre>
 +
 
 +
=== Months ===
 +
<pre>
 +
en:1 month,1month
 +
fr:1 mois, 1mois
 +
 
 +
en:2 months,2months
 +
fr:2 mois, 2mois
 +
</pre>
 +
 
 +
== Places ==
 +
<pre>
 +
en:dry place
  
 +
en:cool place
  
 +
en:cool, dry place
 +
</pre>
 +
 +
== Taxonomy definition ==
 
<pre>
 
<pre>
fr:A consommer 15 jours après ouverture
+
en:Once opened, consume within <i> days
en:Once opened, consume within 15 days
+
fr:A consommer <i> jours après ouverture
 +
 
 +
en:Consume within <i> mois
 +
fr:A consommer sous <i> mois
  
 
en:Store in a dry place
 
en:Store in a dry place
Line 33: Line 88:
 
en:Do not freeze
 
en:Do not freeze
 
</pre>
 
</pre>
 +
 +
 +
1. how the product should be kept before opening
 +
<pre>
 +
fr:à conserver dans un endroit sec
 +
en:store in a dry place
 +
 +
fr:Ne pas congeler
 +
 +
en:Freezable, Suitable for freezing
 +
</pre>
 +
2. same after opening (e.g. refrigerate)
 +
<pre>
 +
fr:à conserver au frais après ouverture
 +
 +
</pre>
 +
3. number of days to keep after being opened

Latest revision as of 08:05, 13 August 2024

How it works

Back to Global taxonomies

This page contains the definition of the storage/best before recommandations in Open Food Facts.

Current status

Draft. Not live yet.

Script

The taxonomy is generated with this script:


#!/usr/bin/perl -w

use strict;

my $entry_format = <<TXT
en:Once opened, consume within <i> days
fr:A consommer <i> jours après ouverture
numeric_days:en:<i>
TXT
;

for (my $i = 1; $i <= 4 * 12; $i++) {

	my $entry = $entry_format;
	$entry =~ s/<i>/$i/g;
	print $entry . "\n";
}

Days

en:1 day, 1day
fr:1 jour, 1jour

en:2 days, 2days
fr:2 jours, 2jours

Months

en:1 month,1month
fr:1 mois, 1mois

en:2 months,2months
fr:2 mois, 2mois

Places

en:dry place

en:cool place

en:cool, dry place

Taxonomy definition

en:Once opened, consume within <i> days
fr:A consommer <i> jours après ouverture

en:Consume within <i> mois
fr:A consommer sous <i> mois

en:Store in a dry place

en:Store in a cool place

en:Suitable for freezing

<en:Store in a dry place
<en:Store in a cool place
en:Store in a cool, dry place.

en:Once opened store in an airtight container.

<en:Once opened store in an airtight container.
<en:Store in a cool, dry place.
en:Store in a cool, dry place and once opened in an airtight container.

en:Do not freeze


1. how the product should be kept before opening

fr:à conserver dans un endroit sec
en:store in a dry place

fr:Ne pas congeler

en:Freezable, Suitable for freezing

2. same after opening (e.g. refrigerate)

fr:à conserver au frais après ouverture

3. number of days to keep after being opened