codex-overleaf-link 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +457 -0
- package/bin/codex-overleaf-link.mjs +223 -0
- package/extension/src/shared/agentTranscript.js +1175 -0
- package/extension/src/shared/auditRecords.js +568 -0
- package/extension/src/shared/compatibility.js +372 -0
- package/extension/src/shared/compileAdapter.js +176 -0
- package/extension/src/shared/governanceRules.js +252 -0
- package/extension/src/shared/i18n.js +565 -0
- package/extension/src/shared/models.js +106 -0
- package/extension/src/shared/otText.js +505 -0
- package/extension/src/shared/projectFiles.js +180 -0
- package/extension/src/shared/reviewing.js +99 -0
- package/extension/src/shared/sensitiveScan.js +116 -0
- package/extension/src/shared/sessionState.js +1084 -0
- package/extension/src/shared/staleGuard.js +150 -0
- package/extension/src/shared/storageDb.js +986 -0
- package/extension/src/shared/storageKeys.js +29 -0
- package/extension/src/shared/storageMigration.js +168 -0
- package/extension/src/shared/summary.js +248 -0
- package/extension/src/shared/undoOperations.js +369 -0
- package/native-host/src/codexArgs.js +43 -0
- package/native-host/src/codexHome.js +538 -0
- package/native-host/src/codexModels.js +247 -0
- package/native-host/src/codexPrompt.js +192 -0
- package/native-host/src/codexPromptAssembly.js +411 -0
- package/native-host/src/codexSessionRunner.js +1247 -0
- package/native-host/src/commandApproval.js +914 -0
- package/native-host/src/debugLog.js +78 -0
- package/native-host/src/diffEngine.js +247 -0
- package/native-host/src/index.js +132 -0
- package/native-host/src/launcher.js +81 -0
- package/native-host/src/localSkills.js +476 -0
- package/native-host/src/manifest.js +226 -0
- package/native-host/src/mirrorSensitiveScan.js +119 -0
- package/native-host/src/mirrorWorkspace.js +1019 -0
- package/native-host/src/nativeDoctor.js +826 -0
- package/native-host/src/nativeEnvironment.js +315 -0
- package/native-host/src/nativeHostPlatform.js +112 -0
- package/native-host/src/nativeMessaging.js +60 -0
- package/native-host/src/nativeQuotas.js +294 -0
- package/native-host/src/nativeResponseBudget.js +194 -0
- package/native-host/src/runtimeInstaller.js +357 -0
- package/native-host/src/taskRunner.js +3 -0
- package/native-host/src/taskRunnerRuntime.js +1083 -0
- package/native-host/src/textPatch.js +287 -0
- package/package.json +40 -0
- package/scripts/codex-json-agent.mjs +269 -0
- package/scripts/install-native-host.mjs +255 -0
- package/scripts/npm-package-files-v1.1.1.txt +52 -0
- package/scripts/uninstall-native-host.mjs +298 -0
- package/scripts/verify-npm-package.mjs +296 -0
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
(function initCodexOverleafI18n(root, factory) {
|
|
2
|
+
if (typeof module === 'object' && module.exports) {
|
|
3
|
+
module.exports = factory();
|
|
4
|
+
} else {
|
|
5
|
+
root.CodexOverleafI18n = factory();
|
|
6
|
+
}
|
|
7
|
+
})(typeof globalThis !== 'undefined' ? globalThis : window, function i18nFactory() {
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
const DEFAULT_LOCALE = 'en';
|
|
11
|
+
const VALID_LOCALES = new Set(['en', 'zh']);
|
|
12
|
+
|
|
13
|
+
const MESSAGES = {
|
|
14
|
+
en: {
|
|
15
|
+
resizePanel: 'Drag to resize the Codex panel. Double click to reset.',
|
|
16
|
+
codexActions: 'Codex actions',
|
|
17
|
+
refreshProbe: 'Refresh current file status. This will not sync or modify files.',
|
|
18
|
+
diagnosticsMenu: 'Diagnostics',
|
|
19
|
+
diagnosticsHint: 'Use when Codex cannot run, write, or read files',
|
|
20
|
+
diagnosticsNativeTitle: 'Check Local Connection',
|
|
21
|
+
diagnosticsNativeSubtitle: 'Codex, Native Host, LaTeX tools',
|
|
22
|
+
diagnosticsPageTitle: 'Check Overleaf Write Access',
|
|
23
|
+
diagnosticsPageSubtitle: 'Current file, write access, track changes',
|
|
24
|
+
diagnosticsSnapshotTitle: 'Check Project Read',
|
|
25
|
+
diagnosticsSnapshotSubtitle: 'Full project, assets, read source',
|
|
26
|
+
diagnosticsOtTitle: 'Check Experimental OT Mirror',
|
|
27
|
+
diagnosticsOtSubtitle: 'Status, fresh files, fallback',
|
|
28
|
+
diagnosticsExportTitle: 'Export Diagnostics',
|
|
29
|
+
diagnosticsExportSubtitle: 'Redacted audit and environment bundle',
|
|
30
|
+
diagnosticsExportDone: 'Diagnostics bundle exported.',
|
|
31
|
+
diagnosticsOtSummaryEnabled: 'Experimental OT is enabled. Codex will use the OT-warmed mirror only when matching files are fresh; otherwise it falls back to the normal project read path.',
|
|
32
|
+
diagnosticsOtSummaryDisabled: 'Experimental OT is disabled, so Codex is using the normal project read path.',
|
|
33
|
+
diagnosticsOtNextStep: 'If you expected OT warm reads, turn on OT and wait for the status to show Live before relying on it.',
|
|
34
|
+
experimentalOtMenuTitle: 'Experimental OT Mirror',
|
|
35
|
+
experimentalOtMenuSubtitle: 'Experimental: tracks the current Overleaf editor and warms the local mirror; falls back to normal project reading when unsafe.',
|
|
36
|
+
experimentalOtConfirmTitle: 'Experimental OT Mirror',
|
|
37
|
+
experimentalOtConfirmMessage: 'Experimental: tracks the current Overleaf editor and warms the local mirror so Codex can read recent focused-file edits faster. Codex uses it only when file scope is clear and the mirror is fresh; otherwise it falls back to normal project reading.',
|
|
38
|
+
experimentalOtConfirmEnable: 'Turn on',
|
|
39
|
+
experimentalOtEnabledToast: 'Experimental OT Mirror is on. Use @file for the cleanest warm-mirror test.',
|
|
40
|
+
diagnosticsSnapshotLoading: 'Checking whether the extension can read the full Overleaf project.',
|
|
41
|
+
diagnosticsSnapshotErrorSummary: 'Overleaf may still be loading, or the page API did not return project files yet.',
|
|
42
|
+
diagnosticsNativeLoading: 'Checking whether local Codex, Native Host, and LaTeX tools are available.',
|
|
43
|
+
diagnosticsNativeEmptySummary: 'The local service is connected, but it did not return Codex or LaTeX tool details.',
|
|
44
|
+
nativeCompatibilityBlockedNativeTooOld: 'Native host update required before {method}. Open Diagnostics > Check Local Connection and run the install command.',
|
|
45
|
+
nativeCompatibilityBlockedExtensionTooOld: 'Extension update required before {method}. Update the Chrome extension, reload Overleaf, and try again.',
|
|
46
|
+
nativeCompatibilityBlockedProtocol: 'Native host protocol mismatch before {method}. Update the extension and native host together.',
|
|
47
|
+
nativeCompatibilityBlockedUnhealthy: 'Local Codex is not ready for {method}. Open Diagnostics > Check Local Connection for details.',
|
|
48
|
+
nativeCompatibilityBlockedMissing: 'Native host is not connected for {method}. Install the local native host, reload the extension, and try again.',
|
|
49
|
+
nativeCompatibilityBlockedGeneric: 'Native host is not compatible with this extension for {method}. Update the native host and extension, then try again.',
|
|
50
|
+
diagnosticsPageLoading: 'Checking the current file, write access, and track changes.',
|
|
51
|
+
diagnosticsLoading: 'Checking current state.',
|
|
52
|
+
diagnosticsLoadingSummary: 'Reading diagnostics. This will not modify Overleaf files.',
|
|
53
|
+
diagnosticsResult: 'Diagnostics',
|
|
54
|
+
diagnosticsNoResult: 'No displayable diagnostic result was returned.',
|
|
55
|
+
nextStepPrefix: 'Next: ',
|
|
56
|
+
runInTerminal: 'Run in Terminal:',
|
|
57
|
+
copyInstallCommand: 'Copy install command',
|
|
58
|
+
copied: 'Copied',
|
|
59
|
+
confirmBrand: 'Codex Confirm',
|
|
60
|
+
confirmDefaultTitle: 'Codex Confirm',
|
|
61
|
+
confirmDefaultConfirm: 'OK',
|
|
62
|
+
confirmDefaultCancel: 'Cancel',
|
|
63
|
+
threadResumeFailedTitle: 'Could not restore the previous Codex session',
|
|
64
|
+
threadResumeFailedMessage: 'Create a new Codex thread and continue this task?\n\nCancel will stop this run.',
|
|
65
|
+
threadResumeNew: 'New thread',
|
|
66
|
+
deleteSessionTitle: 'Delete this Codex session?',
|
|
67
|
+
deleteSessionMessage: 'This deletes this Overleaf project\'s plugin session, run history, and the matching plugin-local Codex thread history. It will not modify Overleaf files or affect your global Codex history.',
|
|
68
|
+
deleteSessionConfirm: 'Delete',
|
|
69
|
+
deleteSessionRunningToast: 'This session is running. Cancel the task before deleting it.',
|
|
70
|
+
deleteSessionHistoryFailedToast: 'Deleted this plugin session, but the matching plugin-local Codex thread history was not fully cleared: {message}',
|
|
71
|
+
deleteSessionNoThreadToast: 'Deleted this plugin session. This old session had no identifiable local Codex thread history, so no local history was cleared.',
|
|
72
|
+
deleteSessionDoneToast: 'Deleted this plugin session.',
|
|
73
|
+
modeSwitchFailedToast: 'Could not switch mode: {message}',
|
|
74
|
+
diffAccepted: 'Accepted',
|
|
75
|
+
diffRejected: 'Rejected',
|
|
76
|
+
diffWritten: 'Written',
|
|
77
|
+
diffAccept: 'Accept',
|
|
78
|
+
diffReject: 'Reject',
|
|
79
|
+
diffAcceptAll: 'Accept all',
|
|
80
|
+
diffRejectAll: 'Reject all',
|
|
81
|
+
diffHunkAccept: 'Accept hunk',
|
|
82
|
+
diffHunkReject: 'Reject hunk',
|
|
83
|
+
diffHunkJump: 'Jump to hunk',
|
|
84
|
+
diffHunkAccepted: 'Hunk accepted',
|
|
85
|
+
diffHunkRejected: 'Hunk rejected',
|
|
86
|
+
diffHunkJumpFailed: 'Jump failed',
|
|
87
|
+
diffShowMoreHunks: 'Show {count} more hunks',
|
|
88
|
+
diffHunkExpandLines: 'Show {count} hidden lines',
|
|
89
|
+
diffFallbackFileOnly: 'Review at file level',
|
|
90
|
+
diffPendingCount: '{count} pending',
|
|
91
|
+
diffSelectionDone: 'Selection complete',
|
|
92
|
+
diffWrittenChangesTitle: 'Codex changes written',
|
|
93
|
+
undoRun: 'Undo changes',
|
|
94
|
+
undoPartialRun: 'Undo written parts',
|
|
95
|
+
undoApplied: 'Undone',
|
|
96
|
+
undoRunTitle: 'Undo this run\'s Overleaf writes',
|
|
97
|
+
undoPartialRunTitle: 'Undo the parts of this run already written to Overleaf',
|
|
98
|
+
undoAppliedTitle: 'This run\'s writes have been undone',
|
|
99
|
+
undoNoWritesTitle: 'No writes in this run; nothing to undo.',
|
|
100
|
+
undoUnsafeFullFileTitle: 'Blocked legacy full-file undo',
|
|
101
|
+
undoUnsafeFullFileReason: 'This undo point would restore the file with a full-text replacement, which can mark the whole document as changed in Overleaf Track Changes. Run the task again to create a local undo point, or handle this old change manually.',
|
|
102
|
+
undoNoTraceTitle: 'Undo this run without track changes?',
|
|
103
|
+
undoNoTraceMessage: 'This will undo this run\'s writes to {files}.\n\nIf Overleaf is using Reviewing/Track Changes, Codex will switch to Editing first. It will stay in Editing after undo; the next write can switch back to Reviewing when needed.',
|
|
104
|
+
undoConfirm: 'Undo writes',
|
|
105
|
+
undoNoTraceStarted: 'Starting no-track undo for this run',
|
|
106
|
+
undoResult: 'Undo result: undone {applied} item(s), skipped {skipped} item(s)',
|
|
107
|
+
undoTrackedTitle: 'Reject this run\'s Overleaf tracked changes?',
|
|
108
|
+
undoNativeTitle: 'Undo this run\'s Overleaf writes?',
|
|
109
|
+
undoTrackedMessage: 'This will use Overleaf Reject to undo {files}.\n\nIt will not rewrite files with text patches. If the extension cannot verify the matching tracked changes, it will stop and let you handle them in Overleaf review tools.',
|
|
110
|
+
undoNativeMessage: 'This will use Overleaf Undo to roll back {files}.\n\nBefore running, Codex verifies the current content still matches this run\'s written content. If you edited it afterward, Codex stops to avoid undoing your new changes.',
|
|
111
|
+
undoTrackedConfirm: 'Reject this run',
|
|
112
|
+
undoTrackedStarted: 'Starting rejection of this run\'s Overleaf tracked changes',
|
|
113
|
+
undoNativeStarted: 'Starting Overleaf native undo for this run',
|
|
114
|
+
undoTrackedResult: 'Undo result: rejected {applied} tracked change(s), skipped {skipped}',
|
|
115
|
+
undoNativeResult: 'Undo result: undone {applied} file(s), skipped {skipped}',
|
|
116
|
+
undoSwitchedEditing: 'Switched to Editing for undo and left Editing active afterward.',
|
|
117
|
+
undoReviewingRestoreUnverified: 'Undo completed, but Overleaf Track Changes mode was not verified afterward.',
|
|
118
|
+
undoReviewingRestoreNext: 'Check manually whether Overleaf Reviewing/Track Changes should be enabled again.',
|
|
119
|
+
undoCheckpointTracked: 'Undo point created: this run can be rejected through Overleaf ({count} tracked changes)',
|
|
120
|
+
undoCheckpointNative: 'Undo point created: this run can be rolled back with Overleaf Undo for {files}',
|
|
121
|
+
undoCheckpointNativeMethod: 'The extension did not identify stable tracked-change nodes, but it saved before/after file content. Undo will prefer Overleaf Undo and verify the current content before running.',
|
|
122
|
+
undoCheckpointMissing: 'No automatic undo point was created: this run\'s Overleaf tracked changes were not identified',
|
|
123
|
+
undoCheckpointMissingReason: 'This run wrote while Reviewing/Track Changes was enabled, but the extension could not reliably identify the tracked changes generated by Overleaf. To avoid creating new redlines with text patches, automatic undo is disabled.',
|
|
124
|
+
undoCheckpointMissingNext: 'Reject this run manually in Overleaf review tools, or rerun and try again.',
|
|
125
|
+
undoCheckpointPlain: 'Undo point created: this run has {count} reversible write(s)',
|
|
126
|
+
deleteFilePromptTitle: 'Allow Codex to delete files?',
|
|
127
|
+
deleteFilePromptMessage: '{files}\n\nOther changes can still sync if deletion is not confirmed.',
|
|
128
|
+
deleteFileConfirm: 'Allow delete',
|
|
129
|
+
deleteFileCancel: 'Skip delete',
|
|
130
|
+
dismissNotification: 'Dismiss notification',
|
|
131
|
+
repeatCountSuffix: ' ({count} times)',
|
|
132
|
+
detailAction: 'Action',
|
|
133
|
+
detailFile: 'File',
|
|
134
|
+
detailRecord: 'Record',
|
|
135
|
+
detailReason: 'Reason',
|
|
136
|
+
detailNext: 'Next',
|
|
137
|
+
detailMethod: 'Method',
|
|
138
|
+
detailTarget: 'Target',
|
|
139
|
+
detailWillUndo: 'Will undo',
|
|
140
|
+
detailUndone: 'Undone',
|
|
141
|
+
detailRejected: 'Rejected',
|
|
142
|
+
detailSkipped: 'Skipped',
|
|
143
|
+
unknownReason: 'Unknown reason',
|
|
144
|
+
unknownFile: 'Unknown file',
|
|
145
|
+
operationEdit: 'edit',
|
|
146
|
+
operationCreate: 'create',
|
|
147
|
+
operationRename: 'rename',
|
|
148
|
+
operationMove: 'move',
|
|
149
|
+
operationDelete: 'delete',
|
|
150
|
+
operationUnknown: 'unknown',
|
|
151
|
+
noneValue: 'none',
|
|
152
|
+
yes: 'Yes',
|
|
153
|
+
no: 'No',
|
|
154
|
+
switchLanguage: 'Switch to Chinese',
|
|
155
|
+
switchLanguageHint: 'Change panel language',
|
|
156
|
+
close: 'Close',
|
|
157
|
+
closeDiagnostics: 'Close diagnostics result',
|
|
158
|
+
customInstructionsSettings: 'Custom Instructions',
|
|
159
|
+
customInstructionsTitle: 'Custom Instructions',
|
|
160
|
+
customInstructionsSubtitle: 'Give Codex extra instructions and context for this Overleaf project.',
|
|
161
|
+
customInstructionsLearnMore: 'Learn more',
|
|
162
|
+
customInstructionsClose: 'Close custom instructions',
|
|
163
|
+
customInstructionsPlaceholder: 'Style, terminology, venue constraints, and LaTeX conventions for this project.',
|
|
164
|
+
projectSettingsSavedToast: 'Project settings saved.',
|
|
165
|
+
projectSettingsTitle: 'Project Settings',
|
|
166
|
+
projectSettingsSubtitle: 'Governance, local skills, and custom instructions for this Overleaf project.',
|
|
167
|
+
governanceRulesTitle: 'Governance Rules',
|
|
168
|
+
governanceReadonlyPatterns: 'Read-only patterns',
|
|
169
|
+
governanceWritablePatterns: 'Writable patterns',
|
|
170
|
+
sensitiveCheckEnabled: 'Check for sensitive content before Codex runs',
|
|
171
|
+
sensitiveConfirmAllowed: 'Allow explicit confirmation when sensitive findings exist',
|
|
172
|
+
sensitiveConfirmTitle: 'Sensitive Content Found',
|
|
173
|
+
sensitiveConfirmMessage: 'Codex found possible sensitive content. Raw detected secrets are not shown here. Continue only if this project context may be sent to Codex.',
|
|
174
|
+
sensitiveConfirmRun: 'Run anyway',
|
|
175
|
+
localSkillsTitle: 'Skills',
|
|
176
|
+
codexOverleafSkillsTitle: 'Codex Overleaf skills',
|
|
177
|
+
codexOverleafSkillsEmpty: 'No Codex Overleaf skills installed.',
|
|
178
|
+
codexOverleafSkillsDisabled: 'Codex Overleaf skills are disabled for runs.',
|
|
179
|
+
loadCodexLocalSkills: 'Load local Codex skills',
|
|
180
|
+
loadCodexOverleafSkills: 'Load Codex Overleaf skills',
|
|
181
|
+
localSkillRemove: 'Remove',
|
|
182
|
+
codexOverleafSkillRemoveDone: 'Codex Overleaf skill removed.',
|
|
183
|
+
slashInstallSkillTitle: 'Install skill',
|
|
184
|
+
slashInstallSkillSubtitle: 'Use the Codex skill installer with natural language.',
|
|
185
|
+
slashUseSkillSubtitle: 'Use this skill for the next Codex turn.',
|
|
186
|
+
skillInstallerComposerLabel: 'Skill Installer',
|
|
187
|
+
skillInstallerComposerClear: 'Clear skill installer',
|
|
188
|
+
composerSkillClear: 'Clear skill',
|
|
189
|
+
binaryAssetConfirmTitle: 'Write generated asset to Overleaf?',
|
|
190
|
+
binaryAssetConfirmMessage: 'Codex generated or changed binary asset file(s). These always require explicit confirmation.\n\n{files}',
|
|
191
|
+
binaryAssetConfirm: 'Write assets',
|
|
192
|
+
binaryAssetCancel: 'Skip assets',
|
|
193
|
+
personalizationConfig: 'Personalization',
|
|
194
|
+
save: 'Save',
|
|
195
|
+
technicalDetails: 'Technical Details',
|
|
196
|
+
newSession: 'New Session',
|
|
197
|
+
tasks: 'Tasks',
|
|
198
|
+
placeholder: 'Ask Codex anything. Type @ to add context',
|
|
199
|
+
mode: 'Mode',
|
|
200
|
+
writeMode: 'Write mode',
|
|
201
|
+
modeAsk: 'Ask',
|
|
202
|
+
modeAskTitle: 'Read and analyze only. Do not write to Overleaf.',
|
|
203
|
+
modeConfirm: 'Suggest',
|
|
204
|
+
modeConfirmTitle: 'Show a change plan first, then write after approval.',
|
|
205
|
+
modeAuto: 'Auto',
|
|
206
|
+
modeAutoTitle: 'Write directly after authorization. Deletes still require confirmation.',
|
|
207
|
+
addContext: 'Add @ context',
|
|
208
|
+
requireReviewing: 'Track',
|
|
209
|
+
requireReviewingTitle: 'When enabled, Codex checks or switches Overleaf Reviewing/Track Changes before writing. Deletes still require confirmation.',
|
|
210
|
+
autoCompile: 'Compile',
|
|
211
|
+
autoCompileTitle: 'After Codex writes, click Overleaf Recompile and record the compile result for this task. Ask mode will not trigger it.',
|
|
212
|
+
experimentalOtWarmMirror: 'Experimental OT warm mirror',
|
|
213
|
+
experimentalOtWarmMirrorShort: 'OT',
|
|
214
|
+
experimentalOtWarmMirrorTitle: 'Experimental read-only OT mirror warming. If unavailable, stale, or inconsistent, Codex falls back to the normal project read path.',
|
|
215
|
+
otStatus: 'OT status',
|
|
216
|
+
otFreshFiles: 'OT fresh files',
|
|
217
|
+
otFallback: 'Fallback',
|
|
218
|
+
otStatusOff: 'Off',
|
|
219
|
+
otStatusStarting: 'Start',
|
|
220
|
+
otStatusObserving: 'Live',
|
|
221
|
+
otStatusUnavailable: 'N/A',
|
|
222
|
+
otStatusStale: 'Stale',
|
|
223
|
+
otStatusInconsistent: 'Check',
|
|
224
|
+
modelSourceFallback: 'fallback',
|
|
225
|
+
modelSourceDiscovered: 'discovered',
|
|
226
|
+
modelSourceFailed: 'failed',
|
|
227
|
+
modelDisplayTitle: '{label} - Model list: {source}',
|
|
228
|
+
warmMirrorReuseTitle: 'Using the warmed local workspace. No Overleaf editor navigation was needed before this run.',
|
|
229
|
+
warmMirrorPartialOverlayTitle: 'The full Overleaf project was not read, but the local workspace was synced recently. Continuing with the latest full workspace plus current-file overlay.',
|
|
230
|
+
warmMirrorFocusOverlayTitle: 'Using the warmed local workspace and syncing only focus-file deltas.',
|
|
231
|
+
warmMirrorStaleRetryTitle: 'Warmed workspace is stale. Running a fresh full sync.',
|
|
232
|
+
warmMirrorStaleBlockedConclusion: 'This run did not continue: Overleaf did not provide the full project, and the local workspace is not fresh enough.',
|
|
233
|
+
warmMirrorStaleBlockedNextStep: 'Reload the Overleaf project and wait for the file list to load, then retry. You can also select a specific .tex file as @context first.',
|
|
234
|
+
warmMirrorStaleBlockedTitle: 'Blocked: local workspace is stale',
|
|
235
|
+
send: 'Send',
|
|
236
|
+
cancelRun: 'Cancel Current Task',
|
|
237
|
+
contextTitle: '@ Context',
|
|
238
|
+
refreshFileList: 'Refresh file list',
|
|
239
|
+
contextStatus: 'Type @ to add context: @file, @compile-log, @current-section.',
|
|
240
|
+
contextLoadingFiles: 'Reading available @files...',
|
|
241
|
+
contextReadFailed: 'Could not read files: {message}',
|
|
242
|
+
contextNoFiles: 'No usable text files were read from this Overleaf project.',
|
|
243
|
+
contextSelectedFiles: 'Added {count} @file items. Future tasks will focus on them first.',
|
|
244
|
+
contextDefaultWholeProject: 'Default is the whole project. Add @file; @compile-log and @current-section are available as context options.',
|
|
245
|
+
contextResourceTitle: '{path} (non-text resource, shown only as project structure for now)',
|
|
246
|
+
contextWholeProjectChip: 'Default: whole project',
|
|
247
|
+
clearFiles: 'Clear all @file context',
|
|
248
|
+
removeContextFile: 'Remove {path} from @context',
|
|
249
|
+
resource: 'Asset',
|
|
250
|
+
viewAllSessions: 'View all ({count})',
|
|
251
|
+
renameSession: 'Rename session',
|
|
252
|
+
deleteSession: 'Delete session',
|
|
253
|
+
deleteRunningSession: 'Task running. Cancel it before deleting.',
|
|
254
|
+
newSessionFallback: 'New Session',
|
|
255
|
+
emptyRunLabel: 'Start a Codex task',
|
|
256
|
+
unknownMode: 'Unknown mode',
|
|
257
|
+
askStatus: 'Ask',
|
|
258
|
+
canRun: 'Ready',
|
|
259
|
+
validatingEditor: 'Verify editor on write',
|
|
260
|
+
needsReviewing: 'Needs Reviewing',
|
|
261
|
+
needsReviewingAndFile: 'Needs Reviewing and an open file',
|
|
262
|
+
wholeProjectContext: 'will read the whole project',
|
|
263
|
+
currentFileContext: 'read the current file',
|
|
264
|
+
fileContext: 'has selected @file context',
|
|
265
|
+
contextContext: 'has selected @context',
|
|
266
|
+
refreshProbeLoading: 'Refreshing current file, write access, and track changes...',
|
|
267
|
+
refreshProbeDone: 'Refreshed: {status}',
|
|
268
|
+
refreshProbeFailed: 'Refresh failed. Reload Overleaf and try again.',
|
|
269
|
+
processedFailed: 'Failed {elapsed}',
|
|
270
|
+
processing: 'Running {elapsed}',
|
|
271
|
+
processed: 'Done {elapsed}'
|
|
272
|
+
},
|
|
273
|
+
zh: {
|
|
274
|
+
resizePanel: '拖动调整 Codex 面板宽度,双击恢复默认宽度',
|
|
275
|
+
codexActions: 'Codex 操作',
|
|
276
|
+
refreshProbe: '重新检测当前文件状态;不会同步或修改文件',
|
|
277
|
+
diagnosticsMenu: '排查问题',
|
|
278
|
+
diagnosticsHint: '遇到无法运行、无法写入、读不到文件时使用',
|
|
279
|
+
diagnosticsNativeTitle: '检查本机连接',
|
|
280
|
+
diagnosticsNativeSubtitle: 'Codex、Native Host、LaTeX 工具',
|
|
281
|
+
diagnosticsPageTitle: '检查 Overleaf 写入',
|
|
282
|
+
diagnosticsPageSubtitle: '当前文件、写入能力、留痕状态',
|
|
283
|
+
diagnosticsSnapshotTitle: '检查项目读取',
|
|
284
|
+
diagnosticsSnapshotSubtitle: '完整项目、资源文件、读取来源',
|
|
285
|
+
diagnosticsOtTitle: '检查实验性 OT Mirror',
|
|
286
|
+
diagnosticsOtSubtitle: '状态、新鲜文件、回退路径',
|
|
287
|
+
diagnosticsExportTitle: '导出诊断信息',
|
|
288
|
+
diagnosticsExportSubtitle: '已脱敏的审计和环境信息包',
|
|
289
|
+
diagnosticsExportDone: '诊断信息已导出。',
|
|
290
|
+
diagnosticsOtSummaryEnabled: '实验性 OT 已开启。只有匹配文件是新鲜状态时,Codex 才会使用 OT 预热 mirror;否则会回退到常规项目读取路径。',
|
|
291
|
+
diagnosticsOtSummaryDisabled: '实验性 OT 已关闭,Codex 会使用常规项目读取路径。',
|
|
292
|
+
diagnosticsOtNextStep: '如果你希望使用 OT 预热读取,请开启 OT,并等状态显示为“实时”后再依赖它。',
|
|
293
|
+
experimentalOtMenuTitle: '实验性 OT Mirror',
|
|
294
|
+
experimentalOtMenuSubtitle: '实验性:实时跟踪当前 Overleaf 编辑器,把改动预热到本地 mirror;不安全时自动回退到普通项目读取。',
|
|
295
|
+
experimentalOtConfirmTitle: '实验性 OT Mirror',
|
|
296
|
+
experimentalOtConfirmMessage: '实验性:实时跟踪当前 Overleaf 编辑器,把改动预热到本地 mirror,让 Codex 更快读到最近的当前文件改动。只有文件范围明确且 mirror 新鲜时才会使用;否则自动回退到普通项目读取。',
|
|
297
|
+
experimentalOtConfirmEnable: '开启',
|
|
298
|
+
experimentalOtEnabledToast: '实验性 OT Mirror 已开启。使用 @file 可以最清楚地测试 warm mirror。',
|
|
299
|
+
diagnosticsSnapshotLoading: '确认插件能否读取完整 Overleaf 项目。',
|
|
300
|
+
diagnosticsSnapshotErrorSummary: '这通常是 Overleaf 页面还没加载完成,或者当前页面接口暂时没有返回项目文件。',
|
|
301
|
+
diagnosticsNativeLoading: '确认本机 Codex、Native Host 和 LaTeX 工具是否可用。',
|
|
302
|
+
diagnosticsNativeEmptySummary: '本机服务已经连接,但没有返回 Codex 或 LaTeX 的工具详情。',
|
|
303
|
+
nativeCompatibilityBlockedNativeTooOld: '执行 {method} 前需要更新 native host。请打开“排查问题 > 检查本机连接”,运行安装命令。',
|
|
304
|
+
nativeCompatibilityBlockedExtensionTooOld: '执行 {method} 前需要更新扩展。请更新 Chrome 扩展,重新加载 Overleaf 后再试。',
|
|
305
|
+
nativeCompatibilityBlockedProtocol: '执行 {method} 前发现 native host 协议不匹配。请同时更新扩展和 native host。',
|
|
306
|
+
nativeCompatibilityBlockedUnhealthy: '本机 Codex 还不能执行 {method}。请打开“排查问题 > 检查本机连接”查看详情。',
|
|
307
|
+
nativeCompatibilityBlockedMissing: '执行 {method} 时没有连接到 native host。请安装本机 native host,重新加载扩展后再试。',
|
|
308
|
+
nativeCompatibilityBlockedGeneric: '当前 native host 与扩展不兼容,不能执行 {method}。请更新 native host 和扩展后再试。',
|
|
309
|
+
diagnosticsPageLoading: '确认当前文件、写入能力和留痕状态。',
|
|
310
|
+
diagnosticsLoading: '正在检查当前状态。',
|
|
311
|
+
diagnosticsLoadingSummary: '正在读取信息,不会修改 Overleaf 文件。',
|
|
312
|
+
diagnosticsResult: '诊断结果',
|
|
313
|
+
diagnosticsNoResult: '没有返回可展示的诊断结果。',
|
|
314
|
+
nextStepPrefix: '下一步:',
|
|
315
|
+
runInTerminal: '在终端运行:',
|
|
316
|
+
copyInstallCommand: '复制安装命令',
|
|
317
|
+
copied: '已复制',
|
|
318
|
+
confirmBrand: 'Codex 确认',
|
|
319
|
+
confirmDefaultTitle: 'Codex 确认',
|
|
320
|
+
confirmDefaultConfirm: '确定',
|
|
321
|
+
confirmDefaultCancel: '取消',
|
|
322
|
+
threadResumeFailedTitle: '无法恢复上一轮 Codex 会话',
|
|
323
|
+
threadResumeFailedMessage: '是否新建一个 Codex 线程继续任务?\n\n取消会放弃本次运行。',
|
|
324
|
+
threadResumeNew: '新建线程',
|
|
325
|
+
deleteSessionTitle: '删除这个 Codex 会话?',
|
|
326
|
+
deleteSessionMessage: '这会删除当前 Overleaf 项目的插件会话、运行记录,并清理对应的插件本地 Codex 线程历史。不会修改 Overleaf 文件,也不会影响全局 Codex 历史。',
|
|
327
|
+
deleteSessionConfirm: '删除',
|
|
328
|
+
deleteSessionRunningToast: '这个会话正在运行。请先中断任务,再删除。',
|
|
329
|
+
deleteSessionHistoryFailedToast: '已删除这个插件会话,但对应的插件本地 Codex 线程历史没有清理完成:{message}',
|
|
330
|
+
deleteSessionNoThreadToast: '已删除这个插件会话;这个旧会话没有可识别的本地 Codex 线程历史,未清理本地历史。',
|
|
331
|
+
deleteSessionDoneToast: '已删除这个插件会话。',
|
|
332
|
+
modeSwitchFailedToast: '切换模式失败:{message}',
|
|
333
|
+
diffAccepted: '已接受',
|
|
334
|
+
diffRejected: '已拒绝',
|
|
335
|
+
diffWritten: '已写入',
|
|
336
|
+
diffAccept: '接受',
|
|
337
|
+
diffReject: '拒绝',
|
|
338
|
+
diffAcceptAll: '接受全部',
|
|
339
|
+
diffRejectAll: '拒绝全部',
|
|
340
|
+
diffHunkAccept: '接受此段',
|
|
341
|
+
diffHunkReject: '拒绝此段',
|
|
342
|
+
diffHunkJump: '跳到此段',
|
|
343
|
+
diffHunkAccepted: '此段已接受',
|
|
344
|
+
diffHunkRejected: '此段已拒绝',
|
|
345
|
+
diffHunkJumpFailed: '跳转失败',
|
|
346
|
+
diffShowMoreHunks: '再显示 {count} 段',
|
|
347
|
+
diffHunkExpandLines: '显示隐藏的 {count} 行',
|
|
348
|
+
diffFallbackFileOnly: '按文件确认',
|
|
349
|
+
diffPendingCount: '待处理 {count} 个',
|
|
350
|
+
diffSelectionDone: '已完成选择',
|
|
351
|
+
diffWrittenChangesTitle: '已写入的 Codex 改动',
|
|
352
|
+
undoRun: '撤销改动',
|
|
353
|
+
undoPartialRun: '撤销已写入部分',
|
|
354
|
+
undoApplied: '已撤销',
|
|
355
|
+
undoRunTitle: '撤销本轮写入到 Overleaf 的改动',
|
|
356
|
+
undoPartialRunTitle: '撤销本轮已经写入 Overleaf 的部分改动',
|
|
357
|
+
undoAppliedTitle: '本轮写入已经撤销',
|
|
358
|
+
undoNoWritesTitle: '本轮没有写入,无需撤销。',
|
|
359
|
+
undoUnsafeFullFileTitle: '已阻止旧格式全文撤销',
|
|
360
|
+
undoUnsafeFullFileReason: '这个撤销点会用全文替换恢复文件,在 Overleaf 留痕模式下会把整篇文档标成改动。请重新运行任务生成局部撤销点,或手动处理这次历史改动。',
|
|
361
|
+
undoNoTraceTitle: '无留痕撤销本轮写入?',
|
|
362
|
+
undoNoTraceMessage: '将撤销本轮对 {files} 的写入。\n\n如果 Overleaf 正在使用 Reviewing/Track Changes,Codex 会先切到 Editing;撤销后会保持 Editing,下一轮写入会按需要重新切到 Reviewing。',
|
|
363
|
+
undoConfirm: '撤销写入',
|
|
364
|
+
undoNoTraceStarted: '开始无留痕撤销本轮写入',
|
|
365
|
+
undoResult: '撤销结果:已撤销 {applied} 项,跳过 {skipped} 项',
|
|
366
|
+
undoTrackedTitle: '拒绝本轮 Overleaf 留痕改动?',
|
|
367
|
+
undoNativeTitle: '撤销本轮 Overleaf 写入?',
|
|
368
|
+
undoTrackedMessage: '将通过 Overleaf 自己的 Reject/拒绝功能撤销 {files}。\n\n这不会用文本补丁重写文件;如果插件不能确认对应留痕记录,会停止并让你在 Overleaf 审阅面板手动处理。',
|
|
369
|
+
undoNativeMessage: '将通过 Overleaf 自己的 Undo/撤销功能回退 {files}。\n\n执行前会确认当前内容仍是本轮写入后的内容;如果你已经手动改过,Codex 会停止,避免撤掉你的新修改。',
|
|
370
|
+
undoTrackedConfirm: '拒绝本轮改动',
|
|
371
|
+
undoTrackedStarted: '开始拒绝本轮 Overleaf 留痕改动',
|
|
372
|
+
undoNativeStarted: '开始用 Overleaf 原生撤销回退本轮写入',
|
|
373
|
+
undoTrackedResult: '撤销结果:已拒绝 {applied} 条留痕,跳过 {skipped} 条',
|
|
374
|
+
undoNativeResult: '撤销结果:已撤销 {applied} 个文件,跳过 {skipped} 项',
|
|
375
|
+
undoSwitchedEditing: '撤销时已切到 Editing;撤销后保持 Editing。',
|
|
376
|
+
undoReviewingRestoreUnverified: '撤销已执行,但没有确认 Overleaf 留痕模式已恢复。',
|
|
377
|
+
undoReviewingRestoreNext: '请在 Overleaf 手动确认 Reviewing/Track Changes 是否需要重新开启。',
|
|
378
|
+
undoCheckpointTracked: '已创建撤销点:可通过 Overleaf 拒绝本轮 {count} 条留痕改动',
|
|
379
|
+
undoCheckpointNative: '已创建撤销点:可通过 Overleaf 原生 Undo 回退本轮 {files}',
|
|
380
|
+
undoCheckpointNativeMethod: '没有识别到具体留痕节点,但已保存写入前和写入后的文件内容。撤销时会优先使用 Overleaf 自己的 Undo/撤销功能,并在执行前确认当前内容仍是本轮写入后的内容。',
|
|
381
|
+
undoCheckpointMissing: '没有创建自动撤销点:未识别到本轮 Overleaf 留痕记录',
|
|
382
|
+
undoCheckpointMissingReason: '本轮是在 Reviewing/Track Changes 下写入的,但插件没有可靠识别 Overleaf 生成的留痕记录。为了避免用文本补丁制造新的红线,自动撤销已禁用。',
|
|
383
|
+
undoCheckpointMissingNext: '请在 Overleaf 审阅面板手动拒绝这轮建议,或重新运行后再尝试。',
|
|
384
|
+
undoCheckpointPlain: '已创建撤销点:可撤销本轮 {count} 项写入',
|
|
385
|
+
deleteFilePromptTitle: '允许 Codex 删除文件?',
|
|
386
|
+
deleteFilePromptMessage: '{files}\n\n未确认删除时,其它改动仍可继续同步。',
|
|
387
|
+
deleteFileConfirm: '允许删除',
|
|
388
|
+
deleteFileCancel: '跳过删除',
|
|
389
|
+
dismissNotification: '关闭通知',
|
|
390
|
+
repeatCountSuffix: '({count} 次)',
|
|
391
|
+
detailAction: '动作',
|
|
392
|
+
detailFile: '文件',
|
|
393
|
+
detailRecord: '记录',
|
|
394
|
+
detailReason: '原因',
|
|
395
|
+
detailNext: '下一步',
|
|
396
|
+
detailMethod: '方式',
|
|
397
|
+
detailTarget: '目标',
|
|
398
|
+
detailWillUndo: '将撤销',
|
|
399
|
+
detailUndone: '已撤销',
|
|
400
|
+
detailRejected: '已拒绝',
|
|
401
|
+
detailSkipped: '跳过',
|
|
402
|
+
unknownReason: '未知原因',
|
|
403
|
+
unknownFile: '未知文件',
|
|
404
|
+
operationEdit: '编辑',
|
|
405
|
+
operationCreate: '新建',
|
|
406
|
+
operationRename: '重命名',
|
|
407
|
+
operationMove: '移动',
|
|
408
|
+
operationDelete: '删除',
|
|
409
|
+
operationUnknown: '未知',
|
|
410
|
+
noneValue: '无',
|
|
411
|
+
yes: '是',
|
|
412
|
+
no: '否',
|
|
413
|
+
switchLanguage: '切换为英文',
|
|
414
|
+
switchLanguageHint: '切换面板语言',
|
|
415
|
+
close: '关闭',
|
|
416
|
+
closeDiagnostics: '关闭诊断结果',
|
|
417
|
+
customInstructionsSettings: '自定义指令',
|
|
418
|
+
customInstructionsTitle: '自定义指令',
|
|
419
|
+
customInstructionsSubtitle: '为当前 Overleaf 项目提供额外指令和上下文。',
|
|
420
|
+
customInstructionsLearnMore: '了解更多',
|
|
421
|
+
customInstructionsClose: '关闭自定义指令',
|
|
422
|
+
customInstructionsPlaceholder: '写下此项目的风格、术语、会议要求和 LaTeX 约定。',
|
|
423
|
+
projectSettingsSavedToast: '项目设置已保存。',
|
|
424
|
+
projectSettingsTitle: '项目设置',
|
|
425
|
+
projectSettingsSubtitle: '当前 Overleaf 项目的治理规则、本地技能和自定义指令。',
|
|
426
|
+
governanceRulesTitle: '治理规则',
|
|
427
|
+
governanceReadonlyPatterns: '只读路径规则',
|
|
428
|
+
governanceWritablePatterns: '可写路径规则',
|
|
429
|
+
sensitiveCheckEnabled: 'Codex 运行前检查敏感内容',
|
|
430
|
+
sensitiveConfirmAllowed: '发现敏感内容时允许显式确认后继续',
|
|
431
|
+
sensitiveConfirmTitle: '发现敏感内容',
|
|
432
|
+
sensitiveConfirmMessage: 'Codex 发现了可能的敏感内容。这里不会显示原始密钥或秘密值。只有在确认可以把这些项目上下文发送给 Codex 时才继续。',
|
|
433
|
+
sensitiveConfirmRun: '仍然运行',
|
|
434
|
+
localSkillsTitle: '技能',
|
|
435
|
+
codexOverleafSkillsTitle: 'Codex Overleaf 专属技能',
|
|
436
|
+
codexOverleafSkillsEmpty: '没有安装 Codex Overleaf 专属技能。',
|
|
437
|
+
codexOverleafSkillsDisabled: '运行时已禁用 Codex Overleaf 专属技能。',
|
|
438
|
+
loadCodexLocalSkills: '加载 Codex 本地技能',
|
|
439
|
+
loadCodexOverleafSkills: '加载 Codex Overleaf 专属技能',
|
|
440
|
+
localSkillRemove: '删除',
|
|
441
|
+
codexOverleafSkillRemoveDone: 'Codex Overleaf 技能已删除。',
|
|
442
|
+
slashInstallSkillTitle: '安装 skill',
|
|
443
|
+
slashInstallSkillSubtitle: '用自然语言调用 Codex 的 skill installer。',
|
|
444
|
+
slashUseSkillSubtitle: '本轮使用这个 skill。',
|
|
445
|
+
skillInstallerComposerLabel: 'Skill Installer',
|
|
446
|
+
skillInstallerComposerClear: '清除 skill installer',
|
|
447
|
+
composerSkillClear: '清除 skill',
|
|
448
|
+
binaryAssetConfirmTitle: '将生成的资源写入 Overleaf?',
|
|
449
|
+
binaryAssetConfirmMessage: 'Codex 生成或修改了二进制资源文件。这类写入始终需要显式确认。\n\n{files}',
|
|
450
|
+
binaryAssetConfirm: '写入资源',
|
|
451
|
+
binaryAssetCancel: '跳过资源',
|
|
452
|
+
personalizationConfig: '个性化配置',
|
|
453
|
+
save: '保存',
|
|
454
|
+
technicalDetails: '技术细节',
|
|
455
|
+
newSession: '新建会话',
|
|
456
|
+
tasks: '任务',
|
|
457
|
+
placeholder: '问 Codex 任何事。输入 @ 添加上下文',
|
|
458
|
+
mode: '模式',
|
|
459
|
+
writeMode: '写入模式',
|
|
460
|
+
modeAsk: '只问不改',
|
|
461
|
+
modeAskTitle: '只读取和分析,不写入 Overleaf',
|
|
462
|
+
modeConfirm: '建议修改',
|
|
463
|
+
modeConfirmTitle: '先给出修改方案,确认后写入',
|
|
464
|
+
modeAuto: '自动写入',
|
|
465
|
+
modeAutoTitle: '授权后直接写入,删除仍需确认',
|
|
466
|
+
addContext: '添加 @ 上下文',
|
|
467
|
+
requireReviewing: '留痕',
|
|
468
|
+
requireReviewingTitle: '开启后,写入前会确认并尝试切到 Overleaf Reviewing/Track Changes;删除仍需确认。',
|
|
469
|
+
autoCompile: '编译',
|
|
470
|
+
autoCompileTitle: 'Codex 写入后自动点击 Overleaf Recompile,并把编译结果记录到本轮任务。只问不改时不会触发。',
|
|
471
|
+
experimentalOtWarmMirror: '实验性 OT 预热镜像',
|
|
472
|
+
experimentalOtWarmMirrorShort: 'OT',
|
|
473
|
+
experimentalOtWarmMirrorTitle: '实验性只读 OT 镜像预热;不可用、过期或不一致时会回退到常规项目读取。',
|
|
474
|
+
otStatus: 'OT 状态',
|
|
475
|
+
otFreshFiles: 'OT 新鲜文件',
|
|
476
|
+
otFallback: '回退',
|
|
477
|
+
otStatusOff: '关',
|
|
478
|
+
otStatusStarting: '启动',
|
|
479
|
+
otStatusObserving: '实时',
|
|
480
|
+
otStatusUnavailable: '不可用',
|
|
481
|
+
otStatusStale: '过期',
|
|
482
|
+
otStatusInconsistent: '需检查',
|
|
483
|
+
modelSourceFallback: '备用列表',
|
|
484
|
+
modelSourceDiscovered: '已发现',
|
|
485
|
+
modelSourceFailed: '获取失败',
|
|
486
|
+
modelDisplayTitle: '{label} - 模型列表:{source}',
|
|
487
|
+
warmMirrorReuseTitle: '使用已预热的本地 workspace;本轮开始前没有导航 Overleaf 编辑器。',
|
|
488
|
+
warmMirrorPartialOverlayTitle: '没有读到完整 Overleaf 项目,但本地 workspace 刚同步过;继续使用最近的完整 workspace,并叠加当前文件内容。',
|
|
489
|
+
warmMirrorFocusOverlayTitle: '使用已预热的本地 workspace(仅同步焦点文件差异)。',
|
|
490
|
+
warmMirrorStaleRetryTitle: '预热 workspace 已过期,正在重新完整同步。',
|
|
491
|
+
warmMirrorStaleBlockedConclusion: '这轮没有继续:Overleaf 没有提供完整项目内容,本地 workspace 也不够新。',
|
|
492
|
+
warmMirrorStaleBlockedNextStep: '请刷新 Overleaf 项目,等文件列表加载完成后重试;也可以先选中一个具体 .tex 文件作为 @context。',
|
|
493
|
+
warmMirrorStaleBlockedTitle: '已阻止:本地 workspace 过期',
|
|
494
|
+
send: '发送',
|
|
495
|
+
cancelRun: '中断当前任务',
|
|
496
|
+
contextTitle: '@ 上下文',
|
|
497
|
+
refreshFileList: '刷新文件列表',
|
|
498
|
+
contextStatus: '输入 @ 添加上下文:@文件、@compile-log、@current-section。',
|
|
499
|
+
contextLoadingFiles: '正在读取可添加的 @文件...',
|
|
500
|
+
contextReadFailed: '读取文件失败:{message}',
|
|
501
|
+
contextNoFiles: '没有从当前 Overleaf 项目读取到可用文本文件。',
|
|
502
|
+
contextSelectedFiles: '已添加 {count} 个 @file;后续任务会优先围绕它们。',
|
|
503
|
+
contextDefaultWholeProject: '默认使用整个项目。可添加 @file;@compile-log 和 @current-section 将作为后续上下文能力。',
|
|
504
|
+
contextResourceTitle: '{path}(非文本资源,当前只作为项目结构显示)',
|
|
505
|
+
contextWholeProjectChip: '默认:整个项目',
|
|
506
|
+
clearFiles: '清除全部 @file',
|
|
507
|
+
removeContextFile: '从 @context 移除 {path}',
|
|
508
|
+
resource: '资源',
|
|
509
|
+
viewAllSessions: '查看全部({count} 个)',
|
|
510
|
+
renameSession: '重命名会话',
|
|
511
|
+
deleteSession: '删除会话',
|
|
512
|
+
deleteRunningSession: '任务运行中,先中断后再删除',
|
|
513
|
+
newSessionFallback: '新会话',
|
|
514
|
+
emptyRunLabel: '开始一个 Codex 任务',
|
|
515
|
+
unknownMode: '未知模式',
|
|
516
|
+
askStatus: '只问不改',
|
|
517
|
+
canRun: '可以运行',
|
|
518
|
+
validatingEditor: '写入时验证编辑器',
|
|
519
|
+
needsReviewing: '需要开启 Reviewing',
|
|
520
|
+
needsReviewingAndFile: '需要开启 Reviewing 并打开文件',
|
|
521
|
+
wholeProjectContext: '将读取整个项目',
|
|
522
|
+
currentFileContext: '已读到当前文件',
|
|
523
|
+
fileContext: '已选择 @file 上下文',
|
|
524
|
+
contextContext: '已选择 @context',
|
|
525
|
+
refreshProbeLoading: '正在重新检测当前文件、写入权限和留痕状态...',
|
|
526
|
+
refreshProbeDone: '已重新检测:{status}',
|
|
527
|
+
refreshProbeFailed: '检测失败:请刷新 Overleaf 页面后重试',
|
|
528
|
+
processedFailed: '处理失败 {elapsed}',
|
|
529
|
+
processing: '处理中 {elapsed}',
|
|
530
|
+
processed: '已处理 {elapsed}'
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
function normalizeLocale(value) {
|
|
535
|
+
return VALID_LOCALES.has(value) ? value : DEFAULT_LOCALE;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
function getOppositeLocale(value) {
|
|
539
|
+
return normalizeLocale(value) === 'zh' ? 'en' : 'zh';
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
function t(locale, key, params) {
|
|
543
|
+
const normalized = normalizeLocale(locale);
|
|
544
|
+
const dict = MESSAGES[normalized] || MESSAGES[DEFAULT_LOCALE];
|
|
545
|
+
let text = dict[key] || MESSAGES[DEFAULT_LOCALE][key] || key;
|
|
546
|
+
if (params && typeof params === 'object') {
|
|
547
|
+
for (const name of Object.keys(params)) {
|
|
548
|
+
text = text.replace(new RegExp(`\\{${escapeRegExp(name)}\\}`, 'g'), String(params[name]));
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
return text;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
function escapeRegExp(value) {
|
|
555
|
+
return String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
return {
|
|
559
|
+
DEFAULT_LOCALE,
|
|
560
|
+
MESSAGES,
|
|
561
|
+
normalizeLocale,
|
|
562
|
+
getOppositeLocale,
|
|
563
|
+
t
|
|
564
|
+
};
|
|
565
|
+
});
|