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
21 changes: 21 additions & 0 deletions .locadex/LOCADEX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 🌐 Locadex i18n

This repository is configured to use Locadex for automated internationalization.

## Configuration:

- **Working Directory**: `.`
- **Branch Prefix**: `locadex/`
- **Configured Locales**: `en`, `es`
- **Local Translations**: Enabled

## How it works:

- Once this setup PR is merged, Locadex will automatically monitor your repository for changes
- Locadex will analyze your code for translatable content and internationalize your changes based on your configured settings
- You can configure when Locadex should run (PRs or commits) and whether it should create PRs or commit directly through the General Translation Dashboard

---

Generated by [Locadex](https://generaltranslation.com) • [Documentation](https://generaltranslation.com/docs)
Timestamp: 11/4/2025
14 changes: 8 additions & 6 deletions app/global-error.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@

import 'prism-sentry/index.css';

import {useEffect} from 'react';
import { useEffect } from 'react';
import * as Sentry from '@sentry/nextjs';
import Error from 'next/error';
import { GTProvider } from "gt-next";

export default function GlobalError({error}) {

export default function GlobalError({ error }) {
useEffect(() => {
Sentry.captureException(error);
}, [error]);

return (
<html>
<body>
<html>
<body><GTProvider>
<Error />
</body>
</GTProvider></body>
</html>
);
}
}
59 changes: 32 additions & 27 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,52 @@
import './globals.css';

import {Theme} from '@radix-ui/themes';
import type {Metadata} from 'next';
import {Rubik} from 'next/font/google';
import { Theme } from '@radix-ui/themes';
import type { Metadata } from 'next';
import { Rubik } from 'next/font/google';
import Script from 'next/script';
import PlausibleProvider from 'next-plausible';

import {ThemeProvider} from 'sentry-docs/components/theme-provider';
import { ThemeProvider } from 'sentry-docs/components/theme-provider';
import { getLocale, getGT } from "gt-next/server";
import { GTProvider } from "gt-next";

const rubik = Rubik({
weight: ['400', '500', '700'],
style: ['normal', 'italic'],
subsets: ['latin'],
variable: '--font-rubik',
variable: '--font-rubik'
});

export const metadata: Metadata = {
title: 'Home',
icons: {
icon:
process.env.NODE_ENV === 'production' ? '/favicon.ico' : '/favicon_localhost.png',
},
openGraph: {
images: '/og.png',
},
other: {
'zd-site-verification': 'ocu6mswx6pke3c6qvozr2e',
},
};
export async function generateMetadata(): Promise<Metadata> {
const gt = await getGT();
return {
title: gt('Home'),
icons: {
icon:
process.env.NODE_ENV === 'production' ? '/favicon.ico' : '/favicon_localhost.png'
},
openGraph: {
images: '/og.png'
},
other: {
'zd-site-verification': 'ocu6mswx6pke3c6qvozr2e'
}
};
}

export default function RootLayout({children}: {children: React.ReactNode}) {
export default async function RootLayout({ children }: {children: React.ReactNode;}) {
return (
<html lang="en" suppressHydrationWarning>
<html suppressHydrationWarning lang={await getLocale()}>
<head>
<PlausibleProvider taggedEvents domain="docs.sentry.io,rollup.sentry.io" />
</head>
<body className={rubik.variable} suppressHydrationWarning>
<body className={rubik.variable} suppressHydrationWarning><GTProvider>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
disableTransitionOnChange>

<Theme accentColor="iris" grayColor="sand" radius="large" scaling="95%">
{children}
</Theme>
Expand All @@ -58,9 +63,9 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
data-font-family="var(--font-rubik)"
data-modal-disclaimer="Please note: This is a tool that searches publicly available sources. Do not include any sensitive or personal information in your queries. For more on how Sentry handles your data, see our [Privacy Policy](https://sentry.io/privacy/)."
data-modal-example-questions="How to set up Sentry for Next.js?,What are tracePropagationTargets?"
data-user-analytics-cookie-enabled="false"
/>
</body>
data-user-analytics-cookie-enabled="false" />

</GTProvider></body>
</html>
);
}
}
17 changes: 12 additions & 5 deletions app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import {useEffect, useState} from 'react';
import {Button} from '@radix-ui/themes';
import {T} from 'gt-next';

import {Header} from 'sentry-docs/components/header';
import {Search} from 'sentry-docs/components/search';
Expand All @@ -19,11 +20,17 @@ export default function NotFound() {
<div className="tw-app">
<Header pathname="/" searchPlatforms={[]} noSearch />
<main className="px-8 pt-28">
<h1 className="font-medium text-3xl mb-4">Page Not Found</h1>
<p className="text-lg">We couldn't find the page you were looking for :(</p>
<T>
<h1 className="font-medium text-3xl mb-4">Page Not Found</h1>
</T>
<T>
<p className="text-lg">We couldn't find the page you were looking for :(</p>
</T>

<div className="max-w-md pt-8">
<p className="pb-4">Let's give it another shot:</p>
<T>
<p className="pb-4">Let's give it another shot:</p>
</T>
<Search
autoFocus
path={pathname}
Expand All @@ -35,7 +42,7 @@ export default function NotFound() {
<div className="pt-8 flex gap-4">
<Button variant="solid" size="3" asChild>
<a href={reportUrl} target="_blank" rel="noreferrer">
Report 404 on GitHub
<T>Report 404 on GitHub</T>
</a>
</Button>
<Button variant="soft" size="3" asChild>
Expand All @@ -44,7 +51,7 @@ export default function NotFound() {
target="_blank"
rel="noreferrer"
>
Ask a Bot
<T>Ask a Bot</T>
</a>
</Button>
</div>
Expand Down
25 changes: 16 additions & 9 deletions app/platform-redirect/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Metadata} from 'next';
import {redirect} from 'next/navigation';
import {getGT} from 'gt-next/server';

import {Alert} from 'sentry-docs/components/alert';
import {DocPage} from 'sentry-docs/components/docPage';
Expand All @@ -10,17 +11,22 @@ import {setServerContext} from 'sentry-docs/serverContext';

import {sanitizeNext} from './utils';

export const metadata: Metadata = {
robots: 'noindex',
title: 'Platform Specific Content',
description:
'The page you are looking for is customized for each platform. Select your platform below and we’ll direct you to the most specific documentation on it.',
};
export async function generateMetadata(): Promise<Metadata> {
const gt = await getGT();
return {
robots: 'noindex',
title: gt('Platform Specific Content'),
description: gt(
"The page you are looking for is customized for each platform. Select your platform below and we'll direct you to the most specific documentation on it."
),
};
}

export default async function Page(props: {
searchParams: Promise<{[key: string]: string | string[] | undefined}>;
}) {
const searchParams = await props.searchParams;
const gt = await getGT();

let next = searchParams.next || '';
const platform = searchParams.platform;
Expand All @@ -31,10 +37,11 @@ export default async function Page(props: {

const pathname = sanitizeNext(next);
const rootNode = await getDocsRootNode();
const defaultTitle = 'Platform Specific Content';
const defaultTitle = gt('Platform Specific Content');
let description = '';
const platformInfo =
"The page you are looking for is customized for each platform. Select your platform below and we'll direct you to the most specific documentation on it.";
const platformInfo = gt(
"The page you are looking for is customized for each platform. Select your platform below and we'll direct you to the most specific documentation on it."
);
let title = defaultTitle;

// get rid of irrelevant platforms for the `next` path
Expand Down
11 changes: 11 additions & 0 deletions gt-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": 1,
"entries": {
"879f3a5f954ee8b75bf1e91f4ea9916b41c933e5beba7eb6362647a637c9c66d:es": {
"versionId": "8e6985b6cddc4ac55aeb4d0d6356dd80bc3b30561fee28fef32f73c9b6328220",
"fileId": "879f3a5f954ee8b75bf1e91f4ea9916b41c933e5beba7eb6362647a637c9c66d",
"fileName": "__INTERNAL_GT_TEMPLATE_NAME__",
"updatedAt": "2025-11-04T01:42:39.725Z"
}
}
}
15 changes: 15 additions & 0 deletions gt.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://assets.gtx.dev/config-schema.json",
"locales": [
"en",
"es"
],
"defaultLocale": "en",
"files": {
"gt": {
"output": "public/_gt/[locale].json"
}
},
"framework": "next-app",
"_versionId": "8e6985b6cddc4ac55aeb4d0d6356dd80bc3b30561fee28fef32f73c9b6328220"
}
Loading