Skip to content
CAI
Software that uses CAICheck a score

YiiGuxing/TranslationPlugin

49.1

Weak · 13 November 2026

27.4k

lines of production code

Kotlin

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an IntelliJ IDEA plugin that provides comprehensive translation and text-to-speech capabilities for developers. It integrates with multiple external APIs—including Google, Microsoft, DeepL, OpenAI, and others—to translate selected code, inline documentation, and quick help views directly within the IDE. The plugin also features a local wordbook for vocabulary management and supports audio playback via various TTS engines.

How it got here

2016–2019 — Modernization and architectural refactoring

19 changes.

The project underwent a comprehensive architectural overhaul, migrating from legacy Java components to a modern Kotlin-based structure with Gradle Version Catalogs and a new Presenter-View contract. This period saw the removal of outdated Youdao-specific code and the introduction of a unified translation engine system supporting multiple providers, including OpenAI and DeepL. Significant efforts were also directed at rebuilding core UI components, such as the settings dialog and wordbook, while adding new features like multi-engine TTS and inline documentation translation.

2020–2023 — Translation engine expansion and UI modernization

20 changes.

The project significantly expanded its translation capabilities by integrating new engines for DeepL, Microsoft, and OpenAI, while enhancing existing providers with dictionary lookups and documentation support. Concurrently, the codebase underwent substantial architectural improvements, including centralized UI management, secure credential storage via IntelliJ's PasswordSafe, and robust error handling across all modules. The user interface was modernized with animated icons, synchronized scrolling, and inline documentation translation features to improve overall usability and visual feedback.

2024–2026 — TTS engine overhaul and documentation translation

19 changes.

This period focused on significantly expanding Text-to-Speech capabilities by introducing a robust, multi-source playback engine and adding support for Microsoft Edge TTS. Concurrently, the plugin enhanced its documentation translation features to support inline and PSI-based lookups in Rider and CLion, while also introducing customizable OpenAI prompt templates and request configurations.

Features

Add Alipay and WeChat Pay donation assets

Added new Adobe Illustrator source files for Alipay and WeChat Pay donation QR codes to the resources directory, providing the visual assets required for the plugin's website launcher loading animation.

resources · high confidence

Add DeepL translator with usage tracking and document support

A new DeepL translation engine is now available, supporting text and document translation across a wide range of languages (including Hebrew, Thai, and Vietnamese). The implementation uses header-based authentication for security and includes a settings dialog that displays real-time character usage and quota limits for both free and Pro accounts.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/deepl · high confidence

Add Microsoft Edge TTS synthesis support

Users can now use Microsoft Edge TTS for text-to-speech. This change introduces the necessary backend components, including a WebSocket-based source (EdgeTTSSource) that communicates with Microsoft's speech service using specific authentication tokens (DRM.kt) and request formatting (EdgeTTSModels.kt). It also adds a settings dialog (EdgeTTSSettingsDialog.kt) allowing users to select from a managed list of available voices and adjust speech speed, with the configuration persisted via EdgeTTSSettings.kt. The implementation includes a voice manager (EdgeTTSVoiceManager.kt) to handle locale-to-voice mapping and fetching available voices, and an audio player wrapper (EdgeTTSPlayer.kt) to integrate this new source into the existing playback system.

src/main/kotlin/cn/yiiguxing/plugin/translate/tts/microsoft · high confidence

Add OpenAI Chat API request models

The translation plugin now includes the data structures required to interact with OpenAI's Chat Completions API. This change introduces the \ChatCompletionRequest\ class and its builder, allowing users to specify the AI model and a list of chat messages (system, user, assistant) for translation requests, along with the \ChatRole\ enum to define message authorship.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/openai/chat · high confidence

Add internal model enums for part-of-speech tags and text types

New internal model classes (PosTag and TextType) have been added to the Microsoft translator service to support dictionary lookup functionality. PosTag defines part-of-speech categories (such as nouns, verbs, adjectives) with localized display labels, while TextType specifies supported input formats (plain text and HTML). These models are internal implementation details and do not directly expose new user-facing features in this location.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/microsoft/models · medium confidence

Customizable OpenAI request configuration via config file

Users can now customize OpenAI-compatible chat completion requests by editing a JSON configuration file (config.json) located in the plugin's data directory. This configuration allows overriding the request model, setting custom HTTP headers, and modifying the request body for specific models or as defaults. The system supports placeholder resolution (e.g., ${TEXT}, ${SOURCE\_LANGUAGE}) within these configurations. Additionally, streaming is explicitly disabled for these requests to ensure compatibility.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/openai/config · high confidence

Inline and quick documentation translation support

Users can now translate code documentation directly within the editor (inline) and via quick actions in Rider and CLion. The plugin parses HTML documentation, applies translations asynchronously, and injects status or error messages with icons into the documentation view. It also filters out specific UI elements (such as JavaScript and PHP-specific sections) to prevent translation artifacts and preserves the original document structure.

src/main/kotlin/cn/yiiguxing/plugin/translate/documentation · high confidence

Introduce in-app WebView for displaying plugin web content

The plugin now includes a built-in WebView (powered by JCEF) to display web-based content such as release notes, documentation, and support pages directly within the IDE, rather than opening them in an external browser. This change introduces a new \WebViewProvider\ and \WebView\ component that handles loading states, error pages, and local resource serving (CSS/HTML) via a custom \ITP\ scheme. Users will see these pages rendered inside the IDE window when available, with a fallback to the system browser if JCEF is not supported or if explicitly configured.

src/main/kotlin/cn/yiiguxing/plugin/translate/view · high confidence

Introduce update notification listener and 'What's New' release notes action

The update module now includes an application-level listener (UpdateListener) that notifies components after an update check completes and any resulting notification is dismissed. Additionally, a new 'What's New' action has been added to the help menu, which opens the release notes for the current feature version in the user's web browser.

src/main/kotlin/cn/yiiguxing/plugin/translate/update · high confidence

Introduces configurable, Velocity-based prompt templates for OpenAI translation

The OpenAI translator now uses a new prompt service that renders messages via Apache Velocity templates, allowing users to customize the system and user prompts for both standard and document translation. The service loads templates from a configurable file path (via OpenAiRequestConfigService) or falls back to built-in defaults, and supports variables for source/target languages, mapped language names, and utility functions for string manipulation and escaping. This enables more flexible and structured prompt engineering for OpenAI-compatible chat completion requests.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/openai/prompt · high confidence

Introduction of a styled translation document interface

A new \TranslationDocument\ interface and associated extension functions for \StyledViewer\ have been added to the text translation module. This change introduces a structured way to apply translated content to the UI viewer, supporting features like automatic newline handling and styled rendering, which lays the groundwork for more consistent and visually appealing translation outputs.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/text · high confidence

Introduction of disk caching and centralized UI management services

The plugin now includes a new \CacheService\ that stores translation results on disk in addition to the existing in-memory cache, automatically trimming old entries to manage storage space. A new \ITPCoroutineService\ provides standardized coroutine scopes for application and project-level background tasks. Additionally, \TranslationUIManager\ has been refactored into a dedicated service that centrally manages the lifecycle of translation balloons and dialogs, ensuring they are properly disposed of when their associated UI components are closed.

src/main/kotlin/cn/yiiguxing/plugin/translate/service · high confidence

Microsoft Translator now includes dictionary lookups, example sentences, and documentation translation

The Microsoft translation engine has been significantly enhanced with new capabilities. Users can now see dictionary lookups (alternative translations) and example sentences for translated terms, provided as structured documents alongside the main translation. Additionally, the plugin now supports translating documentation (HTML) using the Microsoft Edge translation service, with a new setting to keep the original text visible after translation. The implementation also introduces separate Azure and Bing translators, improved caching strategies, and better error handling for Microsoft API responses.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/microsoft · high confidence

New OpenAI settings dialog with TTS support and config file editor

The OpenAI translation settings have been reorganized into a dedicated dialog that supports both translation and Text-to-Speech (TTS) configurations. Users can now configure separate API endpoints and keys for TTS, adjust TTS-specific settings like voice and speed, and manage custom models. Additionally, a new editor dialog allows users to customize OpenAI-compatible chat completion requests via a JSON config file, with options to open the file in the IDE or reveal its directory.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/openai/ui · high confidence

