Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

67 add italian translation to items in side bar #89

Merged
merged 18 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c5b039d
adds links(app and website) to the about section
elenavolpato Aug 30, 2023
5b57d26
adds links(app and website) to the contact section
elenavolpato Aug 30, 2023
d967f75
changes text color to a more visible one (darker gray)
elenavolpato Aug 30, 2023
61511f6
standarized the links
elenavolpato Aug 30, 2023
36a1a37
changes text of contact dialog to a darker gray
elenavolpato Aug 30, 2023
262fc47
adds translation to italian to SideBarList Component
elenavolpato Aug 31, 2023
6be71c7
adds translation to SideBarDialog component
elenavolpato Aug 31, 2023
d510c49
adds translation to SelectLang component
elenavolpato Aug 31, 2023
8ca5c29
added translation to ContributeDialog component
elenavolpato Aug 31, 2023
27d5406
removes errors in build checks
elenavolpato Aug 31, 2023
26efb1e
Merge pull request #87 from fuzue/67-add-italian-translation-to-items…
elenavolpato Aug 31, 2023
2a6de9e
Merge pull request #86 from fuzue/81-add-link-to-fuzuetech-and-also-t…
elenavolpato Aug 31, 2023
6c67973
Merge branch '67-add-italian-translation-to-items-in-side-bar' of git…
elenavolpato Aug 31, 2023
c266f37
fixes conflict in merge with branch 81
elenavolpato Aug 31, 2023
e27e8a9
adds translation to ContactDialog component
elenavolpato Aug 31, 2023
ca2f6e2
adds translation to italian in AboutDialog component
elenavolpato Sep 1, 2023
ef7a451
adds rest of translation for AboutDialog and fixes an error in englis…
elenavolpato Sep 1, 2023
ed26095
fixed Edgar'd comment
elenavolpato Sep 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@
"FoodPage_inSeasonText": "Currently in season",
"FoodPage_checkMonths": "Check below when it's best to buy it.",
"FoodPage_monthsInSeason": "Months in season",
"SideBarList_aboutApp": "About the app",
"SideBarList_contribute": "Contribute",
"SideBarList_contact": "Contact us",
"SideBarDialog_close": "Close",
"AboutDialog_title": "About the app",
"AboutDialog_desc1": "This project was developed to address a genuine challenge: determining the availability of fruits and vegetables in a new country or region. Despite searching for solutions and information, I couldn't find anything intuitive or capable of meeting my needs.",
"AboutDialog_desc2": "The concept behind this project was to create a simple and scalable solution, making it easy to modify and expand the database for different countries or regions. The primary objective of this app is to promote the consumption of locally grown produce, empower small-scale farmers, and ultimately reduce our contribution to globalwarming.",
"AboutDialog_ItalyDisclaimer": "At the moment it is only available for Italian products.",
"ContributeDialog_title": "Contribute",
"ContributeDialog_desc": "This is an open source project, that means you can clone this repository, write issues, make your own changes and submit your own pull requests.",
"AboutDialog_aboutus":"More about us in",
"AboutDialog_aboutapp": "More about the app",
"ContributeDialog_forthis": "For this, use our",
"ContributeDialog_githubPage": "github page.",
"ContactDialog_title": "Contact us",
"ContactDialog_text1": "Contact us via email, visit",
"ContactDialog_text2": "our website,",
"ContactDialog_text3": "or check out",
"ContactDialog_text4": "our repository in github.",
"SelectLang_Text": "Language",
"backButton": "back",
"month_0": "January",
"month_1": "February",
Expand Down
20 changes: 20 additions & 0 deletions public/locales/it/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@
"FoodPage_inSeasonText": "Attualmente è in stagione",
"FoodPage_checkMonths": "controllate qui sotto quando è meglio acquistarlo.",
"FoodPage_monthsInSeason": "Mesi di stagione",
"SideBarList_aboutApp": "Informazione sull'app",
"SideBarList_contribute": "Contribuisci",
"SideBarList_contact": "Contattaci",
"SideBarDialog_close": "Chiudi",
"AboutDialog_title": "Informazione sull'app",
"AboutDialog_desc1": "Questo progetto è stato sviluppato per affrontare una sfida reale: determinare la disponibilità di frutta e verdura in un paese o in una regione. Nonostante la ricerca di soluzioni e informazioni, non sono riuscita a trovare nulla di intuitivo o in grado di soddisfare le mie esigenze.",
"AboutDialog_desc2": "L'idea alla base di questo progetto era quella di creare una soluzione semplice e scalabile, che permettesse di modificare ed espandere facilmente il database per diversi Paesi o regioni. L'obiettivo principale di questa applicazione è promuovere il consumo di prodotti coltivati localmente, dare potere ai piccoli agricoltori e, in ultima analisi, ridurre il nostro contributo al riscaldamento globale.",
"AboutDialog_ItalyDisclaimer": "Al momento è disponibile solo per i prodotti italiani.",
"AboutDialog_aboutus":"Maggiori informazioni su di noi in",
"AboutDialog_aboutapp": "Più informazioni sull'applicazione",
"ContributeDialog_title": "Contribuisci",
"ContributeDialog_desc": "Si tratta di un progetto open source, il che significa che è possibile clonare questo repository, scrivere problemi, apportare le proprie modifiche e inviare le proprie pull request.",
"ContributeDialog_forthis": "Per farlo, utilizzare la nostra",
"ContributeDialog_githubPage": "pagina github.",
"ContactDialog_title": "Contattateci",
"ContactDialog_text1": "Contattateci via e-mail, visitate",
"ContactDialog_text2": "in nostro sito,",
"ContactDialog_text3": "oppure controllate",
"ContactDialog_text4": "il nostro archivio in github.",
"SelectLang_Text": "Lingua",
"backButton": "indietro",
"month_0": "Gennaio",
"month_1": "Febbraio",
Expand Down
34 changes: 15 additions & 19 deletions src/components/AboutDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@

