mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 04:54:18 +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.",
|
||||
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ä",
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -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 (
|
||||
<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}>
|
||||
<ButtonToggleBeforeAfter onUpdate={setBa}/>
|
||||
<InputWithIcon
|
||||
|
|
|
@ -8,6 +8,7 @@ import Style from "./BoxConditionHashtag.module.css"
|
|||
import ButtonIconOnly from "../base/ButtonIconOnly"
|
||||
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
||||
import Condition from "../../utils/Condition"
|
||||
import Localization from "../../Localization"
|
||||
|
||||
// Official hashtag regex from https://stackoverflow.com/a/22490853/4334568
|
||||
// noinspection RegExpAnonymousGroup,LongLine
|
||||
|
@ -41,7 +42,7 @@ export default function BoxConditionHashtag({ ...props }) {
|
|||
}
|
||||
|
||||
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}>
|
||||
<InputWithIcon
|
||||
className={Style.Input}
|
||||
|
|
|
@ -7,6 +7,7 @@ import ButtonIconOnly from "../base/ButtonIconOnly"
|
|||
import { MapContainer, TileLayer } from "react-leaflet"
|
||||
import useRepositoryEditor from "../../hooks/useRepositoryEditor"
|
||||
import Condition from "../../utils/Condition"
|
||||
import Localization from "../../Localization"
|
||||
|
||||
|
||||
const STARTING_POSITION = { lat: 41.89309, lng: 12.48289 }
|
||||
|
@ -99,7 +100,7 @@ export default function BoxConditionMap({ ...props }) {
|
|||
return (
|
||||
<BoxFull
|
||||
header={
|
||||
<span>Ricerca per <FontAwesomeIcon icon={faMapPin}/> area</span>
|
||||
<span>{Localization.searchBy}<FontAwesomeIcon icon={faMapPin}/> {Localization.byZone}</span>
|
||||
}
|
||||
childrenClassName={Style.BoxConditionMapContents}
|
||||
{...props}
|
||||
|
|
|
@ -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 (
|
||||
<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}>
|
||||
<InputWithIcon
|
||||
className={Style.Input}
|
||||
|
|
|
@ -2,6 +2,7 @@ import React from "react"
|
|||
import BoxFull from "../base/BoxFull"
|
||||
import ConditionBadge from "./ConditionBadge"
|
||||
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}/>)
|
||||
|
||||
return (
|
||||
<BoxFull header={"Condizioni"} {...props}>
|
||||
<BoxFull header={Localization.conditions} {...props}>
|
||||
{badges}
|
||||
</BoxFull>
|
||||
)
|
||||
|
|
|
@ -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 (
|
||||
<BoxFull header={"Effettuato l'accesso"} {...props}>
|
||||
<BoxFull header={Localization.loggedInTitle} {...props}>
|
||||
<div className={Style.BoxLoggedInContents}>
|
||||
<div>
|
||||
Al momento hai effettuato l'accesso su <CurrentServer/> come <LoggedInUser/>.
|
||||
{Localization.loggedInOn} <CurrentServer/> {Localization.loggedInAs} <LoggedInUser/>.
|
||||
</div>
|
||||
<div>
|
||||
<Button
|
||||
|
@ -32,7 +33,7 @@ export default function BoxLoggedIn({ ...props }) {
|
|||
logout()
|
||||
history.push("/login")
|
||||
}} icon={faSignOutAlt}
|
||||
>Esci</Button>
|
||||
>{Localization.logout}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</BoxFull>
|
||||
|
|
|
@ -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 (
|
||||
<BoxFull header={"Accedi"} {...props}>
|
||||
<BoxFull header={Localization.login} {...props}>
|
||||
<FormLabelled>
|
||||
<FormLabel text={"Email"} htmlFor={"login-email"}>
|
||||
<FormLabel text={Localization.email} htmlFor={"login-email"}>
|
||||
<InputWithIcon
|
||||
id={"login-email"}
|
||||
name={"login-email"}
|
||||
|
@ -56,7 +57,7 @@ export default function BoxLogin({ ...props }) {
|
|||
icon={faEnvelope}
|
||||
/>
|
||||
</FormLabel>
|
||||
<FormLabel text={"Password"} htmlFor={"login-password"}>
|
||||
<FormLabel text={Localization.passwd} htmlFor={"login-password"}>
|
||||
<InputWithIcon
|
||||
id={"login-password"}
|
||||
name={"login-password"}
|
||||
|
@ -77,7 +78,7 @@ export default function BoxLogin({ ...props }) {
|
|||
color={"Green"}
|
||||
disabled={working}
|
||||
>
|
||||
Accedi
|
||||
{Localization.login}
|
||||
</FormButton>
|
||||
</FormLabelled>
|
||||
</BoxFull>
|
||||
|
|
|
@ -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 = <Loading/>
|
||||
}
|
||||
else if(repositories.length === 0) {
|
||||
contents = <i>Non c'è nulla qui.</i>
|
||||
contents = <i>{Localization.emptyMenu}.</i>
|
||||
}
|
||||
else {
|
||||
contents = repositories.map(repo => (
|
||||
|
@ -50,7 +50,7 @@ export default function BoxRepositoriesActive({
|
|||
}
|
||||
|
||||
return (
|
||||
<BoxFullScrollable header={"Repository attivi"} {...props}>
|
||||
<BoxFullScrollable header={Localization.menuActive} {...props}>
|
||||
{contents}
|
||||
</BoxFullScrollable>
|
||||
)
|
||||
|
|
|
@ -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 = <Loading/>
|
||||
}
|
||||
else if(repositories.length === 0) {
|
||||
contents = <i>Non c'è nulla qui.</i>
|
||||
contents = <i>{Localization.emptyMenu}.</i>
|
||||
}
|
||||
else {
|
||||
contents = repositories.map(repo => (
|
||||
|
@ -50,7 +51,7 @@ export default function BoxRepositoriesArchived({
|
|||
}
|
||||
|
||||
return (
|
||||
<BoxFullScrollable header={"Repository archiviati"} {...props}>
|
||||
<BoxFullScrollable header={Localization.menuArchived} {...props}>
|
||||
{contents}
|
||||
</BoxFullScrollable>
|
||||
)
|
||||
|
|
|
@ -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 (
|
||||
<BoxFull header={"Crea repository"} {...props}>
|
||||
<BoxFull header={Localization.createRepo} {...props}>
|
||||
<FormLabelled
|
||||
onSubmit={e => {
|
||||
e.preventDefault()
|
||||
save()
|
||||
}}
|
||||
>
|
||||
<FormLabel htmlFor={"repo-name"} text={"Nome repository"}>
|
||||
<FormLabel htmlFor={"repo-name"} text={Localization.repoName}>
|
||||
<InputWithIcon
|
||||
id={"repo-name"}
|
||||
icon={faFolder}
|
||||
|
@ -50,14 +51,14 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
|||
onChange={e => setName(e.target.value)}
|
||||
/>
|
||||
</FormLabel>
|
||||
<FormLabel htmlFor={"filter-mode"} text={"Richiedi"}>
|
||||
<FormLabel htmlFor={"filter-mode"} text={Localization.request}>
|
||||
<label>
|
||||
<Radio
|
||||
name={"filter-mode"}
|
||||
onChange={() => setEvaluationMode(0)}
|
||||
checked={evaluationMode === 0}
|
||||
/>
|
||||
Almeno una cond.
|
||||
{Localization.filterOR}
|
||||
</label>
|
||||
|
||||
<label>
|
||||
|
@ -66,7 +67,7 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
|||
onChange={() => setEvaluationMode(1)}
|
||||
checked={evaluationMode === 1}
|
||||
/>
|
||||
Tutte le cond.
|
||||
{Localization.filterAND}
|
||||
</label>
|
||||
</FormLabel>
|
||||
{error ?
|
||||
|
@ -83,7 +84,7 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
|||
onClick={() => revert()}
|
||||
disabled={running}
|
||||
>
|
||||
Annulla modifiche
|
||||
{Localization.rollback}
|
||||
</Button>
|
||||
<Button
|
||||
style={{ "gridColumn": "2" }}
|
||||
|
@ -92,7 +93,7 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
|||
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
|
||||
disabled={running}
|
||||
>
|
||||
Salva modifiche
|
||||
{Localization.save}
|
||||
</Button>
|
||||
</>
|
||||
:
|
||||
|
@ -103,7 +104,7 @@ export default function BoxRepositoryCreate({ running, ...props }) {
|
|||
onClick={_ => goToOnSuccess(save, history, "/repositories")()}
|
||||
disabled={running}
|
||||
>
|
||||
Crea repository
|
||||
{Localization.createRepo}
|
||||
</Button>
|
||||
}
|
||||
|
||||
|
|
|
@ -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 (
|
||||
<BoxFull header={"Scegli un server"} {...props}>
|
||||
<BoxFull header={Localization.server} {...props}>
|
||||
<FormLabelled>
|
||||
<FormLabel text={"Base URL"} htmlFor={"set-server-base-url"}>
|
||||
<FormLabel text={Localization.baseURL} htmlFor={"set-server-base-url"}>
|
||||
<InputWithIcon
|
||||
id={"set-server-base-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 BoxFull from "../base/BoxFull"
|
||||
import FormAlert from "../base/formparts/FormAlert"
|
||||
import Localization from "../../Localization"
|
||||
|
||||
|
||||
export default function BoxUserCreate({ createUser, running, ...props }) {
|
||||
|
@ -27,9 +28,9 @@ export default function BoxUserCreate({ createUser, running, ...props }) {
|
|||
)
|
||||
|
||||
return (
|
||||
<BoxFull header={"Crea utente"} {...props}>
|
||||
<BoxFull header={Localization.userCreate} {...props}>
|
||||
<FormLabelled>
|
||||
<FormLabel text={"Username"}>
|
||||
<FormLabel text={Localization.userName}>
|
||||
<InputWithIcon
|
||||
icon={faUser}
|
||||
type={"text"}
|
||||
|
@ -37,7 +38,7 @@ export default function BoxUserCreate({ createUser, running, ...props }) {
|
|||
onChange={event => setUsername(event.target.value)}
|
||||
/>
|
||||
</FormLabel>
|
||||
<FormLabel text={"Email"}>
|
||||
<FormLabel text={Localization.email}>
|
||||
<InputWithIcon
|
||||
icon={faEnvelope}
|
||||
type={"text"}
|
||||
|
@ -45,7 +46,7 @@ export default function BoxUserCreate({ createUser, running, ...props }) {
|
|||
onChange={event => setEmail(event.target.value)}
|
||||
/>
|
||||
</FormLabel>
|
||||
<FormLabel text={"Password"}>
|
||||
<FormLabel text={Localization.passwd}>
|
||||
<InputWithIcon
|
||||
icon={faKey}
|
||||
type={"password"}
|
||||
|
@ -64,7 +65,7 @@ export default function BoxUserCreate({ createUser, running, ...props }) {
|
|||
onClick={onButtonClick}
|
||||
disabled={running}
|
||||
>
|
||||
Create
|
||||
{Localization.create}
|
||||
</FormButton>
|
||||
</FormLabelled>
|
||||
</BoxFull>
|
||||
|
|
|
@ -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 (
|
||||
<BoxFullScrollable header={"Elenco utenti"} {...props}>
|
||||
<BoxFullScrollable header={Localization.userList} {...props}>
|
||||
{contents}
|
||||
</BoxFullScrollable>
|
||||
)
|
||||
|
|
|
@ -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 (
|
||||
<BoxFull header={"Wordcloud"} {...props}>
|
||||
<BoxFull header={Localization.wordcloud} {...props}>
|
||||
<div style={{"width": "100%", "height": "100%"}}>
|
||||
<ReactWordcloud
|
||||
options={{
|
||||
|
|
|
@ -2,6 +2,7 @@ import React, { useState } from "react"
|
|||
import Style from "./ButtonToggleBeforeAfter.module.css"
|
||||
import classNames from "classnames"
|
||||
import Button from "../base/Button"
|
||||
import Localization from "../../Localization"
|
||||
|
||||
|
||||
export default function ButtonToggleBeforeAfter({ onUpdate, className, ...props }) {
|
||||
|
@ -19,7 +20,7 @@ export default function ButtonToggleBeforeAfter({ onUpdate, className, ...props
|
|||
onClick={onButtonClick}
|
||||
{...props}
|
||||
>
|
||||
{value ? "Dopo" : "Prima"}
|
||||
{value ? Localization.timeBefore : Localization.timeAfter}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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 (
|
||||
<i {...props}>
|
||||
Non acceduto
|
||||
{Localization.notLoggedIn}
|
||||
</i>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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 (
|
||||
<Select value={theme} onChange={e => setTheme(e.target.value)} {...props}>
|
||||
<option value={"ThemeDark"}>Scuro</option>
|
||||
<option value={"ThemeLight"}>Chiaro</option>
|
||||
<option value={"ThemeDark"}>{Localization.darkMode}</option>
|
||||
<option value={"ThemeLight"}>{Localization.lightMode}</option>
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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 ?
|
||||
<>
|
||||
<ButtonSidebar to={"/dashboard"} icon={faHome}>Dashboard</ButtonSidebar>
|
||||
<ButtonSidebar to={"/repositories"} icon={faFolder}>Repositories</ButtonSidebar>
|
||||
<ButtonSidebar to={"/alerts"} icon={faExclamationTriangle}>Allarmi</ButtonSidebar>
|
||||
<ButtonSidebar to={"/settings"} icon={faCog}>Impostazioni</ButtonSidebar>
|
||||
<ButtonSidebar to={"/dashboard"} icon={faHome}>{Localization.dashboard}</ButtonSidebar>
|
||||
<ButtonSidebar to={"/repositories"} icon={faFolder}>{Localization.repositories}</ButtonSidebar>
|
||||
<ButtonSidebar to={"/alerts"} icon={faExclamationTriangle}>{Localization.alerts}</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 ?
|
||||
<>
|
||||
<ButtonSidebar to={"/users"} icon={faUserCog}>Utenti</ButtonSidebar>
|
||||
<ButtonSidebar to={"/users"} icon={faUserCog}>{Localization.users}</ButtonSidebar>
|
||||
</>
|
||||
:
|
||||
null
|
||||
|
|
|
@ -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}
|
||||
</Button>
|
||||
: null}
|
||||
{canEdit ?
|
||||
|
@ -52,7 +53,7 @@ export default function SummaryRepository(
|
|||
onClick={onEditClick}
|
||||
disabled={running}
|
||||
>
|
||||
Modifica
|
||||
{Localization.Edit}
|
||||
</Button>
|
||||
: null}
|
||||
{canArchive ?
|
||||
|
@ -62,7 +63,7 @@ export default function SummaryRepository(
|
|||
onClick={archiveSelf}
|
||||
disabled={running}
|
||||
>
|
||||
{"Archivia"}
|
||||
{Localization.achive}
|
||||
</Button>
|
||||
: 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}
|
||||
|
|
|
@ -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}
|
||||
</Button>
|
||||
: 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}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue