Skip to content

Conversation

Aerilym
Copy link
Collaborator

@Aerilym Aerilym commented Jul 24, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 05:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements internationalization (i18n) support for the core pages of the Session website using next-intl, enabling multi-language support across the site. The change introduces a comprehensive localization system with support for 16 languages including English, German, French, Spanish, and more.

  • Adds next-intl integration with locale-specific routing and content
  • Replaces hardcoded strings with translation keys across components and pages
  • Implements language selection dialog with proper ARIA accessibility

Reviewed Changes

Copilot reviewed 54 out of 58 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pages/*.tsx Updates all core pages to support localization with getStaticProps and locale keys
pages/api/sitemap.ts Enhanced sitemap generation with multilingual URL structure and hreflang support
pages/_app.tsx Integrates NextIntlClientProvider for i18n context
pages/_document.tsx Adds RTL language direction detection
locales/*.json Translation files for 16 supported languages
components/ui/Layout.tsx Updates Layout component to accept localeKey prop
components/sections/*.tsx Replaces hardcoded text with translation hooks
components/navigation/*.tsx Implements localized navigation with language picker
constants/* Updates navigation and metadata constants for i18n compatibility
package.json Adds next-intl and related dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<div className={classNames(noteContainerClasses, 'pb-12', 'lg:pb-0')}>
<p className={classNames(notesClasses)}>
Verify Signatures:
{t('verifySignatures', { platforms: '' })}
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platforms parameter is passed as an empty string but the translation keys suggest this should contain platform-specific information. This will result in incomplete text like 'Verify Signatures: ' instead of 'Verify Signatures: Android, iOS'.

Suggested change
{t('verifySignatures', { platforms: '' })}
{t('verifySignatures', { platforms: 'Android, iOS' })}

Copilot uses AI. Check for mistakes.

</p>
<p className={classNames(notesClasses)}>
Release Notes:
{t('releaseNotes', { platforms: '' })}
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platforms parameter is passed as an empty string but the translation keys suggest this should contain platform-specific information. This will result in incomplete text like 'Verify Signatures: ' instead of 'Verify Signatures: Android, iOS'.

Suggested change
{t('releaseNotes', { platforms: '' })}
{t('releaseNotes', { platforms: 'Android, iOS' })}

Copilot uses AI. Check for mistakes.

<div className={classNames(noteContainerClasses, 'md:pb-16', 'lg:pb-0')}>
<p className={classNames(notesClasses)}>
Verify Signatures:
{t('verifySignatures', { platforms: '' })}
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platforms parameter is passed as an empty string but the translation keys suggest this should contain platform-specific information. This will result in incomplete text like 'Verify Signatures: ' instead of 'Verify Signatures: Android, iOS'.

Suggested change
{t('verifySignatures', { platforms: '' })}
{t('verifySignatures', { platforms: 'Desktop' })}

Copilot uses AI. Check for mistakes.

</p>
<p className={classNames(notesClasses)}>
Release Notes:
{t('releaseNotes', { platforms: '' })}
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platforms parameter is passed as an empty string but the translation keys suggest this should contain platform-specific information. This will result in incomplete text like 'Verify Signatures: ' instead of 'Verify Signatures: Android, iOS'.

Suggested change
{t('releaseNotes', { platforms: '' })}
{t('releaseNotes', { platforms: _tGeneral('desktop') })}

Copilot uses AI. Check for mistakes.

"hero": {
"heading": "Send <glitch>Messages,</glitch> Not Metadata.",
"tag": "Find your freedom with {appName}",
"glitchTextGlitch": "Encrypted"
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The English locale file contains HTML-like tags () but other locale files use a different format with 'format' and separate 'glitchTextPrimary'/'glitchTextGlitch' keys. This inconsistency could cause rendering issues in the English version.

Suggested change
"glitchTextGlitch": "Encrypted"
"format": "Send {glitchTextPrimary} {glitchTextGlitch} Not Metadata.",
"glitchTextPrimary": "Messages,",
"glitchTextGlitch": "Encrypted",
"tag": "Find your freedom with {appName}"

Copilot uses AI. Check for mistakes.

"appSupport": "crwdns38066:0{appName}crwdne38066:0",
"socials": "crwdns38068:0crwdne38068:0",
"aria": {
"socialLink": "crwdns38070:0{appName}crwdnd38070:0{platform}crwdne38070:0",
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Crowdin placeholder format uses 'crwdnd' as a delimiter between parameters, but this appears to be a typo - it should likely be 'crwdne' to match the pattern used elsewhere in the file.

Suggested change
"socialLink": "crwdns38070:0{appName}crwdnd38070:0{platform}crwdne38070:0",
"socialLink": "crwdns38070:0{appName}crwdne38070:0{platform}crwdne38070:0",

Copilot uses AI. Check for mistakes.


const redirects: IRedirection[] = await config.redirects();
const locales: Array<string> = config.i18n.locales;
const defaultLocale: string = config.i18n.defaultLocale;
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top-level await is used outside of an async function context. This will cause a syntax error. These declarations should be moved inside the async handler function.

Suggested change
const defaultLocale: string = config.i18n.defaultLocale;

Copilot uses AI. Check for mistakes.

} catch {
return locale.toUpperCase();
}
}
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The of() method can return undefined for invalid locale codes, but the function signature doesn't account for this. The return should be explicitly typed to handle the undefined case or provide a fallback.

Suggested change
}
function getLanguageDisplayName(locale: string): string {
try {
const displayName = new Intl.DisplayNames([locale], { type: 'language' }).of(locale);
return displayName ?? locale.toUpperCase();
} catch {
return locale.toUpperCase();
}

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant