iskills 0.2.45 → 0.2.46

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.
Files changed (94) hide show
  1. package/README.md +5 -1
  2. package/README.zh-CN.md +5 -1
  3. package/bin/iskills.js +9 -2
  4. package/dist/src/cli.js +17 -6
  5. package/dist/src/cli.js.map +1 -1
  6. package/dist/src/commands/browser-actions.js +47 -36
  7. package/dist/src/commands/browser-actions.js.map +1 -1
  8. package/dist/src/commands/config.d.ts +5 -0
  9. package/dist/src/commands/config.js +22 -0
  10. package/dist/src/commands/config.js.map +1 -0
  11. package/dist/src/commands/create.js +7 -6
  12. package/dist/src/commands/create.js.map +1 -1
  13. package/dist/src/commands/index.d.ts +1 -0
  14. package/dist/src/commands/index.js +18 -77
  15. package/dist/src/commands/index.js.map +1 -1
  16. package/dist/src/commands/library.js +49 -44
  17. package/dist/src/commands/library.js.map +1 -1
  18. package/dist/src/commands/search.js +15 -10
  19. package/dist/src/commands/search.js.map +1 -1
  20. package/dist/src/domain/collection-write.js +41 -33
  21. package/dist/src/domain/collection-write.js.map +1 -1
  22. package/dist/src/domain/core.d.ts +1 -1
  23. package/dist/src/domain/core.js +13 -8
  24. package/dist/src/domain/core.js.map +1 -1
  25. package/dist/src/domain/git.js +15 -14
  26. package/dist/src/domain/git.js.map +1 -1
  27. package/dist/src/domain/user-config.d.ts +12 -0
  28. package/dist/src/domain/user-config.js +55 -0
  29. package/dist/src/domain/user-config.js.map +1 -0
  30. package/dist/src/i18n/en.d.ts +5 -0
  31. package/dist/src/i18n/en.js +419 -0
  32. package/dist/src/i18n/en.js.map +1 -0
  33. package/dist/src/i18n/index.d.ts +47 -0
  34. package/dist/src/i18n/index.js +129 -0
  35. package/dist/src/i18n/index.js.map +1 -0
  36. package/dist/src/i18n/zh.d.ts +404 -0
  37. package/dist/src/i18n/zh.js +419 -0
  38. package/dist/src/i18n/zh.js.map +1 -0
  39. package/dist/src/ui/browser/browser.js +121 -38
  40. package/dist/src/ui/browser/browser.js.map +1 -1
  41. package/dist/src/ui/browser/detail.js +2 -1
  42. package/dist/src/ui/browser/detail.js.map +1 -1
  43. package/dist/src/ui/browser/footer.js +18 -1
  44. package/dist/src/ui/browser/footer.js.map +1 -1
  45. package/dist/src/ui/browser/format.d.ts +13 -3
  46. package/dist/src/ui/browser/format.js +86 -63
  47. package/dist/src/ui/browser/format.js.map +1 -1
  48. package/dist/src/ui/browser/index.js +2 -1
  49. package/dist/src/ui/browser/index.js.map +1 -1
  50. package/dist/src/ui/browser/shortcut-help.js +4 -3
  51. package/dist/src/ui/browser/shortcut-help.js.map +1 -1
  52. package/dist/src/ui/browser/types.d.ts +13 -4
  53. package/dist/src/ui/collection-match.d.ts +1 -1
  54. package/dist/src/ui/collection-match.js +8 -5
  55. package/dist/src/ui/collection-match.js.map +1 -1
  56. package/dist/src/ui/components/framed-panel.js +2 -1
  57. package/dist/src/ui/components/framed-panel.js.map +1 -1
  58. package/dist/src/ui/components/modal-panel.d.ts +4 -1
  59. package/dist/src/ui/components/modal-panel.js +8 -2
  60. package/dist/src/ui/components/modal-panel.js.map +1 -1
  61. package/dist/src/ui/components/multi-select.js +2 -1
  62. package/dist/src/ui/components/multi-select.js.map +1 -1
  63. package/dist/src/ui/components/select.js +2 -1
  64. package/dist/src/ui/components/select.js.map +1 -1
  65. package/dist/src/ui/components/tag-editor.d.ts +1 -2
  66. package/dist/src/ui/components/tag-editor.js +6 -4
  67. package/dist/src/ui/components/tag-editor.js.map +1 -1
  68. package/dist/src/ui/config/index.d.ts +11 -0
  69. package/dist/src/ui/config/index.js +22 -0
  70. package/dist/src/ui/config/index.js.map +1 -0
  71. package/dist/src/ui/config/settings.d.ts +17 -0
  72. package/dist/src/ui/config/settings.js +126 -0
  73. package/dist/src/ui/config/settings.js.map +1 -0
  74. package/dist/src/ui/footer/resolve-footer.js +48 -35
  75. package/dist/src/ui/footer/resolve-footer.js.map +1 -1
  76. package/dist/src/ui/footer/types.d.ts +6 -2
  77. package/dist/src/ui/import/review.js +6 -5
  78. package/dist/src/ui/import/review.js.map +1 -1
  79. package/dist/src/ui/import/skill-select.js +14 -12
  80. package/dist/src/ui/import/skill-select.js.map +1 -1
  81. package/dist/src/ui/install/review.js +11 -10
  82. package/dist/src/ui/install/review.js.map +1 -1
  83. package/dist/src/ui/prompts/present.d.ts +4 -2
  84. package/dist/src/ui/prompts/present.js +7 -5
  85. package/dist/src/ui/prompts/present.js.map +1 -1
  86. package/dist/src/ui/search/index.js +6 -5
  87. package/dist/src/ui/search/index.js.map +1 -1
  88. package/dist/src/ui/shell/terminal.d.ts +0 -1
  89. package/dist/src/ui/shell/terminal.js +2 -1
  90. package/dist/src/ui/shell/terminal.js.map +1 -1
  91. package/dist/src/ui/skill-labels.d.ts +9 -9
  92. package/dist/src/ui/skill-labels.js +13 -10
  93. package/dist/src/ui/skill-labels.js.map +1 -1
  94. package/package.json +4 -3
