Skip to content

Commit e4a8fd8

Browse files
committedDec 19, 2014
remove 18n not required for core plugins
1 parent 78ff27f commit e4a8fd8

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed
 

‎python/plugins/MetaSearch/plugin.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
###############################################################################
2525

2626
import logging
27-
import os
2827

2928
from PyQt4.QtCore import QCoreApplication, QLocale, QSettings, QTranslator
3029
from PyQt4.QtGui import QAction, QIcon
@@ -47,31 +46,6 @@ def __init__(self, iface):
4746
self.dialog = None
4847
self.web_menu = '&MetaSearch'
4948

50-
LOGGER.debug('Setting up i18n')
51-
52-
# TODO: does this work for locales like: pt_BR ?
53-
locale_name = QSettings().value("locale/userLocale")[0:2]
54-
# this one below does not pick up when you load QGIS with --lang param
55-
# locale_name = str(QLocale.system().name()).split('_')[0]
56-
57-
LOGGER.debug('Locale name: %s', locale_name)
58-
59-
# load if exists
60-
tr_file = os.path.join(self.context.ppath, 'locale', locale_name,
61-
'LC_MESSAGES', 'ui.qm')
62-
63-
if os.path.exists(tr_file):
64-
self.translator = QTranslator()
65-
result = self.translator.load(tr_file)
66-
if not result:
67-
msg = 'Failed to load translation: %s' % tr_file
68-
LOGGER.error(msg)
69-
raise RuntimeError(msg)
70-
QCoreApplication.installTranslator(self.translator)
71-
72-
LOGGER.debug(QCoreApplication.translate('MetaSearch',
73-
'Translation loaded: %s' % tr_file))
74-
7549
def initGui(self):
7650
"""startup"""
7751

0 commit comments

Comments
 (0)
Please sign in to comment.