Merge branch 'develop' into feature/vue3

This commit is contained in:
vabene1111
2024-08-24 08:29:04 +02:00
3 changed files with 37 additions and 31 deletions

View File

@@ -28,7 +28,9 @@ def get_from_scraper(scrape, request):
source_url = scrape.url source_url = scrape.url
except Exception: except Exception:
pass pass
if source_url: if source_url == "https://urlnotfound.none" or not source_url:
recipe_json['source_url'] = ''
else:
recipe_json['source_url'] = source_url recipe_json['source_url'] = source_url
try: try:
keywords.append(source_url.replace('http://', '').replace('https://', '').split('/')[0]) keywords.append(source_url.replace('http://', '').replace('https://', '').split('/')[0])

View File

@@ -8,17 +8,17 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-01 15:04+0200\n" "POT-Creation-Date: 2024-08-01 15:04+0200\n"
"PO-Revision-Date: 2023-08-13 08:19+0000\n" "PO-Revision-Date: 2024-08-21 16:58+0000\n"
"Last-Translator: Miha Perpar <miha.perpar2@gmail.com>\n" "Last-Translator: \"Matjaž T.\" <matjaz@moj-svet.si>\n"
"Language-Team: Slovenian <http://translate.tandoor.dev/projects/tandoor/" "Language-Team: Slovenian <http://translate.tandoor.dev/projects/tandoor/"
"recipes-backend/sl/>\n" "recipes-backend/sl/>\n"
"Language: sl\n" "Language: sl\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
"%100==4 ? 2 : 3;\n" "n%100==4 ? 2 : 3;\n"
"X-Generator: Weblate 4.15\n" "X-Generator: Weblate 5.6.2\n"
#: .\cookbook\forms.py:45 #: .\cookbook\forms.py:45
msgid "" msgid ""
@@ -89,14 +89,16 @@ msgid ""
"<a href=\"https://www.home-assistant.io/docs/authentication/#your-account-" "<a href=\"https://www.home-assistant.io/docs/authentication/#your-account-"
"profile\">Long Lived Access Token</a> for your HomeAssistant instance" "profile\">Long Lived Access Token</a> for your HomeAssistant instance"
msgstr "" msgstr ""
"<a href=\"https://www.home-assistant.io/docs/authentication/#your-account-"
"profile\">Dolgoročen dostopni žeton</a> za vašo HomeAssistant instanco"
#: .\cookbook\forms.py:193 #: .\cookbook\forms.py:193
msgid "Something like http://homeassistant.local:8123/api" msgid "Something like http://homeassistant.local:8123/api"
msgstr "" msgstr "Nekaj podobnega http://homeassistant.local:8123/api"
#: .\cookbook\forms.py:205 #: .\cookbook\forms.py:205
msgid "http://homeassistant.local:8123/api for example" msgid "http://homeassistant.local:8123/api for example"
msgstr "" msgstr "http://homeassistant.local:8123/api na primer"
#: .\cookbook\forms.py:222 .\cookbook\views\edit.py:117 #: .\cookbook\forms.py:222 .\cookbook\views\edit.py:117
msgid "Storage" msgid "Storage"
@@ -202,45 +204,49 @@ msgid ""
"Fields to full text search. Note: 'web', 'phrase', and 'raw' search methods " "Fields to full text search. Note: 'web', 'phrase', and 'raw' search methods "
"only function with fulltext fields." "only function with fulltext fields."
msgstr "" msgstr ""
"Polja za iskanje po celotnem besedilu. Opomba: metode iskanja 'web', "
"'phrase' in 'raw' delujejo samo s polnimi besedilnimi polji."
#: .\cookbook\forms.py:350 #: .\cookbook\forms.py:350
msgid "Search Method" msgid "Search Method"
msgstr "" msgstr "Metoda iskanja"
#: .\cookbook\forms.py:350 #: .\cookbook\forms.py:350
msgid "Fuzzy Lookups" msgid "Fuzzy Lookups"
msgstr "" msgstr "Mehka iskanja"
#: .\cookbook\forms.py:350 #: .\cookbook\forms.py:350
msgid "Ignore Accent" msgid "Ignore Accent"
msgstr "" msgstr "Prezri naglas"
#: .\cookbook\forms.py:350 #: .\cookbook\forms.py:350
msgid "Partial Match" msgid "Partial Match"
msgstr "" msgstr "Delno ujemanje"
#: .\cookbook\forms.py:350 #: .\cookbook\forms.py:350
msgid "Starts With" msgid "Starts With"
msgstr "" msgstr "Se začne s/z"
#: .\cookbook\forms.py:351 #: .\cookbook\forms.py:351
msgid "Fuzzy Search" msgid "Fuzzy Search"
msgstr "" msgstr "Mehko iskanje"
#: .\cookbook\forms.py:351 #: .\cookbook\forms.py:351
msgid "Full Text" msgid "Full Text"
msgstr "" msgstr "Celotno besedilo"
#: .\cookbook\helper\AllAuthCustomAdapter.py:41 #: .\cookbook\helper\AllAuthCustomAdapter.py:41
msgid "" msgid ""
"In order to prevent spam, the requested email was not send. Please wait a " "In order to prevent spam, the requested email was not send. Please wait a "
"few minutes and try again." "few minutes and try again."
msgstr "" msgstr ""
"Da bi preprečili vsiljeno pošto, zahtevana e-pošta ni bila poslana. "
"Počakajte nekaj minut in poskusite znova."
#: .\cookbook\helper\permission_helper.py:164 #: .\cookbook\helper\permission_helper.py:164
#: .\cookbook\helper\permission_helper.py:187 .\cookbook\views\views.py:117 #: .\cookbook\helper\permission_helper.py:187 .\cookbook\views\views.py:117
msgid "You are not logged in and therefore cannot view this page!" msgid "You are not logged in and therefore cannot view this page!"
msgstr "" msgstr "Niste prijavljeni in si zato ne morete ogledati te strani!"
#: .\cookbook\helper\permission_helper.py:168 #: .\cookbook\helper\permission_helper.py:168
#: .\cookbook\helper\permission_helper.py:174 #: .\cookbook\helper\permission_helper.py:174
@@ -253,48 +259,46 @@ msgstr ""
#: .\cookbook\helper\permission_helper.py:341 .\cookbook\views\data.py:35 #: .\cookbook\helper\permission_helper.py:341 .\cookbook\views\data.py:35
#: .\cookbook\views\views.py:127 .\cookbook\views\views.py:131 #: .\cookbook\views\views.py:127 .\cookbook\views\views.py:131
msgid "You do not have the required permissions to view this page!" msgid "You do not have the required permissions to view this page!"
msgstr "" msgstr "Nimate potrebnih dovoljenj za ogled te strani!"
#: .\cookbook\helper\permission_helper.py:192 #: .\cookbook\helper\permission_helper.py:192
#: .\cookbook\helper\permission_helper.py:215 #: .\cookbook\helper\permission_helper.py:215
#: .\cookbook\helper\permission_helper.py:237 #: .\cookbook\helper\permission_helper.py:237
#: .\cookbook\helper\permission_helper.py:252 #: .\cookbook\helper\permission_helper.py:252
msgid "You cannot interact with this object as it is not owned by you!" msgid "You cannot interact with this object as it is not owned by you!"
msgstr "" msgstr "S tem predmetom ne morete komunicirati, ker ni v vaši lasti!"
#: .\cookbook\helper\permission_helper.py:402 #: .\cookbook\helper\permission_helper.py:402
msgid "You have reached the maximum number of recipes for your space." msgid "You have reached the maximum number of recipes for your space."
msgstr "" msgstr "Dosegli ste največje število receptov za svoj prostor."
#: .\cookbook\helper\permission_helper.py:414 #: .\cookbook\helper\permission_helper.py:414
msgid "You have more users than allowed in your space." msgid "You have more users than allowed in your space."
msgstr "" msgstr "V vašem prostoru imate več uporabnikov, kot je dovoljeno."
#: .\cookbook\helper\recipe_url_import.py:310 #: .\cookbook\helper\recipe_url_import.py:310
#, fuzzy
#| msgid "Use fractions"
msgid "reverse rotation" msgid "reverse rotation"
msgstr "Uporabi ulomke/frakcije" msgstr "obratno vrtenje"
#: .\cookbook\helper\recipe_url_import.py:311 #: .\cookbook\helper\recipe_url_import.py:311
msgid "careful rotation" msgid "careful rotation"
msgstr "" msgstr "previdno vrtenje"
#: .\cookbook\helper\recipe_url_import.py:312 #: .\cookbook\helper\recipe_url_import.py:312
msgid "knead" msgid "knead"
msgstr "" msgstr "gnetemo"
#: .\cookbook\helper\recipe_url_import.py:313 #: .\cookbook\helper\recipe_url_import.py:313
msgid "thicken" msgid "thicken"
msgstr "" msgstr "zgostimo"
#: .\cookbook\helper\recipe_url_import.py:314 #: .\cookbook\helper\recipe_url_import.py:314
msgid "warm up" msgid "warm up"
msgstr "" msgstr "pogrejemo"
#: .\cookbook\helper\recipe_url_import.py:315 #: .\cookbook\helper\recipe_url_import.py:315
msgid "ferment" msgid "ferment"
msgstr "" msgstr "fermentiramo"
#: .\cookbook\helper\recipe_url_import.py:316 #: .\cookbook\helper\recipe_url_import.py:316
msgid "sous-vide" msgid "sous-vide"
@@ -302,7 +306,7 @@ msgstr ""
#: .\cookbook\helper\shopping_helper.py:150 #: .\cookbook\helper\shopping_helper.py:150
msgid "You must supply a servings size" msgid "You must supply a servings size"
msgstr "" msgstr "Navesti morate velikost obrokov"
#: .\cookbook\helper\template_helper.py:95 #: .\cookbook\helper\template_helper.py:95
#: .\cookbook\helper\template_helper.py:97 #: .\cookbook\helper\template_helper.py:97

View File

@@ -1527,9 +1527,9 @@ class RecipeUrlImportView(APIView):
data = "<script type='application/ld+json'>" + json.dumps(data_json) + "</script>" data = "<script type='application/ld+json'>" + json.dumps(data_json) + "</script>"
except JSONDecodeError: except JSONDecodeError:
pass pass
scrape = scrape_html(html=data, org_url=url, supported_only=False) scrape = scrape_html(html=data, org_url='https://urlnotfound.none', supported_only=False)
if not url and (found_url := scrape.schema.data.get('url', 'https://urlnotfound.none')): if not url and (found_url := scrape.schema.data.get('url', 'https://urlnotfound.none')):
scrape = scrape_html(text=data, url=found_url, supported_only=False) scrape = scrape_html(html=data, org_url=found_url, supported_only=False)
if scrape: if scrape:
return Response({ return Response({