luci-base: expose system translations to JavaScript
authorJo-Philipp Wich <jo@mein.io>
Thu, 18 Oct 2018 11:44:39 +0000 (13:44 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 5 Nov 2018 10:01:45 +0000 (11:01 +0100)
commitc916b5ed875675749c3a04c7b95340a5d4443722
tree457e344c0628a2f5777956ab4c72dfd767f74779
parent8ff68c772b76855954cc7a2c163df4056fa19c56
luci-base: expose system translations to JavaScript

Add a new /admin/translations/ endpoint which exposes the loaded system
translations as JavaScript file.

Once referenced by <script>, the endpoint will create a `window.TR` object
containing the entire translation string table for use on the client side.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/controller/admin/index.lua