projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c97ef19
)
libs/web: let luci.i18n.setlanguage() return the lang that was actually loaded
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 2 Dec 2012 13:30:46 +0000
(13:30 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 2 Dec 2012 13:30:46 +0000
(13:30 +0000)
libs/web/luasrc/i18n.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/i18n.lua
b/libs/web/luasrc/i18n.lua
index ff917c6f38bb6ead44a77364bbab59b518b28241..545a8aed939bfd13880b4adaeeb921a28660f73a 100644
(file)
--- a/
libs/web/luasrc/i18n.lua
+++ b/
libs/web/luasrc/i18n.lua
@@
-63,8
+63,10
@@
function setlanguage(lang)
if not tparser.load_catalog(context.lang, i18ndir) then
if context.parent then
tparser.load_catalog(context.parent, i18ndir)
+ return context.parent
end
end
+ return context.lang
end
--- Return the translated value for a specific translation key.