dict[file].regex rows. It shares the same plugin editor shell, file list, save button, and source preview panel as the AST editor, but it shows regex extraction results instead of AST nodes.
Open the Regex editor
1
Open the i18n Manager
Click the globe icon in the sidebar.
2
Open a plugin editor
In the plugin translation flow, open the plugin you want to edit.
3
Switch to Regex
In the switcher card on the left side of the editor, change
AST / Regex to Regex.Regex is a workspace inside the plugin editor. It is not a separate manager tab and it is not the settings page for regex extraction rules.Table structure and editing
The Regex table has exactly three columns:
Click a target cell to edit it inline. When the cell loses focus, the new text is written back into the current editor state.
- reset sets
targetback tosource - the reset button is disabled when
target === source - the table shows an empty state when the current file has no regex rows
Search and filters
The search box only matches these two fields:sourcetarget
When you switch files, the Regex editor clears the search text, resets the filter to
all, and clears the current editing row.
Sidebar capabilities
The right sidebar contains a stats card, a manual insert card, a quick actions card, a diagnose card, and an AI translation card. The stats, insert, quick actions, and AI cards can be toggled from the sidebar view menu. The diagnose card is always shown.Stats card
The stats card calculates these values from the current file’s regex rows:- total row count
- translated row count
- untranslated row count
- progress percentage
target exists and target !== source.
Manual insert card
The新增规则 card adds one regex row to the current file.
- the
sourcefield is validated withnew RegExp(pattern) - the add button is disabled while
sourceis invalid - when
targetis empty, the stored value becomessource Ctrl+Entersubmits the current row
Quick actions card
The quick actions card exposes three actions:- open the current source file
- run incremental extraction for the current file
- delete untranslated rows
RegexTranslator(i18n.settings).extractTranslationsByRegex(...), and merges the result with existing rows through mergeRegexItems(...). It does not replace the full table unconditionally.
If the current plugin is already applied, incremental extraction is disabled in the UI and blocked again in the extraction logic.
Delete untranslated keeps only rows that meet all of these conditions:
targetexiststarget !== sourcetarget.trim() !== ''
Diagnose card
The diagnose card supports three scan modes:- syntax diagnose
- unused scan
- security scan
error, unused, or security.
The diagnose card also provides these actions:
- clear current diagnose results
- delete unused rows
- restore all error rows
- run AI fix for one row when the issue is neither unused nor security-related
AI batch translation
The Regex AI panel exposes these controls:- target language
- style
- batch size
- concurrency limit
- timeout
- overwrite existing targets or not
language, llmLanguage, llmStyle, llmBatchSize, llmConcurrencyLimit, and llmTimeout.
When overwrite = false, batch translation only includes rows whose target is:
- empty
- whitespace-only
- equal to
source
estimateTokens(targetItems, 'regex') to show the estimated token usage and cost. The running task can also be stopped from the same panel.
How does the Regex editor relate to regex extraction settings?
How does the Regex editor relate to regex extraction settings?
The Regex editor maintains rows that have already been extracted. Regex extraction itself reads the current settings fields
reFlags, reLength, reDatas, reRejectRe, and reValidRe. The Regex AI prompt uses llmRegexPrompt.