mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-04-16 02:51:08 +02:00
* fix: customLocaleStrings not applied due to aggressive locale caching The admin panel's i18next backend used fetch with cache: "force-cache", causing the browser to serve stale locale JSON even after the server restarted with new customLocaleStrings in settings.json. The server already sets appropriate Cache-Control headers (max-age based on settings.maxAge), so the client-side force-cache was redundant and prevented custom strings from appearing. Fixes #6390 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: URL lang param now reliably overrides server default language getParams() was processing server options first and URL params second, both calling html10n.localize() for the lang setting. Since localize() is async, the two calls raced and the result was nondeterministic. Now processes each setting once: URL param wins if present, otherwise falls back to server option. This eliminates the race condition. Fixes #5510 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: window._() localization function always available for plugins The html10n gettext shortcut window._ was only set if window._ was undefined, but underscore.js was already setting it via the esbuild bundle. Since internal code uses underscore via require() not window._, it's safe to always set window._ to html10n.get so plugins can use window._() for localization in hooks like documentReady. Fixes #6627 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist