Skip to content

feat: add Zhipu service and localization support#955

Merged
tisfeng merged 7 commits intotisfeng:devfrom
danielzmeow:main
Sep 7, 2025
Merged

feat: add Zhipu service and localization support#955
tisfeng merged 7 commits intotisfeng:devfrom
danielzmeow:main

Conversation

@danielzmeow
Copy link
Copy Markdown
Contributor

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

joaovitoras and others added 2 commits August 24, 2025 12:13
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>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello danielzmeow, Thank you for your first PR contribution 🎉 danielzmeow

@tisfeng tisfeng changed the base branch from main to dev September 3, 2025 15:02
@tisfeng
Copy link
Copy Markdown
Owner

tisfeng commented Sep 3, 2025

ok, thanks your PR, we will review it later.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@tisfeng
Copy link
Copy Markdown
Owner

tisfeng commented Sep 6, 2025

It seems that the Zhipu logo is not good, we can improve it later.

image

@tisfeng
Copy link
Copy Markdown
Owner

tisfeng commented Sep 6, 2025

I replaced it with the favicon of https://bigmodel.cn/

image

@danielzmeow
Copy link
Copy Markdown
Contributor Author

Sry I thought the rounded corner is automatically so I do not handle it well
I think yours better!

@tisfeng tisfeng enabled auto-merge (squash) September 7, 2025 10:16
@tisfeng tisfeng merged commit cca7dbb into tisfeng:dev Sep 7, 2025
4 checks passed
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.

5 participants