New UI utilities for credential editing and synchronized scrolling

The translation plugin now includes two new UI utility components. The CredentialEditor class provides a standardized way to manage and edit API credentials, handling loading, validation, and state binding for password fields. Additionally, the ScrollSynchronizer class enables multiple UI scroll bars to move in sync, which supports features like keeping the original text and translation areas aligned during scrolling.

src/main/kotlin/cn/yiiguxing/plugin/translate/ui/util · high confidence

New WebView utility infrastructure for resource handling, styling, and JavaScript communication

This change introduces a set of new utility classes in the view utils package to support the refactored WebView component. CefLocalResourceRequestHandler and CefStreamResourceHandler enable the WebView to serve local resources via custom protocols with proper MIME type handling and lifecycle management. CefStylesheetHelper generates CSS variables that adapt the WebView's appearance (colors, backgrounds, buttons) to the IDE's light and dark themes. JBCefScrollbarsHelper provides CSS to style scrollbars within the WebView to match the native IDE look and feel, including support for contrast settings. JsQueryDispatcher establishes a bridge for JavaScript-to-Kotlin communication, allowing the WebView to query IDE and plugin information (such as version, build number, and release notes URLs) through a structured request-response model.

src/main/kotlin/cn/yiiguxing/plugin/translate/view/utils · high confidence

New asynchronous data caching interfaces and implementation

The OpenAPI data layer now includes \AsyncData\ and \AsyncExpiringData\ interfaces along with a \CachePolicy\ sealed interface to manage asynchronous data loading and caching. This introduces support for lazy loading, time-based expiration, and stale-while-revalidate semantics, allowing the plugin to cache API responses with configurable validity periods and background refreshes while ensuring coroutine-safe concurrent access.

src/main/kotlin/cn/yiiguxing/plugin/translate/openapi/data · high confidence

New documentation translation service and element filtering

A new \DocumentationTranslationService\ has been added to handle translating code documentation to the main language, including checks for existing translations and background processing. This service integrates with a new \DocumentationElementFilter\ interface, which allows language-specific filtering and restoration of documentation elements during the translation process.

src/main/kotlin/cn/yiiguxing/plugin/translate/openapi/documentation · high confidence

New editor banner notification system

The plugin now supports displaying contextual banners at the top of the editor. This change introduces the core data model (EditorBanner), a manager to attach banners to specific editor instances, a provider to render the UI using IntelliJ's EditorNotificationPanel, and a Kotlin DSL for constructing banners with different statuses (Info, Success, Warning, Error, Promo), messages, and clickable actions.

src/main/kotlin/cn/yiiguxing/plugin/translate/ui/notification · high confidence

New inline documentation translation actions and provider

This change introduces a new package for documentation actions, adding \TranslateDocumentationActionProvider\ which registers inline translation actions (\TranslateRenderedDocAction\) for \PsiDocCommentBase\ elements. It also adds \ShowTranslatedQuickDocInfoAction\ to display translated quick documentation and \ToggleQuickDocTranslationAction\ to toggle translation state via the documentation browser facade. A new \TranslatableInlineDocumentationFinder\ wraps the default inline documentation finder to provide translatable documentation targets. These components work together to enable inline translation of code comments and quick documentation views.

src/main/kotlin/cn/yiiguxing/plugin/translate/documentation/actions · high confidence

New language and translation resource bundles for Japanese, Korean, and Chinese

The plugin now includes dedicated resource bundles for Japanese (ja), Korean (ko), and Simplified Chinese (zh\_CN) to support the translation interface and language selection. These new files, LanguageBundle and TranslationBundle, provide localized strings for the settings UI, translation engines (including OpenAI, DeepL, and Youdao), word book features, and error messages, ensuring these languages are fully supported in the user interface.

src/main/resources/messages · high confidence

New multi-engine TTS player with OpenAI support

