OSDN Git Service

Major refactoring to support addon specific translations.
authorrui Batista <ruiandrebatista@gmail.com>
Fri, 20 Apr 2012 15:52:50 +0000 (16:52 +0100)
committerrui Batista <ruiandrebatista@gmail.com>
Fri, 20 Apr 2012 15:52:50 +0000 (16:52 +0100)
commit289c61a507fd8bda0b20df5e7f00d23b9c1f115e
treedeaae7a92991411e8d2c64097250da2344b28686
parent86585e52c398c9c5bfe0b093d6444561758fc230
Major refactoring to support addon specific translations.

* Refactored getAvailableAddons and getRunningAddons. Internally addons can be queried by path to facilitate identification of currently calling addon.
* addonHanler.getCodeAddon() retrieves the addon instnace for the calling addon, using stack inspection.
* addonHandler.initTranslation() adds the ettext _ function to the calling module to support addon specific translation (it relies on addonHandler.getCodeAddon internally).
* Many more minor tweaks and corrections.
source/addonHandler.py