release: WRNexusJS 0.5.10

This commit is contained in:
2026-07-30 13:36:29 +05:30
parent 8fc6f15402
commit d1b0c55b53
159 changed files with 7509 additions and 604 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@wrnexus/i18n",
"version": "0.5.1",
"version": "0.5.10",
"private": true,
"type": "module",
"main": "src/index.ts",
+7
View File
@@ -156,7 +156,14 @@ export const I18N_RUNTIME = String.raw`
location.reload();
}
function bind(root) {
var currentLang = (window.__wireI18n && window.__wireI18n.lang) || document.documentElement.lang;
(root || document).querySelectorAll("[data-wrn-preferences]").forEach(function (switcher) {
switcher.setAttribute("data-current-language", currentLang);
var currentLabel = switcher.querySelector(".wire-preferences__current-language");
if (currentLabel) currentLabel.textContent = String(currentLang || "en").toUpperCase();
});
(root || document).querySelectorAll("[data-wire-lang-set]").forEach(function (n) {
n.setAttribute("aria-pressed", String(n.getAttribute("data-wire-lang-set") === currentLang));
if (n.__wireLangBound) return; n.__wireLangBound = 1;
n.addEventListener("click", function () { set(n.getAttribute("data-wire-lang-set")); });
});