tractatus/public/js
TheFlow 2d00c73027 fix(docs): complete language switching - update all UI elements instantly
Fixed language persistence issues where sidebar and hero section did not
update when switching languages via navbar flags.

**Root Cause:**
- languageChanged event only updated document content
- URL lang parameter updated AFTER sidebar reload
- detectLanguage() read old lang from URL causing wrong language load

**Changes:**
1. Update URL lang parameter BEFORE reloading sidebar
2. Call updatePageUI() to update hero section instantly
3. Call loadDocuments() to reload sidebar with new language
4. Explicitly reload current document to ensure correct language

**Updated Elements on Language Change:**
- Hero section (page title, subtitle, search button)
- Sidebar category labels (Getting Started → Erste Schritte, etc.)
- Sidebar document titles (shows translations if available)
- Document content (reloads in correct language)
- GitHub section links

**Result:**
 Click language flag → entire page switches to new language instantly
 Document content loads in correct language (not previous language)
 No page refresh required
 All UI elements synchronized
 Ready for Caixin Global launch (Oct 29)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:26:13 +13:00
..
admin fix(audit): fix timeline chart rendering with pixel heights and count labels 2025-10-25 12:22:55 +13:00
components feat(docs): intelligent section recategorization + i18n infrastructure 2025-10-26 00:48:27 +13:00
demos fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
utils fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
blog-post.js docs: complete research documentation publication (Phases 1-6) 2025-10-25 20:10:04 +13:00
blog.js fix(newsletter): resolve CSRF token issue for static HTML pages 2025-10-25 09:37:16 +13:00
case-submission.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
check-version.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
docs-app.js fix(docs): complete language switching - update all UI elements instantly 2025-10-26 10:26:13 +13:00
docs-search-enhanced.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
docs-viewer-app.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
faq.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
i18n-simple.js chore(frontend): update cache-busting versions and i18n 2025-10-23 10:57:32 +13:00
koha-donation.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
koha-success.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
koha-transparency.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
leader-page.js feat(leader): WCAG accessibility with 9 accordions, keyboard navigation 2025-10-23 00:19:23 +13:00
media-inquiry.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
media-triage-transparency.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
page-transitions.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
researcher-page.js feat(researcher): WCAG compliance, Berlin/Weil foundations, fixed footer i18n 2025-10-22 23:56:37 +13:00
scroll-animations.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00
version-manager.js fix(submissions): restructure Economist package and fix article display 2025-10-24 08:47:42 +13:00