Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: validate Bing service always fails #422

Merged
merged 3 commits into from
Feb 25, 2024
Merged

fix: validate Bing service always fails #422

merged 3 commits into from
Feb 25, 2024

Conversation

tisfeng
Copy link
Owner

@tisfeng tisfeng commented Feb 24, 2024

Fix #421

@tisfeng
Copy link
Owner Author

tisfeng commented Feb 24, 2024

Since refactoring startQuery:, we don't need to call prehandleQueryTextLanguage: method manually anymore.

- (void)startQuery:(EZQueryModel *)queryModel
        completion:(void (^)(EZQueryResult *result, NSError *_Nullable error))completion {
    NSString *queryText = queryModel.queryText;
    EZLanguage from = queryModel.queryFromLanguage;
    EZLanguage to = queryModel.queryTargetLanguage;
    
    if ([self prehandleQueryTextLanguage:queryText
                                    from:from
                                      to:to
                              completion:completion]) {
        return;
    }
    
    [self translate:queryText from:from to:to completion:completion];
}

@tisfeng
Copy link
Owner Author

tisfeng commented Feb 24, 2024

I plan to release a small fix update tonight or tomorrow.

@tisfeng
Copy link
Owner Author

tisfeng commented Feb 24, 2024

We need to speed up the Swift refactoring and turn it from an objc project into a Swift project.

Next, in order to better add new features later, I plan to rewrite the code related to the query service (excluding the services themselves), the previous code was a bit ugly, when we refactor it later, we should try our best to optimize it, making it easier to expand.

image

@tisfeng tisfeng merged commit 401bba0 into dev Feb 25, 2024
5 checks passed
@tisfeng tisfeng deleted the validate_bing_fail branch February 25, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants