Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이유혁
/
OSS_Project_Chatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
이유혁
2019-11-18 10:42:28 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
926e4faa75ac1f7d2b8a8765f464de9f3f211251
926e4faa
1 parent
06e51ed2
replying message modify
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
app.js
app.js
View file @
926e4fa
...
...
@@ -86,25 +86,25 @@ const option_maker = (api_connector, event) => {
if
(
detect_body
.
langCode
==
'ko'
)
{
target
=
'en'
;
switch
(
event
.
message
.
text
.
slice
(
-
3
))
{
case
'
:
cn'
:
case
'
.
cn'
:
target
=
'zh-CN'
;
break
;
case
'
:
tw'
:
case
'
.
tw'
:
target
=
'zh-TW'
;
break
;
case
'
:
es'
:
case
'
.
es'
:
target
=
'es'
;
break
;
case
'
:
fr'
:
case
'
.
fr'
:
target
=
'fr'
;
break
;
case
'
:
vi'
:
case
'
.
vi'
:
target
=
'vi'
;
break
;
case
'
:
th'
:
case
'
.
th'
:
target
=
'th'
;
break
;
case
'
:
id'
:
case
'
.
id'
:
target
=
'id'
;
break
;
default
:
...
...
@@ -116,7 +116,7 @@ const option_maker = (api_connector, event) => {
var
options
=
{
url
:
translate_api_url
,
form
:
{
'source'
:
detect_body
.
langCode
,
'target'
:
target
,
'text'
:
event
.
message
.
text
},
form
:
{
'source'
:
detect_body
.
langCode
,
'target'
:
target
,
'text'
:
event
.
message
.
text
.
slice
(
0
,
-
3
)
},
headers
:
{
'X-Naver-Client-Id'
:
client_id
,
'X-Naver-Client-Secret'
:
client_secret
}
};
resolve
(
options
);
...
...
Please
register
or
login
to post a comment