The plugin introduces a new text-to-speech architecture that supports three engines: Google, Microsoft Edge, and OpenAI. Users can now select their preferred TTS provider in settings; the OpenAI engine requires explicit API key configuration via a dedicated dialog, while Google and Edge are available out-of-the-box. The new system handles audio playback, progress, and error notifications for all supported engines.

src/main/kotlin/cn/yiiguxing/plugin/translate/tts · high confidence

New text utility library for styled document manipulation

Added a new set of Kotlin extension functions and data classes in the \util.text\ package to simplify working with Swing's \Document\ and \StyledDocument\ APIs. This includes helpers for inserting, replacing, and appending text with styles, clearing document content, managing paragraph styles, and a \StyledString\ data class to carry text along with its associated style and metadata, enabling easier construction of formatted translation results.

src/main/kotlin/cn/yiiguxing/plugin/translate/util/text · high confidence

New utility library for application, HTTP, caching, and UI helpers

The plugin introduces a comprehensive set of new utility classes in the \util\ package to support core functionality. This includes an \Http\ client with automatic redirect handling and a default Chromium user-agent, a thread-safe \LruCache\ with statistics, a coroutine-based \RateLimiter\, and helpers for IDE threading (\Applications\), notifications, and JSON serialization. Additional utilities cover string processing (CamelCase splitting, chunking), file I/O, and color conversion, providing the foundational tools for translation, caching, and UI interactions.

src/main/kotlin/cn/yiiguxing/plugin/translate/util · high confidence

Repository initialization with project metadata and build scaffolding

The repository has been initialized with essential project documentation and build infrastructure. This includes a comprehensive README detailing installation, usage, and supported IDEs, a full changelog tracking versions from 1.2.2 through 3.9.1, and a plugin description file. Build support is established via Gradle wrapper scripts (gradlew, gradlew.bat) and a .gitignore configuration. Additionally, the project now includes a LICENSE (MIT), a plugin icon, and a dedicated file for listing financial contributors, while removing the legacy IntelliJ module file (TranslatePlugin.iml).

(repo-wide) · high confidence

Support for inline and PSI-based documentation translation in Rider and CLion

The plugin now translates documentation displayed inline (e.g., in tooltips) and via PSI-based lookups in addition to standard IDE documentation. This is achieved by introducing \TranslatableInlineDocumentationProvider\ to wrap inline documentation items, \TranslatablePsiDocumentationTargetProvider\ to handle PSI element lookups, and \TranslatableIdeDocumentationTargetProvider\ to intercept standard IDE documentation targets. The IDE target provider specifically supports Rider and CLion (via the Radler plugin), ensuring that documentation in these environments is also translated.

src/main/kotlin/cn/yiiguxing/plugin/translate/documentation/provider · high confidence

Support for quick document translation in Rider and CLion

Added TranslatableDocumentationLinkHandler to enable quick document translation for Kotlin symbols in Rider and CLion. The handler intercepts documentation link resolution to wrap targets in a TranslatableDocumentationTarget, supporting both synchronous resolved targets and asynchronous link resolution results via reflection-based property access.

src/main/kotlin/cn/yiiguxing/plugin/translate/documentation/handler · high confidence

Translation engine selection and inline documentation translation

Users can now switch between translation engines (Google, Microsoft, Youdao, Baidu, Ali, DeepL, OpenAI) via the TranslationEngineAction, and the plugin supports translating inline documentation in the editor using the FileInlineDocumentationTranslateActionProvider, which integrates with the IDE's documentation rendering system to show translated comments in Reader Mode.

repository · high confidence

Youdao translator now supports domain-specific translation and documentation translation

The Youdao translation engine has been updated to support domain-specific translation (General, Computers, Finance, Medicine) via a new setting in the configuration dialog, allowing users to select a specific domain to improve translation accuracy. Additionally, the translator now supports documentation translation, enabling the translation of HTML content from documentation sources using Youdao's HTML translation API.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/youdao · high confidence

Removals

Removal of legacy translation plugin source code

