diff --git a/cookbook/integration/default.py b/cookbook/integration/default.py index 951a5312..5939b5f4 100644 --- a/cookbook/integration/default.py +++ b/cookbook/integration/default.py @@ -1,4 +1,5 @@ import json +import traceback from io import BytesIO, StringIO from re import match from zipfile import ZipFile @@ -19,7 +20,10 @@ class Default(Integration): recipe = self.decode_recipe(recipe_string) images = list(filter(lambda v: match('image.*', v), recipe_zip.namelist())) if images: - self.import_recipe_image(recipe, BytesIO(recipe_zip.read(images[0])), filetype=get_filetype(images[0])) + try: + self.import_recipe_image(recipe, BytesIO(recipe_zip.read(images[0])), filetype=get_filetype(images[0])) + except AttributeError as e: + traceback.print_exc() return recipe def decode_recipe(self, string): diff --git a/cookbook/locale/el/LC_MESSAGES/django.po b/cookbook/locale/el/LC_MESSAGES/django.po index 87902274..4b569886 100644 --- a/cookbook/locale/el/LC_MESSAGES/django.po +++ b/cookbook/locale/el/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-07-12 19:20+0200\n" -"PO-Revision-Date: 2023-06-23 09:19+0000\n" +"PO-Revision-Date: 2023-06-25 14:19+0000\n" "Last-Translator: sweeney \n" "Language-Team: Greek \n" @@ -262,6 +262,8 @@ msgid "" "You can use markdown to format this field. See the docs here" msgstr "" +"Μπορείτε να χρησιμοποιήσετε τη μορφοποίηση Markdown για να διαμορφώσετε αυτό " +"το πεδίο. Δείτε τα έγγραφα εδώ" #: .\cookbook\forms.py:366 msgid "Maximum number of users for this space reached." @@ -309,6 +311,8 @@ msgid "" "Use fuzzy matching on units, keywords and ingredients when editing and " "importing recipes." msgstr "" +"Χρησιμοποιήστε ασαφείς (fuzzy) αντιστοιχίες σε μονάδες μέτρησης, λέξεις-" +"κλειδιά και συστατικά κατά την επεξεργασία και εισαγωγή συνταγών." #: .\cookbook\forms.py:451 msgid "" @@ -323,6 +327,8 @@ msgid "" "Fields to search for partial matches. (e.g. searching for 'Pie' will return " "'pie' and 'piece' and 'soapie')" msgstr "" +"Πεδία για αναζήτηση μερικών αντιστοιχιών. (π.χ. αναζήτηση για 'πίτα' τα " +"'τυρόπιτα' και 'απιτα' θα βρίσκονται στα αποτελέσματα)" #: .\cookbook\forms.py:455 msgid "" @@ -420,7 +426,7 @@ msgstr "" #: .\cookbook\forms.py:506 msgid "Delimiter to use for CSV exports." -msgstr "" +msgstr "Το σημείο στίξης διαχωρισμού δεκαδικών για τις εξαγωγές σε αρχεία CSV." #: .\cookbook\forms.py:507 msgid "Prefix to add when copying list to the clipboard." @@ -454,7 +460,7 @@ msgstr "Προεπιλεγμένες ώρες καθυστέρησης" #: .\cookbook\forms.py:517 msgid "Filter to Supermarket" -msgstr "" +msgstr "Ταξινόμηση ανά Supermarket" #: .\cookbook\forms.py:518 msgid "Recent Days" @@ -462,7 +468,7 @@ msgstr "Πρόσφατες ημέρες" #: .\cookbook\forms.py:519 msgid "CSV Delimiter" -msgstr "" +msgstr "CSV σημείο στίξης διαχωρισμού δεκαδικών" #: .\cookbook\forms.py:520 msgid "List Prefix" @@ -474,7 +480,7 @@ msgstr "Αυτόματα διαθέσιμο" #: .\cookbook\forms.py:531 msgid "Reset Food Inheritance" -msgstr "" +msgstr "Επαναφορά κληρονομιάς φαγητών" #: .\cookbook\forms.py:532 msgid "Reset all food to inherit the fields configured." @@ -531,7 +537,7 @@ msgstr "Έχετε περισσότερους χρήστες από το επι #: .\cookbook\helper\recipe_search.py:565 msgid "One of queryset or hash_key must be provided" -msgstr "" +msgstr "Πρέπει να παρέχετε είτε το queryset είτε το hash_key" #: .\cookbook\helper\shopping_helper.py:152 msgid "You must supply a servings size" @@ -619,6 +625,8 @@ msgstr "Αναδόμηση πλήρους ευρετηρίου αναζήτησ #: .\cookbook\management\commands\rebuildindex.py:18 msgid "Only Postgresql databases use full text search, no index to rebuild" msgstr "" +"Μόνο οι βάσεις δεδομένων Postgresql χρησιμοποιούν αναζήτηση πλήρους " +"κειμένου, δεν υπάρχει ανάγκη ανασύνθεσης των ευρετηρίων" #: .\cookbook\management\commands\rebuildindex.py:29 msgid "Recipe index rebuild complete." @@ -780,13 +788,15 @@ msgstr "Πρόσκληση στο Tandoor Recipes" #: .\cookbook\serializer.py:1209 msgid "Existing shopping list to update" -msgstr "" +msgstr "Υπάρχουσα λίστα αγορών για ενημέρωση" #: .\cookbook\serializer.py:1211 msgid "" "List of ingredient IDs from the recipe to add, if not provided all " "ingredients will be added." msgstr "" +"Λίστα αναγνωριστικών συστατικών (ID) από τη συνταγή προς προσθήκη. Εάν δεν " +"παρέχονται όλα τα συστατικά θα προστεθούν." #: .\cookbook\serializer.py:1213 msgid "" @@ -795,21 +805,23 @@ msgstr "" #: .\cookbook\serializer.py:1222 msgid "Amount of food to add to the shopping list" -msgstr "" +msgstr "Ποσότητα του φαγητού που θα προστεθεί στη λίστα αγορών" #: .\cookbook\serializer.py:1224 msgid "ID of unit to use for the shopping list" -msgstr "" +msgstr "Το ID της μονάδας μέτρησης που θα χρησιμοποιείται στη λίστα αγορών" #: .\cookbook\serializer.py:1226 msgid "When set to true will delete all food from active shopping lists." msgstr "" +"Όταν οριστεί σε true, θα διαγραφούν όλα τα τρόφιμα από τις ενεργές λίστες " +"αγορών." #: .\cookbook\tables.py:36 .\cookbook\templates\generic\edit_template.html:6 #: .\cookbook\templates\generic\edit_template.html:14 #: .\cookbook\templates\recipes_table.html:82 msgid "Edit" -msgstr "" +msgstr "Τροποποίηση" #: .\cookbook\tables.py:116 .\cookbook\tables.py:131 #: .\cookbook\templates\generic\delete_template.html:7 @@ -817,28 +829,28 @@ msgstr "" #: .\cookbook\templates\generic\edit_template.html:28 #: .\cookbook\templates\recipes_table.html:90 msgid "Delete" -msgstr "" +msgstr "Διαγραφή" #: .\cookbook\templates\404.html:5 msgid "404 Error" -msgstr "" +msgstr "404 Error" #: .\cookbook\templates\404.html:18 msgid "The page you are looking for could not be found." -msgstr "" +msgstr "Η σελίδα που αναζητάτε δεν μπορεί να βρεθεί." #: .\cookbook\templates\404.html:33 msgid "Take me Home" -msgstr "" +msgstr "Πήγαινε με στη αρχική σελίδα" #: .\cookbook\templates\404.html:35 msgid "Report a Bug" -msgstr "" +msgstr "Αναφορά σφάλματος" #: .\cookbook\templates\account\email.html:6 #: .\cookbook\templates\account\email.html:17 msgid "E-mail Addresses" -msgstr "" +msgstr "Διευθύνσεις e-mail" #: .\cookbook\templates\account\email.html:12 #: .\cookbook\templates\account\password_change.html:11 @@ -847,68 +859,71 @@ msgstr "" #: .\cookbook\templates\settings.html:17 #: .\cookbook\templates\socialaccount\connections.html:10 msgid "Settings" -msgstr "" +msgstr "Ρυθμίσεις" #: .\cookbook\templates\account\email.html:13 msgid "Email" -msgstr "" +msgstr "Email" #: .\cookbook\templates\account\email.html:19 msgid "The following e-mail addresses are associated with your account:" -msgstr "" +msgstr "Οι παρακάτω διευθύνσεις e-mail συνδέονται με τον λογαριασμό σας:" #: .\cookbook\templates\account\email.html:36 msgid "Verified" -msgstr "" +msgstr "Πιστοποιημένο" #: .\cookbook\templates\account\email.html:38 msgid "Unverified" -msgstr "" +msgstr "Μη πιστοποιημένο" #: .\cookbook\templates\account\email.html:40 msgid "Primary" -msgstr "" +msgstr "Κύριο" #: .\cookbook\templates\account\email.html:47 msgid "Make Primary" -msgstr "" +msgstr "Μετατροπή σε κύριο" #: .\cookbook\templates\account\email.html:49 msgid "Re-send Verification" -msgstr "" +msgstr "Επαναποστολή της επαλήθευσης" #: .\cookbook\templates\account\email.html:50 #: .\cookbook\templates\generic\delete_template.html:57 #: .\cookbook\templates\socialaccount\connections.html:44 msgid "Remove" -msgstr "" +msgstr "Αφαίρεση" #: .\cookbook\templates\account\email.html:58 msgid "Warning:" -msgstr "" +msgstr "Προειδοποίηση:" #: .\cookbook\templates\account\email.html:58 msgid "" "You currently do not have any e-mail address set up. You should really add " "an e-mail address so you can receive notifications, reset your password, etc." msgstr "" +"Προς το παρόν, δεν έχετε καμία διεύθυνση e-mail καταχωρημένη. Θα πρέπει να " +"προσθέσετε μια διεύθυνση ηλεκτρονικού ταχυδρομείου, ώστε να μπορείτε να " +"λαμβάνετε ειδοποιήσεις, να επαναφέρετε τον κωδικό πρόσβασης, κ.λπ." #: .\cookbook\templates\account\email.html:64 msgid "Add E-mail Address" -msgstr "" +msgstr "Προσθήκη διεύθυνσης e-mail" #: .\cookbook\templates\account\email.html:69 msgid "Add E-mail" -msgstr "" +msgstr "Προσθήκη e-mail" #: .\cookbook\templates\account\email.html:79 msgid "Do you really want to remove the selected e-mail address?" -msgstr "" +msgstr "Θέλετε πραγματικά να αφαιρέσετε την επιλεγμένη διεύθυνση e-mail;" #: .\cookbook\templates\account\email_confirm.html:6 #: .\cookbook\templates\account\email_confirm.html:10 msgid "Confirm E-mail Address" -msgstr "" +msgstr "Επιβεβαίωση διεύθυνσης e-mail" #: .\cookbook\templates\account\email_confirm.html:16 #, python-format @@ -918,11 +933,15 @@ msgid "" "for user %(user_display)s\n" " ." msgstr "" +"Παρακαλώ επιβεβαιώστε ότι το\n" +" %(email)s είναι μια διεύθυνση " +"e-mail για τον χρήστη %(user_display)s\n" +" ." #: .\cookbook\templates\account\email_confirm.html:22 #: .\cookbook\templates\generic\delete_template.html:72 msgid "Confirm" -msgstr "" +msgstr "Επιβεβαίωση" #: .\cookbook\templates\account\email_confirm.html:29 #, python-format @@ -931,11 +950,15 @@ msgid "" " issue a new e-mail confirmation " "request." msgstr "" +"Αυτός ο σύνδεσμος επιβεβαίωσης έχει λήξει είναι δεν είναι έγκυρος. Παρακαλώ " +"\n" +" κάντε ένα νέο αίτημα για επιβεβαιωτικό " +"e-mail." #: .\cookbook\templates\account\login.html:8 #: .\cookbook\templates\base.html:340 .\cookbook\templates\openid\login.html:8 msgid "Login" -msgstr "" +msgstr "Σύνδεση" #: .\cookbook\templates\account\login.html:15 #: .\cookbook\templates\account\login.html:31 @@ -945,41 +968,43 @@ msgstr "" #: .\cookbook\templates\openid\login.html:26 #: .\cookbook\templates\socialaccount\authentication_error.html:15 msgid "Sign In" -msgstr "" +msgstr "Σύνδεση" #: .\cookbook\templates\account\login.html:34 #: .\cookbook\templates\socialaccount\signup.html:8 #: .\cookbook\templates\socialaccount\signup.html:57 msgid "Sign Up" -msgstr "" +msgstr "Εγγραφή" #: .\cookbook\templates\account\login.html:39 #: .\cookbook\templates\account\login.html:41 #: .\cookbook\templates\account\password_reset.html:29 msgid "Reset My Password" -msgstr "" +msgstr "Επαναφορά κωδικού πρόσβασης" #: .\cookbook\templates\account\login.html:40 msgid "Lost your password?" -msgstr "" +msgstr "Χασάτε τον κωδικό πρόσβασης;" #: .\cookbook\templates\account\login.html:52 msgid "Social Login" -msgstr "" +msgstr "Σύνδεση με social media" #: .\cookbook\templates\account\login.html:53 msgid "You can use any of the following providers to sign in." msgstr "" +"Μπορείτε να χρησιμοποιήσετε οποιονδήποτε από τους παρακάτω παρόχους για να " +"συνδεθείτε." #: .\cookbook\templates\account\logout.html:5 #: .\cookbook\templates\account\logout.html:9 #: .\cookbook\templates\account\logout.html:18 msgid "Sign Out" -msgstr "" +msgstr "Αποσύνδεση" #: .\cookbook\templates\account\logout.html:11 msgid "Are you sure you want to sign out?" -msgstr "" +msgstr "Είστε σίγουροι ότι θέλετε να αποσυνδεθείτε;" #: .\cookbook\templates\account\password_change.html:6 #: .\cookbook\templates\account\password_change.html:16 @@ -989,44 +1014,50 @@ msgstr "" #: .\cookbook\templates\account\password_reset_from_key_done.html:7 #: .\cookbook\templates\account\password_reset_from_key_done.html:13 msgid "Change Password" -msgstr "" +msgstr "Αλλαγή κωδικού πρόσβασης" #: .\cookbook\templates\account\password_change.html:12 #: .\cookbook\templates\account\password_set.html:12 #: .\cookbook\templates\settings.html:76 msgid "Password" -msgstr "" +msgstr "Κωδικός πρόσβασης" #: .\cookbook\templates\account\password_change.html:22 msgid "Forgot Password?" -msgstr "" +msgstr "Ξεχάσατε τον κωδικό πρόσβασης;" #: .\cookbook\templates\account\password_reset.html:7 #: .\cookbook\templates\account\password_reset.html:13 #: .\cookbook\templates\account\password_reset_done.html:7 #: .\cookbook\templates\account\password_reset_done.html:10 msgid "Password Reset" -msgstr "" +msgstr "Επαναφορά κωδικού πρόσβασης" #: .\cookbook\templates\account\password_reset.html:24 msgid "" "Forgotten your password? Enter your e-mail address below, and we'll send you " "an e-mail allowing you to reset it." msgstr "" +"Ξεχάσατε τον κωδικό πρόσβασης σας; Εισάγετε τη διεύθυνση ηλεκτρονικού " +"ταχυδρομείου σας παρακάτω και θα σας στείλουμε ένα email που θα σας " +"επιτρέψει να τον επαναφέρετε." #: .\cookbook\templates\account\password_reset.html:32 msgid "Password reset is disabled on this instance." msgstr "" +"Η επαναφορά κωδικού πρόσβασης είναι απενεργοποιημένη σε αυτήν την πλατφόρμα." #: .\cookbook\templates\account\password_reset_done.html:16 msgid "" "We have sent you an e-mail. Please contact us if you do not receive it " "within a few minutes." msgstr "" +"Σας έχουμε στείλει ένα email. Παρακαλούμε επικοινωνήστε μαζί μας αν δεν το " +"λάβετε εντός λίγων λεπτών." #: .\cookbook\templates\account\password_reset_from_key.html:13 msgid "Bad Token" -msgstr "" +msgstr "Μη έγκυρο token" #: .\cookbook\templates\account\password_reset_from_key.html:25 #, python-format @@ -1036,168 +1067,172 @@ msgid "" " Please request a new " "password reset." msgstr "" +"Ο σύνδεσμος επαναφοράς κωδικού πρόσβασης ήταν άκυρος, πιθανώς επειδή έχει " +"ήδη χρησιμοποιηθεί.\n" +" Παρακαλώ ζητήστε έναν νέο σύνδεσμο επαναφοράς κωδικού πρόσβασης." #: .\cookbook\templates\account\password_reset_from_key.html:33 msgid "change password" -msgstr "" +msgstr "Αλλαγή κωδικού πρόσβασης" #: .\cookbook\templates\account\password_reset_from_key.html:36 #: .\cookbook\templates\account\password_reset_from_key_done.html:19 msgid "Your password is now changed." -msgstr "" +msgstr "Ο κωδικός πρόσβασης σας έχει αλλάξει." #: .\cookbook\templates\account\password_set.html:6 #: .\cookbook\templates\account\password_set.html:16 #: .\cookbook\templates\account\password_set.html:21 msgid "Set Password" -msgstr "" +msgstr "Ορισμός Κωδικού Πρόσβασης" #: .\cookbook\templates\account\signup.html:6 msgid "Register" -msgstr "" +msgstr "Εγγραφή" #: .\cookbook\templates\account\signup.html:12 msgid "Create an Account" -msgstr "" +msgstr "Δημιουργία λογαριασμού" #: .\cookbook\templates\account\signup.html:42 #: .\cookbook\templates\socialaccount\signup.html:33 msgid "I accept the follwoing" -msgstr "" +msgstr "Αποδέχομαι τα παρακάτω" #: .\cookbook\templates\account\signup.html:45 #: .\cookbook\templates\socialaccount\signup.html:36 msgid "Terms and Conditions" -msgstr "" +msgstr "Όροι και προϋποθέσεις" #: .\cookbook\templates\account\signup.html:48 #: .\cookbook\templates\socialaccount\signup.html:39 msgid "and" -msgstr "" +msgstr "και" #: .\cookbook\templates\account\signup.html:52 #: .\cookbook\templates\socialaccount\signup.html:43 msgid "Privacy Policy" -msgstr "" +msgstr "Πολιτική απορρήτου" #: .\cookbook\templates\account\signup.html:65 msgid "Create User" -msgstr "" +msgstr "Δημιουργία χρήστη" #: .\cookbook\templates\account\signup.html:69 msgid "Already have an account?" -msgstr "" +msgstr "Έχετε ήδη λογαριασμό;" #: .\cookbook\templates\account\signup_closed.html:5 #: .\cookbook\templates\account\signup_closed.html:11 msgid "Sign Up Closed" -msgstr "" +msgstr "Οι εγγραφές έκλεισαν" #: .\cookbook\templates\account\signup_closed.html:13 msgid "We are sorry, but the sign up is currently closed." -msgstr "" +msgstr "Λυπούμαστε, αλλά οι εγγραφές έχουν ήδη κλείσει." #: .\cookbook\templates\api_info.html:5 .\cookbook\templates\base.html:330 #: .\cookbook\templates\rest_framework\api.html:11 msgid "API Documentation" -msgstr "" +msgstr "Τεκμηρίωση API" #: .\cookbook\templates\base.html:103 .\cookbook\templates\index.html:87 #: .\cookbook\templates\stats.html:22 msgid "Recipes" -msgstr "" +msgstr "Συνταγές" #: .\cookbook\templates\base.html:111 msgid "Shopping" -msgstr "" +msgstr "Αγορές" #: .\cookbook\templates\base.html:150 .\cookbook\views\lists.py:105 msgid "Foods" -msgstr "" +msgstr "Φαγητά" #: .\cookbook\templates\base.html:162 #: .\cookbook\templates\forms\ingredients.html:24 #: .\cookbook\templates\stats.html:26 .\cookbook\views\lists.py:122 msgid "Units" -msgstr "" +msgstr "Μονάδες μέτρησης" #: .\cookbook\templates\base.html:176 .\cookbook\templates\supermarket.html:7 msgid "Supermarket" -msgstr "" +msgstr "Supermarket" #: .\cookbook\templates\base.html:188 msgid "Supermarket Category" -msgstr "" +msgstr "Κατηγορία Supermarket" #: .\cookbook\templates\base.html:200 .\cookbook\views\lists.py:171 msgid "Automations" -msgstr "" +msgstr "Αυτοματισμοί" #: .\cookbook\templates\base.html:214 .\cookbook\views\lists.py:207 msgid "Files" -msgstr "" +msgstr "Αρχεία" #: .\cookbook\templates\base.html:226 msgid "Batch Edit" -msgstr "" +msgstr "Μαζική Επεξεργασία" #: .\cookbook\templates\base.html:238 .\cookbook\templates\history.html:6 #: .\cookbook\templates\history.html:14 msgid "History" -msgstr "" +msgstr "Ιστορικό" #: .\cookbook\templates\base.html:252 #: .\cookbook\templates\ingredient_editor.html:7 #: .\cookbook\templates\ingredient_editor.html:13 msgid "Ingredient Editor" -msgstr "" +msgstr "Επεξεργαστής Συστατικών" #: .\cookbook\templates\base.html:264 #: .\cookbook\templates\export_response.html:7 #: .\cookbook\templates\test2.html:14 .\cookbook\templates\test2.html:20 msgid "Export" -msgstr "" +msgstr "Εξαγωγή" #: .\cookbook\templates\base.html:280 .\cookbook\templates\index.html:47 msgid "Import Recipe" -msgstr "" +msgstr "Εισαγωγή συνταγής" #: .\cookbook\templates\base.html:282 msgid "Create" -msgstr "" +msgstr "Δημιουργία" #: .\cookbook\templates\base.html:295 #: .\cookbook\templates\generic\list_template.html:14 #: .\cookbook\templates\stats.html:43 msgid "External Recipes" -msgstr "" +msgstr "Εξωτερικές Συνταγές" #: .\cookbook\templates\base.html:298 #: .\cookbook\templates\space_manage.html:15 msgid "Space Settings" -msgstr "" +msgstr "Ρυθμίσεις χώρου" #: .\cookbook\templates\base.html:303 .\cookbook\templates\system.html:13 msgid "System" -msgstr "" +msgstr "Σύστημα" #: .\cookbook\templates\base.html:305 msgid "Admin" -msgstr "" +msgstr "Διαχειριστής" #: .\cookbook\templates\base.html:309 #: .\cookbook\templates\space_overview.html:25 msgid "Your Spaces" -msgstr "" +msgstr "Οι χώροι σας" #: .\cookbook\templates\base.html:320 #: .\cookbook\templates\space_overview.html:6 msgid "Overview" -msgstr "" +msgstr "Σύνοψη" #: .\cookbook\templates\base.html:324 msgid "Markdown Guide" -msgstr "" +msgstr "Οδηγός χρήσης του Markdown" #: .\cookbook\templates\base.html:326 msgid "GitHub" @@ -1205,53 +1240,57 @@ msgstr "GitHub" #: .\cookbook\templates\base.html:328 msgid "Translate Tandoor" -msgstr "" +msgstr "Μεταφράστε το Tandoor" #: .\cookbook\templates\base.html:332 msgid "API Browser" -msgstr "" +msgstr "Περιηγητής API" #: .\cookbook\templates\base.html:335 msgid "Log out" -msgstr "" +msgstr "Αποσύνδεση" #: .\cookbook\templates\base.html:357 msgid "You are using the free version of Tandor" -msgstr "" +msgstr "Χρησιμοποιείται την δωρεάν έκδοση του Tandoor" #: .\cookbook\templates\base.html:358 msgid "Upgrade Now" -msgstr "" +msgstr "Αναβαθμιστείτε τώρα" #: .\cookbook\templates\batch\edit.html:6 msgid "Batch edit Category" -msgstr "" +msgstr "Μαζική τροποποίηση κατηγοριών" #: .\cookbook\templates\batch\edit.html:15 msgid "Batch edit Recipes" -msgstr "" +msgstr "Μαζική τροποποίηση Συνταγών" #: .\cookbook\templates\batch\edit.html:20 msgid "Add the specified keywords to all recipes containing a word" msgstr "" +"Προσθέστε τις καθορισμένες λέξεις-κλειδιά σε όλες τις συνταγές που περιέχουν " +"μια λέξη" #: .\cookbook\templates\batch\monitor.html:6 .\cookbook\views\edit.py:73 msgid "Sync" -msgstr "" +msgstr "Συγχρονισμός" #: .\cookbook\templates\batch\monitor.html:10 msgid "Manage watched Folders" -msgstr "" +msgstr "Διαχείριση φακέλων που έχουν προβληθεί" #: .\cookbook\templates\batch\monitor.html:14 msgid "" "On this Page you can manage all storage folder locations that should be " "monitored and synced." msgstr "" +"Σε αυτήν τη σελίδα μπορείτε να διαχειριστείτε όλες τις τοποθεσίες " +"αποθήκευσης φακέλων που πρέπει να παρακολουθούνται και να συγχρονίζονται." #: .\cookbook\templates\batch\monitor.html:16 msgid "The path must be in the following format" -msgstr "" +msgstr "Η διαδρομή (path) πρέπει να είναι στην ακόλουθη μορφή" #: .\cookbook\templates\batch\monitor.html:20 #: .\cookbook\templates\forms\edit_import_recipe.html:14 @@ -1263,55 +1302,57 @@ msgstr "" #: .\cookbook\templates\settings.html:202 #: .\cookbook\templates\settings.html:213 msgid "Save" -msgstr "" +msgstr "Αποθήκευση" #: .\cookbook\templates\batch\monitor.html:21 msgid "Manage External Storage" -msgstr "" +msgstr "Διαχείριση εξωτερικού χώρου αποθήκευσης" #: .\cookbook\templates\batch\monitor.html:28 msgid "Sync Now!" -msgstr "" +msgstr "Συγχρονισμός τώρα!" #: .\cookbook\templates\batch\monitor.html:29 msgid "Show Recipes" -msgstr "" +msgstr "Προβολή Συνταγών" #: .\cookbook\templates\batch\monitor.html:30 msgid "Show Log" -msgstr "" +msgstr "Προβολή αρχείων καταγραφής" #: .\cookbook\templates\batch\waiting.html:4 #: .\cookbook\templates\batch\waiting.html:10 msgid "Importing Recipes" -msgstr "" +msgstr "Οι συνταγές εισάγονται" #: .\cookbook\templates\batch\waiting.html:28 msgid "" "This can take a few minutes, depending on the number of recipes in sync, " "please wait." msgstr "" +"Αυτή η διαδικασία μπορεί να πάρει μερικά λεπτά, ανάλογα με τον αριθμό των " +"συνταγών που πρέπει να συγχρονιστούν, παρακαλώ περιμένετε." #: .\cookbook\templates\books.html:7 msgid "Recipe Books" -msgstr "" +msgstr "Βιβλία Συνταγών" #: .\cookbook\templates\export.html:8 .\cookbook\templates\test2.html:6 msgid "Export Recipes" -msgstr "" +msgstr "Εξαγωγή Συνταγών" #: .\cookbook\templates\forms\edit_import_recipe.html:5 #: .\cookbook\templates\forms\edit_import_recipe.html:9 msgid "Import new Recipe" -msgstr "" +msgstr "Εισαγωγή μια νέας συνταγή" #: .\cookbook\templates\forms\edit_internal_recipe.html:7 msgid "Edit Recipe" -msgstr "" +msgstr "Τροποποίηση συνταγής" #: .\cookbook\templates\forms\ingredients.html:15 msgid "Edit Ingredients" -msgstr "" +msgstr "Τροποποίηση υλικών" #: .\cookbook\templates\forms\ingredients.html:16 msgid "" @@ -1323,32 +1364,41 @@ msgid "" "them.\n" " " msgstr "" +"\n" +" Την παρακάτω φόρμα μπορεί να χρησιμοποιηθεί στην περίπτωση που, κατά " +"λάθος, δημιουργήθηκαν δύο (ή περισσότερες) μονάδες μέτρησης ή συστατικά που " +"θα έπρεπε να είναι\n" +" τα ίδια.\n" +" Αυτή η φόρμα συγχωνεύει δύο μονάδες ή συστατικά και ενημερώνει όλες " +"τις συνταγές που τα χρησιμοποιούν.\n" +" " #: .\cookbook\templates\forms\ingredients.html:26 msgid "Are you sure that you want to merge these two units?" -msgstr "" +msgstr "Είστε βέβαιος ότι θέλετε να συγχωνεύσετε αυτές τις δύο μονάδες;" #: .\cookbook\templates\forms\ingredients.html:31 #: .\cookbook\templates\forms\ingredients.html:40 msgid "Merge" -msgstr "" +msgstr "Συγχώνευση" #: .\cookbook\templates\forms\ingredients.html:36 msgid "Are you sure that you want to merge these two ingredients?" -msgstr "" +msgstr "Είστε βέβαιος ότι θέλετε να συγχωνεύσετε αυτά τα δύο υλικά;" #: .\cookbook\templates\generic\delete_template.html:21 #, python-format msgid "Are you sure you want to delete the %(title)s: %(object)s " msgstr "" +"Είστε σίγουροι ότι θέλετε να διαγράψετε τα %(title)s: %(object)s " #: .\cookbook\templates\generic\delete_template.html:22 msgid "This cannot be undone!" -msgstr "" +msgstr "Αυτό δεν μπορεί να αναιρεθεί!" #: .\cookbook\templates\generic\delete_template.html:27 msgid "Protected" -msgstr "" +msgstr "Προστατευμένο" #: .\cookbook\templates\generic\delete_template.html:42 msgid "Cascade" @@ -1356,68 +1406,68 @@ msgstr "" #: .\cookbook\templates\generic\delete_template.html:73 msgid "Cancel" -msgstr "" +msgstr "Ακύρωση" #: .\cookbook\templates\generic\edit_template.html:32 msgid "View" -msgstr "" +msgstr "Προβολή" #: .\cookbook\templates\generic\edit_template.html:36 msgid "Delete original file" -msgstr "" +msgstr "Διαγραφή πρωτότυπου αρχείου" #: .\cookbook\templates\generic\list_template.html:6 #: .\cookbook\templates\generic\list_template.html:22 msgid "List" -msgstr "" +msgstr "Λίστα" #: .\cookbook\templates\generic\list_template.html:36 msgid "Filter" -msgstr "" +msgstr "Φίλτρο" #: .\cookbook\templates\generic\list_template.html:41 msgid "Import all" -msgstr "" +msgstr "Εισαγωγή όλων" #: .\cookbook\templates\generic\table_template.html:76 #: .\cookbook\templates\recipes_table.html:121 msgid "previous" -msgstr "" +msgstr "προηγούμενο" #: .\cookbook\templates\generic\table_template.html:98 #: .\cookbook\templates\recipes_table.html:143 msgid "next" -msgstr "" +msgstr "επόμενο" #: .\cookbook\templates\history.html:20 msgid "View Log" -msgstr "" +msgstr "Προβολή αρχείων καταγραφής" #: .\cookbook\templates\history.html:24 msgid "Cook Log" -msgstr "" +msgstr "Αρχείο καταγραφής μαγειρέματος" #: .\cookbook\templates\import.html:6 msgid "Import Recipes" -msgstr "" +msgstr "Εισαγωγή Συνταγών" #: .\cookbook\templates\import.html:14 .\cookbook\templates\import.html:20 #: .\cookbook\templates\import_response.html:7 .\cookbook\views\delete.py:86 #: .\cookbook\views\edit.py:191 msgid "Import" -msgstr "" +msgstr "Εισαγωγή" #: .\cookbook\templates\include\recipe_open_modal.html:18 msgid "Close" -msgstr "" +msgstr "Κλείσιμο" #: .\cookbook\templates\include\recipe_open_modal.html:32 msgid "Open Recipe" -msgstr "" +msgstr "Άνοιγμα Συνταγής" #: .\cookbook\templates\include\storage_backend_warning.html:4 msgid "Security Warning" -msgstr "" +msgstr "Προειδοποίηση ασφαλείας" #: .\cookbook\templates\include\storage_backend_warning.html:5 msgid "" @@ -1434,32 +1484,32 @@ msgstr "" #: .\cookbook\templates\index.html:29 msgid "Search recipe ..." -msgstr "" +msgstr "Αναζήτηση συνταγής ..." #: .\cookbook\templates\index.html:44 msgid "New Recipe" -msgstr "" +msgstr "Νέα συνταγή" #: .\cookbook\templates\index.html:53 msgid "Advanced Search" -msgstr "" +msgstr "Αναζήτηση για προχωρημένους" #: .\cookbook\templates\index.html:57 msgid "Reset Search" -msgstr "" +msgstr "Επαναφορά αναζήτησης" #: .\cookbook\templates\index.html:85 msgid "Last viewed" -msgstr "" +msgstr "Τελευταίες προβολές" #: .\cookbook\templates\index.html:94 msgid "Log in to view recipes" -msgstr "" +msgstr "Συνδεθείτε για να δείτε τις συνταγές" #: .\cookbook\templates\markdown_info.html:5 #: .\cookbook\templates\markdown_info.html:13 msgid "Markdown Info" -msgstr "" +msgstr "Πληροφορίες για το Markdown" #: .\cookbook\templates\markdown_info.html:14 msgid "" @@ -1479,31 +1529,33 @@ msgstr "" #: .\cookbook\templates\markdown_info.html:25 msgid "Headers" -msgstr "" +msgstr "Επικεφαλίδες" #: .\cookbook\templates\markdown_info.html:54 msgid "Formatting" -msgstr "" +msgstr "Μορφοποίηση" #: .\cookbook\templates\markdown_info.html:56 #: .\cookbook\templates\markdown_info.html:72 msgid "Line breaks are inserted by adding two spaces after the end of a line" msgstr "" +"Οι αλλαγές γραμμής εισάγονται προσθέτοντας δύο κενά μετά το τέλος μιας " +"γραμμής" #: .\cookbook\templates\markdown_info.html:57 #: .\cookbook\templates\markdown_info.html:73 msgid "or by leaving a blank line in between." -msgstr "" +msgstr "ή αφήνοντας μια κενή γραμμή μεταξύ τους." #: .\cookbook\templates\markdown_info.html:59 #: .\cookbook\templates\markdown_info.html:74 msgid "This text is bold" -msgstr "" +msgstr "Το κείμενο είναι έντονο (bold)" #: .\cookbook\templates\markdown_info.html:60 #: .\cookbook\templates\markdown_info.html:75 msgid "This text is italic" -msgstr "" +msgstr "Αυτό το κείμενο είναι πλάγιο (italic)" #: .\cookbook\templates\markdown_info.html:61 #: .\cookbook\templates\markdown_info.html:77 @@ -1512,7 +1564,7 @@ msgstr "" #: .\cookbook\templates\markdown_info.html:84 msgid "Lists" -msgstr "" +msgstr "Λίστες" #: .\cookbook\templates\markdown_info.html:85 msgid "" @@ -1550,7 +1602,7 @@ msgstr "" #: .\cookbook\templates\markdown_info.html:125 msgid "Images & Links" -msgstr "" +msgstr "Φωτογραφίες και σύνδεσμοι" #: .\cookbook\templates\markdown_info.html:126 msgid "" diff --git a/cookbook/migrations/0194_alter_food_properties_food_amount.py b/cookbook/migrations/0194_alter_food_properties_food_amount.py new file mode 100644 index 00000000..b1d30959 --- /dev/null +++ b/cookbook/migrations/0194_alter_food_properties_food_amount.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1.9 on 2023-06-26 13:28 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cookbook', '0193_space_internal_note'), + ] + + operations = [ + migrations.AlterField( + model_name='food', + name='properties_food_amount', + field=models.DecimalField(blank=True, decimal_places=2, default=100, max_digits=16), + ), + ] diff --git a/cookbook/models.py b/cookbook/models.py index 46af7e78..65697cf2 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -585,7 +585,7 @@ class Food(ExportModelOperationsMixin('food'), TreeModel, PermissionModelMixin): child_inherit_fields = models.ManyToManyField(FoodInheritField, blank=True, related_name='child_inherit') properties = models.ManyToManyField("Property", blank=True, through='FoodProperty') - properties_food_amount = models.IntegerField(default=100, blank=True) + properties_food_amount = models.DecimalField(default=100, max_digits=16, decimal_places=2, blank=True) properties_food_unit = models.ForeignKey(Unit, on_delete=models.PROTECT, blank=True, null=True) preferred_unit = models.ForeignKey(Unit, on_delete=models.SET_NULL, null=True, blank=True, default=None, related_name='preferred_unit') diff --git a/cookbook/serializer.py b/cookbook/serializer.py index a253617c..52d3c6bd 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -109,7 +109,7 @@ class CustomDecimalField(serializers.Field): if data == '': return 0 try: - return float(data.replace(',', '')) + return float(data.replace(',', '.')) except ValueError: raise ValidationError('A valid number is required') @@ -514,11 +514,13 @@ class SupermarketSerializer(UniqueFieldsMixin, SpacedModelSerializer, OpenDataMo fields = ('id', 'name', 'description', 'category_to_supermarket', 'open_data_slug') -class PropertyTypeSerializer(OpenDataModelMixin): +class PropertyTypeSerializer(OpenDataModelMixin, WritableNestedModelSerializer, UniqueFieldsMixin): + id = serializers.IntegerField(required=False) + def create(self, validated_data): validated_data['space'] = self.context['request'].space - if property_type := PropertyType.objects.filter(Q(name=validated_data['name'])).first(): + if property_type := PropertyType.objects.filter(Q(name=validated_data['name'])).filter(space=self.context['request'].space).first(): return property_type return super().create(validated_data) @@ -532,8 +534,6 @@ class PropertySerializer(UniqueFieldsMixin, WritableNestedModelSerializer): property_type = PropertyTypeSerializer() property_amount = CustomDecimalField() - # TODO prevent updates - def create(self, validated_data): validated_data['space'] = self.context['request'].space return super().create(validated_data) @@ -541,7 +541,6 @@ class PropertySerializer(UniqueFieldsMixin, WritableNestedModelSerializer): class Meta: model = Property fields = ('id', 'property_amount', 'property_type') - read_only_fields = ('id',) class RecipeSimpleSerializer(WritableNestedModelSerializer): @@ -582,6 +581,7 @@ class FoodSerializer(UniqueFieldsMixin, WritableNestedModelSerializer, ExtendedR properties = PropertySerializer(many=True, allow_null=True, required=False) properties_food_unit = UnitSerializer(allow_null=True, required=False) + properties_food_amount = CustomDecimalField(required=False) recipe_filter = 'steps__ingredients__food' images = ['recipe__image'] @@ -649,8 +649,15 @@ class FoodSerializer(UniqueFieldsMixin, WritableNestedModelSerializer, ExtendedR if properties_food_unit := validated_data.pop('properties_food_unit', None): properties_food_unit = Unit.objects.filter(name=properties_food_unit['name']).first() + properties = validated_data.pop('properties', None) + obj, created = Food.objects.get_or_create(name=name, plural_name=plural_name, space=space, properties_food_unit=properties_food_unit, defaults=validated_data) + + if properties and len(properties) > 0: + for p in properties: + obj.properties.add(Property.objects.create(property_type_id=p['property_type']['id'], property_amount=p['property_amount'], space=space)) + return obj def update(self, instance, validated_data): diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index 0b0d12b2..81e03086 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -73,7 +73,7 @@ -