Bladeren bron

change english translation meal to dish and fix some console warnings (deprecations)

Ramona Plogmann 1 jaar geleden
bovenliggende
commit
c300115223

+ 3 - 3
client/public/app.webmanifest

@@ -4,17 +4,17 @@
   "start_url": "./meals",
   "icons": [
     {
-        "src": "/favicons/android-chrome-192x192.png",
+        "src": "/android-chrome-192x192.png",
         "sizes": "192x192",
         "type": "image/png"
     },
     {
-        "src": "/favicons/android-chrome-512x512.png",
+        "src": "/android-chrome-512x512.png",
         "sizes": "512x512",
         "type": "image/png"
     },
     {
-      "src": "/favicons/maskable_icon_x192.png",
+      "src": "/maskable_icon_x192.png",
       "sizes": "192x192",
       "type": "image/png",
       "purpose": "maskable"

+ 0 - 2
client/src/components/Home.jsx

@@ -53,8 +53,6 @@ const Home = () => {
 
   const { isAuthenticated, isLoading } = useAuth0();
 
-  console.log('useAuth0',useAuth0());
-
   if (isLoading) return <Loading />;
   if (isAuthenticated) return <Navigate replace to={OWN_START_PAGE} />;
 

+ 1 - 1
client/src/components/Images/ImageGrid.jsx

@@ -37,7 +37,7 @@ const useStyles = makeStyles((theme) => ({
 
 /**
  * Image grid that displays an array of images in a 3 column grid and includes optional buttons to delete or select an image.
- * Height of each row can be controlled via `localhost.env.REACT_APP_GRID_LIST_ROW_HEIGHT`
+ * Height of each row can be controlled via `.env.REACT_APP_GRID_LIST_ROW_HEIGHT`
  * allows children to be wrapped within ImageGrid component, they will be displayed within the grid, before the photos (e.g., Dropzone)
  */
 const ImageGrid = (props) => {

+ 1 - 1
client/src/components/Images/ImageUpload.jsx

@@ -4,7 +4,7 @@ import ImageGrid from './ImageGrid.jsx';
 import axios from "axios";
 import { array, arrayOf, bool, func, oneOfType, shape, string } from "prop-types";
 import { makeStyles } from "@material-ui/styles";
-import { Box, GridList, GridListTile, Snackbar } from "@material-ui/core";
+import { Box, ImageList as GridList, ImageListItem as GridListTile, Snackbar } from "@material-ui/core";
 import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
 import { faCamera, faCircle } from "@fortawesome/free-solid-svg-icons";
 import CircleImage from "./CircleImage";

+ 1 - 0
client/src/components/Meals/AddMeal.jsx

@@ -85,6 +85,7 @@ const AddMeal = () => {
   return (
     <>
       <Navbar pageTitle={t('New Meal')} leftSideComponent={<BackButton onClick={() => {
+        console.log(meal.images);
         if (meal.images) {
           deleteAllImagesFromMeal(meal._id);
         }

+ 2 - 2
client/src/components/Meals/EditMealCore.jsx

@@ -81,8 +81,8 @@ const EditMealCore = (props) => {
                          required />
       <OutlinedTextField name="recipeLink" value={recipeLink} label={t('Link to Recipe')} onChange={e => updateMeal('recipeLink', e.target.value)} isSecondary={isSecondary} />
       <OutlinedTextField multiline
-                         rowsMax={10}
-                         rows={1}
+                         maxRows={10}
+                         minRows={1}
                          name="comment"
                          placeholder={placeholder}
                          value={comment}

+ 3 - 4
client/src/components/Meals/MealDetailView.jsx

@@ -29,7 +29,7 @@ const useStyles = makeStyles((theme) => ({
   },
 }));
 
-/** Dialog page that displays Meal Details and optionally opens Edit Dialog */
+/** todo updated description */
 const MealDetailView = () => {
   const classes = useStyles();
   const { t } = useTranslation();
@@ -59,11 +59,10 @@ const MealDetailView = () => {
 
   // set the meal that is given in state as a temporary option while the one from the server is loaded
   useEffect(() => {
-    if(state) {
+    if (state) {
       if (!meal) {
         if (state.meal) setMeal(state.meal);
       }
-      console.log(state.prevRoute);
       if (state.prevRoute && state.prevRoute === '/plans') setComingFromPlans(true);
     }
   }, [state]);
@@ -74,7 +73,7 @@ const MealDetailView = () => {
 
   const openEditItemDialog = () => {
     if (own) {
-      navigate('../edit/' + meal._id, { state: {meal} });
+      navigate('../edit/' + meal._id, { state: { meal } });
     }
   }
 

+ 22 - 22
client/src/translations/en-GB.translation.json

@@ -1,21 +1,21 @@
 {
-  "Meal": "Meal",
-  "Meals": "Meals",
+  "Meal": "Dish",
+  "Meals": "Dishes",
   "Plan": "Plan",
   "Plans": "Plans",
   "Social": "Social",
   "Settings": "Settings",
   "Advanced Settings": "Advanced Settings",
-  "Edit Meal": "Edit Meal",
+  "Edit Meal": "Edit Dish",
   "Edit Plan": "Edit Plan",
   "Edit Profile": "Edit Profile",
   "Add Plan": "Add Plan",
-  "New Meal": "New Meal",
+  "New Meal": "New Dish",
   "New Plan": "New Plan",
-  "Meal deleted": "Meal deleted",
-  "Meal {{title}} deleted": "Meal {{title}} deleted",
-  "Meal re-added": "Meal re-added",
-  "Meal {{title}} re-added": "Meal {{title}} re-added",
+  "Meal deleted": "Dish deleted",
+  "Meal {{title}} deleted": "Dish {{title}} deleted",
+  "Meal re-added": "Dish re-added",
+  "Meal {{title}} re-added": "Dish {{title}} re-added",
   "Plan deleted": "Plan deleted",
   "Plan {{title}} deleted": "Plan {{title}} deleted",
   "Plan re-added": "Plan re-added",
@@ -26,7 +26,7 @@
   "Due Date": "Due Date",
   "Got everything?": "Got everything?",
   "Link to Recipe": "Link to Recipe",
-  "Meal Title": "Meal Title",
+  "Meal Title": "Title",
   "Comment": "Comment",
   "Undo": "Undo",
   "Title": "Title",
@@ -39,8 +39,8 @@
   "Missing Ingredient": "Missing Ingredient",
   "Please log in to use the app": "Please log in to use the app",
   "Welcome to <1>Emilia</1>!": "Welcome to <1>Emilia</1>!",
-  "APP_SUBTITLE": "Here you can create a collection of meals and plan when to cook what.",
-  "Looks like there are no meals here yet.": "Looks like there are no meals here yet.",
+  "APP_SUBTITLE": "Here you can create a collection of dishes and plan when to cook what.",
+  "Looks like there are no meals here yet.": "Looks like there are no dishes here yet.",
   "Add one by clicking in the top right corner.": "Add one by clicking in the top right corner.",
   "Currently nothing planned": "Currently nothing planned",
   "Loading": "Loading",
@@ -48,7 +48,7 @@
   "No contacts yet": "No contacts yet",
   "Search for friends in the top right corner": "Search for friends in the top right corner",
   "Contacts": "Contacts",
-  "Plan some meals": "Plan some meals",
+  "Plan some meals": "Plan some dishes",
   "Language": "Language",
   "Name": "Name",
   "Username": "Username",
@@ -73,30 +73,30 @@
   "Tag": "Tag",
   "Select Tags": "Select Tags",
   "Create tag \"{{input}}\"": "Create tag \\\"{{input}}\\\"",
-  "Meals without category": "Meals without category",
+  "Meals without category": "Dishes without category",
   "Filter": "Filter",
   "Filter by Tags": "Filter by Tags",
   "No Tags so far": "There are no tags yet",
   "Type to add Tags": "Type to add tags",
   "Type to add a Category": "Type to add a category",
-  "No meals found for filter selection": "No meals found for filter selection",
+  "No meals found for filter selection": "No dishes found for filter selection",
   "expand all": "expand all",
   "collapse all": "collapse all",
   "Search for users": "Search for users",
   "Copy": "Copy",
   "Copied": "Copied",
-  "Check out the following meal: {{mealTitle}}": "Check out the following meal: {{mealTitle}}",
-  "Import into my meals": "Import into my meals",
+  "Check out the following meal: {{mealTitle}}": "Check out the following dish: {{mealTitle}}",
+  "Import into my meals": "Import into my dishes",
   "Own start view": "Own start view",
   "Contact start view": "Contact start view",
   "A new version of the app is available!": "A new version is available!",
   "Reload": "Reload",
-  "PLACEHOLDER_TAG": "vegetarian",
-  "PLACEHOLDER_CATEGORY": "family recipes",
-  "Go to my meals": "Go to my meals",
+  "PLACEHOLDER_TAG": "e.g., vegetarian",
+  "PLACEHOLDER_CATEGORY": "e.g., family recipes",
+  "Go to my meals": "Go to my dishes",
   "Import": "Import",
-  "Import Meal": "Import Meal",
-  "Successfully imported meal": "Successfully imported meal",
+  "Import Meal": "Import Dish",
+  "Successfully imported meal": "Successfully imported dish",
   "Plan Meal": "Plan",
   "You can use this field to add a recipe in text form, instructions, experience or other comments.": "You can use this field to add a recipe in text form, instructions, experience or other comments.",
   "Recipe, instructions, comments, etc.": "Recipe, instructions, comments, etc.",
@@ -109,7 +109,7 @@
   "Your Account has been deleted": "Your Account has been deleted",
   "You will be logged out now.": "You will be logged out now.",
   "OK": "OK",
-  "LOADING_IMAGES_TAKES_LONG": "It seems to take a while to load the images. You can wait or add the meal without these images.",
+  "LOADING_IMAGES_TAKES_LONG": "It seems to take a while to load the images. You can wait or add the dish without these images.",
   "Add without images": "Add without images",
   "Save without new images": "Save without new images"
 }

+ 20 - 20
client/src/translations/en-US.translation.json

@@ -1,21 +1,21 @@
 {
-  "Meal": "Meal",
-  "Meals": "Meals",
+  "Meal": "Dish",
+  "Meals": "Dishes",
   "Plan": "Plan",
   "Plans": "Plans",
   "Social": "Social",
   "Settings": "Settings",
   "Advanced Settings": "Advanced Settings",
-  "Edit Meal": "Edit Meal",
+  "Edit Meal": "Edit Dish",
   "Edit Plan": "Edit Plan",
   "Edit Profile": "Edit Profile",
   "Add Plan": "Add Plan",
-  "New Meal": "New Meal",
+  "New Meal": "New Dish",
   "New Plan": "New Plan",
-  "Meal deleted": "Meal deleted",
-  "Meal {{title}} deleted": "Meal {{title}} deleted",
-  "Meal re-added": "Meal re-added",
-  "Meal {{title}} re-added": "Meal {{title}} re-added",
+  "Meal deleted": "Dish deleted",
+  "Meal {{title}} deleted": "Dish {{title}} deleted",
+  "Meal re-added": "Dish re-added",
+  "Meal {{title}} re-added": "Dish {{title}} re-added",
   "Plan deleted": "Plan deleted",
   "Plan {{title}} deleted": "Plan {{title}} deleted",
   "Plan re-added": "Plan re-added",
@@ -26,7 +26,7 @@
   "Due Date": "Due Date",
   "Got everything?": "Got everything?",
   "Link to Recipe": "Link to Recipe",
-  "Meal Title": "Meal Title",
+  "Meal Title": "Title",
   "Comment": "Comment",
   "Undo": "Undo",
   "Title": "Title",
@@ -39,8 +39,8 @@
   "Missing Ingredient": "Missing Ingredient",
   "Please log in to use the app": "Please log in to use the app",
   "Welcome to <1>Emilia</1>!": "Welcome to <1>Emilia</1>!",
-  "APP_SUBTITLE": "Here you can create a collection of meals and plan when to cook what.",
-  "Looks like there are no meals here yet.": "Looks like there are no meals here yet.",
+  "APP_SUBTITLE": "Here you can create a collection of dishes and plan when to cook what.",
+  "Looks like there are no meals here yet.": "Looks like there are no dishes here yet.",
   "Add one by clicking in the top right corner.": "Add one by clicking in the top right corner.",
   "Currently nothing planned": "Currently nothing planned",
   "Loading": "Loading",
@@ -48,7 +48,7 @@
   "No contacts yet": "No contacts yet",
   "Search for friends in the top right corner": "Search for friends in the top right corner",
   "Contacts": "Contacts",
-  "Plan some meals": "Plan some meals",
+  "Plan some meals": "Plan some dishes",
   "Language": "Language",
   "Name": "Name",
   "Username": "Username",
@@ -73,30 +73,30 @@
   "Tag": "Tag",
   "Select Tags": "Select Tags",
   "Create tag \"{{input}}\"": "Create tag \\\"{{input}}\\\"",
-  "Meals without category": "Meals without category",
+  "Meals without category": "Dishes without category",
   "Filter": "Filter",
   "Filter by Tags": "Filter by Tags",
   "No Tags so far": "There are no tags yet",
   "Type to add Tags": "Type to add tags",
   "Type to add a Category": "Type to add a category",
-  "No meals found for filter selection": "No meals found for filter selection",
+  "No meals found for filter selection": "No dishes found for filter selection",
   "expand all": "expand all",
   "collapse all": "collapse all",
   "Search for users": "Search for users",
   "Copy": "Copy",
   "Copied": "Copied",
-  "Check out the following meal: {{mealTitle}}": "Check out the following meal: {{mealTitle}}",
-  "Import into my meals": "Import into my meals",
+  "Check out the following meal: {{mealTitle}}": "Check out the following dish: {{mealTitle}}",
+  "Import into my meals": "Import into my dishes",
   "Own start view": "Own start view",
   "Contact start view": "Contact start view",
   "A new version of the app is available!": "A new version is available!",
   "Reload": "Reload",
   "PLACEHOLDER_TAG": "e.g., vegetarian",
   "PLACEHOLDER_CATEGORY": "e.g., family recipes",
-  "Go to my meals": "Go to my meals",
+  "Go to my meals": "Go to my dishes",
   "Import": "Import",
-  "Import Meal": "Import Meal",
-  "Successfully imported meal": "Successfully imported meal",
+  "Import Meal": "Import Dish",
+  "Successfully imported meal": "Successfully imported dish",
   "Plan Meal": "Plan",
   "You can use this field to add a recipe in text form, instructions, experience or other comments.": "You can use this field to add a recipe in text form, instructions, experience or other comments.",
   "Recipe, instructions, comments, etc.": "Recipe, instructions, comments, etc.",
@@ -109,7 +109,7 @@
   "Your Account has been deleted": "Your Account has been deleted",
   "You will be logged out now.": "You will be logged out now.",
   "OK": "OK",
-  "LOADING_IMAGES_TAKES_LONG": "It seems to take a while to load the images. You can wait or add the meal without these images.",
+  "LOADING_IMAGES_TAKES_LONG": "It seems to take a while to load the images. You can wait or add the dish without these images.",
   "Add without images": "Add without images",
   "Save without new images": "Save without new images"
 }