File tree Expand file tree Collapse file tree 6 files changed +46
-17
lines changed Expand file tree Collapse file tree 6 files changed +46
-17
lines changed Original file line number Diff line number Diff line change 1
1
---
2
+ import { useTranslations } from " ../i18n/utils" ;
3
+
4
+ const tr = useTranslations (Astro .params .lang as never );
2
5
---
3
6
4
7
<footer class =" footer" >
5
8
<div class =" container" >
6
- Made with ♥ by retrozinndev
7
- · <a href =" https://github.com/retrozinndev/retrozinndev.github.io" >Improve this Page </a >
9
+ { tr ( " footer.txt1 " ) } ♥ { tr ( " footer.txt2 " ) }
10
+ · <a href =" https://github.com/retrozinndev/retrozinndev.github.io" >{ tr ( " footer.txt3 " ) } </a >
8
11
</div >
9
12
</footer >
10
13
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ const tr = useTranslations(lang as never);
15
15
<nav class =" navbar" >
16
16
<ul class =" links" >
17
17
<li class =" link" >
18
- <a href ={ ` ${lang }/#top ` } target =" _self" >{ tr (" nav.home" ) } </a >
18
+ <a href ={ ` / ${lang }/#top` } target =" _self" >{ tr (" nav.home" ) } </a >
19
19
</li >
20
20
<li class =" link" >
21
- <a href ={ ` ${lang }/#chars ` } target =" _self" >{ tr (" nav.about" ) } </a >
21
+ <a href ={ ` / ${lang }/#chars` } target =" _self" >{ tr (" nav.about" ) } </a >
22
22
</li >
23
23
<li class =" link" >
24
- <a href ={ ` ${lang }/projects ` } target =" _self" >{ tr (" nav.projects" ) } </a >
24
+ <a href ={ ` / ${lang }/projects` } target =" _self" >{ tr (" nav.projects" ) } </a >
25
25
</li >
26
26
</ul >
27
27
</nav >
Original file line number Diff line number Diff line change @@ -17,8 +17,17 @@ export const en = {
17
17
18
18
not_found : {
19
19
title : "404 - Not found!" ,
20
- description : `Looks like I haven't developed this yet!
21
- Feel free to suggest me anything, talk to me on any of` ,
22
- social_link : "my socials!"
20
+ description : {
21
+ l1 : "Looks like I haven't developed this yet!" ,
22
+ l2 : "Feel free to suggest me anything, talk to me on any of" ,
23
+ socials : "my socials!"
24
+ }
25
+ } ,
26
+
27
+ footer : {
28
+ txt1 : "Made with" ,
29
+ txt2 : "by retrozinndev" ,
30
+ txt3 : "Improve this page"
23
31
}
32
+
24
33
} as const ;
Original file line number Diff line number Diff line change @@ -17,8 +17,16 @@ export const pt = {
17
17
18
18
not_found : {
19
19
title : "404 - Não encontrado!" ,
20
- description : `Parece que eu ainda não desenvolvi essa página!
21
- Feel free to suggest me anything, talk to me on any of` ,
22
- social_link : "minhas redes sociais!"
20
+ description : {
21
+ l1 : "Parece que eu ainda não desenvolvi essa página!" ,
22
+ l2 : "Se quiser sugerir alguma ideia, me chame em qualquer uma das" ,
23
+ socials : "minhas redes sociais!"
24
+ }
25
+ } ,
26
+
27
+ footer : {
28
+ txt1 : "Feito com" ,
29
+ txt2 : "por retrozinndev" ,
30
+ txt3 : "Melhore esta página"
23
31
}
24
32
} as const ;
Original file line number Diff line number Diff line change 1
1
---
2
+ import { getLanguageFromURL , useTranslations } from " ../i18n/utils" ;
2
3
import " ../styles/global.css" ;
3
4
import NavBar from " ../components/NavBar.astro" ;
4
5
5
- Astro .params .lang = " en" ;
6
+ Astro .params .lang = getLanguageFromURL (Astro .url );
7
+
8
+ if (Astro .params .lang === undefined ) {
9
+ Astro .params .lang = " en" ;
10
+ }
11
+
12
+ const tr = useTranslations (Astro .params .lang as never );
6
13
---
7
14
8
15
<!DOCTYPE html >
@@ -17,10 +24,10 @@ Astro.params.lang = "en";
17
24
<body >
18
25
<div class =" center" >
19
26
<div class =" not-found" >
20
- <h1 > 404! </h1 >
27
+ <h1 > { tr ( " not_found.title " ) } </h1 >
21
28
<p >
22
- Looks like I haven't developed this yet! <br >
23
- Feel free to suggest me anything, talk to me on any of <a href =" / #socials" >my socials! </a >
29
+ { tr ( " not_found.description.l1 " ) } <br >
30
+ { tr ( " not_found.description.l2 " ) } <a href ={ ` /${ Astro . params . lang }/ #socials` } > { tr ( " not_found.description. socials" ) } </a >
24
31
</p >
25
32
</div >
26
33
</div >
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export { getStaticPaths };
9
9
const tr = useTranslations (Astro .params .lang as never );
10
10
---
11
11
12
- <PageLayout title ={ " retrozinndev" + " | " + " Home" } icon =" https://github.com/retrozinndev.png" lang =" en-US" >
12
+ <PageLayout title ={ " retrozinndev - Home" } icon =" https://github.com/retrozinndev.png" lang =" en-US" >
13
13
<body >
14
14
<div class =" container" >
15
15
<div class =" about-section title" >
@@ -18,7 +18,9 @@ const tr = useTranslations(Astro.params.lang as never);
18
18
<div class =" about" id =" about" >
19
19
{ tr (" about.description" ) }
20
20
</div >
21
- <a href =" /projects" ><h3 class =" projects" id =" projects" >{ tr (" about.projects" ) } ↗ </h3 ></a >
21
+ <a href ={ ` /${Astro .params .lang }/projects ` } >
22
+ <h3 class =" projects" id =" projects" >{ tr (" about.projects" ) } ↗ </h3 >
23
+ </a >
22
24
<div class =" socials ul" id =" socials" >
23
25
<h2 >{ tr (" about.socials_title" ) } </h2 >
24
26
<SocialLinks />
You can’t perform that action at this time.
0 commit comments