Skip to content
CAI
Software that uses CAICheck a score

YiiGuxing/TranslationPlugin

37.0

Weak · 25 September 2026

27.3k

lines of production code

Kotlin

primary language

4

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 multiple translation engines, including Google, Microsoft, DeepL, and OpenAI, to translate code comments, documentation, and selected text directly within the IDE. The plugin also features a wordbook for vocabulary management, inline documentation translation, and customizable settings for language selection and API credentials.

How it got here

2016–2019 — Architecture modernization and feature expansion

19 changes.

The project underwent a comprehensive architectural overhaul, migrating from legacy Java components to a modern Kotlin-based structure with a Presenter-View pattern and Gradle Version Catalog. This period saw the removal of outdated Youdao-specific code and the introduction of a robust utility layer, alongside the expansion of supported translation and text-to-speech engines. Significant enhancements included a redesigned UI, a SQLite-backed wordbook with import/export capabilities, and improved text rendering for richer translation results.

2020–2023 — Translation engine expansion and refactoring

20 changes.

This period focused on significantly expanding the plugin's translation capabilities by integrating new engines for DeepL, OpenAI, and Microsoft, while refactoring existing providers like Google, Baidu, and Youdao for better stability and feature parity. The work also involved major architectural improvements, including centralized UI management, secure credential storage via IntelliJ's PasswordSafe, and robust error handling across all translation modules.

2024–2026 — TTS, documentation, and UI enhancements

20 changes.

This period focused on expanding text-to-speech capabilities with a robust new playback engine and Microsoft Edge TTS support, while introducing configurable prompt templates and request configurations for OpenAI. Significant work was also done to enhance inline and rendered documentation translation across multiple IDEs, alongside a comprehensive overhaul of the in-app WebView infrastructure for better UI integration and resource handling.

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 model classes

Added Kotlin data classes and builders for the OpenAI Chat Completion API, including ChatChoice, ChatCompletion, ChatCompletionRequest, ChatMessage, and ChatRole. These classes provide the data structures needed to construct chat requests and parse responses from the OpenAI API.

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

Add model classes for dictionary lookup, examples, and authentication

The Microsoft Translator integration now supports dictionary lookups, example sentences, and spell checking. New data models in the \microsoft.models\ package define the structures for dictionary entries (including part-of-speech tags and back-translations), example sentences, and spell check results. Additionally, authentication models for Azure (access tokens and subscription keys) and Bing have been added to support the underlying API services.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/microsoft/models · high 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

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

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 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 providers

This change introduces a new set of actions and providers in the \documentation.actions\ package to handle inline documentation translation. It adds \FileInlineDocumentationTranslateActionProvider\ to manage file-level inline translations with a 50-item limit and banner notifications, \TranslateDocumentationActionProvider\ to expose translation actions for rendered documentation comments, and \TranslateRenderedDocAction\ to toggle translation for specific rendered doc elements. Additionally, it includes \ToggleQuickDocTranslationAction\ for toggling translation in the quick documentation browser, \ShowTranslatedQuickDocInfoAction\ to display info about translated quick docs, and \TranslateRenderedDocSelectionAction\ to translate selected text within rendered documentation using a custom balloon position tracker. These components collectively enable users to translate inline and rendered documentation directly within the editor and quick doc 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

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-specific exception handling classes

The translation plugin now includes dedicated exception classes for OpenAI API interactions. A new \OpenAIStatusException\ extends IntelliJ's HTTP status exception to capture response details including status code, URL, and an optional error object. Additionally, an \OpenAiError\ data class is introduced to model the structured error response returned by the OpenAI API, mapping fields such as error code, message, parameter, and type. These changes improve error reporting and debugging for users encountering issues with OpenAI-based translations.

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

Google Translate engine refactored with new API, settings, and document support

The Google Translate integration has been significantly refactored to use a new internal API structure, introducing separate clients for text (GTX) and documentation (TE\_LIB) translation. A new settings dialog allows users to configure a custom server URL and enables an option to keep the original text during documentation translation. The engine now supports richer translation results, including bilingual dictionary entries and example sentences, and explicitly excludes unsupported languages such as Kurdish (general), Chinese (general), and various regional variants.

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

Inline and hover documentation translation with status and error handling

The plugin now translates inline code comments and hover documentation popups. Translated content is displayed directly in the editor or tooltip, with visual indicators (icons and messages) showing translation status, loading states, or errors. The system tracks which provider performed the translation and uses cache tokens to avoid redundant work, while also filtering out specific UI elements (like JavaScript or PHP source snippets) from the translated output to preserve formatting.

src/main/kotlin/cn/yiiguxing/plugin/translate/documentation · 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 HTML documentation translation with pluggable strategies

The HTML documentation translator has been refactored to support pluggable translation strategies, allowing the plugin to adapt to different translation service capabilities. Three strategies are now available: PlaceholderHtmlTranslationStrategy for services that recognize basic tags but not attributes, RawHtmlTranslationStrategy for services that can handle full HTML including attributes, and PlainTextHtmlTranslationStrategy for services that cannot recognize any HTML tags. This change improves translation quality by preserving HTML structure and attributes when the translation service supports it, while falling back to safer plain-text translation when necessary. Additionally, protected inline tags (code, samp, kbd, var) now remain empty when their placeholder content is empty, preventing unintended text insertion.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/documentation · 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 translation document rendering with styled, named, and dictionary views

The translation result display has been restructured to support richer, styled content. A new \TranslationDocument\ interface and helper extension functions (\apply\, \append\) now drive the \StyledViewer\, replacing the previous monolithic approach. This enables specific document types: \ExampleDocument\ renders usage examples with folding capabilities for additional entries; \DictionaryDocument\ presents dictionary groups with distinct styling for parts of speech, words, and reverse translations, including clickable interactions; and \NamedTranslationDocument\ wraps other documents with styled titles. This change improves the visual presentation and interactivity of translation results, examples, and dictionary lookups within the plugin.

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

Refactored translation engine architecture and error handling

The translation subsystem has been restructured to improve reliability and extensibility. A new \TranslateService\ now centrally manages translator instances (Google, Microsoft, Youdao, Baidu, Ali, DeepL, OpenAI) and handles caching and listener notifications. The \AbstractTranslator\ and \TranslateClient\ classes provide a unified execution flow with integrated disk caching and standardized error reporting via \ReportException\. Language support has been expanded and standardized through the \Lang\ enum and \LanguageAdapter\, while the \Translation\ data model now includes fields for transliteration, spelling, and dictionary documents to enrich the user's view of translation results.

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

Refactored wordbook export logic into a dedicated package

The wordbook export functionality has been reorganized into the new \cn.yiiguxing.plugin.translate.wordbook.exports\ package. This change introduces a \WordBookExporter\ interface and concrete implementations for XML, JSON, TXT, and Youdao XML formats, replacing the previous structure. For users, this ensures consistent export behavior across all supported formats while maintaining the same output capabilities.

src/main/kotlin/cn/yiiguxing/plugin/translate/wordbook/exports · 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 plugin update notification and version checking

The plugin's update mechanism has been rewritten to use semantic versioning for more accurate change detection. Users will now see a richer update notification that includes a link to the GitHub milestone page for the current version, a 'What's New' action for feature updates, and a 'Getting Started' action on first installation. The update check runs as a startup activity, and the notification is displayed via a balloon popup when possible, falling back to the standard notification tray if the balloon cannot be shown.

src/main/kotlin/cn/yiiguxing/plugin/translate/update · 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

Youdao Translate engine receives a complete rewrite with domain support and documentation translation

The Youdao translation engine has been refactored to support domain-specific translation (General, Computers, Finance, Medicine) via a new settings dialog, and now includes dedicated support for translating documentation (HTML) in addition to standard text. The implementation introduces a new request signing helper, a language adapter for Youdao's specific codes, and new document classes to render dictionary entries and web explanations with styled formatting.

src/main/kotlin/cn/yiiguxing/plugin/translate/trans/youdao · 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 HTML documentation translation strategies; Added tests for OpenAI request configuration parsing and resolution; 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 watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 27 → 37 (+10.4)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 97 (-1.6)
  • Architecture 94 → 97 (+3.3)
  • Maturity 55 → 55 (-0.0)
  • Readiness 26 → 44 (+18.2)
  • Security 0 → 18 (+17.8)
  • Accessibility 48 (new)

Resolved (40)

  • Coverage not measured — test suite did not build
  • Dimension evaluation failed
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 20 more

New (69)

  • CamelCaseSplitter.split (cognitive 24) (src/main/kotlin/cn/yiiguxing/plugin/translate/util/CamelCaseSplitter.kt)
  • CamelCaseSplitter.split (cyclomatic 17) (src/main/kotlin/cn/yiiguxing/plugin/translate/util/CamelCaseSplitter.kt)
  • Change coupling: TranslationDialog.kt ↔ WordFavoritesUi.kt (src/main/kotlin/cn/yiiguxing/plugin/translate/ui/TranslationDialog.kt)
  • ClassTooLong: TranslationDialog (src/main/kotlin/cn/yiiguxing/plugin/translate/ui/TranslationDialog.kt)
  • ClassTooLong: WordBookService (src/main/kotlin/cn/yiiguxing/plugin/translate/wordbook/WordBookService.kt)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (5 lines × 2) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/text/ExampleDocument.kt)
  • Factory.getDocument (cognitive 20) (src/main/kotlin/cn/yiiguxing/plugin/translate/trans/youdao/YoudaoDictDocument.kt)
  • FileTooLong: ui/TranslationDialog.kt (src/main/kotlin/cn/yiiguxing/plugin/translate/ui/TranslationDialog.kt)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 49 more

Changes since last survey

  • 76 commits — 70 feature/other, 6 fixes

By area

  • src/main — 58 commits
  • (root) — 13 commits
  • (repo) — 3 commits
  • .github/workflows — 1 commit
  • src/test — 1 commit

Notable commits

  • fix: Fix ClassCastException in MicrosoftHttp postWithCache
  • fix: Fix ClassNotFoundException when CLion C and C++ plugin is installed but disabled
  • fix: Fix OpenAI request config file detection in editor providers
  • fix: Fix balloon pointer tracking when space is insufficient
  • fix: Fix documentation translation cache key collision for Google Translate (#6470)
  • fix: Merge branch 'v3.8/241-fix-balloon' into v3.8/241
  • change: :rocket: v3.9.0
  • change: :rocket: v3.9.1
  • change: Add BingEdgeTranslatorService for Bing authentication handling
  • change: Add Edge documentation translator
  • change: Add HTML documentation translator
  • change: Add Microsoft translator keepOriginal setting
  • change: Add RequiresBackgroundThread annotation to translateDocumentation method
  • change: Add TextTranslator interface
  • change: Add AsyncData and AsyncExpiringData interfaces for asynchronous data management
  • change: Add opencode.json* to gitignore
  • change: Add config file support for customizing OpenAI-compatible chat completion requests
  • change: Add dynamic keepOriginal provider constructor to EdgeDocumentationTranslator
  • change: Add open config directory action to the OpenAI request config editor
  • change: Add open in main editor action for the OpenAI request config file
  • …and 56 more

Written by watchdog.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 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 2b92876d3b22e616f6404a77700e9e90cba0321a — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-dd72cc24c749.