<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/10/2014 03:09 AM, Aline Manera
wrote:<br>
</div>
<blockquote cite="mid:53960663.6030401@linux.vnet.ibm.com"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 06/09/2014 07:08 AM, <a
moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:shaohef@linux.vnet.ibm.com">shaohef@linux.vnet.ibm.com</a>
wrote:<br>
</div>
<blockquote
cite="mid:1402308545-2068-1-git-send-email-shaohef@linux.vnet.ibm.com"
type="cite">
<pre wrap="">From: ShaoHe Feng <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
V4 -> V5:
let autoconf generate sample.conf
V3 -> V4:
rebase
V2 -> V3:
change "enable-plugins" to "enable-sample"
remove nls
improve the Portuguese translation.
V1 -> V2:
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 (6):
Update root.py to make Cheetah render the JSON template.
Update the i18n tmpl to produce JSON
Add JS API for fetching i18n JSON
Issue #342: load i18n.html of the plugin
add an optional to toggle the sample plugin
generate the translation files for plugins/sample
Zhou Zheng Sheng (1):
Add Minimal UI Page for the Sample Plugin
configure.ac | 18 ++++
plugins/sample/Makefile.am | 11 +-
plugins/sample/__init__.py | 3 +-
plugins/sample/config.status | 1 +
plugins/sample/po/LINGUAS | 1 +
plugins/sample/po/Makefile.in.in | 1 +
plugins/sample/po/Makevars | 1 +
plugins/sample/po/POTFILES.in | 2 +
plugins/sample/po/en_US.po | 21 ++++
plugins/sample/po/gen-pot | 1 +
plugins/sample/po/pt_BR.po | 24 +++++
plugins/sample/po/zh_CN.po | 24 +++++
plugins/sample/sample.conf | 7 --
plugins/sample/sample.conf.in | 12 +++
plugins/sample/ui/config/tab-ext.xml | 8 +-
plugins/sample/ui/pages/i18n.json.tmpl | 9 ++
plugins/sample/ui/pages/tab.html.tmpl | 6 ++
src/kimchi/root.py | 5 +
src/kimchi/template.py | 34 ++++---
ui/js/src/kimchi.api.js | 18 +++-
ui/js/src/kimchi.main.js | 24 ++++-
ui/pages/i18n.html.tmpl | 178 ---------------------------------
ui/pages/i18n.json.tmpl | 165 ++++++++++++++++++++++++++++++
23 files changed, 361 insertions(+), 213 deletions(-)
create mode 120000 plugins/sample/config.status
create mode 120000 plugins/sample/po/LINGUAS
create mode 120000 plugins/sample/po/Makefile.in.in
create mode 120000 plugins/sample/po/Makevars
create mode 100644 plugins/sample/po/POTFILES.in
create mode 100644 plugins/sample/po/en_US.po
create mode 120000 plugins/sample/po/gen-pot
create mode 100644 plugins/sample/po/pt_BR.po
create mode 100644 plugins/sample/po/zh_CN.po
delete mode 100644 plugins/sample/sample.conf
create mode 100644 plugins/sample/sample.conf.in
create mode 100644 plugins/sample/ui/pages/i18n.json.tmpl
create mode 100644 plugins/sample/ui/pages/tab.html.tmpl
delete mode 100644 ui/pages/i18n.html.tmpl
create mode 100644 ui/pages/i18n.json.tmpl
</pre>
</blockquote>
<font face="DejaVu Sans Mono">The tests are failing:<br>
<br>
======================================================================<br>
FAIL: test_bad_params (test_plugin.PluginTests)<br>
----------------------------------------------------------------------<br>
Traceback (most recent call last):<br>
File "/home/alinefm/kimchi/tests/test_plugin.py", line 114, in
test_bad_params<br>
self.assertEquals(400, resp.status)<br>
AssertionError: 400 != 404<br>
<br>
======================================================================<br>
FAIL: test_rectangles (test_plugin.PluginTests)<br>
----------------------------------------------------------------------<br>
Traceback (most recent call last):<br>
File "/home/alinefm/kimchi/tests/test_plugin.py", line 87, in
test_rectangles<br>
self._create_rectangle_and_assert('small', 10, 8)<br>
File "/home/alinefm/kimchi/tests/test_plugin.py", line 72, in
_create_rectangle_and_assert<br>
self.assertEquals(201, resp.status)<br>
AssertionError: 201 != 404<br>
<br>
----------------------------------------------------------------------<br>
Ran 159 tests in 181.016s<br>
<br>
FAILED (failures=2)<br>
[09/Jun/2014:16:05:11] ENGINE Waiting for child threads to
terminate...<br>
make[3]: *** [check-local] Error 1<br>
make[3]: Leaving directory `/home/alinefm/kimchi/tests'<br>
make[2]: *** [check-am] Error 2<br>
make[2]: Leaving directory `/home/alinefm/kimchi/tests'<br>
make[1]: *** [check] Error 2<br>
make[1]: Leaving directory `/home/alinefm/kimchi/tests'<br>
make: *** [check-recursive] Error 1<br>
<br>
</font> </blockquote>
when disable sample plugin, should skip this test. patch will send
later. <br>
<br>
<pre class="moz-signature" cols="72">--
Thanks and best regards!
Sheldon Feng(冯少合)<a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com"><shaohef@linux.vnet.ibm.com></a>
IBM Linux Technology Center</pre>
</body>
</html>