Skip to content

Use VS Code locale for document count formatting#461

Merged
tnaum-ms merged 4 commits into
feature/copy-and-pastefrom
copilot/sub-pr-170-again
Jan 22, 2026
Merged

Use VS Code locale for document count formatting#461
tnaum-ms merged 4 commits into
feature/copy-and-pastefrom
copilot/sub-pr-170-again

Conversation

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Addresses feedback from #170 to use the user's VS Code locale instead of hardcoding 'en' for number formatting.

Changes

  • Import vscode module to access vscode.env.language
  • Use optional chaining with fallback: vscode.env?.language || 'en-US'
  • Changed hardcoded locale from 'en' to dynamic locale detection
// Before
const formatter = new Intl.NumberFormat('en', {
    notation: 'compact',
    maximumFractionDigits: 1,
});

// After
const locale = vscode.env?.language || 'en-US';
const formatter = new Intl.NumberFormat(locale, {
    notation: 'compact',
    maximumFractionDigits: 1,
});

Optional chaining handles test environments where vscode.env is undefined.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 22, 2026 11:54
…to en-US

Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>
Co-authored-by: tnaum-ms <171359267+tnaum-ms@users.noreply.github.com>

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/vscode-documentdb/vscode-documentdb/node_modules/.bin/vscode-test formatDocumentCount.test.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update Easy Data Migrations for VS Code locale handling Use VS Code locale for document count formatting Jan 22, 2026
Copilot AI requested a review from tnaum-ms January 22, 2026 12:00
@tnaum-ms tnaum-ms marked this pull request as ready for review January 22, 2026 12:41
@tnaum-ms tnaum-ms requested a review from a team as a code owner January 22, 2026 12:41
@tnaum-ms tnaum-ms merged commit dca36d2 into feature/copy-and-paste Jan 22, 2026
5 checks passed
@tnaum-ms tnaum-ms deleted the copilot/sub-pr-170-again branch January 22, 2026 12:41
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.

2 participants