On 05/15/2014 08:25 AM, Adam King wrote:
The improvement concept here is to directly generate JSON on the
server
and assign it to the i18n variable, rather than inserting nodes into the DOM.
Plugins would use a plugin1.i18n= structure to keep plugin strings from colliding with
each other, or with the kimchi variables.
Great! It's the right way to directly
use JSON file instead of HTML file.
Adam King (2):
Add JS API for fetching i18n JSON
Update the i18n tmpl to produce JSON
src/kimchi/root.py | 2 +
ui/js/src/kimchi.api.js | 18 +++++
ui/js/src/kimchi.main.js | 12 +++-
ui/pages/i18n.html.tmpl | 176 -----------------------------------------------
ui/pages/i18n.json.tmpl | 163 +++++++++++++++++++++++++++++++++++++++++++
5 files changed, 192 insertions(+), 179 deletions(-)
delete mode 100644 ui/pages/i18n.html.tmpl
create mode 100644 ui/pages/i18n.json.tmpl