i18n: Initialize translations in __init__.

This commit is contained in:
Valentin Lorentz 2012-12-19 17:04:39 +00:00
parent 0607462dd5
commit 97b48abaa2

View File

@ -136,6 +136,7 @@ class _PluginInternationalization:
"""Internationalization managment for a plugin."""
def __init__(self, name='supybot'):
self.name = name
self.translations = {}
self.currentLocaleName = None
i18nClasses.update({name: self})
self.loadLocale()
@ -157,7 +158,8 @@ class _PluginInternationalization:
localeName, 'po'), 'r')
self._parse(translationFile)
except IOError, PluginNotFound: # The translation is unavailable
self.translations = {}
pass
def _parse(self, translationFile):
"""A .po files parser.