| #
1a25f39d |
| 03-Jun-2026 |
tracker-user <82045103+tracker-user@users.noreply.github.com> |
Fix per-user language not applying to the JavaScript bundle
js.php runs with NOSESSION, so it has no REMOTE_USER and the JS_SCRIPT_LIST handler (which keyed off REMOTE_USER) could never resolve the
Fix per-user language not applying to the JavaScript bundle
js.php runs with NOSESSION, so it has no REMOTE_USER and the JS_SCRIPT_LIST handler (which keyed off REMOTE_USER) could never resolve the user's language -- LANG/LANG.plugins.* always shipped in the site default. The page UI followed the user's choice while all JS strings stayed English.
Carry the language through the js.php <script> URL instead of the session: - TPL_METAHEADER_OUTPUT appends &uslang=<code> to the js.php src during the authenticated page request; this also caches the bundle per language so a stale English bundle is not reused after a switch. - JS_SCRIPT_LIST reads $INPUT->str('uslang') (survives NOSESSION), validates it to a real inc/lang/ dir, switches $conf['lang'], and keeps the datepicker cache-key rewrite. - Capture the pre-override site default so the URL builder can compare against it after applyUserLang has already switched $conf['lang']. - Factor language validation into isValidLangCode(); the param is now user-controllable so it is checked against [a-z0-9-] + an existing dir.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
show more ...
|
| #
26676c97 |
| 03-Jun-2026 |
tracker-user <82045103+tracker-user@users.noreply.github.com> |
Fix per-user language not applying to JS bundle
JS strings (LANG, LANG.plugins.*) are built by lib/exe/js.php, which is a separate request that never fires ACTION_ACT_PREPROCESS — so applyUserLang()
Fix per-user language not applying to JS bundle
JS strings (LANG, LANG.plugins.*) are built by lib/exe/js.php, which is a separate request that never fires ACTION_ACT_PREPROCESS — so applyUserLang() never ran for it and the JS bundle always shipped in the site-default language.
Hook JS_SCRIPT_LIST (BEFORE) to apply the preferred language before js.php builds its cache and loads JS strings. The handler also rewrites the inc/lang/<lang>/jquery.ui.datepicker.js entry in the file list, because js.php keys its output cache on md5(serialize($files)) and that datepicker path is the only language-dependent member — without rewriting it, two users with different languages collide on one cached bundle.
Shared lang-resolution logic extracted to resolvePreferredLang() so both ACTION_ACT_PREPROCESS and JS_SCRIPT_LIST handlers stay DRY.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
show more ...
|
| #
49b74e0a |
| 01-Jun-2026 |
tracker-user <82045103+tracker-user@users.noreply.github.com> |
Review: fix lock collision, lazy lang-apply, endonyms, null-guards, namespacing
- helper: use a distinct lock key ($file.'.lock') in setPreferences() so the outer read-modify-write lock does not c
Review: fix lock collision, lazy lang-apply, endonyms, null-guards, namespacing
- helper: use a distinct lock key ($file.'.lock') in setPreferences() so the outer read-modify-write lock does not collide with io_saveFile()'s own internal lock — previously caused a ~3 s CPU spin on every save - action: applyUserLang() reads the stored 'lang' record directly via getRecord() instead of getPreference(), avoiding the REGISTER event (and inc/lang/ glob) on every logged-in request; the toggle registry is now built after $conf['lang'] is updated, so toggle labels resolve in the user's language. Add [a-z0-9-] charset guard on the stored code. Remove the now-moot $this->localised/$this->lang cache reset. - action: getAvailableLanguages() returns native endonyms via languageName() (covers all 78 DokuWiki lang dirs; unknown codes fall back to bare code) - admin: ?? '' null-guard on $userData['name'] in two places - All three files: migrate to namespaced base classes (dokuwiki\Extension\{Plugin,ActionPlugin,AdminPlugin,EventHandler,Event}) - plugin.info.txt: bump date to 2026-06-01
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
show more ...
|
| #
f51fe07c |
| 28-May-2026 |
tracker-user <82045103+tracker-user@users.noreply.github.com> |
Review: fix JSON encoding, error message, locale cache, add translations
- helper.php: add JSON_UNESCAPED_UNICODE to json_encode flags - lang/en: add %s placeholder to adminsavefail for consistency
Review: fix JSON encoding, error message, locale cache, add translations
- helper.php: add JSON_UNESCAPED_UNICODE to json_encode flags - lang/en: add %s placeholder to adminsavefail for consistency with adminsaved - action.php: reset plugin locale cache after applying user language override, so the settings page renders in the user's chosen language rather than the site default - Add de, ru, ja translations - plugin.info.txt: update date
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
show more ...
|
| #
cc98f4d1 |
| 23-May-2026 |
tracker-user <82045103+tracker-user@users.noreply.github.com> |
Add a built-in interface language toggle
|
| #
1ab40613 |
| 22-May-2026 |
tracker-user <82045103+tracker-user@users.noreply.github.com> |
Initial commit, made with Claude Opus 4.7
|