diff --git a/nest_frontend/Localization.js b/nest_frontend/Localization.js index 5c2c637..b1c053c 100644 --- a/nest_frontend/Localization.js +++ b/nest_frontend/Localization.js @@ -18,6 +18,13 @@ export default new LocalizedStrings({ appName: "N.E.S.T.", appFullName: "Noi Estraiamo Statistiche Tweet", + server: "Scegli un server", + baseURL: "Base URL", + notLoggedIn: "Accesso non effettuato", + login: "Accedi", + email: "Email", + passwd: "Password", + dashboard: "Dashboard", searchBy: "Ricerca per ", byZone: "area", @@ -26,15 +33,26 @@ export default new LocalizedStrings({ byTimePeriod: "arco di tempo", timeBefore: "Prima", timeAfter: "Dopo", + conditions: "Condizioni", createRepo: "Crea repository", repoName: "Nome repository: ", + request: "Richiedi", + filterOR: "Almeno una cond.", + filterAND: "Tutte le cond.", + rollback: "Annulla modifiche", + save: "Salva modifiche", + wordcloud: "Wordcloud", + repositories: "Repositories", repoMenu: "Menu repository", menuActive: "Le tue repository attive", menuArchived: "Le tue repository archiviate", + emptyMenu: "Non c'è nulla qui", delete: "Elimina", archive: "Archivia", edit: "Modifica", + created: "Creata", + archived: "Archiviata", alerts: "Allarmi", alertTitle: "I tuoi allarmi", @@ -46,19 +64,34 @@ export default new LocalizedStrings({ loggedInAs: " come ", logout: "Esci", switchTheme: "Cambia tema", + darkMode: "Scuro", + lightMode: "Chiaro", alertSettings: "Impostazioni allarmi", changeEmail: "Cambia il tuo indirizzo email", changePasswd: "Cambia la tua password", + users: "Utenti", manageUsers: "Gestisci utenti", userList: "Elenco utenti", userCreate: "Crea nuovo utente", + userName: "Username", + create: "Crea", + type: "Tipo", + admin: "Amministratore", + user: "Utente", }, // 🇬🇧 en: { appName: "N.E.S.T.", appFullName: "We Extract Statistics from Tweets", + server: "Choose a server", + baseURL: "Base URL", + notLoggedIn: "Not logged in", + login: "Login", + email: "Email", + passwd: "Password", + dashboard: "Dashboard", searchBy: "Search by ", byZone: "zone", @@ -67,15 +100,26 @@ export default new LocalizedStrings({ byTimePeriod: "time period", timeBefore: "Before", timeAfter: "After", + conditions: "Conditions", createRepo: "Create repository", repoName: "Repository name: ", + request: "Request", + filterOR: "At least one cond.", + filterAND: "Every cond.", + rollback: "Rollback changes", + save: "Save changes", + wordcloud: "Wordcloud", + repositories: "Repositories", repoMenu: "Repositories menu", menuActive: "Your active repositories", menuArchived: "Your archived repositories", + emptyMenu: "There's nothing here", delete: "Delete", archive: "Archive", edit: "Edit", + created: "Created", + archived: "Archived", alerts: "Alerts", alertTitle: "Your alerts", @@ -87,19 +131,34 @@ export default new LocalizedStrings({ loggedInAs: " as ", logout: "Logout", switchTheme: "Switch theme", + darkMode: "Dark", + lightMode: "Light", alertSettings: "Alert settings", changeEmail: "Change your email address", changePasswd: "Change your password", + users: "Users", manageUsers: "Manage users", userList: "User list", userCreate: "Create new user", + userName: "Username", + create: "Create", + type: "Type", + admin: "Admin", + user: "User", }, // 🇫🇮 fi: { appName: "N.E.S.T.", appFullName: "Poimimme Twiittien Tilastot", + server: "Valitse palvelin", + baseURL: "Perus-URL", + notLoggedIn: "Ei kirjautunut sisään", + login: "Kirjaudu sisään", + email: "Sähköposti", + passwd: "Salasana", + dashboard: "Kojelauta", searchBy: "Haku ", byZone: "vyöhykkeen mukaan", @@ -108,8 +167,52 @@ export default new LocalizedStrings({ byTimePeriod: "aikajakson mukaan", timeBefore: "Ennen", timeAfter: "Jälkeen", + conditions: "Ehdot", createRepo: "Luo arkisto", repoName: "Arkiston nimi: ", + request: "Pyydä", + filterOR: "Vähintään yksi ehto", + filterAND: "Kaikki ehdot", + rollback: "Peruuta muutokset", + save: "Tallenna muutokset", + wordcloud: "Sanapilvi", + + repositories: "Arkistot", + repoMenu: "Arkistot-valikko", + menuActive: "Aktiiviset arkistosi", + menuArchived: "Arkistoidut arkistosi", + emptyMenu: "Täällä ei ole mitään", + delete: "Poista", + archive: "Arkistoi", + edit: "Muokkaa", + created: "Luotu", + archived: "Arkisto", + + alerts: "Hälytykset", + alertTitle: "Hälytyksesi", + alertCreate: "Luo uusi hälytys", + + settings: "Asetukset", + loggedInTitle: "Kirjautunut sisään", + loggedInOn: "Olet tällä hetkellä kirjautuneena sisään ", + loggedInAs: " nimellä ", + logout: "Kirjaudu ulos", + switchTheme: "Vaihda teema", + darkMode: "Tumma", + lightMode: "Selkeä", + alertSettings: "Hälytysasetukset", + changeEmail: "Vaihda sähköpostiosoitteesi", + changePasswd: "Vaihda salasanasi", + + users: "Käyttäjät", + manageUsers: "Käyttäjien hallinta", + userList: "Käyttäjäluettelo", + userCreate: "Luo uusi käyttäjä", + userName: "Käyttäjätunnus", + create: "Luo", + type: "Tyyppi", + admin: "Ylläpitäjä", + user: "Käyttäjä", } }) diff --git a/nest_frontend/components/interactive/BoxConditionDatetime.js b/nest_frontend/components/interactive/BoxConditionDatetime.js index 1cdba48..3b47e59 100644 --- a/nest_frontend/components/interactive/BoxConditionDatetime.js +++ b/nest_frontend/components/interactive/BoxConditionDatetime.js @@ -10,6 +10,7 @@ import useRepositoryEditor from "../../hooks/useRepositoryEditor" import ButtonToggleBeforeAfter from "./ButtonToggleBeforeAfter" import Condition from "../../utils/Condition" import convertToLocalISODate from "../../utils/convertToLocalISODate" +import Localization from "../../Localization" const INVALID_USER_CHARACTERS = /[^0-9TZ:+-]/g @@ -50,7 +51,7 @@ export default function BoxConditionDatetime({ ...props }) { } return ( - Ricerca per arco di tempo} {...props}> + {Localization.searchBy} {Localization.byTimePeriod}} {...props}> Ricerca per hashtag} {...props}> + {Localization.searchBy} {Localization.byHashtag}} {...props}> Ricerca per area + {Localization.searchBy} {Localization.byZone} } childrenClassName={Style.BoxConditionMapContents} {...props} diff --git a/nest_frontend/components/interactive/BoxConditionUser.js b/nest_frontend/components/interactive/BoxConditionUser.js index dede95a..0020a7a 100644 --- a/nest_frontend/components/interactive/BoxConditionUser.js +++ b/nest_frontend/components/interactive/BoxConditionUser.js @@ -8,6 +8,7 @@ import Style from "./BoxConditionUser.module.css" import ButtonIconOnly from "../base/ButtonIconOnly" import useRepositoryEditor from "../../hooks/useRepositoryEditor" import Condition from "../../utils/Condition" +import Localization from "../../Localization" const INVALID_USER_CHARACTERS = /[^a-zA-Z0-9]/g @@ -40,7 +41,7 @@ export default function BoxConditionUser({ ...props }) { } return ( - Ricerca per utente} {...props}> + {Localization.searchBy} {Localization.byUser}} {...props}> ) return ( - + {badges} ) diff --git a/nest_frontend/components/interactive/BoxLoggedIn.js b/nest_frontend/components/interactive/BoxLoggedIn.js index f12349f..9094934 100644 --- a/nest_frontend/components/interactive/BoxLoggedIn.js +++ b/nest_frontend/components/interactive/BoxLoggedIn.js @@ -7,6 +7,7 @@ import ContextUser from "../../contexts/ContextUser" import { useHistory } from "react-router" import Style from "./BoxLoggedIn.module.css" import CurrentServer from "./CurrentServer" +import Localization from "../../Localization" /** @@ -21,10 +22,10 @@ export default function BoxLoggedIn({ ...props }) { const history = useHistory() return ( - +
- Al momento hai effettuato l'accesso su come . + {Localization.loggedInOn} {Localization.loggedInAs} .
+ >{Localization.logout}
diff --git a/nest_frontend/components/interactive/BoxLogin.js b/nest_frontend/components/interactive/BoxLogin.js index 7555ca9..8725066 100644 --- a/nest_frontend/components/interactive/BoxLogin.js +++ b/nest_frontend/components/interactive/BoxLogin.js @@ -8,6 +8,7 @@ import FormButton from "../base/formparts/FormButton" import ContextUser from "../../contexts/ContextUser" import { useHistory } from "react-router" import FormAlert from "../base/formparts/FormAlert" +import Localization from "../../Localization" /** @@ -44,9 +45,9 @@ export default function BoxLogin({ ...props }) { } return ( - + - + - + - Accedi + {Localization.login} diff --git a/nest_frontend/components/interactive/BoxRepositoriesActive.js b/nest_frontend/components/interactive/BoxRepositoriesActive.js index a2c7c22..0b58d8c 100644 --- a/nest_frontend/components/interactive/BoxRepositoriesActive.js +++ b/nest_frontend/components/interactive/BoxRepositoriesActive.js @@ -4,7 +4,7 @@ import { faFolderOpen } from "@fortawesome/free-solid-svg-icons" import ContextUser from "../../contexts/ContextUser" import Loading from "../base/Loading" import BoxFullScrollable from "../base/BoxFullScrollable" - +import Localization from "../../Localization" /** * A {@link BoxFull} listing all the user's active repositories. @@ -31,7 +31,7 @@ export default function BoxRepositoriesActive({ contents = } else if(repositories.length === 0) { - contents = Non c'è nulla qui. + contents = {Localization.emptyMenu}. } else { contents = repositories.map(repo => ( @@ -50,7 +50,7 @@ export default function BoxRepositoriesActive({ } return ( - + {contents} ) diff --git a/nest_frontend/components/interactive/BoxRepositoriesArchived.js b/nest_frontend/components/interactive/BoxRepositoriesArchived.js index 2bf4483..0555aa3 100644 --- a/nest_frontend/components/interactive/BoxRepositoriesArchived.js +++ b/nest_frontend/components/interactive/BoxRepositoriesArchived.js @@ -4,6 +4,7 @@ import { faFolderOpen } from "@fortawesome/free-solid-svg-icons" import ContextUser from "../../contexts/ContextUser" import Loading from "../base/Loading" import BoxFullScrollable from "../base/BoxFullScrollable" +import Localization from "../../Localization" /** @@ -31,7 +32,7 @@ export default function BoxRepositoriesArchived({ contents = } else if(repositories.length === 0) { - contents = Non c'è nulla qui. + contents = {Localization.emptyMenu}. } else { contents = repositories.map(repo => ( @@ -50,7 +51,7 @@ export default function BoxRepositoriesArchived({ } return ( - + {contents} ) diff --git a/nest_frontend/components/interactive/BoxRepositoryCreate.js b/nest_frontend/components/interactive/BoxRepositoryCreate.js index b46f1f6..09736ba 100644 --- a/nest_frontend/components/interactive/BoxRepositoryCreate.js +++ b/nest_frontend/components/interactive/BoxRepositoryCreate.js @@ -10,6 +10,7 @@ import useRepositoryEditor from "../../hooks/useRepositoryEditor" import FormAlert from "../base/formparts/FormAlert" import goToOnSuccess from "../../utils/goToOnSuccess" import { useHistory } from "react-router" +import Localization from "../../Localization" /** @@ -35,14 +36,14 @@ export default function BoxRepositoryCreate({ running, ...props }) { const history = useHistory() return ( - + { e.preventDefault() save() }} > - + setName(e.target.value)} /> - +   {error ? @@ -83,7 +84,7 @@ export default function BoxRepositoryCreate({ running, ...props }) { onClick={() => revert()} disabled={running} > - Annulla modifiche + {Localization.rollback} : @@ -103,7 +104,7 @@ export default function BoxRepositoryCreate({ running, ...props }) { onClick={_ => goToOnSuccess(save, history, "/repositories")()} disabled={running} > - Crea repository + {Localization.createRepo} } diff --git a/nest_frontend/components/interactive/BoxSetServer.js b/nest_frontend/components/interactive/BoxSetServer.js index ff05bc9..319b525 100644 --- a/nest_frontend/components/interactive/BoxSetServer.js +++ b/nest_frontend/components/interactive/BoxSetServer.js @@ -5,6 +5,7 @@ import FormLabel from "../base/formparts/FormLabel" import InputWithIcon from "../base/InputWithIcon" import { faGlobe } from "@fortawesome/free-solid-svg-icons" import ContextServer from "../../contexts/ContextServer" +import Localization from "../../Localization" /** @@ -18,9 +19,9 @@ export default function BoxSetServer({ ...props }) { const { server, setServer } = useContext(ContextServer) return ( - + - + + - + setUsername(event.target.value)} /> - + setEmail(event.target.value)} /> - + - Create + {Localization.create} diff --git a/nest_frontend/components/interactive/BoxUserList.js b/nest_frontend/components/interactive/BoxUserList.js index e5a78ae..ff9f8ae 100644 --- a/nest_frontend/components/interactive/BoxUserList.js +++ b/nest_frontend/components/interactive/BoxUserList.js @@ -2,6 +2,7 @@ import React from "react" import Loading from "../base/Loading" import BoxFullScrollable from "../base/BoxFullScrollable" import SummaryUser from "./SummaryUser" +import Localization from "../../Localization" export default function BoxUserList({ users, destroyUser, running, ...props }) { @@ -15,7 +16,7 @@ export default function BoxUserList({ users, destroyUser, running, ...props }) { } return ( - + {contents} ) diff --git a/nest_frontend/components/interactive/BoxWordcloud.js b/nest_frontend/components/interactive/BoxWordcloud.js index 12e1dd0..2fb0564 100644 --- a/nest_frontend/components/interactive/BoxWordcloud.js +++ b/nest_frontend/components/interactive/BoxWordcloud.js @@ -1,6 +1,7 @@ import React from "react" import BoxFull from "../base/BoxFull" import ReactWordcloud from "@steffo/nest-react-wordcloud" +import Localization from "../../Localization" /** @@ -13,7 +14,7 @@ import ReactWordcloud from "@steffo/nest-react-wordcloud" */ export default function BoxWordcloud({ words, props }) { return ( - +
- {value ? "Dopo" : "Prima"} + {value ? Localization.timeBefore : Localization.timeAfter} ) } diff --git a/nest_frontend/components/interactive/LoggedInUser.js b/nest_frontend/components/interactive/LoggedInUser.js index 8df518d..9fa19fb 100644 --- a/nest_frontend/components/interactive/LoggedInUser.js +++ b/nest_frontend/components/interactive/LoggedInUser.js @@ -2,6 +2,7 @@ import React, { useContext } from "react" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import { faUser } from "@fortawesome/free-solid-svg-icons" import ContextUser from "../../contexts/ContextUser" +import Localization from "../../Localization" /** @@ -17,7 +18,7 @@ export default function LoggedInUser({ ...props }) { if(!user) { return ( - Non acceduto + {Localization.notLoggedIn} ) } diff --git a/nest_frontend/components/interactive/SelectTheme.js b/nest_frontend/components/interactive/SelectTheme.js index 970b5da..73b4eb0 100644 --- a/nest_frontend/components/interactive/SelectTheme.js +++ b/nest_frontend/components/interactive/SelectTheme.js @@ -1,6 +1,7 @@ import React, { useContext } from "react" import Select from "../base/Select" import ContextTheme from "../../contexts/ContextTheme" +import Localization from "../../Localization" /** @@ -16,8 +17,8 @@ export default function SelectTheme({ ...props }) { return ( ) } diff --git a/nest_frontend/components/interactive/Sidebar.js b/nest_frontend/components/interactive/Sidebar.js index 41d4b64..58247e7 100644 --- a/nest_frontend/components/interactive/Sidebar.js +++ b/nest_frontend/components/interactive/Sidebar.js @@ -12,6 +12,7 @@ import { faUserCog, } from "@fortawesome/free-solid-svg-icons" import ContextUser from "../../contexts/ContextUser" +import Localization from "../../Localization" /** @@ -32,20 +33,20 @@ export default function Sidebar({ className, ...props }) { { user ? <> - Dashboard - Repositories - Allarmi - Impostazioni + {Localization.dashboard} + {Localization.repositories} + {Localization.alerts} + {Localization.settings} : <> - Accedi + {Localization.login} } { user && user.isAdmin ? <> - Utenti + {Localization.users} : null diff --git a/nest_frontend/components/interactive/SummaryRepository.js b/nest_frontend/components/interactive/SummaryRepository.js index 129ed85..ab4bacf 100644 --- a/nest_frontend/components/interactive/SummaryRepository.js +++ b/nest_frontend/components/interactive/SummaryRepository.js @@ -3,6 +3,7 @@ import Button from "../base/Button" import { faArchive, faFolder, faFolderOpen, faPencilAlt, faTrash } from "@fortawesome/free-solid-svg-icons" import { useHistory } from "react-router" import Summary from "../base/Summary" +import Localization from "../../Localization" /** @@ -42,7 +43,7 @@ export default function SummaryRepository( onClick={deleteSelf} disabled={running} > - Elimina + {Localization.delete} : null} {canEdit ? @@ -52,7 +53,7 @@ export default function SummaryRepository( onClick={onEditClick} disabled={running} > - Modifica + {Localization.Edit} : null} {canArchive ? @@ -62,7 +63,7 @@ export default function SummaryRepository( onClick={archiveSelf} disabled={running} > - {"Archivia"} + {Localization.achive} : null} @@ -73,9 +74,9 @@ export default function SummaryRepository( title={repo.name} subtitle={repo.owner ? repo.owner.username : null} onClick={onRepoClick} - upperLabel={"Creata"} + upperLabel={Localization.created} upperValue={repo.start ? new Date(repo.start).toLocaleString() : null} - lowerLabel={"Archiviata"} + lowerLabel={Localization.archived} lowerValue={repo.end ? new Date(repo.end).toLocaleString() : null} buttons={buttons} {...props} diff --git a/nest_frontend/components/interactive/SummaryUser.js b/nest_frontend/components/interactive/SummaryUser.js index 53fe21c..0dd3eef 100644 --- a/nest_frontend/components/interactive/SummaryUser.js +++ b/nest_frontend/components/interactive/SummaryUser.js @@ -3,6 +3,7 @@ import Summary from "../base/Summary" import { faStar, faTrash, faUser } from "@fortawesome/free-solid-svg-icons" import Button from "../base/Button" import ContextUser from "../../contexts/ContextUser" +import Localization from "../../Localization" export default function SummaryUser({ user, destroyUser, running, ...props }) { @@ -20,7 +21,7 @@ export default function SummaryUser({ user, destroyUser, running, ...props }) { }} disabled={running} > - Elimina + {Localization.delete} : null} @@ -30,8 +31,8 @@ export default function SummaryUser({ user, destroyUser, running, ...props }) { icon={user.isAdmin ? faStar : faUser} title={user.username} subtitle={user.email} - upperLabel={"Tipo"} - upperValue={user.isAdmin ? "Amministratore" : "Utente"} + upperLabel={Localization.type} + upperValue={user.isAdmin ? Localization.admin : Localization.user} buttons={buttons} {...props} />