[r21645]Plugins: Limit addon translators
Only get an addon translator if the plugin has a locale directory Prevents pointless warnings, esp. when the translations are in the main Gramps message file. svn: r21649
This commit is contained in:
parent
e4202098b7
commit
6e525893bd
@ -1088,7 +1088,11 @@ class PluginRegister(object):
|
||||
fd = io.open(full_filename, 'r', encoding = 'utf-8')
|
||||
stream = fd.read()
|
||||
fd.close()
|
||||
if os.path.exists(os.path.join(os.path.dirname(full_filename),
|
||||
'locale')):
|
||||
local_gettext = glocale.get_addon_translator(full_filename).gettext
|
||||
else:
|
||||
local_gettext = glocale.get_translation().gettext
|
||||
try:
|
||||
#execfile(full_filename,
|
||||
exec (compile(stream, full_filename, 'exec'),
|
||||
|
Loading…
Reference in New Issue
Block a user