Skip to content

Redo localization for onboarding - #63987

Open
Jake Bailey (jakebailey) wants to merge 16 commits into
microsoft:mainfrom
jakebailey:localization-update
Open

Jake Bailey (jakebailey) wants to merge 16 commits into
microsoft:mainfrom
jakebailey:localization-update

Conversation

@jakebailey

@jakebailey Jake Bailey (jakebailey) commented Aug 24, 2026

Copy link
Copy Markdown
Member

This reorganizes our localization files to match what the loc team expects, which should allow us to start localization up again.

The gist is that we run a pipeline which sends them the diagnostics, then the same task pulls their current localizations, and the bot opens a PR if that's changed. (A previous version of this PR used their architecture which sends us PRs, but that would prevent us from compressing the diags, which is unfortuante.)

I've also added support so that we can also localize the VS Code extension strings, modeling other Microsoft extensions' repos. Removed that.

Comment thread tools/LocProject.json Outdated
@jakebailey

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The broad localization and diagnostic-catalog migration has unresolved compatibility, packaging, and runtime-delivery risks.

Pull request overview

Reworks compiler and VS Code localization to match the localization team’s expected workflow.

Changes:

  • Replaces compressed locale assets with generated JSON files supporting embedded and noembed builds.
  • Consolidates and renumbers diagnostic messages and updates affected tests.
  • Adds localization configuration and packaging support for the VS Code extension.
File summaries
File Description
tsc/testdata/baselines/reference/tsc/contentMapperFailures/transform-failure-reports-a-per-file-error.js Updates the expected diagnostic code.
tsc/testdata/baselines/reference/tsc/contentMapperFailures/mapper-is-disabled-after-repeated-failures.js Updates content-mapper diagnostic codes.
tsc/testdata/baselines/reference/tsc/contentMapperFailures/initialization-failure-reports-one-project-error.js Updates the initialization diagnostic code.
tsc/testdata/baselines/reference/fourslash/syntaxandSemanticDiagnostics/contentMapperSynthesizedDiagnostics.baseline Updates synthesized diagnostic codes.
tsc/testdata/baselines/reference/compiler/contentMapperSupplementalFileCollision.contentmapper Updates the collision diagnostic code.
tsc/testdata/baselines/reference/compiler/contentMapperInvalidExtension.contentmapper Updates the invalid-extension diagnostic code.
tsc/testdata/baselines/reference/compiler/contentMapperInvalidDiagnosticDirectives.contentmapper Updates directive diagnostic codes.
tsc/testdata/baselines/reference/compiler/contentMapperDeclarationEmitFailure.contentmapper Updates the emit-failure diagnostic code.
tsc/internal/fourslash/tests/contentMapperDiagnostics_test.go Updates the expected LSP diagnostic code.
tsc/internal/execute/tsctests/contentmapper_watch_test.go Updates the watch-test diagnostic assertion.
tsc/internal/diagnostics/localizations.go Adds shared locale loading and fallback behavior.
tsc/internal/diagnostics/localizations_noembed.go Loads external locale files for noembed builds.
tsc/internal/diagnostics/localizations_generated.go Defines generated locale names, matching, and loaders.
tsc/internal/diagnostics/localizations_embed.go Embeds generated locale JSON files.
tsc/internal/diagnostics/loc/README.md Documents ownership of generated locale files.
tsc/internal/diagnostics/loc_generated.go Removes compressed embedded localization code.
tsc/internal/diagnostics/generate.go Reworks diagnostic and localization generation.
tsc/internal/diagnostics/generate_deps.go Removes the obsolete compression dependency shim.
tsc/internal/diagnostics/extraDiagnosticMessages.json Removes the separate extra diagnostic catalog.
tsc/internal/diagnostics/diagnostics.go Uses generated locale loaders directly.
tsc/internal/diagnostics/diagnostics_test.go Adds locale-file and placeholder validation.
tsc/internal/diagnostics/diagnostics_generated.go Regenerates diagnostics with consolidated codes.
tsc/internal/diagnostics/diagnosticMessages.json Consolidates messages into the primary catalog.
tsc/go.sum Removes compression dependency checksums.
tsc/go.mod Removes the compression dependency.
tools/LocProject.json Configures compiler and extension localization handbacks.
packages/vscode-typescript/package.json Includes localized extension resources.
Herebyfile.mjs Copies runtime locale files during builds.
.dprint.jsonc Excludes generated localization artifacts from formatting.
Review details

