Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions messages/en-CA.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"HomePage": {
"title": "Home page (English)",
"description": "we goin mtl w ts ✌️🥀 (in English tho)"
}
"HomePage": {
"title": "Home page (English)",
"description": "we goin mtl w ts ✌️🥀 (in English tho)"
},
"Splash": {
"title": "CUSEC 2027",
"subtitle": "Canada's flagship student software engineering conference",
"date": "January 2027 · Montréal, QC",
"description": "Join students, developers, and industry leaders from across Canada for three days of learning, networking, and innovation.",
"cta": "Get conference updates"
}
}
15 changes: 11 additions & 4 deletions messages/fr-CA.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"HomePage": {
"title": "Home page (French)",
"description": "we goin mtl w ts ✌️🥀 (in French monseur)"
}
"HomePage": {
"title": "Home page (French)",
"description": "we goin mtl w ts ✌️🥀 (in French monseur)"
},
"Splash": {
"title": "CUSEC 2027",
"subtitle": "Le grand rendez-vous étudiant canadien du génie logiciel",
"date": "Janvier 2027 · Montréal (QC)",
"description": "Joignez-vous à des étudiantes, étudiants, développeuses, développeurs et leaders de l'industrie de partout au Canada pour trois jours d'apprentissage, de réseautage et d'innovation.",
"cta": "Recevoir les mises à jour"
}
}
4 changes: 2 additions & 2 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";

const nextConfig: NextConfig = {};
const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts");

const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
export default withNextIntl(nextConfig);
export default withNextIntl(nextConfig);
196 changes: 87 additions & 109 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 27 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { NextIntlClientProvider } from "next-intl";
import { getLocale, getMessages } from "next-intl/server";
import "./globals.css";

const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});

const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});

export const metadata: Metadata = {
title: "CUSEC 2027",
description: "CUSEC 2027: Canadian University Software Engineering Conference",
};

export default function RootLayout({
export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const locale = await getLocale();
const messages = await getMessages();

return (
<html lang="en">
<body>{children}</body>
<html
lang={locale}
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
>
<body className="min-h-full flex flex-col">
<NextIntlClientProvider locale={locale} messages={messages}>
{children}
</NextIntlClientProvider>
</body>
</html>
);
}
}
4 changes: 2 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {redirect} from 'next/navigation';
import {routing} from '@/i18n/routing';
import { redirect } from "next/navigation";
import { routing } from "@/i18n/routing";

export default function RootPage() {
redirect(`/${routing.defaultLocale}`);
Expand Down
22 changes: 22 additions & 0 deletions src/components/splash-content.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"use client";

import { useTranslations } from "next-intl";

export function SplashContent() {
const t = useTranslations("Splash");

return (
<div className="space-y-3">
<h1 className="text-4xl font-bold text-green-600">{t("title")}</h1>
<p className="text-lg font-medium">{t("subtitle")}</p>
<p className="text-neutral-600">{t("date")}</p>
<p className="max-w-2xl">{t("description")}</p>
<button
type="button"
className="rounded-md bg-green-600 px-4 py-2 text-sm font-semibold text-white"
>
{t("cta")}
</button>
</div>
);
}
15 changes: 7 additions & 8 deletions src/i18n/request.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import {getRequestConfig} from 'next-intl/server';
import {hasLocale} from 'next-intl';
import {routing} from './routing';

export default getRequestConfig(async ({requestLocale}) => {
// Typically corresponds to the `[locale]` segment
import { getRequestConfig } from "next-intl/server";
import { hasLocale } from "next-intl";
import { routing } from "./routing";

export default getRequestConfig(async ({ requestLocale }) => {
const requested = await requestLocale;
const locale = hasLocale(routing.locales, requested)
? requested
: routing.defaultLocale;

return {
locale,
messages: (await import(`../../messages/${locale}.json`)).default
messages: (await import(`../../messages/${locale}.json`)).default,
};
});