diff --git a/README.md b/README.md index 042240d..aa4ba97 100644 --- a/README.md +++ b/README.md @@ -204,12 +204,17 @@ except Exception as e: Configure API clients to use the pre-deployed instance: -### [Immersive Translate](https://immersivetranslate.com/) (Closed-source browser extension) +### [DeepLX App](https://github.com/xixu-me/DeepLX-App) (Open-source web app) -1. [Install Immersive Translate](https://immersivetranslate.com/download/) -2. Go to developer settings and enable beta testing features -3. Go to translation services and add custom translation service DeepLX, set API URL to: `https://dplx.xi-xu.me/translate` -4. Set the maximum requests per second and the maximum text length per request to appropriate values (e.g., `80` and `5000`) to ensure stability and performance +A modern, free web-based translation app powered by DeepLX API. Features include: + +- Multi-language auto-detection support +- Real-time translation as you type +- Translation history and language switching +- Responsive design for all devices +- RTL language support + +**Live Demo**: [https://deeplx.xi-xu.me](https://deeplx.xi-xu.me) ### [Pot](https://github.com/pot-app/pot-desktop/blob/master/README_EN.md) (Open-source cross-platform Windows, macOS and Linux app) @@ -217,6 +222,13 @@ Configure API clients to use the pre-deployed instance: 2. Open Pot settings and navigate to service settings 3. Configure DeepL service type as DeepLX and set custom URL to: `https://dplx.xi-xu.me/translate` +### [Immersive Translate](https://immersivetranslate.com/) (Closed-source browser extension) + +1. [Install Immersive Translate](https://immersivetranslate.com/download/) +2. Go to developer settings and enable beta testing features +3. Go to translation services and add custom translation service DeepLX, set API URL to: `https://dplx.xi-xu.me/translate` +4. Set the maximum requests per second and the maximum text length per request to appropriate values (e.g., `80` and `5000`) to ensure stability and performance + ### [Bob](https://bobtranslate.com/) (Closed-source macOS app) 1. [Download and install Bob from Mac App Store](https://apps.apple.com/app/id1630034110) diff --git a/README.zh.md b/README.zh.md index 2d96a07..45b6316 100644 --- a/README.zh.md +++ b/README.zh.md @@ -204,12 +204,17 @@ except Exception as e: 配置 API 客户端以使用预部署实例: -### [沉浸式翻译](https://immersivetranslate.com/zh-Hans/)(闭源浏览器扩展) +### [DeepLX App](https://github.com/xixu-me/DeepLX-App)(开源 web 应用) -1. [安装沉浸式翻译](https://immersivetranslate.com/zh-Hans/download/) -2. 进入开发者设置并开启 beta 测试特性 -3. 进入翻译服务添加自定义翻译服务 DeepLX,将 API URL 设置为:`https://dplx.xi-xu.me/translate` -4. 将每秒最大请求数和每次请求最大文本长度设置为合适的值(例如 `80` 和 `5000`),以确保稳定性和性能 +一个现代化、免费的基于 web 的翻译应用,由 DeepLX API 驱动。功能包括: + +- 支持多语言自动检测 +- 输入时自动翻译 +- 翻译历史和语言切换 +- 适配所有设备的响应式设计 +- RTL 语言支持 + +**在线演示**:[https://deeplx.xi-xu.me](https://deeplx.xi-xu.me) ### [Pot](https://github.com/pot-app/pot-desktop)(开源跨平台 Windows、macOS 和 Linux 应用) @@ -217,6 +222,13 @@ except Exception as e: 2. 打开 Pot 设置并导航到服务设置 3. 将 DeepL 服务类型配置为 DeepLX,并将自定义 URL 设置为:`https://dplx.xi-xu.me/translate` +### [沉浸式翻译](https://immersivetranslate.com/zh-Hans/)(闭源浏览器扩展) + +1. [安装沉浸式翻译](https://immersivetranslate.com/zh-Hans/download/) +2. 进入开发者设置并开启 beta 测试特性 +3. 进入翻译服务添加自定义翻译服务 DeepLX,将 API URL 设置为:`https://dplx.xi-xu.me/translate` +4. 将每秒最大请求数和每次请求最大文本长度设置为合适的值(例如 `80` 和 `5000`),以确保稳定性和性能 + ### [Bob](https://bobtranslate.com/)(闭源 macOS 应用) 1. [从 Mac App Store 下载并安装 Bob](https://apps.apple.com/cn/app/id1630034110) diff --git a/src/index.ts b/src/index.ts index 7e638de..14348a8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,7 +22,7 @@ import { import { createStandardResponse } from "./lib/types"; /** - * Initialize Hono application with environment bindings + * Initialize Hono app with environment bindings */ const app = new Hono<{ Bindings: Env }>(); diff --git a/src/lib/config.ts b/src/lib/config.ts index e24a1d1..ad8e883 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -1,5 +1,5 @@ /** - * Configuration constants for the DeepLX application + * Configuration constants for the DeepLX app * Centralizes all configuration values for easy maintenance and consistency */ diff --git a/src/lib/const.ts b/src/lib/const.ts index 7833cda..c51856a 100644 --- a/src/lib/const.ts +++ b/src/lib/const.ts @@ -1,5 +1,5 @@ /** - * Application constants for DeepLX translation service + * App constants for DeepLX translation service * Contains API endpoints, language definitions, and other immutable values */ diff --git a/src/lib/errorHandler.ts b/src/lib/errorHandler.ts index 10ebb6a..368731b 100644 --- a/src/lib/errorHandler.ts +++ b/src/lib/errorHandler.ts @@ -127,7 +127,7 @@ export function logError( /** * Create standardized error response for API endpoints - * Provides consistent error response format across the application + * Provides consistent error response format across the app * @param error The error that occurred * @param context Optional context about where the error occurred * @returns Object containing the response data and HTTP status code diff --git a/tests/index.test.ts b/tests/index.test.ts index 040f30f..5be592d 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -1,8 +1,8 @@ /** - * Tests for main application endpoints + * Tests for main app endpoints */ -// Mock the main application +// Mock the main app jest.mock("../src/lib", () => ({ clearMemoryCache: jest.fn(), generateCacheKey: jest.fn().mockReturnValue("cache:test-key"), @@ -29,7 +29,7 @@ jest.mock("../src/lib/performance", () => ({ .mockReturnValue({ requests: 100, avgResponseTime: 250 }), })); -describe("Main Application", () => { +describe("Main App", () => { let app: any; let mockEnv: Env;