lemmy-ui/src/shared/services
matc-pub e832cd2729
Lazy load translations and date-fns, server side support for "Browser Default" language (#2380)
* Lazy load i18n translations.

* Lazy load date-fns

* Fix inconsistent DOMContentLoaded event.

Only when no translations and date-fns have to be dynamically loaded
(e.g. for en-US) the NavBar `componentDidMount` is early enough to
listen for "DOMContentLoaded".

Removes one redundant `requestNotificationPermission()` call.

* Rename interface language code "pt_BR" to "pt-BR".

Browsers ask for "pt-BR", but the "interface_language" saved in the
settings dialog asks for "pt_BR". This change will make the settings
dialog ask for "pt-BR" instead of "pt_BR". For users that already (or
still) have "pt_BR" configured, "pt-BR" will be used, but the settings
dialog will present it as unspecified.

* Use Accept-Language request header

* Prefetch translation and date-fns

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-03-13 16:39:45 -04:00
..
FirstLoadService.ts Refactor first load handling 2023-06-23 15:41:10 -04:00
HttpService.ts Improve TOTP modal (#2327) 2024-01-19 10:06:54 -05:00
I18NextService.ts Lazy load translations and date-fns, server side support for "Browser Default" language (#2380) 2024-03-13 16:39:45 -04:00
index.ts Lazy load translations and date-fns, server side support for "Browser Default" language (#2380) 2024-03-13 16:39:45 -04:00
UnreadCounterService.ts use improved notification system for all notification types (#2190) 2023-10-24 17:58:00 -04:00
UserService.ts Trying another SSR fix. #2243 (#2251) 2023-11-29 09:44:31 -05:00