Skip to content

Commit

Permalink
convert html keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
choykarl committed Dec 21, 2023
1 parent 3de6bd7 commit 0c71496
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions Easydict/App/Easydict-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
#import "NSString+EZChineseText.h"
#import "EZError.h"
#import "NSString+EZConvenience.h"
#import "NSString+EZConvenience.h"
3 changes: 1 addition & 2 deletions Easydict/Feature/Service/Ali/AliService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,13 @@ class AliService: QueryService {
result.to = to
result.queryText = text
if let data = value.data, let translateText = data.translateText {
result.translatedResults = [translateText]
result.translatedResults = [translateText.unescapedXML()]
completion(result, nil)
} else {
let ezError = EZError(type: value.httpStatusCode == 500 ? .unsupportedLanguage : .noResultsFound)
ezError.errorDataMessage = value.message ?? "ali translate failed"
completion(result, ezError)
}

case let .failure(error):
NSLog("ali lookup error \(error)")
let ezError = EZError(nsError: error)
Expand Down

0 comments on commit 0c71496

Please sign in to comment.