Skip to content

Commit e55798c

Browse files
committed
230115_0220 Attached escaping feature to translator
1 parent ed03794 commit e55798c

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/main/java/translate/TranslationService.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.google.cloud.translate.TranslateOptions;
66
import com.google.cloud.translate.Translation;
77
import lombok.extern.slf4j.Slf4j;
8+
import utils.CommonUtils;
89

910
import java.io.FileInputStream;
1011

@@ -35,12 +36,14 @@ private static String executeTranslate(String source, String target, String text
3536

3637
// Translation method: Kor to Eng
3738
public static String translateKorToEng(String text) {
38-
return executeTranslate("ko", "en", text);
39+
String result = executeTranslate("ko", "en", text);
40+
return CommonUtils.unescapeHTMLEntity(result);
3941
}
4042

4143
// Translation method: Eng to Kor
4244
public static String translateEngToKor(String text) {
43-
return executeTranslate("en", "ko", text);
45+
String result = executeTranslate("en", "ko", text);
46+
return CommonUtils.unescapeHTMLEntity(result);
4447
}
4548

4649
}

src/main/resources/properties.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
VERSION: v1.6
2-
BUILD: 230114_1950
1+
VERSION: v1.7
2+
BUILD: 230115_0214

0 commit comments

Comments
 (0)