projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0200ca3
)
* core: Added shortcut translatef for translate and format
author
Steven Barth
<steven@midlink.org>
Sun, 25 May 2008 15:55:39 +0000
(15:55 +0000)
committer
Steven Barth
<steven@midlink.org>
Sun, 25 May 2008 15:55:39 +0000
(15:55 +0000)
core/src/i18n.lua
patch
|
blob
|
history
diff --git
a/core/src/i18n.lua
b/core/src/i18n.lua
index 88381dde7f691cecb4afb44b648167956f884ae9..4e4187308ec4a8b2c8c90632537e393e16a851f5 100644
(file)
--- a/
core/src/i18n.lua
+++ b/
core/src/i18n.lua
@@
-55,4
+55,9
@@
end
-- Returns the i18n-value defined by "key" or if there is no such: "default"
function translate(key, default)
return table[key] or default
+end
+
+-- Translate shourtcut with sprintf/string.format inclusion
+function translatef(key, default, ...)
+ return translate(key, default):format(...)
end
\ No newline at end of file