feat(i18n): wire header strings to translations across locales
This commit is contained in:
1 parent
a40669b130
commit
050fcdf25b
28 files changed
+430
-342
No files matched your search
@@ -24,6 +24,7 @@ import {
|
||||
|
||||
export async function Navigation({ session }: { session: Session | null }) {
|
||||
const t = await getTranslations("nav");
|
||||
const headerT = await getTranslations("header");
|
||||
const brandLabel = await resolveHotelName();
|
||||
let showAdmin = false;
|
||||
let showMod = false;
|
||||
@@ -257,7 +258,7 @@ export async function Navigation({ session }: { session: Session | null }) {
|
||||
<input
|
||||
type="text"
|
||||
name="q"
|
||||
placeholder="Search users..."
|
||||
placeholder={headerT("searchUsers")}
|
||||
className="w-32 rounded-lg border px-2.5 py-1.5 text-xs font-medium transition-all focus:w-40"
|
||||
style={{
|
||||
background: "var(--color-background)",
|
||||
@@ -448,7 +449,7 @@ export async function Navigation({ session }: { session: Session | null }) {
|
||||
<Link
|
||||
href="/"
|
||||
className="ml-auto flex md:hidden items-center gap-2 shrink-0"
|
||||
aria-label="Home"
|
||||
aria-label={t("home")}
|
||||
>
|
||||
<Image
|
||||
src="/assets/images/icons/navigation/home.png"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
export function RoomQuickEntry() {
|
||||
const t = useTranslations("header");
|
||||
return (
|
||||
<form
|
||||
action="/client"
|
||||
@@ -19,8 +22,8 @@ export function RoomQuickEntry() {
|
||||
<input
|
||||
type="number"
|
||||
name="roomId"
|
||||
placeholder="Room ID"
|
||||
aria-label="Room ID"
|
||||
placeholder={t("roomId")}
|
||||
aria-label={t("roomId")}
|
||||
min={1}
|
||||
className="w-20 rounded-lg border px-2 py-1 text-xs font-medium"
|
||||
style={{
|
||||
@@ -39,7 +42,7 @@ export function RoomQuickEntry() {
|
||||
color: "var(--color-primary-readable, var(--color-primary))",
|
||||
}}
|
||||
>
|
||||
Go
|
||||
{t("go")}
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user