The translation functionality implemented in the \src/cn\ package has been removed. This includes the deletion of the core translation engine (\Translate.java\), the query dialog UI (\TranslateDialog.java\ and its form), data models for API responses (\BasicExplain.java\, \QueryResult.java\, \WebExplain.java\), JSON parsing utilities (\JsonHelper.java\), and a custom LRU cache implementation (\LruCache.java\). This change eliminates the previous Youdao-based translation feature and its associated UI components from the plugin.

src/cn · high confidence

Behavioural changes

Add OpenAI status exception handling

The translation plugin now includes a specific exception class, OpenAIStatusException, to handle HTTP errors from the OpenAI API. This exception captures the HTTP status code, the request URL, and an optional error detail object, allowing the application to distinguish and respond to specific API failure scenarios more effectively.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/openai/exception · high confidence

Ali Translator implementation refactored with new language adapter and error handling

The Ali Translator module has been restructured to improve stability and maintainability. A new \AliLanguageAdapter\ centralizes source and target language definitions and handles code mapping (e.g., 'zh' to Chinese Simplified), replacing previous inline logic. The translation engine now uses dedicated model classes (\AliMTRequest\, \AliMTResponse\, \AliTranslationInput\) for cleaner API interaction. Error handling has been updated with a new \AliTranslationResultException\ to provide specific error codes and messages, and the parser now robustly handles empty responses and null pointers that previously caused crashes.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/ali · high confidence

Baidu Translator language support and error handling updated

The Baidu translator now uses a dedicated language adapter that expands the list of supported languages, including classical Chinese and additional languages for the Pro tier, and maps Baidu API codes to internal language identifiers. Error handling has been refined to provide specific user actions for certain API errors, such as prompting to check configuration for invalid accounts or signatures, and browsing the Baidu Fanyi product page when the service is down.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/baidu · high confidence

Centralized icon management for translation features

The \TranslationIcons\ object has been introduced to centralize and organize all icons related to the translation plugin. This includes general UI icons (such as arrow expand/collapse, configuration, documentation, speech, and stop controls) and specific icons for translation states (success, failure, inactivation, replacement, and small variants). Additionally, a nested \Engines\ object now provides dedicated logos for supported translation providers, including Ali, Baidu, DeepL, Google, Microsoft, OpenAI, and Youdao. This change consolidates icon loading logic into a single location, improving consistency and maintainability for the translation user interface.

src/main/kotlin/icons · high confidence

Documentation translation now uses pluggable HTML strategies

The documentation translator has been refactored to support different HTML translation strategies, allowing the system to adapt to translation services with varying levels of HTML awareness. This change introduces a new \HtmlTranslationStrategy\ interface and specific implementations (such as \PlainTextHtmlTranslationStrategy\) that define how HTML content is parsed, which text segments are translatable, and how results are applied back to the document structure. Users benefit from more robust handling of documentation content, particularly for services that cannot natively process HTML tags, as the system can now intelligently merge or separate text nodes to preserve context while avoiding translation of protected elements like code or scripts.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/documentation · high confidence

Google Translate engine refactored with dictionary support and custom server settings

The Google Translate integration has been refactored to support bilingual dictionary lookups and example sentences, exposing these as structured document types (DictionaryDocument and ExampleDocument) for richer translation results. The engine now allows users to configure a custom API server URL via the settings dialog, with validation for the URL format, and includes an option to keep the original text in documentation translations. Additionally, the language adapter has been updated to explicitly handle unsupported languages (such as specific Chinese and Kurdish variants) and defaults to the Google Translate PA API endpoint.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/google · high confidence

Migrate startup logic to ProjectActivity and add IDE version warning

The plugin's startup sequence has been refactored to use IntelliJ's modern \ProjectActivity\ interface via a new \BaseStartupActivity\ base class, replacing previous mechanisms. This change introduces two specific startup behaviors: an optional "Word of the Day" dialog that appears on IDE launch if enabled in settings, and a warning notification for users running IDE versions older than 2024.1.

src/main/kotlin/cn/yiiguxing/plugin/translate/activity · high confidence

New TTS audio playback engine with robust error handling

The TTS sound module now uses a new \AudioPlayer\ implementation that decodes audio streams to PCM format and manages playback via a dedicated worker thread. This change introduces explicit playback states (Idle, Preparing, Playing, Stopped, Error) and ensures that audio errors are caught and reported rather than causing silent failures, providing a more reliable experience when playing translated speech.

