mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
i18n: Initialize translations in __init__.
This commit is contained in:
parent
0607462dd5
commit
97b48abaa2
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user