Skip to content

Conversation

@Aerilym
Copy link
Collaborator

@Aerilym Aerilym commented Dec 4, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 4, 2025 04:59
Copy link

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 minor performance optimizations to the i18n (internationalization) system by introducing caching for the browser locale calculation and reducing unnecessary function exports.

  • Caches the browser locale value to avoid repeated computation of locale matching
  • Makes internal helper function normalizeLocaleName private to better encapsulate implementation details

Reviewed changes

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

File Description
ts/util/i18n/shared.ts Adds caching mechanism for getBrowserLocale() by introducing a module-level browserLocale variable and refactoring the logic into getInitialBrowserLocale()
ts/node/locale.ts Changes normalizeLocaleName from exported to private function, improving encapsulation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Bilb Bilb merged commit 40a06b1 into dev Dec 4, 2025
16 checks passed
@Bilb Bilb deleted the fix/minor_performance_optimisations branch December 4, 2025 05:55
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.

3 participants