Commit 827b2a9d5483d372ec3cf6efdad8f8e0442992e8

Authored by Vinicius
1 parent d2146031
Exists in OpenSigns

Read json

core/translator.py
... ... @@ -15,6 +15,7 @@ E-Mail: wesnydy@lavid.ufpb.br
15 15 import os
16 16 import pika
17 17 import PikaManager
  18 +import json
18 19  
19 20 from PortGlosa import traduzir
20 21 from time import sleep
... ... @@ -38,7 +39,8 @@ def run(ch, method, properties, body):
38 39 Json string containing the necessary arguments for workers.
39 40 """
40 41 print ("Translating...")
41   - gloss = traduzir(body)
  42 + data = json.load(body)
  43 + gloss = traduzir(data["text"],data["lang"])
42 44 manager.send_to_queue("translations", gloss, properties)
43 45 print ("Ok")
44 46  
... ...
translate-api/config/settings.js
... ... @@ -15,7 +15,7 @@ var config = {};
15 15 config.contentsPath = process.env.VLIBRAS_VIDEO_LIBRAS;
16 16 config.bundlesPath = process.env.SIGNS_VLIBRAS;
17 17  
18   -config.defaultLang = "pt-br"
  18 +config.defaultLang = "pt_br"
19 19  
20 20 config.platformsList = [ 'ANDROID', 'IOS', 'WEBGL', 'STANDALONE' ];
21 21  
... ...