From 510234c1062ba42d38675647879100bf73b5d990 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Mar 2026 00:08:45 +0800 Subject: [PATCH 1/3] fix: expose i18n helpers globally closes #38 --- public/index.html | 4 ++-- public/js/i18n.js | 5 +++++ src/auth/login.html | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index a303c95..d22abf3 100644 --- a/public/index.html +++ b/public/index.html @@ -622,8 +622,8 @@

About

- - + + diff --git a/public/js/i18n.js b/public/js/i18n.js index 223248f..8413e05 100644 --- a/public/js/i18n.js +++ b/public/js/i18n.js @@ -667,6 +667,11 @@ function applyTranslations() { if (selector) selector.value = currentLang; } +// Expose i18n helpers for deferred scripts and inline handlers. +window.t = t; +window.setLanguage = setLanguage; +window.applyTranslations = applyTranslations; + // Initial application applyTranslations(); document.addEventListener('DOMContentLoaded', applyTranslations); diff --git a/src/auth/login.html b/src/auth/login.html index 065b77a..979f48a 100644 --- a/src/auth/login.html +++ b/src/auth/login.html @@ -270,7 +270,7 @@ color: var(--text); } - + @@ -352,4 +352,4 @@

ClawBridge

- \ No newline at end of file + From f9378714807fb7f399cb73baf842aa9369d6306d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Mar 2026 00:13:07 +0800 Subject: [PATCH 2/3] fix: allow i18n assets before auth --- public/index.html | 1 + public/js/i18n.js | 1 + src/auth/middleware.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index d22abf3..d1da689 100644 --- a/public/index.html +++ b/public/index.html @@ -9,6 +9,7 @@ + diff --git a/public/js/i18n.js b/public/js/i18n.js index 8413e05..189069d 100644 --- a/public/js/i18n.js +++ b/public/js/i18n.js @@ -671,6 +671,7 @@ function applyTranslations() { window.t = t; window.setLanguage = setLanguage; window.applyTranslations = applyTranslations; +window.translations = translations; // Initial application applyTranslations(); diff --git a/src/auth/middleware.js b/src/auth/middleware.js index 8a70fad..36f00df 100644 --- a/src/auth/middleware.js +++ b/src/auth/middleware.js @@ -33,7 +33,7 @@ function authMiddleware(req, res, next) { } // 4. Static assets passthrough - if (req.path.match(/\.(png|jpg|jpeg|svg|gif|ico|css)$/)) return next(); + if (req.path.match(/\.(js|png|jpg|jpeg|svg|gif|ico|css)$/)) return next(); if (req.path === '/manifest.json') return next(); if (req.path === '/login.html') return res.redirect(302, '/'); From 5419ea80ac5675904ab336e18b0f04cd43ea51d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Mar 2026 00:24:03 +0800 Subject: [PATCH 3/3] chore: bump frontend asset cache keys --- public/index.html | 4 ++-- src/auth/login.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/index.html b/public/index.html index d1da689..9fc270a 100644 --- a/public/index.html +++ b/public/index.html @@ -623,8 +623,8 @@

About

- - + + diff --git a/src/auth/login.html b/src/auth/login.html index 979f48a..db49ff0 100644 --- a/src/auth/login.html +++ b/src/auth/login.html @@ -270,7 +270,7 @@ color: var(--text); } - +