chore: translate lastFM strings

This commit is contained in:
GivFNZ 2025-03-21 22:40:39 -03:00
parent 13ad6645f0
commit e5870cc115
No known key found for this signature in database
GPG Key ID: 63DD92181B575322
5 changed files with 16 additions and 7 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "givs-website-react", "name": "givs-website-react",
"private": true, "private": true,
"version": "1.1.13", "version": "1.2.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -2,7 +2,7 @@ export default function Footer() {
return ( return (
<footer> <footer>
<p>© 2025 GivFNZ</p> <p>© 2025 GivFNZ</p>
<p>Version: 1.1.13</p> <p>Version: 1.2.1</p>
</footer> </footer>
) )
} }

View File

@ -7,5 +7,8 @@
"welcome": "Hi, I'm Giovani! Welcome to my website!", "welcome": "Hi, I'm Giovani! Welcome to my website!",
"skills": "Skills", "skills": "Skills",
"projects": "Projects", "projects": "Projects",
"send": "Send" "send": "Send",
"myLast": "My Last.FM Status",
"myLastDescription": "Take a look on my last played song:",
"lastLink": "Check this song page on Last.FM"
} }

View File

@ -7,5 +7,8 @@
"welcome": "Olá, eu sou o Giovani! Bem-vindo ao meu site!", "welcome": "Olá, eu sou o Giovani! Bem-vindo ao meu site!",
"skills": "Habilidades", "skills": "Habilidades",
"projects": "Projetos", "projects": "Projetos",
"send": "Enviar" "send": "Enviar",
"myLast": "Meu status do Last.FM",
"myLastDescription": "Dê uma olhada na música que eu estava ouvindo:",
"lastLink": "Clique aqui para ver a música no Last.FM"
} }

View File

@ -2,18 +2,21 @@ import { getRecentTracks } from "../../api/lastfm";
import { MainContainer } from "../../components/MainContent/styles"; import { MainContainer } from "../../components/MainContent/styles";
import { useQuery } from '@tanstack/react-query' import { useQuery } from '@tanstack/react-query'
import { Paragraph } from "../../components/Paragraph/styles"; import { Paragraph } from "../../components/Paragraph/styles";
import { useTranslation } from "react-i18next";
export default function Music() { export default function Music() {
const { t } = useTranslation()
const { data: lastResponse } = useQuery({ const { data: lastResponse } = useQuery({
queryKey: ['song'], queryKey: ['song'],
queryFn: getRecentTracks queryFn: getRecentTracks
}) })
return ( return (
<MainContainer> <MainContainer>
<h1>My Last FM Status</h1> <h1>{t("myLast")}</h1>
<h2>Check my last played song!</h2> <h2>{t("myLastDescription")}</h2>
<Paragraph>{lastResponse?.recenttracks?.track[0].name} - {lastResponse?.recenttracks?.track[0].artist["#text"]}</Paragraph> <Paragraph>{lastResponse?.recenttracks?.track[0].name} - {lastResponse?.recenttracks?.track[0].artist["#text"]}</Paragraph>
<a href={lastResponse?.recenttracks?.track[0].url}>Check this song on LastFM</a> <a href={lastResponse?.recenttracks?.track[0].url}>{t("lastLink")}</a>
</MainContainer> </MainContainer>
) )
} }