1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 14:34:19 +00:00

🌍 Translated UI

This commit is contained in:
@uni-chiara 2021-05-18 18:50:02 +02:00
parent 79427d6b96
commit cbfb66854e
6 changed files with 41 additions and 18 deletions

View file

@ -22,6 +22,7 @@ export default {
email: "Email",
passwd: "Password",
dashboardTitle: "Crea una nuova repository",
dashboard: "Dashboard",
searchBy: "Ricerca per",
byZone: "area",
@ -42,6 +43,7 @@ export default {
repositories: "Repositories",
repoMenu: "Menu repository",
repoEdit: "Modifica repository",
menuActive: "Le tue repository attive",
menuArchived: "Le tue repository archiviate",
emptyMenu: "Non c'è nulla qui",
@ -54,6 +56,7 @@ export default {
alerts: "Allarmi",
alertTitle: "I tuoi allarmi",
alertCreate: "Crea un allarme",
notImplemented: "🚧 Non implementato.",
settings: "Impostazioni",
loggedInTitle: "Accesso effettuato",
@ -63,6 +66,7 @@ export default {
switchTheme: "Cambia tema",
darkMode: "Scuro",
lightMode: "Chiaro",
changeLang: "Cambia lingua",
alertSettings: "Impostazioni allarmi",
changeEmail: "Cambia il tuo indirizzo email",
changePasswd: "Cambia la tua password",
@ -89,6 +93,7 @@ export default {
email: "Email",
passwd: "Password",
dashboardTitle: "Create a new repository",
dashboard: "Dashboard",
searchBy: "Search by",
byZone: "zone",
@ -109,6 +114,7 @@ export default {
repositories: "Repositories",
repoMenu: "Repositories menu",
repoEdit: "Edit repository",
menuActive: "Your active repositories",
menuArchived: "Your archived repositories",
emptyMenu: "There's nothing here",
@ -121,6 +127,7 @@ export default {
alerts: "Alerts",
alertTitle: "Your alerts",
alertCreate: "Create a new alert",
notImplemented: "🚧 Not implemented.",
settings: "Settings",
loggedInTitle: "Logged in",
@ -130,6 +137,7 @@ export default {
switchTheme: "Switch theme",
darkMode: "Dark",
lightMode: "Light",
changeLang: "Change language",
alertSettings: "Alert settings",
changeEmail: "Change your email address",
changePasswd: "Change your password",
@ -156,6 +164,7 @@ export default {
email: "Sähköposti",
passwd: "Salasana",
dashboardTitle: "Luo uusi arkisto",
dashboard: "Kojelauta",
searchBy: "Haku ",
byZone: "vyöhykkeen mukaan",
@ -176,6 +185,7 @@ export default {
repositories: "Arkistot",
repoMenu: "Arkistot-valikko",
repoEdit: "Muokkaa arkistoa",
menuActive: "Aktiiviset arkistosi",
menuArchived: "Arkistoidut arkistosi",
emptyMenu: "Täällä ei ole mitään",
@ -188,6 +198,7 @@ export default {
alerts: "Hälytykset",
alertTitle: "Hälytyksesi",
alertCreate: "Luo uusi hälytys",
notImplemented: "🚧 Ei toteutettu.",
settings: "Asetukset",
loggedInTitle: "Kirjautunut sisään",
@ -197,6 +208,7 @@ export default {
switchTheme: "Vaihda teema",
darkMode: "Tumma",
lightMode: "Selkeä",
changeLang: "Vaihda kieltä",
alertSettings: "Hälytysasetukset",
changeEmail: "Vaihda sähköpostiosoitteesi",
changePasswd: "Vaihda salasanasi",

View file

@ -10,11 +10,11 @@ export default function PageAlerts({ children, className, ...props }) {
return (
<div className={classNames(Style.PageAlerts, className)} {...props}>
<BoxFull header={"I tuoi allarmi"} className={Style.YourAlerts}>
🚧 Non implementato.
<BoxFull header={strings.alertTitle} className={Style.YourAlerts}>
{strings.notImplemented}
</BoxFull>
<BoxFull header={"Crea un nuovo allarme"} className={Style.CreateAlert}>
🚧 Non implementato.
<BoxFull header={strings.alertCreate} className={Style.CreateAlert}>
{strings.notImplemented}
</BoxFull>
</div>
)

View file

@ -1,15 +1,18 @@
import React from "react"
import React, {useContext} from "react"
import Style from "./PageDashboard.module.css"
import classNames from "classnames"
import BoxHeader from "../components/base/BoxHeader"
import RepositoryEditor from "../components/providers/RepositoryEditor"
import ContextLanguage from "../contexts/ContextLanguage"
export default function PageDashboard({ children, className, ...props }) {
const { strings } = useContext(ContextLanguage)
return (
<div className={classNames(Style.PageHome, className)} {...props}>
<BoxHeader className={Style.Header}>
Crea una nuova repository
{strings.dashboardTitle}
</BoxHeader>
<RepositoryEditor className={Style.RepositoryEditor}/>
</div>

View file

@ -7,9 +7,12 @@ import useBackendImmediately from "../hooks/useBackendImmediately"
import ContextUser from "../contexts/ContextUser"
import renderContents from "../utils/renderContents"
import { useParams } from "react-router"
import ContextLanguage from "../contexts/ContextLanguage"
export default function PageEdit({ className, ...props }) {
const { strings } = useContext(ContextLanguage)
const { id } = useParams()
const { fetchDataAuth } = useContext(ContextUser)
const repositoryRequest = useBackendImmediately(fetchDataAuth, "GET", `/api/v1/repositories/${id}`)
@ -24,7 +27,7 @@ export default function PageEdit({ className, ...props }) {
return (
<div className={classNames(Style.PageHome, className)} {...props}>
<BoxHeader className={Style.Header}>
Modifica repository
{strings.repoEdit}
</BoxHeader>
{contents}
</div>

View file

@ -1,4 +1,4 @@
import React from "react"
import React, { useContext } from "react"
import Style from "./PageSettings.module.css"
import classNames from "classnames"
import BoxHeader from "../components/base/BoxHeader"
@ -6,27 +6,29 @@ import BoxFull from "../components/base/BoxFull"
import SelectTheme from "../components/interactive/SelectTheme"
import BoxLoggedIn from "../components/interactive/BoxLoggedIn"
import SelectLanguage from "../components/interactive/SelectLanguage"
import ContextLanguage from "../contexts/ContextLanguage"
export default function PageSettings({ children, className, ...props }) {
const { strings } = useContext(ContextLanguage)
return (
<div className={classNames(Style.PageSettings, className)} {...props}>
<BoxLoggedIn/>
<BoxHeader>
Cambia tema: <SelectTheme/>
{strings.switchTheme}: <SelectTheme/>
</BoxHeader>
<BoxHeader>
Cambia lingua: <SelectLanguage/>
{strings.changeLang}: <SelectLanguage/>
</BoxHeader>
<BoxFull header={"Impostazioni allarmi"}>
🚧 Non implementato.
<BoxFull header={strings.alertSettings}>
{strings.notImplemented}
</BoxFull>
<BoxFull header={"Cambia il tuo indirizzo email"}>
🚧 Non implementato.
<BoxFull header={strings.changeEmail}>
{strings.notImplemented}
</BoxFull>
<BoxFull header={"Cambia la tua password"}>
🚧 Non implementato.
<BoxFull header={strings.changePasswd}>
{strings.notImplemented}
</BoxFull>
</div>
)

View file

@ -1,19 +1,22 @@
import React from "react"
import React, { useContext } from "react"
import Style from "./PageUsers.module.css"
import classNames from "classnames"
import BoxHeader from "../components/base/BoxHeader"
import BoxUserCreate from "../components/interactive/BoxUserCreate"
import useBackendViewset from "../hooks/useBackendViewset"
import BoxUserList from "../components/interactive/BoxUserList"
import ContextLanguage from "../contexts/ContextLanguage"
export default function PageUsers({ children, className, ...props }) {
const { strings } = useContext(ContextLanguage)
const bv = useBackendViewset("/api/v1/users/", "email")
return (
<div className={classNames(Style.PageUsers, className)} {...props}>
<BoxHeader className={Style.Header}>
Gestisci utenti
{strings.manageUsers}
</BoxHeader>
<BoxUserCreate className={Style.CreateUser} createUser={bv.createResource} running={bv.running}/>
<BoxUserList className={Style.UserList} users={bv.resources} destroyUser={bv.destroyResource} running={bv.running}/>