[Kimchi-devel] [PATCH 0/8] Refactor exception
Aline Manera
alinefm at linux.vnet.ibm.com
Sun Feb 9 22:47:54 UTC 2014
From: Aline Manera <alinefm at br.ibm.com>
This patch set includes:
- Create a common Exception class (KimchiError) to translate the error message
and proper set the parameters
- Create a i18n.py file with all messages used on backend
- Update build process to add the messages in this file to .po files
- Update UI to show the message received from backend to the user
- Update UI messages to add a code for them
- Display error message like: <code>: <msg>
Aline Manera (8):
refactor exception: Create a common Exception to translate error
messages
refactor exception: Add messages to be translated on backend
refactor exception: Set error messages for jsonschema validation
refator exception: Update control to raise the exception message
refactor exception: Update all exceptions
refactor exception: Update gen-pot script to get messages from
i18n.py
refactor exception: Update UI references
refactor exception: Update all po files
plugins/sample/API.json | 23 +-
plugins/sample/Makefile.am | 1 +
plugins/sample/__init__.py | 7 +-
plugins/sample/i18n.py | 44 ++
plugins/sample/model.py | 12 +-
po/POTFILES.in | 1 +
po/en_US.po | 686 ++++++++++++++++++++++++------
po/gen-pot.in | 8 +-
po/kimchi.pot | 624 ++++++++++++++++++++++-----
po/pt_BR.po | 684 +++++++++++++++++++++++------
po/zh_CN.po | 678 +++++++++++++++++++++++------
src/kimchi/API.json | 144 +++++--
src/kimchi/Makefile.am | 1 +
src/kimchi/asynctask.py | 4 +-
src/kimchi/auth.py | 3 +-
src/kimchi/control/base.py | 90 ++--
src/kimchi/control/utils.py | 5 +-
src/kimchi/disks.py | 5 +-
src/kimchi/distroloader.py | 5 +-
src/kimchi/exception.py | 42 +-
src/kimchi/i18n.py | 173 ++++++++
src/kimchi/iscsi.py | 6 +-
src/kimchi/isoinfo.py | 17 +-
src/kimchi/mockmodel.py | 113 +++--
src/kimchi/model/config.py | 2 +-
src/kimchi/model/debugreports.py | 18 +-
src/kimchi/model/host.py | 10 +-
src/kimchi/model/interfaces.py | 4 +-
src/kimchi/model/libvirtstoragepool.py | 14 +-
src/kimchi/model/networks.py | 37 +-
src/kimchi/model/storagepools.py | 39 +-
src/kimchi/model/storageservers.py | 2 +-
src/kimchi/model/storagevolumes.py | 37 +-
src/kimchi/model/templates.py | 44 +-
src/kimchi/model/utils.py | 2 +-
src/kimchi/model/vmifaces.py | 15 +-
src/kimchi/model/vms.py | 28 +-
src/kimchi/objectstore.py | 4 +-
src/kimchi/root.py | 3 +
src/kimchi/template.py | 2 +-
src/kimchi/utils.py | 12 +-
src/kimchi/vmtemplate.py | 7 +-
tests/test_exception.py | 4 +-
tests/test_rest.py | 4 +-
tests/utils.py | 5 +-
ui/js/src/kimchi.api.js | 4 +-
ui/js/src/kimchi.guest_add_main.js | 7 +-
ui/js/src/kimchi.guest_main.js | 32 +-
ui/js/src/kimchi.host.js | 46 +-
ui/js/src/kimchi.line-chart.js | 2 +-
ui/js/src/kimchi.login_window.js | 8 +-
ui/js/src/kimchi.main.js | 6 +-
ui/js/src/kimchi.message.js | 4 +
ui/js/src/kimchi.network.js | 22 +-
ui/js/src/kimchi.report_add_main.js | 8 +-
ui/js/src/kimchi.storage_main.js | 18 +-
ui/js/src/kimchi.storagepool_add_main.js | 28 +-
ui/js/src/kimchi.template_add_main.js | 18 +-
ui/js/src/kimchi.template_main.js | 16 +-
ui/js/widgets/filter-select.js | 4 +-
ui/js/widgets/select-menu.js | 4 +-
ui/pages/i18n.html.tmpl | 172 ++++----
62 files changed, 3046 insertions(+), 1022 deletions(-)
create mode 100644 plugins/sample/i18n.py
create mode 100644 src/kimchi/i18n.py
--
1.7.10.4
More information about the Kimchi-devel
mailing list