src/main/kotlin/cn/yiiguxing/plugin/translate/tts/sound · high confidence

New animated icons for translation status and sound feedback

The translation UI now includes dedicated animated icons to improve visual feedback. A small progress icon has been added to the status bar of the Translation dialog to indicate ongoing translation tasks. Additionally, a sound icon provides animated feedback for audio playback states (active, passive, disabled), and a spinner icon with adjusted sizing for high-DPI displays is available for general loading indicators.

src/main/kotlin/cn/yiiguxing/plugin/translate/ui/icon · high confidence

New error page and enhanced release notes UI

Users will now see a dedicated error page (error.html) with a branded loading state and logo when issues occur, replacing previous generic displays. Additionally, the release notes interface has been updated with improved styling, structure, and localization support, including refined button styles and simplified logo presentation for a cleaner look.

src/main/resources/web · high confidence

New helper for consistent engine settings panel layout

A new Kotlin DSL helper function, engineSettingsPanel, has been added to standardize the structure of translation engine settings dialogs. This utility automatically centers an engine logo at the top of the settings panel and delegates the remaining configuration to a provided builder, ensuring a consistent visual presentation across different engine configurations.

src/main/kotlin/cn/yiiguxing/plugin/translate/openapi/ui · high confidence

OpenAI translator and TTS engine restructured with Azure support and new models

The OpenAI translation and text-to-speech (TTS) components have been completely rewritten to support both OpenAI and Azure OpenAI services. Users can now configure separate API endpoints, keys, and paths for translation and TTS, with Azure support including deployment IDs and API version selection (e.g., 2024-10-21, 2025-01-01-preview). New models are available, including GPT-5.4, GPT-5.4-mini, GPT-5.5, and GPT-4o-mini TTS, along with additional TTS voices (Verse, Marin, Cedar). The translator now uses prompt templates and supports custom model names. Cache keys now include model and configuration hashes to improve cache accuracy. TTS speed is configurable with a new range (0–400).

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/openai · high confidence

Redesigned translation dialog and language selection UI

The translation interface has been overhauled with a new dialog layout and improved language selection controls. Users will now see a dedicated language selection popup with keyboard navigation support, a new 'Fix Language' link to correct auto-detected source languages, and a cleaner settings dialog for API keys. The balloon popup behavior has been optimized for better positioning and stability, and the overall UI now uses a custom ActionLink component and updated layout managers for a more consistent appearance.

src/main/kotlin/cn/yiiguxing/plugin/translate/ui · high confidence

Redesigned wordbook interface with tag editing and improved table interactions

The wordbook window and word details dialog have been completely rewritten to enhance usability and stability. The main wordbook table now supports double-clicking to view details, keyboard shortcuts (Delete, Escape), and a context menu for copying or deleting words. A new tag editing system allows users to manage word tags with comma-separated input and auto-completion. The word details dialog has been optimized with a compact layout, improved focus handling, and better error recovery during saves. Additionally, the wordbook window now uses a custom loading panel to resolve compatibility issues with certain IDE versions, and the 'Word of the Day' dialog has been refactored for better navigation and explanation display.

src/main/kotlin/cn/yiiguxing/plugin/translate/ui/wordbook · high confidence

Refactored TTS playback source architecture with multi-source support

The TTS playback engine has been refactored to support multiple audio sources and improved resource management. A new \PlaybackLoader\ abstraction allows for flexible data loading, including a \MultiSource\ loader for chaining multiple audio inputs. New concrete implementations, \DefaultPlaybackSource\, \FilePlaybackSource\, and \InputStreamPlaybackSource\, provide standardized ways to handle audio from files, streams, or custom loaders. The \PushablePlaybackSource\ class has been updated to ensure resources are properly released and to correctly handle preparation cancellation, preventing issues where playback sources might not be cleaned up or where the preparation process could be incorrectly interrupted.

src/main/kotlin/cn/yiiguxing/plugin/translate/tts/sound/source · high confidence

Refactored credential storage to use IntelliJ's PasswordSafe