Files not reviewed (1)

  • tsc/internal/diagnostics/diagnostics_generated.go: Generated file
  • Files reviewed: 27/69 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread tsc/internal/diagnostics/diagnostics_generated.go
Comment thread Herebyfile.mjs Outdated
Comment thread packages/vscode-typescript/package.json Outdated
Comment thread tsc/internal/diagnostics/diagnostics.go Outdated
@jakebailey

Copy link
Copy Markdown
Member Author

Classic copilot producing good feedback

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The formatter exclusions omit generated nightly extension localization handbacks.

Get a fresh assessment by requesting another Copilot review.

Review details

Files not reviewed (1)

  • tsc/internal/diagnostics/diagnostics_generated.go: Generated file
  • Files reviewed: 28/70 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread .dprint.jsonc Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Handback failures and stale generated outputs can still produce incomplete or outdated localization updates.

Get a fresh assessment by requesting another Copilot review.

Review details

Files not reviewed (1)

  • tsc/internal/diagnostics/diagnostics_generated.go: Generated file
  • Files reviewed: 22/50 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread tools/pipelines/localization-update.yml
Comment thread tsc/internal/diagnostics/generate.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The scheduled pipeline lacks the GitHub App variables required to create its update pull request.

Get a fresh assessment by requesting another Copilot review.

Review details

Files not reviewed (1)

  • tsc/internal/diagnostics/diagnostics_generated.go: Generated file
  • Files reviewed: 22/50 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread tools/pipelines/localization-update.yml
@DanielRosenwasser

Copy link
Copy Markdown
Member

I've also added support so that we can also localize the VS Code extension strings, modeling other Microsoft extensions' repos.

CC TylerLeonhardt

@jakebailey
Jake Bailey (jakebailey) marked this pull request as ready for review September 18, 2026 22:15
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Sep 18, 2026

Copy link
Copy Markdown
Member

Just to recap other convos we've had with Isabel Duan (@iisaduan) and Tyler, the plan was that will be ship as a built-in extension for VS Code, so I just want to make sure we're doing the right thing.

@jakebailey

Copy link
Copy Markdown
Member Author

Then we need to discuss this, as the standard thing to do is to submit our localization to the loc team, then we commit those files back, and those get published in the VSIX to the marketplace. If there needs to be some special build that doesn't have those locs and are placed elsewhere, then VS Code needs to perform surgery on out outputs when they bundle us or something.

@jakebailey
Jake Bailey (jakebailey) force-pushed the localization-update branch 2 times, most recently from 154a62e to 548b6a9 Compare September 22, 2026 18:02
@jakebailey

Copy link
Copy Markdown
Member Author

Per Tyler:

what you ship on the marketplace should include it's own localizations. Once we're ready to pull your extension in, then we can talk about getting the localizations in the vscode language packs

So, I think this PR is good to go

@jakebailey

Copy link
Copy Markdown
Member Author

Okay, I removed the vscode stuff, since that's still in the air.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The localization pipeline invokes hereby without first installing its required Node dependencies.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)
Files not reviewed (1)
  • tsc/internal/diagnostics/diagnostics_generated.go: Generated file

Comment thread tools/pipelines/localization-update.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The update pipeline skips artifact generation and would stage its temporary .npmrc.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)
Files not reviewed (1)
  • tsc/internal/diagnostics/diagnostics_generated.go: Generated file
Previously missed (1)

In code that hasn't changed since last review

Medium severity Invoke the diagnostics generator to refresh localization outputs

tools/​pipelines/​localization-update.yml:121

This command is a no-op: -run filters //go:generate directives by their text, but the directive in tsc/internal/diagnostics/diagnostics.go:16 is npx hereby generate:diagnostics, which does not match generate.go. The job therefore applies handbacks without regenerating loc_generated.go or the gzip archives. Invoke the generator task directly.

Comment thread tools/pipelines/localization-update.yml Outdated
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true

git add --all

This branch has not been deployed

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

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants