set navigator.language (according to the test cases)
set local storage locale item (according to the test cases)
expect that result is the expected result
test cases for "normal" locales (e. g. en), locales with country codes (e. g. en-US), locales with writing system and country code (e. g. zh-Hans-CN) and locales with extension (e. g. en-US-u-ca-gregory)
# Current language utility unit test
Add a unit test for the current language utility ( [`src/utils/currentLanguage.js`](src/src/utils/currentLanguage.js)).
## Summary
- set `navigator.language` (according to the test cases)
- set local storage `locale` item (according to the test cases)
- expect that result is the expected result
- test cases for "normal" locales (e. g. `en`), locales with country codes (e. g. `en-US`), locales with writing system and country code (e. g. `zh-Hans-CN`) and locales with extension (e. g. `en-US-u-ca-gregory`)
## Related issues
Closes: #83
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Current language utility unit test
Add a unit test for the current language utility (
src/utils/currentLanguage.js).Summary
navigator.language(according to the test cases)localeitem (according to the test cases)en), locales with country codes (e. g.en-US), locales with writing system and country code (e. g.zh-Hans-CN) and locales with extension (e. g.en-US-u-ca-gregory)Related issues
Closes: #83
c42d650302to7d15d29409Add current language utility unit testto Test: current language utility unit testTest: current language utility unit testto Test(i18n): current language utility unit test