import { DialogTitle, DialogContent, DialogContentText, Typography }
import { DialogTitle, DialogContent, DialogContentText, Typography, Link }
from "@mui/material"
import { useTranslation } from "react-i18next"

//dialog box that opens with each element clicked
export default function AboutDialog() {
const { t } = useTranslation();
return (
<>
<DialogTitle id="about-dialog-title">
{"About the app"}
{t("AboutDialog_title")}
</DialogTitle>
<DialogContent>
<DialogContentText id="about-dialog-description">
<p>
This project was developed to address a genuine challenge:
determining the availability of fruits and vegetables in a new
country or region. Despite searching for solutions and information, I
couldn't find anything intuitive or capable of meeting my needs.
</p>
<DialogContentText id="about-dialog-description" color="dark-gray">
<p>{t("AboutDialog_desc1")}</p>
<p>{t("AboutDialog_desc2")}</p>

<p>
The concept behind this project was to create a simple and scalable
solution, making it easy to modify and expand the database for
different countries or regions. The primary objective of this app is
to promote the consumption of locally grown produce, empower
small-scale farmers, and ultimately reduce our contribution to global
warming.
</p>
<Typography sx={{fontWeight: 600}}>
At the moment it is only available for Italian products.

<Typography sx={{fontWeight: 600 }}>
{t("AboutDialog_ItalyDisclaimer")}
</Typography>
<Typography sx={{fontWeight: 800, mt: 3}}>
{t("AboutDialog_aboutus")} <Link underline="hover" sx={{ color: "inherit"}} href="https://fuzue.tech" target="_blank">fuzue.tech</Link>
<br />
{t("AboutDialog_aboutapp")}More about the app <Link underline="hover" sx={{ color: "inherit"}} href="https://seasonalfood.fuzue.tech/" target="_blank" > here</Link>
elenavolpato marked this conversation as resolved.
Show resolved Hide resolved
</Typography>
</DialogContentText>
</DialogContent>
Expand Down
28 changes: 19 additions & 9 deletions src/components/ContactDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@

import { DialogTitle, DialogContent, DialogContentText, Link, Typography }
from "@mui/material"
import { DialogTitle, DialogContent, DialogContentText, Link, Box }
from "@mui/material";
import AlternateEmailIcon from '@mui/icons-material/AlternateEmail';
import GitHubIcon from '@mui/icons-material/GitHub';
import { useTranslation } from "react-i18next";

//dialog box that opens with each element clicked
export default function ContactDialog() {
const { t } = useTranslation();
return (
<>
<DialogTitle id="contact-dialog-title">
{"Contact"}
{t("ContactDialog_title")}
</DialogTitle>
<DialogContent>
<DialogContentText id="contact-dialog-description">
You can talk to us via email and/or check our repository in github.
<p>
<Typography variant="subtitle2" gutterBottom><a href="mailto:[email protected]">[email protected]</a></Typography>
<Link underline="hover" href="https://github.com/fuzue/seasonalfood" target="_blank"> <Typography variant="subtitle2" gutterBottom>Github</Typography></Link>
</p>
<DialogContentText id="contact-dialog-description" color="dark-gray" >
{t("ContactDialog_text1")}
<Link underline="hover" color="inherit" href="https://seasonalfood.fuzue.tech/" target="_blank"> {t("ContactDialog_text2")}</Link>
&nbsp;{t( "ContactDialog_text3")} <Link underline="hover" color="inherit" href="https://github.com/fuzue/seasonalfood"> {t("ContactDialog_text4")}</Link>
<Box sx={{display: 'flex', justifyContent: 'start', mt:2, }}>
<AlternateEmailIcon sx={{mr:1}} />
<Link underline="hover" color="inherit" href="mailto:[email protected]">[email protected]</Link>
</Box>
<Box sx={{display: 'flex', justifyContent: 'start', mt:1}}>
<GitHubIcon sx={{mr:1}}/>
<Link underline="hover" color="inherit" href="https://github.com/fuzue/seasonalfood">GitHub Repo</Link>
</Box>
</DialogContentText>
</DialogContent>
</>
Expand Down
22 changes: 12 additions & 10 deletions src/components/ContributeDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import { DialogTitle, DialogContent, DialogContentText, Link }
from "@mui/material";
import { useTranslation } from "react-i18next";

//dialog box that opens with each element clicked
export default function ContributeDialog() {
const { t } = useTranslation();
return (
<>
<DialogTitle id="contribute-dialog-title">
{"Contribute"}
<DialogTitle id="contribute-dialog-title" >
{t("ContributeDialog_title")}
</DialogTitle>
<DialogContent>
<DialogContentText id="contribute-dialog-description">
This is an open source project, that means you can clone this repository, write issues, make your own changes and submit your own pull requests.
<p>For this, use our&nbsp;
<Link underline="hover" href="https://github.com/fuzue/seasonfood" target="_blank">
github Page.

</Link></p>
<DialogContent >
<DialogContentText id="contribute-dialog-description" color="dark-gray">
{t("ContributeDialog_desc")}
<p>{t("ContributeDialog_forthis")}&nbsp;
<Link underline="hover" href="https://github.com/fuzue/seasonfood" target="_blank">
{t("ContributeDialog_githubPage")}
</Link>
</p>
</DialogContentText>
</DialogContent>
</>
Expand Down
5 changes: 3 additions & 2 deletions src/components/SelectLang.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
import { useTranslation } from "react-i18next";

export default function SelectLang() {
const { i18n } = useTranslation();
const { t, i18n } = useTranslation();


const langs = {
en: { nativeName: "English" },
Expand All @@ -18,7 +19,7 @@ export default function SelectLang() {

return (
<FormControl sx={{ minWidth: "100%" }} size="small">
<InputLabel id="demo-select-small-label">Language</InputLabel>
<InputLabel id="demo-select-small-label">{t("SelectLang_Text")}</InputLabel>
<Select
labelId="demo-select-small-label"
id="demo-select-small"
Expand Down
4 changes: 3 additions & 1 deletion src/components/SideBarDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Dialog, DialogActions, Button } from "@mui/material";
import AboutDialog from "./AboutDialog";
import ContactDialog from "./ContactDialog";
import ContributeDialog from "./ContributeDialog";
import { useTranslation } from "react-i18next";

//dialog box that opens with each element clicked

Expand All @@ -10,6 +11,7 @@ export default function SideBarDialog(props: {
dialogType: string;
handleClose: () => void;
}) {
const { t } = useTranslation();
const renderDialog = (anchor: string) => {
if (anchor === "about") {
return <AboutDialog />;
Expand All @@ -25,7 +27,7 @@ export default function SideBarDialog(props: {
{renderDialog(props.dialogType)}
<DialogActions>
<Button variant="outlined" onClick={props.handleClose} autoFocus>
close
{t("SideBarDialog_close")}
</Button>
</DialogActions>
</Dialog>
Expand Down
11 changes: 7 additions & 4 deletions src/components/SideBarList.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useTranslation } from "react-i18next";
import SelectLang from "./SelectLang";
/* MUI IMPORTS */
import {
Expand All @@ -9,6 +10,8 @@ import {
} from "@mui/material";

export default function SideBarList(props: any) {
const { t } = useTranslation();

return (
<Stack
height="100%"
Expand All @@ -22,28 +25,28 @@ export default function SideBarList(props: any) {
>
<ListItem sx={{ my: 1.5 }}>
<Typography variant="h6" display="block" gutterBottom sx={{ m: 0 }}>
SEASONAL FOOD 🇮🇹
SEASON FOOD 🇮🇹
</Typography>
</ListItem>
<Divider />
<ListItem disablePadding>
<ListItemButton onClick={() => props.handleClickOpen("about")}>
<Typography variant="button" display="block" gutterBottom>
about the app
{t("SideBarList_aboutApp")}
</Typography>
</ListItemButton>
</ListItem>
<ListItem disablePadding>
<ListItemButton onClick={() => props.handleClickOpen("contribute")}>
<Typography variant="button" display="block" gutterBottom>
contribute
{t("SideBarList_contribute")}
</Typography>
</ListItemButton>
</ListItem>
<ListItem disablePadding>
<ListItemButton onClick={() => props.handleClickOpen("contact")}>
<Typography variant="button" display="block" gutterBottom>
contact us
{t("SideBarList_contact")}
</Typography>
</ListItemButton>
</ListItem>
Expand Down