@@ -7,28 +7,35 @@ import { LanguagePicker } from "./language-picker";
77import Image from "next/image" ;
88import Link from "next/link" ;
99import { usePathname } from "next/navigation" ;
10+ import { useTranslation } from "next-export-i18n" ;
1011
1112const links = [
12- { link : "/" , label : "About Ruffle" } ,
13- { link : "/downloads" , label : "Downloads" } ,
14- { link : "/compatibility" , label : "Compatibility" } ,
15- { link : "/contribute" , label : "Get Involved" } ,
16- { link : "/blog" , label : "Blog" } ,
17- { link : "/demo" , label : "Demo" , target : "_blank" } ,
18- { link : "https://discord.gg/ruffle" , label : "Discord" , target : "_blank" } ,
13+ { link : "/" , label : "header.about" } ,
14+ { link : "/downloads" , label : "header.downloads" } ,
15+ { link : "/compatibility" , label : "header.compatibility" } ,
16+ { link : "/contribute" , label : "header.contribute" } ,
17+ { link : "/blog" , label : "header.blog" } ,
18+ { link : "/demo" , label : "header.demo" , target : "_blank" } ,
19+ {
20+ link : "https://discord.gg/ruffle" ,
21+ label : "header.discord" ,
22+ target : "_blank" ,
23+ } ,
1924 {
2025 link : "https://github.com/ruffle-rs/ruffle/" ,
21- label : "GitHub " ,
26+ label : "header.github " ,
2227 target : "_blank" ,
2328 } ,
2429] ;
2530
2631export function Header ( ) {
32+ const { t } = useTranslation ( ) ;
2733 const [ opened , { toggle, close } ] = useDisclosure ( false ) ;
2834 const pathname = usePathname ( ) ;
2935
3036 const items = links . map ( ( link ) => (
3137 < Link
38+ suppressHydrationWarning
3239 key = { link . label }
3340 href = { link . link }
3441 target = { link . target }
@@ -38,7 +45,7 @@ export function Header() {
3845 close ( ) ;
3946 } }
4047 >
41- { link . label }
48+ { t ( link . label ) }
4249 </ Link >
4350 ) ) ;
4451
@@ -47,8 +54,9 @@ export function Header() {
4754 < Container size = "lg" className = { classes . inner } >
4855 < Link href = "/" >
4956 < Image
57+ suppressHydrationWarning
5058 src = "/logo.svg"
51- alt = "Ruffle Logo"
59+ alt = { t ( "logo.alt-tag" ) }
5260 height = { 30 }
5361 width = { 91 }
5462 priority
0 commit comments