@@ -0,0 +1,419 @@
1
+ /** English catalog — must share the same keys as {@link zh}. */
2
+ export const en = {
3
+ // ── common ──────────────────────────────────────────────────────────────
4
+ 'common.confirm': 'Confirm',
5
+ 'common.cancel': 'Cancel',
6
+ 'common.close': 'Close',
7
+ 'common.none': 'None',
8
+ 'common.noneIndented': ' None',
9
+ 'common.help': 'Help',
10
+ 'common.quit': 'Quit',
11
+ 'common.filter': 'Filter',
12
+ 'common.filterLabel': 'Filter: ',
13
+ 'common.switch': 'Switch',
14
+ 'common.enter': 'Enter',
15
+ 'common.back': 'Back',
16
+ 'common.move': 'Move',
17
+ 'common.edit': 'Edit',
18
+ 'common.list': 'List',
19
+ 'common.select': 'Select',
20
+ 'common.delete': 'Delete',
21
+ 'common.add': 'Add',
22
+ 'common.detail': 'Detail',
23
+ 'common.view': 'View',
24
+ 'common.collect': 'Collect',
25
+ 'common.more': 'More',
26
+ 'common.tags': 'Tags',
27
+ 'common.update': 'Update',
28
+ 'common.materialize': 'Materialize',
29
+ 'common.expand': 'Expand',
30
+ 'common.local': 'Local',
31
+ 'common.git': 'Git',
32
+ 'common.unknown': 'Unknown',
33
+ 'common.skill': 'Skill',
34
+ 'common.copy': 'Copy',
35
+ 'common.symlink': 'Symlink',
36
+ 'common.project': 'Project',
37
+ 'common.global': 'Global',
38
+ 'common.collection': 'Collection',
39
+ 'common.origin': 'Origin',
40
+ 'common.usage': 'Usage',
41
+ 'common.dependent': 'Dependent',
42
+ 'common.originIndented': ' Origin',
43
+ 'common.usageIndented': ' Usage',
44
+ 'common.dependentIndented': ' Dependent',
45
+ 'common.noDescription': 'No description',
46
+ 'common.updating': 'Updating',
47
+ 'common.updatingSuffix': ' updating',
48
+ 'common.interrupted': 'Operation interrupted',
49
+ 'common.failed': 'Failed: {error}',
50
+ 'common.version': 'Version',
51
+ 'common.source': 'Source',
52
+ 'common.note': 'Note',
53
+ 'common.description': 'Description',
54
+ 'common.location': 'Location',
55
+ 'common.path': 'Path',
56
+ 'common.all': 'All',
57
+ 'common.untagged': 'Untagged',
58
+ 'common.listSep': ', ',
59
+ 'common.itemJoin': '; ',
60
+ // ── labels ──────────────────────────────────────────────────────────────
61
+ 'label.collectionStatus': 'Collection status',
62
+ 'label.description': 'Description',
63
+ 'label.location': 'Location',
64
+ 'label.note': 'Note',
65
+ 'label.path': 'Path',
66
+ 'label.relatedLocations': 'Related locations',
67
+ 'label.source': 'Source',
68
+ 'label.tags': 'Tags',
69
+ // ── collection match ────────────────────────────────────────────────────
70
+ 'match.sameSource': 'Collected (same source)',
71
+ 'match.conflictingSource': 'Name conflict (different source)',
72
+ 'match.unverifiedSource': 'Same name (source unverified)',
73
+ // ── CLI / help ──────────────────────────────────────────────────────────
74
+ 'cli.unknownCommand': 'Unknown command: {command}',
75
+ 'cli.errorPrefix': 'Error: {message}',
76
+ 'cli.bunStartFailed': 'Failed to start Bun runtime: {message}',
77
+ 'cli.mainTtyRequired': 'The main TUI requires a TTY for stdin and stdout; this terminal is not supported.',
78
+ 'cli.configTtyRequired': 'The config UI requires a TTY for stdin and stdout; this terminal is not supported.',
79
+ 'cli.pendingConflicts': 'Warning: {count} pending conflict(s).',
80
+ 'cli.searchTtyRequired': 'Standalone search TUI requires a TTY for stdin and stdout; this terminal is not supported.',
81
+ 'help.search': `Usage:
82
+ iskills search [query]
83
+
84
+ Search skills.sh live and save selections into your collection.
85
+
86
+ Options:
87
+ --replace Replace same-name collection entry from a different source
88
+ -h, --help Show help
89
+ `,
90
+ 'help.add': `Usage:
91
+ iskills add [skills...] [options]
92
+
93
+ Add skills from your collection to the current project or agent global dirs.
94
+
95
+ Options:
96
+ --agent <name> Limit to agent(s); repeatable ({agents})
97
+ -g, --global Add to agent global skill directories
98
+ --to <dir> Target directory
99
+ --copy Copy instead of symlink
100
+ --replace Replace existing skills
101
+ -y, --yes Skip confirmation
102
+ -h, --help Show help
103
+ `,
104
+ 'help.create': `Usage:
105
+ iskills create [name]
106
+
107
+ Create a new skill in the collection and open its directory.
108
+
109
+ Options:
110
+ -h, --help Show help
111
+ `,
112
+ 'help.import': `Usage:
113
+ iskills import [path or Git URL] [options]
114
+
115
+ Import a local path or Git source into your collection.
116
+
117
+ Options:
118
+ -g, --global Scan agent global skill directories
119
+ --agent <name> Limit to agent(s); repeatable ({agents})
120
+ --all Import every discovered skill
121
+ --replace Replace same-name skills in the collection
122
+ -y, --yes Skip confirmation
123
+ -h, --help Show help
124
+ `,
125
+ 'help.init': `Usage:
126
+ iskills init [options]
127
+
128
+ Initialize the collection Git repository and create the first commit.
129
+
130
+ Options:
131
+ --remote <Git URL> Set or update origin
132
+ -h, --help Show help
133
+ `,
134
+ 'help.config': `Usage:
135
+ iskills config
136
+
137
+ Open the config UI to set UI language (follow system / Chinese / English).
138
+
139
+ Options:
140
+ -h, --help Show help
141
+ `,
142
+ 'help.root': `Skill collection
143
+
144
+ Usage:
145
+ iskills [command] [options]
146
+
147
+ Commands:
148
+ search [query] Search skills and save into the collection
149
+ add [skills...] Add from collection to the current project
150
+ create [name] Create a new skill in the collection and open it
151
+ import [source] Import a local path or Git source
152
+ init Initialize collection Git
153
+ config Open config UI (UI language, …)
154
+
155
+ Options:
156
+ -h, --help Show help (or: iskills help <command>)
157
+ -v, --version Show version
158
+
159
+ `,
160
+ 'config.localeTitle': 'UI language',
161
+ 'config.localeSystem': 'Follow system',
162
+ 'config.localeZh': '中文',
163
+ 'config.localeEn': 'English',
164
+ 'config.settingsTitle': ' Settings ',
165
+ 'config.settingsFooter': '←→ change · Esc close',
166
+ 'config.changeValue': 'Change',
167
+ // ── domain core ─────────────────────────────────────────────────────────
168
+ 'domain.unsafeSkillName': 'Unsafe skill name: {name}',
169
+ 'domain.unsafeSourcePath': 'Unsafe source subpath: {path}',
170
+ 'domain.symlinkEscapesTree': 'Skill contains a symlink that escapes its tree: {path}',
171
+ 'domain.skillExistsInCollection': 'Skill already exists in collection: {name}',
172
+ 'domain.gitCommitFailed': 'Warning: collection Git commit failed: {error}',
173
+ 'domain.originNotCollectionLink': 'Origin is no longer a symlink into the collection; aborted: {path}',
174
+ 'domain.importFailedRollback': 'Import failed: {error}; rollback failed: {rollback}',
175
+ 'domain.warnConflictCleanup': 'Warning: failed to clean old conflict directory: {error}',
176
+ 'domain.warnReplaceBackupCleanup': 'Warning: failed to clean replace backup: {error}',
177
+ 'domain.noUsageInScope': 'No usage of skill in current scope: {name}',
178
+ 'domain.usageNotExpectedLink': 'Usage path is not the expected symlink; not deleted: {path}',
179
+ 'domain.notInCollection': 'Not in collection: {name}',
180
+ 'domain.removeNeedsConfirm': 'Removing from collection requires confirmation',
181
+ 'domain.removedWithRestore': 'Removed {name} from collection and restored {path}.',
182
+ 'domain.removed': 'Removed {name} from collection.',
183
+ 'domain.cyclicSymlink': 'Skill contains a cyclic symlink: {path}',
184
+ 'domain.unresolvableSymlink': 'Skill contains an unresolvable symlink: {path}',
185
+ 'domain.symlinkOutside': 'Skill contains a symlink pointing outside its tree: {path}',
186
+ 'domain.copyStillHasSymlink': 'Copy still contains a symlink: {path}',
187
+ 'domain.cannotOpCollectionByPath': 'Cannot {operation} collection content by location: {path}',
188
+ 'domain.locationGone': 'Skill location no longer exists: {path}',
189
+ 'domain.locationChangedNotDeleted': 'Skill location changed; not deleted: {path}',
190
+ 'domain.locationChanged': 'Skill location changed: {path}',
191
+ 'domain.notAReference': 'Skill location is not a reference: {path}',
192
+ 'domain.referenceUnresolvable': 'Skill reference could not be resolved: {path}',
193
+ 'domain.referenceNotDir': 'Skill reference target is not a directory: {path}',
194
+ 'domain.copyNameChanged': 'Copied skill name changed: {path}',
195
+ 'domain.materializeFailedRollbackItem': 'Materialize failed: {error}; rollback failed: {path}: {rollback}',
196
+ 'domain.stateRollback': 'State: {error}',
197
+ 'domain.materializeFailedRollback': 'Materialize failed: {error}; rollback failed: {rollback}',
198
+ 'domain.warnMaterializeTempCleanup': 'Warning: failed to clean materialize temp directory: {error}',
199
+ 'domain.collectionLinkChanged': 'Collection link changed; not deleted: {path}',
200
+ 'domain.mergeNotValidSkill': 'Merge result is not a valid skill: {name}',
201
+ 'domain.opDelete': 'delete',
202
+ 'domain.opMaterialize': 'materialize',
203
+ // ── git ─────────────────────────────────────────────────────────────────
204
+ 'git.initFailed': 'Could not initialize collection Git: {error}',
205
+ 'git.remoteEmpty': 'Remote URL cannot be empty',
206
+ 'git.cloneFailed': 'Could not clone Git source: {error}',
207
+ 'git.conflictResolved': 'Collection Git conflict resolved.',
208
+ 'git.appliedManualUpdate': 'Applied manually resolved update: {skill}',
209
+ 'git.conflictWithOrigin': 'Collection conflicts with origin; sync in the main TUI then resolve manually',
210
+ 'git.backgroundSyncFailed': 'Background collection sync failed: {error}',
211
+ 'git.branchMissing': 'Source branch does not exist: {ref}',
212
+ 'git.commitMissing': 'Previous sync commit not found in source history: {commit}',
213
+ 'git.upstreamDeletedNeedsConfirm': 'Upstream deleted {name}; caller must confirm or explicitly allow removal',
214
+ 'git.missingBaseline': 'Missing import baseline for first update; re-import or rebind the source',
215
+ 'git.notARepo': 'Collection is not a Git repository',
216
+ 'git.syncConflictManual': 'Collection Git sync conflict; resolve manually with Git',
217
+ 'git.syncFailed': 'Collection Git sync failed: {error}',
218
+ 'git.initDone': 'Initialized collection Git.',
219
+ 'git.alreadyInit': 'Collection Git already initialized.',
220
+ 'git.configureRemotePrompt': 'Configure a remote repository?',
221
+ 'git.remoteAddressPrompt': 'Remote repository URL:',
222
+ 'git.remoteConfigured': 'Configured remote origin.',
223
+ // ── commands / library ──────────────────────────────────────────────────
224
+ 'cmd.sameNameExistsReplace': 'Collection already has skill {name}; confirm and use --replace',
225
+ 'cmd.oneSkillNameOnly': 'Only one skill name is allowed',
226
+ 'cmd.skillNamePrompt': 'Skill name:',
227
+ 'cmd.createdSkill': 'Created skill: {name}',
228
+ 'cmd.warnOpenPathFailed': 'Warning: could not open directory: {error}',
229
+ 'cmd.skillMissingInSource': 'Skill not found in source repository: {name}',
230
+ 'cmd.skillDuplicateInSource': 'Multiple skills with the same name in source repository: {name}',
231
+ 'cmd.conflictingSourceExists': 'Collection already has skill {name} from a different source; use --replace',
232
+ 'cmd.conflictsExistReplace': 'Already in collection: {names}; confirm and use --replace',
233
+ 'cmd.replaceSameNameConfirm': 'Replace same-name collection entries {names}?',
234
+ 'cmd.importedCount': 'Imported {count} skill(s).',
235
+ 'cmd.unknownAgent': 'Unknown agent: {name}',
236
+ 'cmd.noPresentAgents': 'No installed agent root detected; pass --agent to specify one',
237
+ 'cmd.agentDisplayAgents': 'Standard Agent Skills',
238
+ 'cmd.cannotSourceAndGlobal': 'Cannot specify both a source and -g',
239
+ 'cmd.oneImportRootOnly': 'Only one import root is allowed',
240
+ 'cmd.noSkillMd': 'No SKILL.md found',
241
+ 'cmd.useAllOrInteractive': 'Use --all or choose skills interactively',
242
+ 'cmd.scanGlobalSkills': 'Scan global skill directories',
243
+ 'cmd.selectRepoSkills': 'Select skills in this repository',
244
+ 'cmd.foundSkills': 'Skills found',
245
+ 'cmd.useYesToConfirmImport': 'Use --yes to confirm import',
246
+ 'cmd.globalNeedsAgent': 'Specify --agent when adding to global directories',
247
+ 'cmd.selectGlobalAgent': 'Select global agent directories:',
248
+ 'cmd.agentGlobalOnly': 'Agent {name} only supports global skill directories; use --global',
249
+ 'cmd.multipleAgentDirs': 'Multiple agent directories detected:',
250
+ 'cmd.missingInCollection': 'Not in collection: {names}',
251
+ 'cmd.specifySkillNames': 'Specify skill name(s)',
252
+ 'cmd.scanCurrentDir': 'Scan current directory',
253
+ 'cmd.scanGlobalAgents': 'Scan common global agent directories',
254
+ 'cmd.enterPathOrGit': 'Enter a local path or Git source',
255
+ 'cmd.emptyCollectionImportWhere': 'Collection is empty. Where should skills be imported from?',
256
+ 'cmd.pathOrGitPrompt': 'Path or Git source:',
257
+ 'cmd.searchCollection': 'Search collection:',
258
+ 'cmd.selectSkills': 'Select skills:',
259
+ 'cmd.targetPointsSelf': 'Target would point at the skill itself: {target}',
260
+ 'cmd.replaceTargetConfirm': 'Target already exists. Replace {target}?',
261
+ 'cmd.targetExistsReplace': 'Target already exists: {target}; confirm and use --replace',
262
+ 'cmd.addedSkillsToDirs': 'Added {skills} skill(s) to {dirs} directory(ies){copy}.',
263
+ 'cmd.addedCopySuffix': ' (copy)',
264
+ 'cmd.invalidGitSource': 'Not a valid Git source: {input}',
265
+ 'cmd.syncDone': 'Sync complete',
266
+ 'cmd.upstreamDeleted': 'Upstream deleted',
267
+ 'cmd.upstreamDeletedConfirm': 'Upstream deleted {name}. Run collection removal?',
268
+ 'cmd.linkKindLine': '{kind}: {path}',
269
+ 'cmd.updateFailedLine': '{name}: update failed — {error}',
270
+ 'cmd.updatedCount': 'Updated {count}',
271
+ 'cmd.updatedWithFailed': 'Updated {updated}, failed {failed}',
272
+ 'cmd.addTagsForSkills': 'Add tags for {count} skill(s)',
273
+ 'cmd.tagged': 'Tags added',
274
+ 'cmd.replaceTargetTitle': 'Replace target',
275
+ 'cmd.addedCount': 'Added {count}',
276
+ 'cmd.removedOne': 'Removed {name}',
277
+ 'cmd.removedCount': 'Removed {count}',
278
+ 'cmd.deletedOne': 'Deleted {name}',
279
+ 'cmd.deletedCount': 'Deleted {count} location(s)',
280
+ 'cmd.materializedOne': 'Materialized',
281
+ 'cmd.materializedCount': 'Materialized {count}',
282
+ 'cmd.replaceCollectionTitle': 'Replace collection entry',
283
+ 'cmd.importedShort': 'Imported {count}',
284
+ 'cmd.editNote': 'Edit note (Enter save, Esc cancel)',
285
+ 'cmd.editNoteTitle': 'Edit note',
286
+ 'cmd.editNoteLabel': 'Note (Enter save, Esc cancel)',
287
+ 'cmd.editTags': 'Edit tags',
288
+ 'cmd.gitSourcePrompt': 'Git source (Enter continue, Esc cancel)',
289
+ 'cmd.refPrompt': 'Branch, tag, or commit (Enter continue, Esc cancel)',
290
+ 'cmd.noSkillMdInRepo': 'No SKILL.md found in target repository',
291
+ 'cmd.selectSkillInRepo': 'Select skill in repository:',
292
+ 'cmd.installAgentsProject': 'Standard Agent Skills (.agents/skills)',
293
+ 'cmd.installAgentsGlobal': 'Standard Agent Skills (~/.agents/skills)',
294
+ 'cmd.collected': 'Collected {name}.',
295
+ 'cmd.collectedSameSource': '{name} is already collected from the same source; update it in the main TUI.',
296
+ 'cmd.searchHttpFailed': 'Search failed (HTTP {status})',
297
+ 'cmd.searchInvalidPayload': 'Search service returned invalid data',
298
+ 'cmd.validatingCollect': 'Validating and collecting…',
299
+ 'cmd.replaceIdentityConfirm': 'Replace {name}: {from} → {to}?',
300
+ 'cmd.collectFailed': 'Collect failed: {error}',
301
+ 'cmd.retryCollect': 'Retry collect?',
302
+ // ── footer ──────────────────────────────────────────────────────────────
303
+ 'footer.updateWithCount': 'Update({count})',
304
+ 'footer.selectedCount': 'Selected {count}',
305
+ 'footer.working': '{action}{progress}',
306
+ 'footer.workingProgress': ' {current}/{total}',
307
+ 'footer.checkFailed': '{count} check(s) failed',
308
+ 'footer.checkingUpdates': 'Checking for updates',
309
+ // ── browser ─────────────────────────────────────────────────────────────
310
+ 'browser.moreActionsTitle': ' More actions ',
311
+ 'browser.moreActionsFooter': 'Enter run · Esc back',
312
+ 'browser.localSkill': 'Local · {name}',
313
+ 'browser.selectSkillToView': 'Select a skill to view',
314
+ 'browser.selectedSkills': 'Selected {count} skill(s)',
315
+ 'browser.skillLine': 'Skill: {names}',
316
+ 'browser.removeCollectionTitle': 'Remove from collection',
317
+ 'browser.removeCollectionOne': 'Remove {name} from the collection?',
318
+ 'browser.removeCollectionMany': 'Remove {count} skills from the collection?',
319
+ 'browser.removeLocationsTitle': 'Delete skills',
320
+ 'browser.removeLocationOne': 'Delete the current location of {name}?',
321
+ 'browser.removeLocationsMany': 'Delete the {count} selected skill locations?',
322
+ 'browser.removeLocationsHint': 'These locations will be permanently deleted; collection content (if any) is kept.',
323
+ 'browser.tabProject': 'Project {count}',
324
+ 'browser.tabGlobal': 'Global {count}',
325
+ 'browser.tabCollection': 'Collection {count}',
326
+ 'browser.jumpToGroup': 'Jump to group:',
327
+ 'browser.detailFooterScroll': '↑/↓ scroll · ',
328
+ 'browser.detailFooterCollection': 'n note · t tags · s source · Esc back',
329
+ 'browser.detailFooterEsc': 'Esc back',
330
+ 'browser.noMatchingSkills': 'No matching skills',
331
+ 'browser.referenceName': 'Reference · {name}',
332
+ 'browser.referencePrefix': 'Reference · ',
333
+ 'browser.spaceSelect': 'Space select',
334
+ 'browser.enterViewSpaceSelect': 'Enter view · Space select',
335
+ 'browser.materializeAction': '› Materialize reference to copy',
336
+ 'browser.shortcutHelpTitle': ' All shortcuts ',
337
+ 'browser.shortcutHelpFooterScroll': '↑/↓/wheel move · e/Space expand/collapse · ← collapse · Esc close {range}',
338
+ 'browser.shortcutHelpFooter': '↑/↓/wheel move · e/Space expand/collapse · ← collapse · Esc close',
339
+ 'browser.helpNav': 'Navigation',
340
+ 'browser.helpNavMove': 'Move focus or list item',
341
+ 'browser.helpNavTab': 'Switch tab at current level',
342
+ 'browser.helpNavDetail': 'Open detail on narrow screens (three-pane right column is preview)',
343
+ 'browser.helpNavFilter': 'Filter skills',
344
+ 'browser.helpNavGroup': 'Jump to group (when grouped)',
345
+ 'browser.helpSelect': 'Selection',
346
+ 'browser.helpSelectToggle': 'Toggle selection (tag column: all under that tag)',
347
+ 'browser.helpSelectEnter': 'Add selected; open detail on narrow screens (three-pane right is preview)',
348
+ 'browser.helpCollect': 'Collect & install',
349
+ 'browser.helpCollectImport': 'Add to collection (project / global selected local skills)',
350
+ 'browser.helpMaintain': 'Maintain',
351
+ 'browser.helpMaintainTag': 'Batch tag (selected in collection)',
352
+ 'browser.helpMaintainUpdate': 'Update: selected updatable skills, else current item',
353
+ 'browser.helpMaintainMore': 'More · materialize reference (project symlink)',
354
+ 'browser.helpMaintainSync': 'Sync collection Git (when available)',
355
+ 'browser.helpMaintainDelete': 'Delete selected; if none selected, delete current item',
356
+ 'browser.helpGlobal': 'Global',
357
+ 'browser.helpGlobalHelp': 'Open this help',
358
+ 'browser.helpGlobalQuit': 'Quit browser',
359
+ 'browser.helpGlobalEsc': 'Cancel innermost context',
360
+ // ── components ──────────────────────────────────────────────────────────
361
+ 'comp.scrollRange': '↑/↓/wheel scroll {from}–{to} / {total}',
362
+ 'comp.quickSelect': '1–{max} quick · ',
363
+ 'comp.newTagsComma': 'New tags (comma-separated)',
364
+ 'comp.editTags': 'Edit tags',
365
+ // ── import UI ───────────────────────────────────────────────────────────
366
+ 'import.confirmTitle': 'Confirm import',
367
+ 'import.selectGroups': 'Select groups',
368
+ 'import.newGroupsComma': 'New groups (comma-separated)',
369
+ 'import.groupInputFooter': 'Enter finish groups · Tab back to existing · Esc cancel',
370
+ 'import.groupListFooter': '↑/↓ move · Space select · Tab switch input · Enter finish groups · → confirm · Esc cancel',
371
+ 'import.fromAgentPath': 'From {agent} · {path}',
372
+ 'import.detailFooterScroll': '↑/↓ scroll · ',
373
+ 'import.detailFooter': 'Esc back · Space select · Enter confirm import',
374
+ 'import.selectSkillsTitle': 'Select skills',
375
+ 'import.selectSkillsHeader': '{label} · selected {selected} / total {total}',
376
+ 'import.skillListFooter': '↑/↓ move · Space select · → detail · a select all · Enter confirm · Esc cancel',
377
+ 'import.agentTabsFooter': '←/→ switch agent · ↓ back to skill list · Esc cancel',
378
+ 'import.skillListFooterAgent': '↑/↓ move · Space select · → detail · a select current · Enter confirm · Esc cancel',
379
+ // ── install UI ──────────────────────────────────────────────────────────
380
+ 'install.location': 'Install location',
381
+ 'install.method': 'Install method',
382
+ 'install.targetDirs': 'Target directories',
383
+ 'install.nextStep': 'Enter next',
384
+ 'install.selectAtLeastOne': 'Select at least one directory',
385
+ // ── search UI ───────────────────────────────────────────────────────────
386
+ 'search.title': 'Search skills',
387
+ 'search.retryFooter': 'Enter retry · Esc cancel',
388
+ 'search.cancelFooter': 'Esc cancel',
389
+ 'search.listFooter': '↑/↓ select · Enter collect · Esc cancel',
390
+ 'search.minChars': 'Type at least 2 characters to search',
391
+ 'search.searching': 'Searching…',
392
+ 'search.noResults': 'No skills found',
393
+ // ── extra UI chrome ─────────────────────────────────────────────────────
394
+ 'ui.loading': 'Loading…',
395
+ 'ui.multiSelectFooter': 'Space toggle · Enter confirm · Esc cancel',
396
+ 'ui.selectFooter': '↑/↓ select · Enter confirm · Esc cancel',
397
+ 'ui.tagEditorHeader': '{title} · selected {count}',
398
+ 'ui.selectedCount': 'Selected {count}',
399
+ 'ui.existingTags': 'Existing tags',
400
+ 'ui.noExistingTags': 'No existing tags',
401
+ 'ui.tagEditorFooter': '↑/↓ move · Space select · Tab switch · Enter save · Esc cancel',
402
+ 'import.selectedGroups': 'Selected groups: {tags}',
403
+ 'import.noExistingGroups': 'No existing groups',
404
+ 'import.willImport': 'Will import {count} skill(s); groups: ',
405
+ 'import.moreItems': '… and {count} more',
406
+ 'import.confirmFooter': 'Enter confirm import · ← back to groups · n cancel · Esc cancel',
407
+ 'import.noSkillsForAgent': 'No importable skills for this agent',
408
+ 'install.locationStepFooter': '↑/↓ select · Enter next · Esc cancel',
409
+ 'install.symlinkRecommended': 'Symlink (recommended)',
410
+ 'install.methodStepFooter': '↑/↓ select · ← back · Enter next · Esc cancel',
411
+ 'install.targetsFooter': '↑/↓ move · Space select · ← back · {next} · Esc cancel',
412
+ 'install.skillLine': 'Skills: {names}',
413
+ 'install.locationLine': 'Install location: {value}',
414
+ 'install.methodLine': 'Install method: {value}',
415
+ 'install.targetsLine': 'Target directories: {value}',
416
+ 'install.confirmFooter': 'Enter confirm install · ← back · n cancel · Esc cancel',
417
+ 'install.title': 'Install skills',
418
+ };
419
+ //# sourceMappingURL=en.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/i18n/en.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,MAAM,CAAC,MAAM,EAAE,GAAgD;IAC7D,2EAA2E;IAC3E,gBAAgB,EAAE,SAAS;IAC3B,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,OAAO;IACvB,aAAa,EAAE,MAAM;IACrB,qBAAqB,EAAE,QAAQ;IAC/B,aAAa,EAAE,MAAM;IACrB,aAAa,EAAE,MAAM;IACrB,eAAe,EAAE,QAAQ;IACzB,oBAAoB,EAAE,UAAU;IAChC,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,OAAO;IACvB,aAAa,EAAE,MAAM;IACrB,aAAa,EAAE,MAAM;IACrB,aAAa,EAAE,MAAM;IACrB,aAAa,EAAE,MAAM;IACrB,eAAe,EAAE,QAAQ;IACzB,eAAe,EAAE,QAAQ;IACzB,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,QAAQ;IACzB,aAAa,EAAE,MAAM;IACrB,gBAAgB,EAAE,SAAS;IAC3B,aAAa,EAAE,MAAM;IACrB,aAAa,EAAE,MAAM;IACrB,eAAe,EAAE,QAAQ;IACzB,oBAAoB,EAAE,aAAa;IACnC,eAAe,EAAE,QAAQ;IACzB,cAAc,EAAE,OAAO;IACvB,YAAY,EAAE,KAAK;IACnB,gBAAgB,EAAE,SAAS;IAC3B,cAAc,EAAE,OAAO;IACvB,aAAa,EAAE,MAAM;IACrB,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EA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AE,2BAA2B;IACnD,oBAAoB,EAAE,yBAAyB;IAC/C,qBAAqB,EAAE,6BAA6B;IACpD,uBAAuB,EACrB,wDAAwD;IAC1D,eAAe,EAAE,gBAAgB;CAClC,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Thin locale-aware message catalog (zh / en only).
3
+ *
4
+ * Resolution order (first wins):
5
+ * 1. Test pin via setLocale
6
+ * 2. User config preference (zh | en | system) after applyUserConfigLocale
7
+ * 3. System locale from env / Intl
8
+ */
9
+ import type { LocalePreference } from '../domain/user-config.js';
10
+ import { zh } from './zh.js';
11
+ export type Locale = 'zh' | 'en';
12
+ export type MessageKey = keyof typeof zh;
13
+ export type MessageVars = Record<string, string | number>;
14
+ /** Map a locale tag (e.g. zh_CN, en-US) to app locale. */
15
+ export declare function mapLocaleTag(tag: string | undefined | null): Locale;
16
+ /**
17
+ * Resolve app locale from env (LC_ALL → LC_MESSAGES → LANG).
18
+ * Pure: does not mutate process state.
19
+ */
20
+ export declare function resolveLocaleFromEnv(env?: NodeJS.ProcessEnv): Locale;
21
+ /** Effective locale for a stored preference (system → env/Intl). */
22
+ export declare function resolveLocaleFromPreference(pref: LocalePreference, env?: NodeJS.ProcessEnv): Locale;
23
+ /** Current process locale (pinned or preference-resolved). */
24
+ export declare function getLocale(): Locale;
25
+ /** Last applied user preference (system | zh | en). */
26
+ export declare function getLocalePreference(): LocalePreference;
27
+ /**
28
+ * Apply user config locale preference for this process.
29
+ * Does not override a test pin from setLocale.
30
+ */
31
+ export declare function applyLocalePreference(pref: LocalePreference): void;
32
+ /**
33
+ * Load `~/.config/iskills/config.json` (JSON5) and apply locale preference.
34
+ * Safe when file missing. Does not override test pins.
35
+ */
36
+ export declare function applyUserConfigLocale(): Promise<void>;
37
+ /**
38
+ * Pin locale for the rest of the process (tests).
39
+ * Not a user-facing override.
40
+ */
41
+ export declare function setLocale(locale: Locale): void;
42
+ /** Clear pin and cached resolution (tests). Preference stays until re-applied. */
43
+ export declare function resetLocale(): void;
44
+ /** Translate a catalog key with optional named placeholders `{name}`. */
45
+ export declare function t(key: MessageKey, vars?: MessageVars): string;
46
+ /** All keys present in both catalogs (runtime sanity for tests). */
47
+ export declare function messageKeys(): MessageKey[];
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Thin locale-aware message catalog (zh / en only).
3
+ *
4
+ * Resolution order (first wins):
5
+ * 1. Test pin via setLocale
6
+ * 2. User config preference (zh | en | system) after applyUserConfigLocale
7
+ * 3. System locale from env / Intl
8
+ */
9
+ import { en } from './en.js';
10
+ import { zh } from './zh.js';
11
+ const catalogs = {
12
+ zh: zh,
13
+ en: en,
14
+ };
15
+ let pinned;
16
+ let resolved;
17
+ let preference = 'system';
18
+ /** Map a locale tag (e.g. zh_CN, en-US) to app locale. */
19
+ export function mapLocaleTag(tag) {
20
+ if (!tag)
21
+ return 'en';
22
+ const normalized = tag.trim().replace(/_/g, '-').toLowerCase();
23
+ if (!normalized || normalized === 'c' || normalized === 'posix')
24
+ return 'en';
25
+ // Strip encoding / modifiers: zh_CN.UTF-8@euro → zh-cn
26
+ const base = normalized.split('.')[0]?.split('@')[0] ?? '';
27
+ if (base === 'zh' || base.startsWith('zh-'))
28
+ return 'zh';
29
+ return 'en';
30
+ }
31
+ /**
32
+ * Resolve app locale from env (LC_ALL → LC_MESSAGES → LANG).
33
+ * Pure: does not mutate process state.
34
+ */
35
+ export function resolveLocaleFromEnv(env = process.env) {
36
+ const candidates = [env.LC_ALL, env.LC_MESSAGES, env.LANG];
37
+ for (const raw of candidates) {
38
+ if (raw === undefined || raw === null)
39
+ continue;
40
+ const value = String(raw).trim();
41
+ if (!value)
42
+ continue;
43
+ return mapLocaleTag(value);
44
+ }
45
+ try {
46
+ const intl = Intl.DateTimeFormat().resolvedOptions().locale;
47
+ return mapLocaleTag(intl);
48
+ }
49
+ catch {
50
+ return 'en';
51
+ }
52
+ }
53
+ /** Effective locale for a stored preference (system → env/Intl). */
54
+ export function resolveLocaleFromPreference(pref, env = process.env) {
55
+ if (pref === 'zh' || pref === 'en')
56
+ return pref;
57
+ return resolveLocaleFromEnv(env);
58
+ }
59
+ function detectLocale() {
60
+ if (pinned)
61
+ return pinned;
62
+ if (resolved)
63
+ return resolved;
64
+ resolved = resolveLocaleFromPreference(preference);
65
+ return resolved;
66
+ }
67
+ /** Current process locale (pinned or preference-resolved). */
68
+ export function getLocale() {
69
+ return detectLocale();
70
+ }
71
+ /** Last applied user preference (system | zh | en). */
72
+ export function getLocalePreference() {
73
+ return preference;
74
+ }
75
+ /**
76
+ * Apply user config locale preference for this process.
77
+ * Does not override a test pin from setLocale.
78
+ */
79
+ export function applyLocalePreference(pref) {
80
+ preference = pref;
81
+ if (pinned)
82
+ return;
83
+ resolved = resolveLocaleFromPreference(pref);
84
+ }
85
+ /**
86
+ * Load `~/.config/iskills/config.json` (JSON5) and apply locale preference.
87
+ * Safe when file missing. Does not override test pins.
88
+ */
89
+ export async function applyUserConfigLocale() {
90
+ const { readUserConfig } = await import('../domain/user-config.js');
91
+ const config = await readUserConfig();
92
+ applyLocalePreference(config.locale);
93
+ }
94
+ /**
95
+ * Pin locale for the rest of the process (tests).
96
+ * Not a user-facing override.
97
+ */
98
+ export function setLocale(locale) {
99
+ pinned = locale;
100
+ resolved = locale;
101
+ }
102
+ /** Clear pin and cached resolution (tests). Preference stays until re-applied. */
103
+ export function resetLocale() {
104
+ pinned = undefined;
105
+ resolved = undefined;
106
+ preference = 'system';
107
+ }
108
+ function interpolate(template, vars) {
109
+ if (!vars)
110
+ return template;
111
+ return template.replace(/\{([a-zA-Z_][a-zA-Z0-9_]*)\}/g, (match, name) => {
112
+ if (Object.prototype.hasOwnProperty.call(vars, name)) {
113
+ return String(vars[name]);
114
+ }
115
+ return match;
116
+ });
117
+ }
118
+ /** Translate a catalog key with optional named placeholders `{name}`. */
119
+ export function t(key, vars) {
120
+ const locale = detectLocale();
121
+ const catalog = catalogs[locale];
122
+ const template = catalog[key] ?? catalogs.en[key] ?? catalogs.zh[key] ?? key;
123
+ return interpolate(template, vars);
124
+ }
125
+ /** All keys present in both catalogs (runtime sanity for tests). */
126
+ export function messageKeys() {
127
+ return Object.keys(zh);
128
+ }
129
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAM7B,MAAM,QAAQ,GAA+C;IAC3D,EAAE,EAAE,EAAgC;IACpC,EAAE,EAAE,EAAgC;CACrC,CAAC;AAEF,IAAI,MAA0B,CAAC;AAC/B,IAAI,QAA4B,CAAC;AACjC,IAAI,UAAU,GAAqB,QAAQ,CAAC;AAE5C,0DAA0D;AAC1D,MAAM,UAAU,YAAY,CAAC,GAA8B;IACzD,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC;IAC7E,uDAAuD;IACvD,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,MAAM,UAAU,GAAG,CAAC,GA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