mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00

* Added minify * Added POC for browser * Moved first js files to ts * Fixed caret positioning * Added support for plugins * Fixed get undefined. * Removed require of socketio, l10n, html10n and error reporter * Added minify * Added POC for browser * Moved first js files to ts * Fixed caret positioning * Added support for plugins * Fixed get undefined. * Removed require of socketio, l10n, html10n and error reporter * Fixed popup not showing * Fixed timeslider * Reworked paths * Fixed loading * Don't generate sources map in production mode * Non working hmr * Added live reloading. * Fixed timeslider when hot reloading * Removed eval * Fixed. * Fixed env * Fixed frontend tests. * Added minifying via lightningcss * Added minify via esbuild * Fixed diagnostic url * Removed lightningcss * Fixed types * Fixed alias * Fixed loadtest * Fixed * Fixed loading ep_font_color3 * Restructure windows build * Fixed windows build * Fixed pnpm lock --------- Co-authored-by: SamTv12345 <samtv12345@samtv12345.com>
18 lines
606 B
TypeScript
18 lines
606 B
TypeScript
import html10n from '../js/vendors/html10n';
|
|
|
|
|
|
// Set language for l10n
|
|
let regexpLang: string | undefined;
|
|
let language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
|
|
if (language) regexpLang = language[1];
|
|
|
|
html10n.mt.bind('indexed', () => {
|
|
console.log('Navigator language', navigator.language)
|
|
console.log('Localizing things', [regexpLang, navigator.language, 'en'])
|
|
html10n.localize([regexpLang, navigator.language, 'en']);
|
|
});
|
|
|
|
html10n.mt.bind('localized', () => {
|
|
document.documentElement.lang = html10n.getLanguage()!;
|
|
document.documentElement.dir = html10n.getDirection()!;
|
|
});
|