More localization of recipe search and view

This commit is contained in:
MaxJa4
2022-02-28 21:19:00 +01:00
parent b393d026f7
commit 1e3a6fadf0
6 changed files with 17 additions and 5 deletions

View File

@ -4,6 +4,7 @@ from zipfile import ZipFile
from bs4 import BeautifulSoup
from django.utils.translation import gettext as _
from cookbook.helper.ingredient_parser import IngredientParser
from cookbook.helper.recipe_url_import import iso_duration_to_minutes, parse_servings
from cookbook.integration.integration import Integration
@ -59,7 +60,7 @@ class RecipeKeeper(Integration):
step.instruction += s.text + ' \n'
if file.find("span", {"itemprop": "recipeSource"}).text != '':
step.instruction += "\n\nImported from: " + file.find("span", {"itemprop": "recipeSource"}).text
step.instruction += "\n\n" + _("Imported from") + ": " + file.find("span", {"itemprop": "recipeSource"}).text
step.save()
recipe.steps.add(step)