Skip to content

chore(skunk): DNM WIP very basic attempt at translating Compass SKUNK-500#8076

Draft
nbbeeken wants to merge 4 commits into
mainfrom
SKUNK-500-neal
Draft

chore(skunk): DNM WIP very basic attempt at translating Compass SKUNK-500#8076
nbbeeken wants to merge 4 commits into
mainfrom
SKUNK-500-neal

Conversation

@nbbeeken
Copy link
Copy Markdown
Collaborator

@nbbeeken nbbeeken commented May 11, 2026

Description

SKUNK-500

NOTE: This is not production code. Do not review.

image

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

Copy link
Copy Markdown
Contributor

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

Introduces an initial localization (i18n) pipeline for the Compass welcome surfaces and exposes a new language preference through the preferences model and Settings UI.

Changes:

  • Adds an i18next/react-i18next setup for the Compass Welcome workspace tab + welcome modal and wires it to the new language preference.
  • Introduces a language user preference (schema + provider exports) and surfaces it in Settings as an enum.
  • Updates Compass Welcome UI strings to use translation keys (with Trans for embedded links) and adds required runtime dependencies.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/compass-welcome/src/index.ts Wraps welcome surfaces with an i18n provider and syncs language from preferences.
packages/compass-welcome/src/i18n.ts Adds the i18next instance and inlined en/ja resources for the welcome namespace.
packages/compass-welcome/src/components/modal.tsx Switches modal copy to translated strings and uses Trans for the settings link.
packages/compass-welcome/src/components/desktop-welcome-tab.tsx Switches welcome tab copy to translated strings and uses Trans for the Atlas link.
packages/compass-welcome/package.json Adds i18n runtime dependencies needed by the new implementation.
packages/compass-settings/src/components/settings/settings-list.tsx Registers the new language preference as a supported enum setting.
packages/compass-settings/src/components/settings/general.tsx Adds language to the General settings fields list.
packages/compass-preferences-model/src/provider.ts Re-exports LANGUAGE_VALUES for UI consumption.
packages/compass-preferences-model/src/preferences-schema.tsx Defines LANGUAGE_VALUES + language preference schema and UI metadata.
package-lock.json Locks new i18n dependencies and their transitive deps.

Comment thread packages/compass-welcome/src/index.ts Outdated
const language = usePreference('language');
React.useEffect(() => {
void i18n.changeLanguage(language);
}, [language]);
Comment on lines 19 to 22
import { useConnectionActions } from '@mongodb-js/compass-connections/provider';
import { usePreference } from 'compass-preferences-model/provider';
import { Trans, useTranslation } from 'react-i18next';
import { WelcomeTabImage } from './welcome-image';
);

const aiButtonContent = `<span>Generate query</span>
const aiButtonContent = `<span>${buttonText ?? 'Generate query'}</span>
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.

4 participants