Skip to content

Commit 510234c

Browse files
fix: expose i18n helpers globally closes #38
1 parent fccc1ae commit 510234c

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ <h3 style="margin-top:0" data-i18n="about">About</h3>
622622
</a>
623623
</nav>
624624

625-
<script src="js/i18n.js?v=20260317-03"></script>
626-
<script src="js/dashboard.js?v=20260317-03" defer></script>
625+
<script src="js/i18n.js?v=20260318-01"></script>
626+
<script src="js/dashboard.js?v=20260318-01" defer></script>
627627
</body>
628628

629629
</html>

public/js/i18n.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,11 @@ function applyTranslations() {
667667
if (selector) selector.value = currentLang;
668668
}
669669

670+
// Expose i18n helpers for deferred scripts and inline handlers.
671+
window.t = t;
672+
window.setLanguage = setLanguage;
673+
window.applyTranslations = applyTranslations;
674+
670675
// Initial application
671676
applyTranslations();
672677
document.addEventListener('DOMContentLoaded', applyTranslations);

src/auth/login.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
color: var(--text);
271271
}
272272
</style>
273-
<script src="js/i18n.js?v=20260317-03"></script>
273+
<script src="js/i18n.js?v=20260318-01"></script>
274274
</head>
275275

276276
<body>
@@ -352,4 +352,4 @@ <h1>ClawBridge</h1>
352352
</script>
353353
</body>
354354

355-
</html>
355+
</html>

0 commit comments

Comments
 (0)