luci-base: template: add translation iterator function
authorJo-Philipp Wich <jo@mein.io>
Wed, 17 Oct 2018 10:57:34 +0000 (12:57 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 5 Nov 2018 10:01:45 +0000 (11:01 +0100)
commit62102f4f0e8a88ffbdf44517f4ff737049a3f3bf
tree014bf7a3f47798a05bcdede54da8779f7a4e8491
parent4623a58394b1cc71ddf24865a2f0639ee2119470
luci-base: template: add translation iterator function

Introduce a new luci.template.parser.get_translations() function which will
iterate all loaded translation entries and pass the to the given callback
function.

This is useful to expose the loaded translations in other formats, e.g. for
wrapping them into JSON feeds.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/src/template_lmo.c
modules/luci-base/src/template_lmo.h
modules/luci-base/src/template_lualib.c