diff --git a/.idea/runConfigurations/Backend.xml b/.idea/runConfigurations/Backend.xml
index c3cdc20..805354d 100644
--- a/.idea/runConfigurations/Backend.xml
+++ b/.idea/runConfigurations/Backend.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/nest_frontend/LocalizationStrings.js b/nest_frontend/LocalizationStrings.js
index 481f91f..8b6b05c 100644
--- a/nest_frontend/LocalizationStrings.js
+++ b/nest_frontend/LocalizationStrings.js
@@ -80,6 +80,25 @@ export default {
type: "Tipo",
admin: "Amministratore",
user: "Utente",
+
+ repoDeleted: "Questa repository è stata eliminata.",
+ hourlyGraph: "Grafico orario",
+ visualMap: "Mappa",
+ tweets: "Tweet",
+ stats: "Statistiche",
+ totTweets: "Tweet totali",
+ dispTweets: "Tweet mostrati",
+ dispTweetsPerc: "% di tweet mostrati",
+ locTweets: "Tweet con posizione",
+ locTweetsPerc: "% di tweet con posizione",
+ contTweets: "Tweet con contenuto",
+ contTweetsPerc: "% di tweet con contenuto",
+ wordCount: "Totale parole",
+ wordPop: "Parola più utilizzata",
+ imgTweets: "Tweet con immagine",
+ imgTweetsPerc: "% di tweet con immagine",
+ postUniq: "Totale utenti che hanno postato",
+ postPop: "Utente più attivo",
},
// 🇬🇧
en: {
@@ -151,6 +170,25 @@ export default {
type: "Type",
admin: "Admin",
user: "User",
+
+ repoDeleted: "This repository was deleted.",
+ hourlyGraph: "Hourly graph",
+ visualMap: "Map",
+ tweets: "Tweets",
+ stats: "Stats",
+ totTweets: "Total tweets",
+ dispTweets: "Displayed tweets",
+ dispTweetsPerc: "% of displayed tweets",
+ locTweets: "Tweets with location",
+ locTweetsPerc: "% of tweets with location",
+ contTweets: "Tweets with content",
+ contTweetsPerc: "% of tweets with content",
+ wordCount: "Word count",
+ wordPop: "Most popular word",
+ imgTweets: "Tweets with image",
+ imgTweetsPerc: "% of tweets with image",
+ postUniq: "Unique posters",
+ postPop: "Most active poster",
},
// 🇫🇮
fi: {
@@ -222,5 +260,24 @@ export default {
type: "Tyyppi",
admin: "Ylläpitäjä",
user: "Käyttäjä",
+
+ repoDeleted: "Tämä arkisto on poistettu.",
+ tweets: "Twiitit",
+ hourlyGraph: "Tuntikohtainen kaavio",
+ visualMap: "Kartta",
+ stats: "Tilastot",
+ totTweets: "Twiitit yhteensä",
+ dispTweets: "Näytetyt twiitit",
+ dispTweetsPerc: "% näytetyistä twiiteistä",
+ locTweets: "Twiitit, joissa on sijainti",
+ locTweetsPerc: "% twiiteistä, joissa on sijainti",
+ contTweets: "Sisältöä sisältävät twiitit",
+ contTweetsPerc: "% sisältöä sisältävistä twiiteistä",
+ wordCount: "Sanojen määrä",
+ wordPop: "Suosituin sana",
+ imgTweets: "Twiitit, joissa on kuva",
+ imgTweetsPerc: "% twiiteistä, joissa on kuva",
+ postUniq: "Ainutkertaiset käyttäjät",
+ postPop: "Aktiivisimmat käyttäjät",
},
}
diff --git a/nest_frontend/components/interactive/BoxRepositoryTweets.js b/nest_frontend/components/interactive/BoxRepositoryTweets.js
index 166f65a..ec3ac9a 100644
--- a/nest_frontend/components/interactive/BoxRepositoryTweets.js
+++ b/nest_frontend/components/interactive/BoxRepositoryTweets.js
@@ -1,11 +1,12 @@
-import React from "react"
+import React, { useContext } from "react"
import BoxFullScrollable from "../base/BoxFullScrollable"
import SummaryTweet from "./SummaryTweet"
+import ContextLanguage from "../../contexts/ContextLanguage"
import Empty from "./Empty"
export default function BoxRepositoryTweets({ tweets, ...props }) {
- // TODO: Translate this
+ const { strings } = useContext(ContextLanguage)
let content
if(tweets.length === 0) {
@@ -16,7 +17,7 @@ export default function BoxRepositoryTweets({ tweets, ...props }) {
}
return (
-
+
{content}
)
diff --git a/nest_frontend/components/interactive/BoxVisualizationChart.js b/nest_frontend/components/interactive/BoxVisualizationChart.js
index 147dadd..1e71f95 100644
--- a/nest_frontend/components/interactive/BoxVisualizationChart.js
+++ b/nest_frontend/components/interactive/BoxVisualizationChart.js
@@ -1,11 +1,12 @@
-import React from "react"
+import React, { useContext } from "react"
import BoxFull from "../base/BoxFull"
import BoxChart from "../base/BoxChart"
import Empty from "./Empty"
+import ContextLanguage from "../../contexts/ContextLanguage"
export default function BoxVisualizationChart({ tweets, ...props }) {
- // TODO: translate this
+ const { strings } = useContext(ContextLanguage)
const hours = [...Array(24).keys()].map(hour => hour.toString())
const hourlyTweetCount = Array(24).fill(0)
@@ -25,7 +26,7 @@ export default function BoxVisualizationChart({ tweets, ...props }) {
return (
[0-9.]+),(?[0-9.]+)[}]/
export default function BoxVisualizationMap({ tweets, ...props }) {
- // TODO: translate this
const { strings } = useContext(ContextLanguage)
console.debug(tweets)
@@ -33,7 +32,7 @@ export default function BoxVisualizationMap({ tweets, ...props }) {
})
return (
-
+
{markers}
)
diff --git a/nest_frontend/components/interactive/BoxVisualizationStats.js b/nest_frontend/components/interactive/BoxVisualizationStats.js
index b51fc77..e76f378 100644
--- a/nest_frontend/components/interactive/BoxVisualizationStats.js
+++ b/nest_frontend/components/interactive/BoxVisualizationStats.js
@@ -1,10 +1,12 @@
-import React, { useMemo } from "react"
+import React, { useContext, useMemo } from "react"
import FormLabelled from "../base/FormLabelled"
import FormLabel from "../base/formparts/FormLabel"
+import ContextLanguage from "../../contexts/ContextLanguage"
import BoxFullScrollable from "../base/BoxFullScrollable"
export default function BoxVisualizationStats({ tweets, words, totalTweetCount, ...props }) {
+ const { strings } = useContext(ContextLanguage)
const tweetCount = useMemo(
() => tweets.length,
[tweets],
@@ -104,47 +106,46 @@ export default function BoxVisualizationStats({ tweets, words, totalTweetCount,
// TODO: missing stats
- // TODO: translate this
return (
-
+
-
+
{totalTweetCount}
-
+
{tweetCount}
-
+
{tweetPct.toFixed(2)}%
-
+
{tweetLocationCount}
-
+
{tweetLocationPct.toFixed(2)}%
-
+
{tweetContentCount}
-
+
{tweetContentPct.toFixed(2)}%
-
+
{wordCount}
-
+
{mostPopularWord}
-
+
🚧
-
+
🚧
-
+
{uniqueUsersCount}
-
+
{mostActiveUser ? `${mostActiveUser.user} (${mostActiveUser.count} tweet${mostActiveUser.count === 1 ? "" : "s"})` : "❌"}
diff --git a/nest_frontend/routes/PageRepository.js b/nest_frontend/routes/PageRepository.js
index 43c501d..d39e9d5 100644
--- a/nest_frontend/routes/PageRepository.js
+++ b/nest_frontend/routes/PageRepository.js
@@ -68,10 +68,9 @@ export default function PageRepository({ className, ...props }) {
>
}
else if(repository === null) {
- // TODO: Translate this!
contents = <>
- This repository was deleted.
+ {strings.repoDeleted}
>
}