The plugin now stores credentials using IntelliJ's secure PasswordSafe service instead of previous methods. This change introduces a new credential management architecture with a \StringCredentialManager\ interface and a \SimpleStringCredentialManager\ implementation that delegates storage to the IDE's native password safe, ensuring credentials are handled securely and consistently with the platform's standards.

src/main/kotlin/cn/yiiguxing/plugin/translate/util/credential · high confidence

Refactored translation actions with new selection modes and priority system

The translation actions in the editor have been restructured to support distinct text selection behaviors: the new ExclusiveTranslateAction and InclusiveTranslateAction allow users to choose between translating only the word under the caret or the entire selected text, respectively, while the EditorTranslateAction now respects the configured auto-selection mode. A new priority system (via ImportantTranslationAction and TranslationPromoter) ensures these actions appear in the correct order in context menus, and the ReplaceWithTranslationAction has been renamed and updated to work with these new selection modes. Additionally, the SwitchEngineAction now uses a ComboBoxAction for engine switching, and the ShowTranslationDialogAction can be configured to automatically select text when opened.

src/main/kotlin/cn/yiiguxing/plugin/translate/action · high confidence

Refactored wordbook import logic into a modular importer interface

The wordbook import functionality has been restructured to use a new \WordBookImporter\ interface located in the \imports\ package, with specific implementations for JSON (\JsonWordBookImporter\) and XML (\XmlWordBookImporter\) formats. This change centralizes the import workflow, handling progress indication and error logging within the interface's default \import\ method, while delegating format-specific parsing to the concrete classes. This modular approach supports the fix for garbled characters by ensuring consistent UTF-8 encoding during input stream reading.

src/main/kotlin/cn/yiiguxing/plugin/translate/wordbook/imports · high confidence

Reimplemented translation settings UI with new configuration components

The translation settings page has been completely rebuilt using a new modular UI architecture. This introduces a \ConfigurableUi\ interface and a dedicated \SettingsPanel\ that manages the settings state, including live validation for the ignore regular expression and asynchronous cache size updates. The language selection experience is improved with a new \LanguageSelectionComboBox\ that groups language options with separators. Additionally, users can now configure the wordbook storage location via a new \WordbookStoragePathBrowser\ that supports moving or overwriting existing storage files, and the translation engine selection is handled by a new \TranslationEngine\ enum that centralizes configuration dialogs for engines like Microsoft, Google, Youdao, Baidu, Ali, DeepL, and OpenAI.

src/main/kotlin/cn/yiiguxing/plugin/translate/ui/settings · high confidence

Reimplemented word book with new service, UI, and import/export capabilities

The word book feature has been completely rebuilt, introducing a dedicated tool window and a new service layer backed by SQLite. Users can now manage their vocabulary through a new UI that supports grouping by tags, viewing word details, and multi-select operations. The word book also adds the ability to import and export words in JSON, XML, Youdao XML, and TXT formats. The underlying storage has been migrated to a new SQLite-based system, and the service now handles driver downloads and storage path changes more robustly.

src/main/kotlin/cn/yiiguxing/plugin/translate/wordbook · high confidence

Translation plugin core refactored with new architecture and settings

