文档翻译,将翻译后的文件,输出doc格式。
This commit is contained in:
+3
-2
@@ -115,8 +115,9 @@ public class TranslationDocumentUtils {
|
||||
|
||||
//翻译后的文件路径
|
||||
String translateAfterFilePath = uploadpath + "/tempZip/translationTempFile";
|
||||
String translateAfterFileName = sourceOssFile.getFileName().substring(0, sourceOssFile.getFileName().lastIndexOf("."));
|
||||
try {
|
||||
translateAfterFile = createTranslateAfterFile(translateAfterFilePath, translateAfterSb.toString(),sourceOssFile.getFileName());
|
||||
translateAfterFile = createTranslateAfterFile(translateAfterFilePath, translateAfterSb.toString(),translateAfterFileName);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
logger.error("翻译文档-写入文档失败:" + ex.getMessage());
|
||||
@@ -137,7 +138,7 @@ public class TranslationDocumentUtils {
|
||||
if (!newFilePath.exists()) {
|
||||
newFilePath.mkdirs();
|
||||
}
|
||||
translateAfterFilePath = translateAfterFilePath + "/" + fileName;
|
||||
translateAfterFilePath = translateAfterFilePath + "/" + fileName + ".doc";
|
||||
File newFile = new File(translateAfterFilePath);
|
||||
if (!newFile.exists()) {
|
||||
newFile.createNewFile();
|
||||
|
||||
Reference in New Issue
Block a user