77 lines
4.3 KiB
Python
77 lines
4.3 KiB
Python
"""Static, bilingual guidance for the food diary nutrient cards."""
|
|
|
|
GUIDANCE = {
|
|
'protein_g': {
|
|
'en': ('Helps build and maintain muscles and supports recovery.', [
|
|
('Poultry', 'chicken breast, turkey'), ('Fish', 'tuna, salmon, cod'),
|
|
('Eggs', ''), ('Dairy', 'skyr, quark (kwark), cottage cheese'),
|
|
('Legumes', 'lentils, chickpeas, beans'),
|
|
('Plant proteins', 'tofu, tempeh, edamame')], ''),
|
|
'nl': ('Helpt spieren opbouwen en behouden en ondersteunt herstel.', [
|
|
('Gevogelte', 'kipfilet, kalkoen'), ('Vis', 'tonijn, zalm, kabeljauw'),
|
|
('Eieren', ''), ('Zuivel', 'skyr, kwark, hüttenkäse'),
|
|
('Peulvruchten', 'linzen, kikkererwten, bonen'),
|
|
('Plantaardige eiwitten', 'tofu, tempeh, edamame')], ''),
|
|
},
|
|
'carbohydrates_g': {
|
|
'en': ('Provide energy for your brain, muscles and everyday activity.', [
|
|
('Whole grains', 'oats, wholemeal bread, brown rice'),
|
|
('Starchy foods', 'potatoes, pasta, rice'),
|
|
('Fruit', 'bananas, apples, berries'),
|
|
('Legumes', 'beans, lentils, chickpeas'),
|
|
('Vegetables', 'sweetcorn, peas')],
|
|
'Whole grains and fibre-rich carbohydrate sources are generally preferable to highly refined options.'),
|
|
'nl': ('Geven energie voor je hersenen, spieren en dagelijkse activiteiten.', [
|
|
('Volkoren granen', 'havermout, volkorenbrood, zilvervliesrijst'),
|
|
('Zetmeelrijke producten', 'aardappelen, pasta, rijst'),
|
|
('Fruit', 'bananen, appels, bessen'),
|
|
('Peulvruchten', 'bonen, linzen, kikkererwten'),
|
|
('Groenten', 'suikermaïs, erwten')],
|
|
'Volkoren en vezelrijke koolhydraatbronnen hebben doorgaans de voorkeur boven sterk geraffineerde producten.'),
|
|
},
|
|
'fat_g': {
|
|
'en': ('Supports hormone production, cell function and absorption of certain vitamins.', [
|
|
('Nuts', 'walnuts, almonds, cashews'),
|
|
('Seeds', 'chia, flaxseed, sunflower seeds'),
|
|
('Oils', 'olive oil, rapeseed oil'), ('Avocado', ''),
|
|
('Oily fish', 'salmon, mackerel, sardines'),
|
|
('Dairy and butter', 'cheese, cream, butter')],
|
|
'Unsaturated fats are generally preferable to saturated fats.'),
|
|
'nl': ('Ondersteunt de hormoonproductie, celfunctie en opname van bepaalde vitamines.', [
|
|
('Noten', 'walnoten, amandelen, cashewnoten'),
|
|
('Zaden', 'chiazaad, lijnzaad, zonnebloempitten'),
|
|
('Oliën', 'olijfolie, koolzaadolie'), ('Avocado', ''),
|
|
('Vette vis', 'zalm, makreel, sardines'),
|
|
('Zuivel en boter', 'kaas, room, boter')],
|
|
'Onverzadigde vetten hebben doorgaans de voorkeur boven verzadigde vetten.'),
|
|
},
|
|
'fibre_g': {
|
|
'en': ('Supports digestion, gut health and feelings of fullness.', [
|
|
('Legumes', 'lentils, kidney beans, chickpeas'),
|
|
('Whole grains', 'oats, wholemeal bread, barley'),
|
|
('Seeds', 'chia seeds, flaxseed'),
|
|
('Fruit', 'raspberries, pears, apples with skin'),
|
|
('Vegetables', 'broccoli, carrots, Brussels sprouts'),
|
|
('Nuts', 'almonds, pistachios')],
|
|
'Increase fibre gradually and drink enough fluids.'),
|
|
'nl': ('Ondersteunt de spijsvertering, darmgezondheid en een vol gevoel.', [
|
|
('Peulvruchten', 'linzen, kidneybonen, kikkererwten'),
|
|
('Volkoren granen', 'havermout, volkorenbrood, gerst'),
|
|
('Zaden', 'chiazaad, lijnzaad'),
|
|
('Fruit', 'frambozen, peren, appels met schil'),
|
|
('Groenten', 'broccoli, wortels, spruitjes'),
|
|
('Noten', 'amandelen, pistachenoten')],
|
|
'Verhoog je vezelinname geleidelijk en drink voldoende.'),
|
|
},
|
|
}
|
|
|
|
|
|
def nutrient_guidance(slug, language):
|
|
explanation, sources, tip = GUIDANCE[slug]['nl' if language.startswith('nl') else 'en']
|
|
titles = {'protein_g': 'Eiwitten', 'carbohydrates_g': 'Koolhydraten',
|
|
'fat_g': 'Vetten', 'fibre_g': 'Vezels'}
|
|
return {'title': titles[slug] if language.startswith('nl') else {
|
|
'protein_g': 'Protein', 'carbohydrates_g': 'Carbohydrates',
|
|
'fat_g': 'Fat', 'fibre_g': 'Fibre'}[slug],
|
|
'explanation': explanation, 'sources': sources, 'tip': tip}
|