mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 13:04:19 +00:00
🌍 Translating UI
This commit is contained in:
parent
9ba87a1809
commit
beb3027f36
21 changed files with 174 additions and 52 deletions
|
@ -18,6 +18,13 @@ export default new LocalizedStrings({
|
||||||
appName: "N.E.S.T.",
|
appName: "N.E.S.T.",
|
||||||
appFullName: "Noi Estraiamo Statistiche Tweet",
|
appFullName: "Noi Estraiamo Statistiche Tweet",
|
||||||
|
|
||||||
|
server: "Scegli un server",
|
||||||
|
baseURL: "Base URL",
|
||||||
|
notLoggedIn: "Accesso non effettuato",
|
||||||
|
login: "Accedi",
|
||||||
|
email: "Email",
|
||||||
|
passwd: "Password",
|
||||||
|
|
||||||
dashboard: "Dashboard",
|
dashboard: "Dashboard",
|
||||||
searchBy: "Ricerca per ",
|
searchBy: "Ricerca per ",
|
||||||
byZone: "area",
|
byZone: "area",
|
||||||
|
@ -26,15 +33,26 @@ export default new LocalizedStrings({
|
||||||
byTimePeriod: "arco di tempo",
|
byTimePeriod: "arco di tempo",
|
||||||
timeBefore: "Prima",
|
timeBefore: "Prima",
|
||||||
timeAfter: "Dopo",
|
timeAfter: "Dopo",
|
||||||
|
conditions: "Condizioni",
|
||||||
createRepo: "Crea repository",
|
createRepo: "Crea repository",
|
||||||
repoName: "Nome 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",
|
repoMenu: "Menu repository",
|
||||||
menuActive: "Le tue repository attive",
|
menuActive: "Le tue repository attive",
|
||||||
menuArchived: "Le tue repository archiviate",
|
menuArchived: "Le tue repository archiviate",
|
||||||
|
emptyMenu: "Non c'è nulla qui",
|
||||||
delete: "Elimina",
|
delete: "Elimina",
|
||||||
archive: "Archivia",
|
archive: "Archivia",
|
||||||
edit: "Modifica",
|
edit: "Modifica",
|
||||||
|
created: "Creata",
|
||||||
|
archived: "Archiviata",
|
||||||
|
|
||||||
alerts: "Allarmi",
|
alerts: "Allarmi",
|
||||||
alertTitle: "I tuoi allarmi",
|
alertTitle: "I tuoi allarmi",
|
||||||
|
@ -46,19 +64,34 @@ export default new LocalizedStrings({
|
||||||
loggedInAs: " come ",
|
loggedInAs: " come ",
|
||||||
logout: "Esci",
|
logout: "Esci",
|
||||||
switchTheme: "Cambia tema",
|
switchTheme: "Cambia tema",
|
||||||
|
darkMode: "Scuro",
|
||||||
|
lightMode: "Chiaro",
|
||||||
alertSettings: "Impostazioni allarmi",
|
alertSettings: "Impostazioni allarmi",
|
||||||
changeEmail: "Cambia il tuo indirizzo email",
|
changeEmail: "Cambia il tuo indirizzo email",
|
||||||
changePasswd: "Cambia la tua password",
|
changePasswd: "Cambia la tua password",
|
||||||
|
|
||||||
|
users: "Utenti",
|
||||||
manageUsers: "Gestisci utenti",
|
manageUsers: "Gestisci utenti",
|
||||||
userList: "Elenco utenti",
|
userList: "Elenco utenti",
|
||||||
userCreate: "Crea nuovo utente",
|
userCreate: "Crea nuovo utente",
|
||||||
|
userName: "Username",
|
||||||
|
create: "Crea",
|
||||||
|
type: "Tipo",
|
||||||
|
admin: "Amministratore",
|
||||||
|
user: "Utente",
|
||||||
},
|
},
|
||||||
// 🇬🇧
|
// 🇬🇧
|
||||||
en: {
|
en: {
|
||||||
appName: "N.E.S.T.",
|
appName: "N.E.S.T.",
|
||||||
appFullName: "We Extract Statistics from Tweets",
|
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",
|
dashboard: "Dashboard",
|
||||||
searchBy: "Search by ",
|
searchBy: "Search by ",
|
||||||
byZone: "zone",
|
byZone: "zone",
|
||||||
|
@ -67,15 +100,26 @@ export default new LocalizedStrings({
|
||||||
byTimePeriod: "time period",
|
byTimePeriod: "time period",
|
||||||
timeBefore: "Before",
|
timeBefore: "Before",
|
||||||
timeAfter: "After",
|
timeAfter: "After",
|
||||||
|
conditions: "Conditions",
|
||||||
createRepo: "Create repository",
|
createRepo: "Create repository",
|
||||||
repoName: "Repository name: ",
|
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",
|
repoMenu: "Repositories menu",
|
||||||
menuActive: "Your active repositories",
|
menuActive: "Your active repositories",
|
||||||
menuArchived: "Your archived repositories",
|
menuArchived: "Your archived repositories",
|
||||||
|
emptyMenu: "There's nothing here",
|
||||||
delete: "Delete",
|
delete: "Delete",
|
||||||
archive: "Archive",
|
archive: "Archive",
|
||||||
edit: "Edit",
|
edit: "Edit",
|
||||||
|
created: "Created",
|
||||||
|
archived: "Archived",
|
||||||
|
|
||||||
alerts: "Alerts",
|
alerts: "Alerts",
|
||||||
alertTitle: "Your alerts",
|
alertTitle: "Your alerts",
|
||||||
|
@ -87,19 +131,34 @@ export default new LocalizedStrings({
|
||||||
loggedInAs: " as ",
|
loggedInAs: " as ",
|
||||||
logout: "Logout",
|
logout: "Logout",
|
||||||
switchTheme: "Switch theme",
|
switchTheme: "Switch theme",
|
||||||
|
darkMode: "Dark",
|
||||||
|
lightMode: "Light",
|
||||||
alertSettings: "Alert settings",
|
alertSettings: "Alert settings",
|
||||||
changeEmail: "Change your email address",
|
changeEmail: "Change your email address",
|
||||||
changePasswd: "Change your password",
|
changePasswd: "Change your password",
|
||||||
|
|
||||||
|
users: "Users",
|
||||||
manageUsers: "Manage users",
|
manageUsers: "Manage users",
|
||||||
userList: "User list",
|
userList: "User list",
|
||||||
userCreate: "Create new user",
|
userCreate: "Create new user",
|
||||||
|
userName: "Username",
|
||||||
|
create: "Create",
|
||||||
|
type: "Type",
|
||||||
|
admin: "Admin",
|
||||||
|
user: "User",
|
||||||
},
|
},
|
||||||
// 🇫🇮
|
// 🇫🇮
|
||||||
fi: {
|
fi: {
|
||||||
appName: "N.E.S.T.",
|
appName: "N.E.S.T.",
|
||||||
appFullName: "Poimimme Twiittien Tilastot",
|
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",
|
dashboard: "Kojelauta",
|
||||||
searchBy: "Haku ",
|
searchBy: "Haku ",
|
||||||
byZone: "vyöhykkeen mukaan",
|
byZone: "vyöhykkeen mukaan",
|
||||||
|
@ -108,8 +167,52 @@ export default new LocalizedStrings({
|
||||||
byTimePeriod: "aikajakson mukaan",
|
byTimePeriod: "aikajakson mukaan",
|
||||||
timeBefore: "Ennen",
|
timeBefore: "Ennen",
|
||||||
timeAfter: "Jälkeen",
|
timeAfter: "Jälkeen",
|
||||||
|
conditions: "Ehdot",
|
||||||
createRepo: "Luo arkisto",
|
createRepo: "Luo arkisto",
|
||||||
repoName: "Arkiston nimi: ",
|
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ä",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
||||||
import ButtonToggleBeforeAfter from "./ButtonToggleBeforeAfter"
|
import ButtonToggleBeforeAfter from "./ButtonToggleBeforeAfter"
|
||||||
import Condition from "../../utils/Condition"
|
import Condition from "../../utils/Condition"
|
||||||
import convertToLocalISODate from "../../utils/convertToLocalISODate"
|
import convertToLocalISODate from "../../utils/convertToLocalISODate"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
const INVALID_USER_CHARACTERS = /[^0-9TZ:+-]/g
|
const INVALID_USER_CHARACTERS = /[^0-9TZ:+-]/g
|
||||||
|
@ -50,7 +51,7 @@ export default function BoxConditionDatetime({ ...props }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={<span>Ricerca per <FontAwesomeIcon icon={faClock}/> arco di tempo</span>} {...props}>
|
<BoxFull header={<span>{Localization.searchBy}<FontAwesomeIcon icon={faClock}/> {Localization.byTimePeriod}</span>} {...props}>
|
||||||
<FormInline onSubmit={onButtonClick}>
|
<FormInline onSubmit={onButtonClick}>
|
||||||
<ButtonToggleBeforeAfter onUpdate={setBa}/>
|
<ButtonToggleBeforeAfter onUpdate={setBa}/>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
|
|
|
@ -8,6 +8,7 @@ import Style from "./BoxConditionHashtag.module.css"
|
||||||
import ButtonIconOnly from "../base/ButtonIconOnly"
|
import ButtonIconOnly from "../base/ButtonIconOnly"
|
||||||
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
||||||
import Condition from "../../utils/Condition"
|
import Condition from "../../utils/Condition"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
// Official hashtag regex from https://stackoverflow.com/a/22490853/4334568
|
// Official hashtag regex from https://stackoverflow.com/a/22490853/4334568
|
||||||
// noinspection RegExpAnonymousGroup,LongLine
|
// noinspection RegExpAnonymousGroup,LongLine
|
||||||
|
@ -41,7 +42,7 @@ export default function BoxConditionHashtag({ ...props }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={<span>Ricerca per <FontAwesomeIcon icon={faHashtag}/> hashtag</span>} {...props}>
|
<BoxFull header={<span>{Localization.searchBy}<FontAwesomeIcon icon={faHashtag}/> {Localization.byHashtag}</span>} {...props}>
|
||||||
<FormInline onSubmit={onButtonClick}>
|
<FormInline onSubmit={onButtonClick}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
className={Style.Input}
|
className={Style.Input}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import ButtonIconOnly from "../base/ButtonIconOnly"
|
||||||
import { MapContainer, TileLayer } from "react-leaflet"
|
import { MapContainer, TileLayer } from "react-leaflet"
|
||||||
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
||||||
import Condition from "../../utils/Condition"
|
import Condition from "../../utils/Condition"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
const STARTING_POSITION = { lat: 41.89309, lng: 12.48289 }
|
const STARTING_POSITION = { lat: 41.89309, lng: 12.48289 }
|
||||||
|
@ -99,7 +100,7 @@ export default function BoxConditionMap({ ...props }) {
|
||||||
return (
|
return (
|
||||||
<BoxFull
|
<BoxFull
|
||||||
header={
|
header={
|
||||||
<span>Ricerca per <FontAwesomeIcon icon={faMapPin}/> area</span>
|
<span>{Localization.searchBy}<FontAwesomeIcon icon={faMapPin}/> {Localization.byZone}</span>
|
||||||
}
|
}
|
||||||
childrenClassName={Style.BoxConditionMapContents}
|
childrenClassName={Style.BoxConditionMapContents}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import Style from "./BoxConditionUser.module.css"
|
||||||
import ButtonIconOnly from "../base/ButtonIconOnly"
|
import ButtonIconOnly from "../base/ButtonIconOnly"
|
||||||
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
||||||
import Condition from "../../utils/Condition"
|
import Condition from "../../utils/Condition"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
const INVALID_USER_CHARACTERS = /[^a-zA-Z0-9]/g
|
const INVALID_USER_CHARACTERS = /[^a-zA-Z0-9]/g
|
||||||
|
@ -40,7 +41,7 @@ export default function BoxConditionUser({ ...props }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={<span>Ricerca per <FontAwesomeIcon icon={faAt}/> utente</span>} {...props}>
|
<BoxFull header={<span>{Localization.searchBy}<FontAwesomeIcon icon={faAt}/> {Localization.byUser}</span>} {...props}>
|
||||||
<FormInline onSubmit={onButtonClick}>
|
<FormInline onSubmit={onButtonClick}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
className={Style.Input}
|
className={Style.Input}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from "react"
|
||||||
import BoxFull from "../base/BoxFull"
|
import BoxFull from "../base/BoxFull"
|
||||||
import ConditionBadge from "./ConditionBadge"
|
import ConditionBadge from "./ConditionBadge"
|
||||||
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +18,7 @@ export default function BoxConditions({ ...props }) {
|
||||||
const badges = conditions.map((cond, pos) => <ConditionBadge key={pos} {...cond}/>)
|
const badges = conditions.map((cond, pos) => <ConditionBadge key={pos} {...cond}/>)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={"Condizioni"} {...props}>
|
<BoxFull header={Localization.conditions} {...props}>
|
||||||
{badges}
|
{badges}
|
||||||
</BoxFull>
|
</BoxFull>
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,6 +7,7 @@ import ContextUser from "../../contexts/ContextUser"
|
||||||
import { useHistory } from "react-router"
|
import { useHistory } from "react-router"
|
||||||
import Style from "./BoxLoggedIn.module.css"
|
import Style from "./BoxLoggedIn.module.css"
|
||||||
import CurrentServer from "./CurrentServer"
|
import CurrentServer from "./CurrentServer"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,10 +22,10 @@ export default function BoxLoggedIn({ ...props }) {
|
||||||
const history = useHistory()
|
const history = useHistory()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={"Effettuato l'accesso"} {...props}>
|
<BoxFull header={Localization.loggedInTitle} {...props}>
|
||||||
<div className={Style.BoxLoggedInContents}>
|
<div className={Style.BoxLoggedInContents}>
|
||||||
<div>
|
<div>
|
||||||
Al momento hai effettuato l'accesso su <CurrentServer/> come <LoggedInUser/>.
|
{Localization.loggedInOn} <CurrentServer/> {Localization.loggedInAs} <LoggedInUser/>.
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
|
@ -32,7 +33,7 @@ export default function BoxLoggedIn({ ...props }) {
|
||||||
logout()
|
logout()
|
||||||
history.push("/login")
|
history.push("/login")
|
||||||
}} icon={faSignOutAlt}
|
}} icon={faSignOutAlt}
|
||||||
>Esci</Button>
|
>{Localization.logout}</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</BoxFull>
|
</BoxFull>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import FormButton from "../base/formparts/FormButton"
|
||||||
import ContextUser from "../../contexts/ContextUser"
|
import ContextUser from "../../contexts/ContextUser"
|
||||||
import { useHistory } from "react-router"
|
import { useHistory } from "react-router"
|
||||||
import FormAlert from "../base/formparts/FormAlert"
|
import FormAlert from "../base/formparts/FormAlert"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,9 +45,9 @@ export default function BoxLogin({ ...props }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={"Accedi"} {...props}>
|
<BoxFull header={Localization.login} {...props}>
|
||||||
<FormLabelled>
|
<FormLabelled>
|
||||||
<FormLabel text={"Email"} htmlFor={"login-email"}>
|
<FormLabel text={Localization.email} htmlFor={"login-email"}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
id={"login-email"}
|
id={"login-email"}
|
||||||
name={"login-email"}
|
name={"login-email"}
|
||||||
|
@ -56,7 +57,7 @@ export default function BoxLogin({ ...props }) {
|
||||||
icon={faEnvelope}
|
icon={faEnvelope}
|
||||||
/>
|
/>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormLabel text={"Password"} htmlFor={"login-password"}>
|
<FormLabel text={Localization.passwd} htmlFor={"login-password"}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
id={"login-password"}
|
id={"login-password"}
|
||||||
name={"login-password"}
|
name={"login-password"}
|
||||||
|
@ -77,7 +78,7 @@ export default function BoxLogin({ ...props }) {
|
||||||
color={"Green"}
|
color={"Green"}
|
||||||
disabled={working}
|
disabled={working}
|
||||||
>
|
>
|
||||||
Accedi
|
{Localization.login}
|
||||||
</FormButton>
|
</FormButton>
|
||||||
</FormLabelled>
|
</FormLabelled>
|
||||||
</BoxFull>
|
</BoxFull>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { faFolderOpen } from "@fortawesome/free-solid-svg-icons"
|
||||||
import ContextUser from "../../contexts/ContextUser"
|
import ContextUser from "../../contexts/ContextUser"
|
||||||
import Loading from "../base/Loading"
|
import Loading from "../base/Loading"
|
||||||
import BoxFullScrollable from "../base/BoxFullScrollable"
|
import BoxFullScrollable from "../base/BoxFullScrollable"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link BoxFull} listing all the user's active repositories.
|
* A {@link BoxFull} listing all the user's active repositories.
|
||||||
|
@ -31,7 +31,7 @@ export default function BoxRepositoriesActive({
|
||||||
contents = <Loading/>
|
contents = <Loading/>
|
||||||
}
|
}
|
||||||
else if(repositories.length === 0) {
|
else if(repositories.length === 0) {
|
||||||
contents = <i>Non c'è nulla qui.</i>
|
contents = <i>{Localization.emptyMenu}.</i>
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
contents = repositories.map(repo => (
|
contents = repositories.map(repo => (
|
||||||
|
@ -50,7 +50,7 @@ export default function BoxRepositoriesActive({
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFullScrollable header={"Repository attivi"} {...props}>
|
<BoxFullScrollable header={Localization.menuActive} {...props}>
|
||||||
{contents}
|
{contents}
|
||||||
</BoxFullScrollable>
|
</BoxFullScrollable>
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { faFolderOpen } from "@fortawesome/free-solid-svg-icons"
|
||||||
import ContextUser from "../../contexts/ContextUser"
|
import ContextUser from "../../contexts/ContextUser"
|
||||||
import Loading from "../base/Loading"
|
import Loading from "../base/Loading"
|
||||||
import BoxFullScrollable from "../base/BoxFullScrollable"
|
import BoxFullScrollable from "../base/BoxFullScrollable"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +32,7 @@ export default function BoxRepositoriesArchived({
|
||||||
contents = <Loading/>
|
contents = <Loading/>
|
||||||
}
|
}
|
||||||
else if(repositories.length === 0) {
|
else if(repositories.length === 0) {
|
||||||
contents = <i>Non c'è nulla qui.</i>
|
contents = <i>{Localization.emptyMenu}.</i>
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
contents = repositories.map(repo => (
|
contents = repositories.map(repo => (
|
||||||
|
@ -50,7 +51,7 @@ export default function BoxRepositoriesArchived({
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFullScrollable header={"Repository archiviati"} {...props}>
|
<BoxFullScrollable header={Localization.menuArchived} {...props}>
|
||||||
{contents}
|
{contents}
|
||||||
</BoxFullScrollable>
|
</BoxFullScrollable>
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,6 +10,7 @@ import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
||||||
import FormAlert from "../base/formparts/FormAlert"
|
import FormAlert from "../base/formparts/FormAlert"
|
||||||
import goToOnSuccess from "../../utils/goToOnSuccess"
|
import goToOnSuccess from "../../utils/goToOnSuccess"
|
||||||
import { useHistory } from "react-router"
|
import { useHistory } from "react-router"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,14 +36,14 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
||||||
const history = useHistory()
|
const history = useHistory()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={"Crea repository"} {...props}>
|
<BoxFull header={Localization.createRepo} {...props}>
|
||||||
<FormLabelled
|
<FormLabelled
|
||||||
onSubmit={e => {
|
onSubmit={e => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
save()
|
save()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FormLabel htmlFor={"repo-name"} text={"Nome repository"}>
|
<FormLabel htmlFor={"repo-name"} text={Localization.repoName}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
id={"repo-name"}
|
id={"repo-name"}
|
||||||
icon={faFolder}
|
icon={faFolder}
|
||||||
|
@ -50,14 +51,14 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
||||||
onChange={e => setName(e.target.value)}
|
onChange={e => setName(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormLabel htmlFor={"filter-mode"} text={"Richiedi"}>
|
<FormLabel htmlFor={"filter-mode"} text={Localization.request}>
|
||||||
<label>
|
<label>
|
||||||
<Radio
|
<Radio
|
||||||
name={"filter-mode"}
|
name={"filter-mode"}
|
||||||
onChange={() => setEvaluationMode(0)}
|
onChange={() => setEvaluationMode(0)}
|
||||||
checked={evaluationMode === 0}
|
checked={evaluationMode === 0}
|
||||||
/>
|
/>
|
||||||
Almeno una cond.
|
{Localization.filterOR}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
@ -66,7 +67,7 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
||||||
onChange={() => setEvaluationMode(1)}
|
onChange={() => setEvaluationMode(1)}
|
||||||
checked={evaluationMode === 1}
|
checked={evaluationMode === 1}
|
||||||
/>
|
/>
|
||||||
Tutte le cond.
|
{Localization.filterAND}
|
||||||
</label>
|
</label>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
{error ?
|
{error ?
|
||||||
|
@ -83,7 +84,7 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
||||||
onClick={() => revert()}
|
onClick={() => revert()}
|
||||||
disabled={running}
|
disabled={running}
|
||||||
>
|
>
|
||||||
Annulla modifiche
|
{Localization.rollback}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
style={{ "gridColumn": "2" }}
|
style={{ "gridColumn": "2" }}
|
||||||
|
@ -92,7 +93,7 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
||||||
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
|
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
|
||||||
disabled={running}
|
disabled={running}
|
||||||
>
|
>
|
||||||
Salva modifiche
|
{Localization.save}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
:
|
:
|
||||||
|
@ -103,7 +104,7 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
||||||
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
|
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
|
||||||
disabled={running}
|
disabled={running}
|
||||||
>
|
>
|
||||||
Crea repository
|
{Localization.createRepo}
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import FormLabel from "../base/formparts/FormLabel"
|
||||||
import InputWithIcon from "../base/InputWithIcon"
|
import InputWithIcon from "../base/InputWithIcon"
|
||||||
import { faGlobe } from "@fortawesome/free-solid-svg-icons"
|
import { faGlobe } from "@fortawesome/free-solid-svg-icons"
|
||||||
import ContextServer from "../../contexts/ContextServer"
|
import ContextServer from "../../contexts/ContextServer"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,9 +19,9 @@ export default function BoxSetServer({ ...props }) {
|
||||||
const { server, setServer } = useContext(ContextServer)
|
const { server, setServer } = useContext(ContextServer)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={"Scegli un server"} {...props}>
|
<BoxFull header={Localization.server} {...props}>
|
||||||
<FormLabelled>
|
<FormLabelled>
|
||||||
<FormLabel text={"Base URL"} htmlFor={"set-server-base-url"}>
|
<FormLabel text={Localization.baseURL} htmlFor={"set-server-base-url"}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
id={"set-server-base-url"}
|
id={"set-server-base-url"}
|
||||||
type={"url"}
|
type={"url"}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { faEnvelope, faKey, faPlus, faUser } from "@fortawesome/free-solid-svg-i
|
||||||
import FormButton from "../base/formparts/FormButton"
|
import FormButton from "../base/formparts/FormButton"
|
||||||
import BoxFull from "../base/BoxFull"
|
import BoxFull from "../base/BoxFull"
|
||||||
import FormAlert from "../base/formparts/FormAlert"
|
import FormAlert from "../base/formparts/FormAlert"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
export default function BoxUserCreate({ createUser, running, ...props }) {
|
export default function BoxUserCreate({ createUser, running, ...props }) {
|
||||||
|
@ -27,9 +28,9 @@ export default function BoxUserCreate({ createUser, running, ...props }) {
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFull header={"Crea utente"} {...props}>
|
<BoxFull header={Localization.userCreate} {...props}>
|
||||||
<FormLabelled>
|
<FormLabelled>
|
||||||
<FormLabel text={"Username"}>
|
<FormLabel text={Localization.userName}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
icon={faUser}
|
icon={faUser}
|
||||||
type={"text"}
|
type={"text"}
|
||||||
|
@ -37,7 +38,7 @@ export default function BoxUserCreate({ createUser, running, ...props }) {
|
||||||
onChange={event => setUsername(event.target.value)}
|
onChange={event => setUsername(event.target.value)}
|
||||||
/>
|
/>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormLabel text={"Email"}>
|
<FormLabel text={Localization.email}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
icon={faEnvelope}
|
icon={faEnvelope}
|
||||||
type={"text"}
|
type={"text"}
|
||||||
|
@ -45,7 +46,7 @@ export default function BoxUserCreate({ createUser, running, ...props }) {
|
||||||
onChange={event => setEmail(event.target.value)}
|
onChange={event => setEmail(event.target.value)}
|
||||||
/>
|
/>
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<FormLabel text={"Password"}>
|
<FormLabel text={Localization.passwd}>
|
||||||
<InputWithIcon
|
<InputWithIcon
|
||||||
icon={faKey}
|
icon={faKey}
|
||||||
type={"password"}
|
type={"password"}
|
||||||
|
@ -64,7 +65,7 @@ export default function BoxUserCreate({ createUser, running, ...props }) {
|
||||||
onClick={onButtonClick}
|
onClick={onButtonClick}
|
||||||
disabled={running}
|
disabled={running}
|
||||||
>
|
>
|
||||||
Create
|
{Localization.create}
|
||||||
</FormButton>
|
</FormButton>
|
||||||
</FormLabelled>
|
</FormLabelled>
|
||||||
</BoxFull>
|
</BoxFull>
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from "react"
|
||||||
import Loading from "../base/Loading"
|
import Loading from "../base/Loading"
|
||||||
import BoxFullScrollable from "../base/BoxFullScrollable"
|
import BoxFullScrollable from "../base/BoxFullScrollable"
|
||||||
import SummaryUser from "./SummaryUser"
|
import SummaryUser from "./SummaryUser"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
export default function BoxUserList({ users, destroyUser, running, ...props }) {
|
export default function BoxUserList({ users, destroyUser, running, ...props }) {
|
||||||
|
@ -15,7 +16,7 @@ export default function BoxUserList({ users, destroyUser, running, ...props }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoxFullScrollable header={"Elenco utenti"} {...props}>
|
<BoxFullScrollable header={Localization.userList} {...props}>
|
||||||
{contents}
|
{contents}
|
||||||
</BoxFullScrollable>
|
</BoxFullScrollable>
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import BoxFull from "../base/BoxFull"
|
import BoxFull from "../base/BoxFull"
|
||||||
import ReactWordcloud from "@steffo/nest-react-wordcloud"
|
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 }) {
|
export default function BoxWordcloud({ words, props }) {
|
||||||
return (
|
return (
|
||||||
<BoxFull header={"Wordcloud"} {...props}>
|
<BoxFull header={Localization.wordcloud} {...props}>
|
||||||
<div style={{"width": "100%", "height": "100%"}}>
|
<div style={{"width": "100%", "height": "100%"}}>
|
||||||
<ReactWordcloud
|
<ReactWordcloud
|
||||||
options={{
|
options={{
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React, { useState } from "react"
|
||||||
import Style from "./ButtonToggleBeforeAfter.module.css"
|
import Style from "./ButtonToggleBeforeAfter.module.css"
|
||||||
import classNames from "classnames"
|
import classNames from "classnames"
|
||||||
import Button from "../base/Button"
|
import Button from "../base/Button"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
export default function ButtonToggleBeforeAfter({ onUpdate, className, ...props }) {
|
export default function ButtonToggleBeforeAfter({ onUpdate, className, ...props }) {
|
||||||
|
@ -19,7 +20,7 @@ export default function ButtonToggleBeforeAfter({ onUpdate, className, ...props
|
||||||
onClick={onButtonClick}
|
onClick={onButtonClick}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{value ? "Dopo" : "Prima"}
|
{value ? Localization.timeBefore : Localization.timeAfter}
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React, { useContext } from "react"
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||||
import { faUser } from "@fortawesome/free-solid-svg-icons"
|
import { faUser } from "@fortawesome/free-solid-svg-icons"
|
||||||
import ContextUser from "../../contexts/ContextUser"
|
import ContextUser from "../../contexts/ContextUser"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +18,7 @@ export default function LoggedInUser({ ...props }) {
|
||||||
if(!user) {
|
if(!user) {
|
||||||
return (
|
return (
|
||||||
<i {...props}>
|
<i {...props}>
|
||||||
Non acceduto
|
{Localization.notLoggedIn}
|
||||||
</i>
|
</i>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React, { useContext } from "react"
|
import React, { useContext } from "react"
|
||||||
import Select from "../base/Select"
|
import Select from "../base/Select"
|
||||||
import ContextTheme from "../../contexts/ContextTheme"
|
import ContextTheme from "../../contexts/ContextTheme"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,8 +17,8 @@ export default function SelectTheme({ ...props }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Select value={theme} onChange={e => setTheme(e.target.value)} {...props}>
|
<Select value={theme} onChange={e => setTheme(e.target.value)} {...props}>
|
||||||
<option value={"ThemeDark"}>Scuro</option>
|
<option value={"ThemeDark"}>{Localization.darkMode}</option>
|
||||||
<option value={"ThemeLight"}>Chiaro</option>
|
<option value={"ThemeLight"}>{Localization.lightMode}</option>
|
||||||
</Select>
|
</Select>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {
|
||||||
faUserCog,
|
faUserCog,
|
||||||
} from "@fortawesome/free-solid-svg-icons"
|
} from "@fortawesome/free-solid-svg-icons"
|
||||||
import ContextUser from "../../contexts/ContextUser"
|
import ContextUser from "../../contexts/ContextUser"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,20 +33,20 @@ export default function Sidebar({ className, ...props }) {
|
||||||
{
|
{
|
||||||
user ?
|
user ?
|
||||||
<>
|
<>
|
||||||
<ButtonSidebar to={"/dashboard"} icon={faHome}>Dashboard</ButtonSidebar>
|
<ButtonSidebar to={"/dashboard"} icon={faHome}>{Localization.dashboard}</ButtonSidebar>
|
||||||
<ButtonSidebar to={"/repositories"} icon={faFolder}>Repositories</ButtonSidebar>
|
<ButtonSidebar to={"/repositories"} icon={faFolder}>{Localization.repositories}</ButtonSidebar>
|
||||||
<ButtonSidebar to={"/alerts"} icon={faExclamationTriangle}>Allarmi</ButtonSidebar>
|
<ButtonSidebar to={"/alerts"} icon={faExclamationTriangle}>{Localization.alerts}</ButtonSidebar>
|
||||||
<ButtonSidebar to={"/settings"} icon={faCog}>Impostazioni</ButtonSidebar>
|
<ButtonSidebar to={"/settings"} icon={faCog}>{Localization.settings}</ButtonSidebar>
|
||||||
</>
|
</>
|
||||||
:
|
:
|
||||||
<>
|
<>
|
||||||
<ButtonSidebar to={"/login"} icon={faKey}>Accedi</ButtonSidebar>
|
<ButtonSidebar to={"/login"} icon={faKey}>{Localization.login}</ButtonSidebar>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
user && user.isAdmin ?
|
user && user.isAdmin ?
|
||||||
<>
|
<>
|
||||||
<ButtonSidebar to={"/users"} icon={faUserCog}>Utenti</ButtonSidebar>
|
<ButtonSidebar to={"/users"} icon={faUserCog}>{Localization.users}</ButtonSidebar>
|
||||||
</>
|
</>
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
|
|
|
@ -3,6 +3,7 @@ import Button from "../base/Button"
|
||||||
import { faArchive, faFolder, faFolderOpen, faPencilAlt, faTrash } from "@fortawesome/free-solid-svg-icons"
|
import { faArchive, faFolder, faFolderOpen, faPencilAlt, faTrash } from "@fortawesome/free-solid-svg-icons"
|
||||||
import { useHistory } from "react-router"
|
import { useHistory } from "react-router"
|
||||||
import Summary from "../base/Summary"
|
import Summary from "../base/Summary"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,7 +43,7 @@ export default function SummaryRepository(
|
||||||
onClick={deleteSelf}
|
onClick={deleteSelf}
|
||||||
disabled={running}
|
disabled={running}
|
||||||
>
|
>
|
||||||
Elimina
|
{Localization.delete}
|
||||||
</Button>
|
</Button>
|
||||||
: null}
|
: null}
|
||||||
{canEdit ?
|
{canEdit ?
|
||||||
|
@ -52,7 +53,7 @@ export default function SummaryRepository(
|
||||||
onClick={onEditClick}
|
onClick={onEditClick}
|
||||||
disabled={running}
|
disabled={running}
|
||||||
>
|
>
|
||||||
Modifica
|
{Localization.Edit}
|
||||||
</Button>
|
</Button>
|
||||||
: null}
|
: null}
|
||||||
{canArchive ?
|
{canArchive ?
|
||||||
|
@ -62,7 +63,7 @@ export default function SummaryRepository(
|
||||||
onClick={archiveSelf}
|
onClick={archiveSelf}
|
||||||
disabled={running}
|
disabled={running}
|
||||||
>
|
>
|
||||||
{"Archivia"}
|
{Localization.achive}
|
||||||
</Button>
|
</Button>
|
||||||
: null}
|
: null}
|
||||||
</>
|
</>
|
||||||
|
@ -73,9 +74,9 @@ export default function SummaryRepository(
|
||||||
title={repo.name}
|
title={repo.name}
|
||||||
subtitle={repo.owner ? repo.owner.username : null}
|
subtitle={repo.owner ? repo.owner.username : null}
|
||||||
onClick={onRepoClick}
|
onClick={onRepoClick}
|
||||||
upperLabel={"Creata"}
|
upperLabel={Localization.created}
|
||||||
upperValue={repo.start ? new Date(repo.start).toLocaleString() : null}
|
upperValue={repo.start ? new Date(repo.start).toLocaleString() : null}
|
||||||
lowerLabel={"Archiviata"}
|
lowerLabel={Localization.archived}
|
||||||
lowerValue={repo.end ? new Date(repo.end).toLocaleString() : null}
|
lowerValue={repo.end ? new Date(repo.end).toLocaleString() : null}
|
||||||
buttons={buttons}
|
buttons={buttons}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import Summary from "../base/Summary"
|
||||||
import { faStar, faTrash, faUser } from "@fortawesome/free-solid-svg-icons"
|
import { faStar, faTrash, faUser } from "@fortawesome/free-solid-svg-icons"
|
||||||
import Button from "../base/Button"
|
import Button from "../base/Button"
|
||||||
import ContextUser from "../../contexts/ContextUser"
|
import ContextUser from "../../contexts/ContextUser"
|
||||||
|
import Localization from "../../Localization"
|
||||||
|
|
||||||
|
|
||||||
export default function SummaryUser({ user, destroyUser, running, ...props }) {
|
export default function SummaryUser({ user, destroyUser, running, ...props }) {
|
||||||
|
@ -20,7 +21,7 @@ export default function SummaryUser({ user, destroyUser, running, ...props }) {
|
||||||
}}
|
}}
|
||||||
disabled={running}
|
disabled={running}
|
||||||
>
|
>
|
||||||
Elimina
|
{Localization.delete}
|
||||||
</Button>
|
</Button>
|
||||||
: null}
|
: null}
|
||||||
</>
|
</>
|
||||||
|
@ -30,8 +31,8 @@ export default function SummaryUser({ user, destroyUser, running, ...props }) {
|
||||||
icon={user.isAdmin ? faStar : faUser}
|
icon={user.isAdmin ? faStar : faUser}
|
||||||
title={user.username}
|
title={user.username}
|
||||||
subtitle={user.email}
|
subtitle={user.email}
|
||||||
upperLabel={"Tipo"}
|
upperLabel={Localization.type}
|
||||||
upperValue={user.isAdmin ? "Amministratore" : "Utente"}
|
upperValue={user.isAdmin ? Localization.admin : Localization.user}
|
||||||
buttons={buttons}
|
buttons={buttons}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue