[Kimchi-devel] [WIP V2][PATCH 0/3] Improved i18n JS string loading
shaohef at linux.vnet.ibm.com
shaohef at linux.vnet.ibm.com
Thu May 15 16:18:44 UTC 2014
From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
still need to imporve to load all plugins i18n string.
V1 -> V2:
set the Content-Type as application/json
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.
ShaoHe Feng (3):
Update root.py to make Cheetah render the JSON template.
Update the i18n tmpl to produce JSON
Add JS API for fetching i18n JSON
src/kimchi/root.py | 5 ++
src/kimchi/template.py | 34 +++++----
ui/js/src/kimchi.api.js | 17 +++++
ui/js/src/kimchi.main.js | 12 +++-
ui/pages/i18n.html.tmpl | 176 -----------------------------------------------
ui/pages/i18n.json.tmpl | 163 +++++++++++++++++++++++++++++++++++++++++++
6 files changed, 213 insertions(+), 194 deletions(-)
delete mode 100644 ui/pages/i18n.html.tmpl
create mode 100644 ui/pages/i18n.json.tmpl
--
1.9.0
More information about the Kimchi-devel
mailing list