comparison src/plugins/plugin_exp_lang_detect.py @ 2145:33c8c4973743

core (plugins): added missing contants + use of new constants in PLUGIN_INFO
author Goffi <goffi@goffi.org>
date Sun, 12 Feb 2017 18:59:10 +0100
parents 1d3f73e065e1
children 8b37a62336c3
comparison
equal deleted inserted replaced
2144:1d3f73e065e1 2145:33c8c4973743
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from sat.core.i18n import _, D_ 20 from sat.core.i18n import _, D_
21 from sat.core.constants import Const as C
21 from sat.core.log import getLogger 22 from sat.core.log import getLogger
22 log = getLogger(__name__) 23 log = getLogger(__name__)
23 from sat.core import exceptions 24 from sat.core import exceptions
24 25
25 try: 26 try:
29 30
30 identifier = LanguageIdentifier.from_modelstring(model, norm_probs=False) 31 identifier = LanguageIdentifier.from_modelstring(model, norm_probs=False)
31 32
32 33
33 PLUGIN_INFO = { 34 PLUGIN_INFO = {
34 "name": "Language detection plugin", 35 C.PI_NAME: "Language detection plugin",
35 "import_name": "EXP-LANG-DETECT", 36 C.PI_IMPORT_NAME: "EXP-LANG-DETECT",
36 "type": "EXP", 37 C.PI_TYPE: "EXP",
37 "protocols": [], 38 C.PI_PROTOCOLS: [],
38 "dependencies": [], 39 C.PI_DEPENDENCIES: [],
39 "main": "LangDetect", 40 C.PI_MAIN: "LangDetect",
40 "handler": "no", 41 C.PI_HANDLER: "no",
41 "description": _("""Detect and set message language when unknown""") 42 C.PI_DESCRIPTION: _("""Detect and set message language when unknown""")
42 } 43 }
43 44
44 CATEGORY = D_(u"Misc") 45 CATEGORY = D_(u"Misc")
45 NAME = u"lang_detect" 46 NAME = u"lang_detect"
46 LABEL = D_(u"language detection") 47 LABEL = D_(u"language detection")