feat: add Zhipu service and localization support#955
Merged
tisfeng merged 7 commits intotisfeng:devfrom Sep 7, 2025
Merged
Conversation
tisfeng#951) * Add Brazilian Portuguese to Google dictionary and fix Portugal Portuguese * fix(google-translate): correct language code for Brazilian Portuguese Updates the language code for Brazilian Portuguese from "pt" to "pt-BR" in the Google Translate service mapping. This change ensures that translation requests for Brazilian Portuguese are sent with the correct and specific regional code, distinguishing it from European Portuguese (`pt-PT`) and resolving potential translation inaccuracies. --------- Co-authored-by: tisfeng <tisfeng@gmail.com>
Owner
|
ok, thanks your PR, we will review it later. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the Zhipu translation service to the Easydict application. It includes the complete integration of a new AI-powered translation service that inherits from the existing OpenAI service architecture.
- Adds ZhipuService class that extends OpenAI service functionality
- Integrates Zhipu service into the application's service registry and type system
- Provides localization support for the service name in multiple languages
Reviewed Changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ZhipuService.swift | New service implementation with model configurations and API endpoints |
| EZServiceTypes.m | Registers ZhipuService class in the service mapping |
| EZEnumTypes.h/.m | Adds Zhipu service type constant declaration and definition |
| EZGoogleTranslate.m | Updates Portuguese language codes for better localization |
| Localizable.xcstrings | Adds translations for "zhipu_translate" key |
| Contents.json | Asset configuration for Zhipu service icon |
| project.pbxproj | Xcode project file updates to include new Swift file |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Refactors the `ZhipuModel` enum to be more organized and maintainable. - Groups models into logical sections (Free, GLM 4.5, GLM Z1) with comments detailing context size, output size, and QoS for each. - Updates the default model to `glm-4-flash-250414` for better performance. - Cleans up related services and localization files for consistency. - Adds API key placeholders for Groq and OpenAI services to improve user experience in settings.
Owner
Owner
|
I replaced it with the favicon of https://bigmodel.cn/
|
Contributor
Author
|
Sry I thought the rounded corner is automatically so I do not handle it well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


I tried to follow #878 to add Zhipu Translation Service.