RocketChat / Rocket.Chat.Electron

Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat
https://rocket.chat/
MIT License
1.6k stars 708 forks source link

fix: Electron i18n language setup #2961

Closed rique223 closed 2 weeks ago

rique223 commented 1 month ago

Added a safety check at the end of the getLng function. This check verifies if translations exist for the language portion of a locale (e.g., 'en' from 'en-US') when the full locale isn't found in the resources object. This prevents errors when translations exist for a base language but not for a specific regional variant.

Demo gif: electron_language

Closes #2960