The translation plugin has been refactored to use a new Presenter-View contract, introducing a \TranslationPresenter\ that manages translation logic, language selection strategies (including last-used and primary language modes), and history tracking via \TranslationStates\. A new \Settings\ class centralizes configuration for translation engines (Baidu, Ali, Youdao, DeepL, OpenAI, Azure), TTS engines (Edge, OpenAI), font overrides, and UI behaviors like auto-replacement and word folding. Data storage has been migrated to a dedicated directory (\TranslationPlugin\ in user's local app data or XDG\_DATA\_HOME) with separate cache and preference files. A new \HelpProvider\ routes help topics to specific service documentation URLs, and registry keys for HTTP user agent and WebView debugging have been added.

src/main/kotlin/cn/yiiguxing/plugin/translate · high confidence

Unified translation model and error handling infrastructure

The translation subsystem now uses a unified \BaseTranslation\ data class and a dedicated \TranslationException\ that includes the translator ID, name, and structured error info, replacing previous ad-hoc exception handling. A new \TranslateClient\ base class centralizes execution, caching (with separate tokens for text and documentation), and error investigation, attaching request/response details to diagnostic reports. Language support is standardized via a \LanguageAdapter\ interface and the \Lang\ enum now exposes \localeName\, while the \Translator\ interface adds icon, primary language, and cache token capabilities. Error notifications now include a 'Switch Engine' action to let users quickly change translation providers when a failure occurs.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans · high confidence

Fixes

Fix async promise error handling and potential deadlock

The concurrent utility module now includes a new \asyncLatch\ helper and several Promise extension methods (such as \expireWith\, \successOnUiThread\, and \errorOnUiThread\) to improve asynchronous operation management. These changes specifically address error handling in \AsyncPromise\ scenarios and resolve a logic issue that could previously cause deadlocks, ensuring more stable background task execution within the IDE.

src/main/kotlin/cn/yiiguxing/plugin/translate/util/concurrent · high confidence

Test coverage

Added tests for documentation translation strategies and OpenAI request configuration; Added tests for string utilities and rate limiter; Added tests for version parsing and comparison logic.

Dependencies

Initial Gradle wrapper configuration for version 8.9

The project now includes a Gradle wrapper configuration file that sets the build tool version to 8.9. This ensures that all builds use the specified Gradle distribution, downloaded from the official services URL, with a network timeout of 10 seconds and distribution URL validation enabled.

gradle · high confidence

Migrate to Gradle Version Catalog and modernize build tooling

The build system has been migrated to use the Gradle Version Catalog (libs.versions.toml) for centralized dependency management, upgrading the Gradle wrapper to 8.9 and the Kotlin compiler to 2.1.21. This update also bumps the target IntelliJ Platform version to 2024.1, updates the IntelliJ Gradle plugin to 1.17.4, and enables the Gradle Configuration Cache and Build Cache for improved build performance. Third-party dependencies such as jsoup (1.22.2), commons-dbutils (1.8.1), and Java-WebSocket (1.6.0) are updated to their latest stable versions.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 45 → 49 (+3.9)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 83 → 83 (-0.0)
  • Architecture 84 → 97 (+13.7)
  • Maturity 55 → 55 (+0.5)
  • Readiness 44 → 59 (+14.8)
  • Security 38 → 38 (+0.0)
  • Accessibility 44 → 49 (+5.3)
  • Performance 78 → 100 (+21.7)

Resolved (2)

  • Duplicated block (5 lines × 2) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/text/ExampleDocument.kt)
  • Projects may be oversized for their cohesion

New (15)

  • Duplicated block (5 lines × 2) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/text/ExampleDocument.kt)
  • Duplicated block (7 lines × 2) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/ali/AliTranslator.kt)
  • Edited copies of one member (3 members, 12+ corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/baidu/BaiduTranslator.kt)
  • Edited copies of one member (3 members, 7+ corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/ali/AliTranslator.kt)
  • Edited copy of a member (11 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/microsoft/MicrosoftHttp.kt)
  • Edited copy of a member (16 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/util/CharSequences.kt)
  • Edited copy of a member (17 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/openai/config/OpenAiRequestConfigService.kt)
  • Edited copy of a member (17 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/youdao/YoudaoSettingsDialog.kt)
  • Edited copy of a member (19 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/ui/FixedSizeCardLayout.kt)
  • Edited copy of a member (20 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/util/UrlTrackingParametersProvider.kt)
  • Edited copy of a member (21 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/action/SwitchEngineAction.kt)
  • Edited copy of a member (25 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/baidu/BaiduTranslator.kt)
  • Edited copy of a member (27 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/microsoft/BingTranslator.kt)
  • Edited copy of a member (7 corresponding lines) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/TranslateService.kt)
  • GoogleTranslateAPIKt spells API where 28 names in the project spell it Api (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/google/GoogleTranslateAPI.kt)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

YiiGuxing/TranslationPlugin was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit bb50b0f4debe5464ffe99ede63c95e5456862bb7 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.63+preprod-4a8cc97a9484.