From 255449a1e2c59265d4db0bb80e915eb1530d42b8 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 5 Oct 2008 16:08:33 +0000 Subject: [PATCH] * luci/i18n: rename *.pt_br.* to *.pt-br.*, extend luci.i18n to convert "_" to "-" in language tags --- .../luasrc/i18n/{ddns.pt_br.lua => ddns.pt-br.lua} | 0 .../luasrc/i18n/{ddns.pt_br.xml => ddns.pt-br.xml} | 0 .../i18n/{luci-fw.pt_br.lua => luci-fw.pt-br.lua} | 0 .../i18n/{luci-fw.pt_br.xml => luci-fw.pt-br.xml} | 0 .../i18n/{hd_idle.pt_br.lua => hd_idle.pt-br.lua} | 0 .../i18n/{hd_idle.pt_br.xml => hd_idle.pt-br.xml} | 0 .../i18n/{initmgr.pt_br.lua => initmgr.pt-br.lua} | 0 .../i18n/{initmgr.pt_br.xml => initmgr.pt-br.xml} | 0 .../luasrc/i18n/{ntpc.pt_br.lua => ntpc.pt-br.lua} | 0 .../luasrc/i18n/{ntpc.pt_br.xml => ntpc.pt-br.xml} | 0 .../luasrc/i18n/{p910nd.pt_br.lua => p910nd.pt-br.lua} | 0 .../luasrc/i18n/{p910nd.pt_br.xml => p910nd.pt-br.xml} | 0 .../luasrc/i18n/{qos.pt_br.lua => qos.pt-br.lua} | 0 .../luasrc/i18n/{qos.pt_br.xml => qos.pt-br.xml} | 0 .../luasrc/i18n/{samba.pt_br.lua => samba.pt-br.lua} | 0 .../luasrc/i18n/{samba.pt_br.xml => samba.pt-br.xml} | 0 .../i18n/{rrdtool.pt_br.lua => rrdtool.pt-br.lua} | 0 .../{rrdtool.pt_br.xml.hide => rrdtool.pt-br.xml.hide} | 0 .../{statistics.pt_br.lua => statistics.pt-br.lua} | 0 .../{statistics.pt_br.xml => statistics.pt-br.xml} | 0 .../i18n/{tinyproxy.pt_br.lua => tinyproxy.pt-br.lua} | 0 .../i18n/{tinyproxy.pt_br.xml => tinyproxy.pt-br.xml} | 0 .../luasrc/i18n/{upnp.pt_br.lua => upnp.pt-br.lua} | 0 .../luasrc/i18n/{upnp.pt_br.xml => upnp.pt-br.xml} | 0 .../luasrc/i18n/{ushare.pt_br.lua => ushare.pt-br.lua} | 0 .../luasrc/i18n/{ushare.pt_br.xml => ushare.pt-br.xml} | 0 .../{uvc_streamer.pt_br.lua => uvc_streamer.pt-br.lua} | 0 .../{uvc_streamer.pt_br.xml => uvc_streamer.pt-br.xml} | 0 .../{admin-core.pt_br.lua => admin-core.pt-br.lua} | 0 .../{admin-core.pt_br.xml => admin-core.pt-br.xml} | 0 .../luasrc/i18n/{cbi.pt_br.lua => cbi.pt-br.lua} | 0 .../luasrc/i18n/{cbi.pt_br.xml => cbi.pt-br.xml} | 0 .../i18n/{default.pt_br.lua => default.pt-br.lua} | 0 .../i18n/{default.pt_br.xml => default.pt-br.xml} | 0 .../i18n/{sysauth.pt_br.lua => sysauth.pt-br.lua} | 0 .../i18n/{sysauth.pt_br.xml => sysauth.pt-br.xml} | 0 .../luasrc/i18n/{wifi.pt_br.lua => wifi.pt-br.lua} | 0 .../luasrc/i18n/{wifi.pt_br.xml => wifi.pt-br.xml} | 0 libs/uvl/luasrc/i18n/{uvl.pt_br.lua => uvl.pt-br.lua} | 0 libs/uvl/luasrc/i18n/{uvl.pt_br.xml => uvl.pt-br.xml} | 0 libs/web/luasrc/i18n.lua | 10 +++++----- 41 files changed, 5 insertions(+), 5 deletions(-) rename applications/luci-ddns/luasrc/i18n/{ddns.pt_br.lua => ddns.pt-br.lua} (100%) rename applications/luci-ddns/luasrc/i18n/{ddns.pt_br.xml => ddns.pt-br.xml} (100%) rename applications/luci-fw/luasrc/i18n/{luci-fw.pt_br.lua => luci-fw.pt-br.lua} (100%) rename applications/luci-fw/luasrc/i18n/{luci-fw.pt_br.xml => luci-fw.pt-br.xml} (100%) rename applications/luci-hd_idle/luasrc/i18n/{hd_idle.pt_br.lua => hd_idle.pt-br.lua} (100%) rename applications/luci-hd_idle/luasrc/i18n/{hd_idle.pt_br.xml => hd_idle.pt-br.xml} (100%) rename applications/luci-initmgr/luasrc/i18n/{initmgr.pt_br.lua => initmgr.pt-br.lua} (100%) rename applications/luci-initmgr/luasrc/i18n/{initmgr.pt_br.xml => initmgr.pt-br.xml} (100%) rename applications/luci-ntpc/luasrc/i18n/{ntpc.pt_br.lua => ntpc.pt-br.lua} (100%) rename applications/luci-ntpc/luasrc/i18n/{ntpc.pt_br.xml => ntpc.pt-br.xml} (100%) rename applications/luci-p910nd/luasrc/i18n/{p910nd.pt_br.lua => p910nd.pt-br.lua} (100%) rename applications/luci-p910nd/luasrc/i18n/{p910nd.pt_br.xml => p910nd.pt-br.xml} (100%) rename applications/luci-qos/luasrc/i18n/{qos.pt_br.lua => qos.pt-br.lua} (100%) rename applications/luci-qos/luasrc/i18n/{qos.pt_br.xml => qos.pt-br.xml} (100%) rename applications/luci-samba/luasrc/i18n/{samba.pt_br.lua => samba.pt-br.lua} (100%) rename applications/luci-samba/luasrc/i18n/{samba.pt_br.xml => samba.pt-br.xml} (100%) rename applications/luci-statistics/luasrc/i18n/{rrdtool.pt_br.lua => rrdtool.pt-br.lua} (100%) rename applications/luci-statistics/luasrc/i18n/{rrdtool.pt_br.xml.hide => rrdtool.pt-br.xml.hide} (100%) rename applications/luci-statistics/luasrc/i18n/{statistics.pt_br.lua => statistics.pt-br.lua} (100%) rename applications/luci-statistics/luasrc/i18n/{statistics.pt_br.xml => statistics.pt-br.xml} (100%) rename applications/luci-tinyproxy/luasrc/i18n/{tinyproxy.pt_br.lua => tinyproxy.pt-br.lua} (100%) rename applications/luci-tinyproxy/luasrc/i18n/{tinyproxy.pt_br.xml => tinyproxy.pt-br.xml} (100%) rename applications/luci-upnp/luasrc/i18n/{upnp.pt_br.lua => upnp.pt-br.lua} (100%) rename applications/luci-upnp/luasrc/i18n/{upnp.pt_br.xml => upnp.pt-br.xml} (100%) rename applications/luci-ushare/luasrc/i18n/{ushare.pt_br.lua => ushare.pt-br.lua} (100%) rename applications/luci-ushare/luasrc/i18n/{ushare.pt_br.xml => ushare.pt-br.xml} (100%) rename applications/luci-uvc_streamer/luasrc/i18n/{uvc_streamer.pt_br.lua => uvc_streamer.pt-br.lua} (100%) rename applications/luci-uvc_streamer/luasrc/i18n/{uvc_streamer.pt_br.xml => uvc_streamer.pt-br.xml} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{admin-core.pt_br.lua => admin-core.pt-br.lua} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{admin-core.pt_br.xml => admin-core.pt-br.xml} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{cbi.pt_br.lua => cbi.pt-br.lua} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{cbi.pt_br.xml => cbi.pt-br.xml} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{default.pt_br.lua => default.pt-br.lua} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{default.pt_br.xml => default.pt-br.xml} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{sysauth.pt_br.lua => sysauth.pt-br.lua} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{sysauth.pt_br.xml => sysauth.pt-br.xml} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{wifi.pt_br.lua => wifi.pt-br.lua} (100%) rename i18n/portuguese_brazilian/luasrc/i18n/{wifi.pt_br.xml => wifi.pt-br.xml} (100%) rename libs/uvl/luasrc/i18n/{uvl.pt_br.lua => uvl.pt-br.lua} (100%) rename libs/uvl/luasrc/i18n/{uvl.pt_br.xml => uvl.pt-br.xml} (100%) diff --git a/applications/luci-ddns/luasrc/i18n/ddns.pt_br.lua b/applications/luci-ddns/luasrc/i18n/ddns.pt-br.lua similarity index 100% rename from applications/luci-ddns/luasrc/i18n/ddns.pt_br.lua rename to applications/luci-ddns/luasrc/i18n/ddns.pt-br.lua diff --git a/applications/luci-ddns/luasrc/i18n/ddns.pt_br.xml b/applications/luci-ddns/luasrc/i18n/ddns.pt-br.xml similarity index 100% rename from applications/luci-ddns/luasrc/i18n/ddns.pt_br.xml rename to applications/luci-ddns/luasrc/i18n/ddns.pt-br.xml diff --git a/applications/luci-fw/luasrc/i18n/luci-fw.pt_br.lua b/applications/luci-fw/luasrc/i18n/luci-fw.pt-br.lua similarity index 100% rename from applications/luci-fw/luasrc/i18n/luci-fw.pt_br.lua rename to applications/luci-fw/luasrc/i18n/luci-fw.pt-br.lua diff --git a/applications/luci-fw/luasrc/i18n/luci-fw.pt_br.xml b/applications/luci-fw/luasrc/i18n/luci-fw.pt-br.xml similarity index 100% rename from applications/luci-fw/luasrc/i18n/luci-fw.pt_br.xml rename to applications/luci-fw/luasrc/i18n/luci-fw.pt-br.xml diff --git a/applications/luci-hd_idle/luasrc/i18n/hd_idle.pt_br.lua b/applications/luci-hd_idle/luasrc/i18n/hd_idle.pt-br.lua similarity index 100% rename from applications/luci-hd_idle/luasrc/i18n/hd_idle.pt_br.lua rename to applications/luci-hd_idle/luasrc/i18n/hd_idle.pt-br.lua diff --git a/applications/luci-hd_idle/luasrc/i18n/hd_idle.pt_br.xml b/applications/luci-hd_idle/luasrc/i18n/hd_idle.pt-br.xml similarity index 100% rename from applications/luci-hd_idle/luasrc/i18n/hd_idle.pt_br.xml rename to applications/luci-hd_idle/luasrc/i18n/hd_idle.pt-br.xml diff --git a/applications/luci-initmgr/luasrc/i18n/initmgr.pt_br.lua b/applications/luci-initmgr/luasrc/i18n/initmgr.pt-br.lua similarity index 100% rename from applications/luci-initmgr/luasrc/i18n/initmgr.pt_br.lua rename to applications/luci-initmgr/luasrc/i18n/initmgr.pt-br.lua diff --git a/applications/luci-initmgr/luasrc/i18n/initmgr.pt_br.xml b/applications/luci-initmgr/luasrc/i18n/initmgr.pt-br.xml similarity index 100% rename from applications/luci-initmgr/luasrc/i18n/initmgr.pt_br.xml rename to applications/luci-initmgr/luasrc/i18n/initmgr.pt-br.xml diff --git a/applications/luci-ntpc/luasrc/i18n/ntpc.pt_br.lua b/applications/luci-ntpc/luasrc/i18n/ntpc.pt-br.lua similarity index 100% rename from applications/luci-ntpc/luasrc/i18n/ntpc.pt_br.lua rename to applications/luci-ntpc/luasrc/i18n/ntpc.pt-br.lua diff --git a/applications/luci-ntpc/luasrc/i18n/ntpc.pt_br.xml b/applications/luci-ntpc/luasrc/i18n/ntpc.pt-br.xml similarity index 100% rename from applications/luci-ntpc/luasrc/i18n/ntpc.pt_br.xml rename to applications/luci-ntpc/luasrc/i18n/ntpc.pt-br.xml diff --git a/applications/luci-p910nd/luasrc/i18n/p910nd.pt_br.lua b/applications/luci-p910nd/luasrc/i18n/p910nd.pt-br.lua similarity index 100% rename from applications/luci-p910nd/luasrc/i18n/p910nd.pt_br.lua rename to applications/luci-p910nd/luasrc/i18n/p910nd.pt-br.lua diff --git a/applications/luci-p910nd/luasrc/i18n/p910nd.pt_br.xml b/applications/luci-p910nd/luasrc/i18n/p910nd.pt-br.xml similarity index 100% rename from applications/luci-p910nd/luasrc/i18n/p910nd.pt_br.xml rename to applications/luci-p910nd/luasrc/i18n/p910nd.pt-br.xml diff --git a/applications/luci-qos/luasrc/i18n/qos.pt_br.lua b/applications/luci-qos/luasrc/i18n/qos.pt-br.lua similarity index 100% rename from applications/luci-qos/luasrc/i18n/qos.pt_br.lua rename to applications/luci-qos/luasrc/i18n/qos.pt-br.lua diff --git a/applications/luci-qos/luasrc/i18n/qos.pt_br.xml b/applications/luci-qos/luasrc/i18n/qos.pt-br.xml similarity index 100% rename from applications/luci-qos/luasrc/i18n/qos.pt_br.xml rename to applications/luci-qos/luasrc/i18n/qos.pt-br.xml diff --git a/applications/luci-samba/luasrc/i18n/samba.pt_br.lua b/applications/luci-samba/luasrc/i18n/samba.pt-br.lua similarity index 100% rename from applications/luci-samba/luasrc/i18n/samba.pt_br.lua rename to applications/luci-samba/luasrc/i18n/samba.pt-br.lua diff --git a/applications/luci-samba/luasrc/i18n/samba.pt_br.xml b/applications/luci-samba/luasrc/i18n/samba.pt-br.xml similarity index 100% rename from applications/luci-samba/luasrc/i18n/samba.pt_br.xml rename to applications/luci-samba/luasrc/i18n/samba.pt-br.xml diff --git a/applications/luci-statistics/luasrc/i18n/rrdtool.pt_br.lua b/applications/luci-statistics/luasrc/i18n/rrdtool.pt-br.lua similarity index 100% rename from applications/luci-statistics/luasrc/i18n/rrdtool.pt_br.lua rename to applications/luci-statistics/luasrc/i18n/rrdtool.pt-br.lua diff --git a/applications/luci-statistics/luasrc/i18n/rrdtool.pt_br.xml.hide b/applications/luci-statistics/luasrc/i18n/rrdtool.pt-br.xml.hide similarity index 100% rename from applications/luci-statistics/luasrc/i18n/rrdtool.pt_br.xml.hide rename to applications/luci-statistics/luasrc/i18n/rrdtool.pt-br.xml.hide diff --git a/applications/luci-statistics/luasrc/i18n/statistics.pt_br.lua b/applications/luci-statistics/luasrc/i18n/statistics.pt-br.lua similarity index 100% rename from applications/luci-statistics/luasrc/i18n/statistics.pt_br.lua rename to applications/luci-statistics/luasrc/i18n/statistics.pt-br.lua diff --git a/applications/luci-statistics/luasrc/i18n/statistics.pt_br.xml b/applications/luci-statistics/luasrc/i18n/statistics.pt-br.xml similarity index 100% rename from applications/luci-statistics/luasrc/i18n/statistics.pt_br.xml rename to applications/luci-statistics/luasrc/i18n/statistics.pt-br.xml diff --git a/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.pt_br.lua b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.pt-br.lua similarity index 100% rename from applications/luci-tinyproxy/luasrc/i18n/tinyproxy.pt_br.lua rename to applications/luci-tinyproxy/luasrc/i18n/tinyproxy.pt-br.lua diff --git a/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.pt_br.xml b/applications/luci-tinyproxy/luasrc/i18n/tinyproxy.pt-br.xml similarity index 100% rename from applications/luci-tinyproxy/luasrc/i18n/tinyproxy.pt_br.xml rename to applications/luci-tinyproxy/luasrc/i18n/tinyproxy.pt-br.xml diff --git a/applications/luci-upnp/luasrc/i18n/upnp.pt_br.lua b/applications/luci-upnp/luasrc/i18n/upnp.pt-br.lua similarity index 100% rename from applications/luci-upnp/luasrc/i18n/upnp.pt_br.lua rename to applications/luci-upnp/luasrc/i18n/upnp.pt-br.lua diff --git a/applications/luci-upnp/luasrc/i18n/upnp.pt_br.xml b/applications/luci-upnp/luasrc/i18n/upnp.pt-br.xml similarity index 100% rename from applications/luci-upnp/luasrc/i18n/upnp.pt_br.xml rename to applications/luci-upnp/luasrc/i18n/upnp.pt-br.xml diff --git a/applications/luci-ushare/luasrc/i18n/ushare.pt_br.lua b/applications/luci-ushare/luasrc/i18n/ushare.pt-br.lua similarity index 100% rename from applications/luci-ushare/luasrc/i18n/ushare.pt_br.lua rename to applications/luci-ushare/luasrc/i18n/ushare.pt-br.lua diff --git a/applications/luci-ushare/luasrc/i18n/ushare.pt_br.xml b/applications/luci-ushare/luasrc/i18n/ushare.pt-br.xml similarity index 100% rename from applications/luci-ushare/luasrc/i18n/ushare.pt_br.xml rename to applications/luci-ushare/luasrc/i18n/ushare.pt-br.xml diff --git a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.pt_br.lua b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.pt-br.lua similarity index 100% rename from applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.pt_br.lua rename to applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.pt-br.lua diff --git a/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.pt_br.xml b/applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.pt-br.xml similarity index 100% rename from applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.pt_br.xml rename to applications/luci-uvc_streamer/luasrc/i18n/uvc_streamer.pt-br.xml diff --git a/i18n/portuguese_brazilian/luasrc/i18n/admin-core.pt_br.lua b/i18n/portuguese_brazilian/luasrc/i18n/admin-core.pt-br.lua similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/admin-core.pt_br.lua rename to i18n/portuguese_brazilian/luasrc/i18n/admin-core.pt-br.lua diff --git a/i18n/portuguese_brazilian/luasrc/i18n/admin-core.pt_br.xml b/i18n/portuguese_brazilian/luasrc/i18n/admin-core.pt-br.xml similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/admin-core.pt_br.xml rename to i18n/portuguese_brazilian/luasrc/i18n/admin-core.pt-br.xml diff --git a/i18n/portuguese_brazilian/luasrc/i18n/cbi.pt_br.lua b/i18n/portuguese_brazilian/luasrc/i18n/cbi.pt-br.lua similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/cbi.pt_br.lua rename to i18n/portuguese_brazilian/luasrc/i18n/cbi.pt-br.lua diff --git a/i18n/portuguese_brazilian/luasrc/i18n/cbi.pt_br.xml b/i18n/portuguese_brazilian/luasrc/i18n/cbi.pt-br.xml similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/cbi.pt_br.xml rename to i18n/portuguese_brazilian/luasrc/i18n/cbi.pt-br.xml diff --git a/i18n/portuguese_brazilian/luasrc/i18n/default.pt_br.lua b/i18n/portuguese_brazilian/luasrc/i18n/default.pt-br.lua similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/default.pt_br.lua rename to i18n/portuguese_brazilian/luasrc/i18n/default.pt-br.lua diff --git a/i18n/portuguese_brazilian/luasrc/i18n/default.pt_br.xml b/i18n/portuguese_brazilian/luasrc/i18n/default.pt-br.xml similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/default.pt_br.xml rename to i18n/portuguese_brazilian/luasrc/i18n/default.pt-br.xml diff --git a/i18n/portuguese_brazilian/luasrc/i18n/sysauth.pt_br.lua b/i18n/portuguese_brazilian/luasrc/i18n/sysauth.pt-br.lua similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/sysauth.pt_br.lua rename to i18n/portuguese_brazilian/luasrc/i18n/sysauth.pt-br.lua diff --git a/i18n/portuguese_brazilian/luasrc/i18n/sysauth.pt_br.xml b/i18n/portuguese_brazilian/luasrc/i18n/sysauth.pt-br.xml similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/sysauth.pt_br.xml rename to i18n/portuguese_brazilian/luasrc/i18n/sysauth.pt-br.xml diff --git a/i18n/portuguese_brazilian/luasrc/i18n/wifi.pt_br.lua b/i18n/portuguese_brazilian/luasrc/i18n/wifi.pt-br.lua similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/wifi.pt_br.lua rename to i18n/portuguese_brazilian/luasrc/i18n/wifi.pt-br.lua diff --git a/i18n/portuguese_brazilian/luasrc/i18n/wifi.pt_br.xml b/i18n/portuguese_brazilian/luasrc/i18n/wifi.pt-br.xml similarity index 100% rename from i18n/portuguese_brazilian/luasrc/i18n/wifi.pt_br.xml rename to i18n/portuguese_brazilian/luasrc/i18n/wifi.pt-br.xml diff --git a/libs/uvl/luasrc/i18n/uvl.pt_br.lua b/libs/uvl/luasrc/i18n/uvl.pt-br.lua similarity index 100% rename from libs/uvl/luasrc/i18n/uvl.pt_br.lua rename to libs/uvl/luasrc/i18n/uvl.pt-br.lua diff --git a/libs/uvl/luasrc/i18n/uvl.pt_br.xml b/libs/uvl/luasrc/i18n/uvl.pt-br.xml similarity index 100% rename from libs/uvl/luasrc/i18n/uvl.pt_br.xml rename to libs/uvl/luasrc/i18n/uvl.pt-br.xml diff --git a/libs/web/luasrc/i18n.lua b/libs/web/luasrc/i18n.lua index 84a869539..4b3adf7eb 100644 --- a/libs/web/luasrc/i18n.lua +++ b/libs/web/luasrc/i18n.lua @@ -12,9 +12,9 @@ Copyright 2008 Steven Barth Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -You may obtain a copy of the License at +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -45,7 +45,7 @@ end -- @param force Force reload even if already loaded (optional) -- @return Success status function load(file, lang, force) - lang = lang or "" + lang = lang and lang:gsub("_", "-") or "" if force or not loaded[lang] or not loaded[lang][file] then local f = loadfile(i18ndir .. file .. "." .. lang .. ".lua") if f then @@ -75,7 +75,7 @@ end --- Set the context default translation language. -- @param lang Two-letter language code function setlanguage(lang) - context.lang = lang + context.lang = lang:gsub("_", "-") end --- Return the translated value for a specific translation key. @@ -95,4 +95,4 @@ end -- @return Translated and formatted string function translatef(key, default, ...) return translate(key, default):format(...) -end \ No newline at end of file +end -- 2.25.1