@nbtca/prompt 1.0.23 → 1.0.24
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/dist/config/data.js +5 -1
- package/dist/config/paths.js +5 -0
- package/dist/config/preferences.js +1 -8
- package/dist/core/icons.js +18 -5
- package/dist/core/logo.js +1 -2
- package/dist/core/menu.js +7 -122
- package/dist/core/text.js +9 -3
- package/dist/core/ui.js +0 -1
- package/dist/core/vim-keys.js +6 -5
- package/dist/features/calendar.js +50 -9
- package/dist/features/docs.js +128 -49
- package/dist/features/links.js +42 -0
- package/dist/features/settings.js +120 -0
- package/dist/features/status.js +19 -26
- package/dist/features/theme.js +9 -101
- package/dist/features/update.js +74 -0
- package/dist/i18n/index.js +7 -16
- package/dist/i18n/locales/en.json +43 -54
- package/dist/i18n/locales/zh.json +43 -54
- package/dist/index.js +107 -67
- package/dist/main.js +14 -5
- package/package.json +4 -1
- package/dist/config/data.d.ts +0 -23
- package/dist/config/data.d.ts.map +0 -1
- package/dist/config/data.js.map +0 -1
- package/dist/config/preferences.d.ts +0 -14
- package/dist/config/preferences.d.ts.map +0 -1
- package/dist/config/preferences.js.map +0 -1
- package/dist/config/theme.d.ts +0 -23
- package/dist/config/theme.d.ts.map +0 -1
- package/dist/config/theme.js +0 -25
- package/dist/config/theme.js.map +0 -1
- package/dist/core/icons.d.ts +0 -3
- package/dist/core/icons.d.ts.map +0 -1
- package/dist/core/icons.js.map +0 -1
- package/dist/core/logo.d.ts +0 -9
- package/dist/core/logo.d.ts.map +0 -1
- package/dist/core/logo.js.map +0 -1
- package/dist/core/menu.d.ts +0 -14
- package/dist/core/menu.d.ts.map +0 -1
- package/dist/core/menu.js.map +0 -1
- package/dist/core/text.d.ts +0 -7
- package/dist/core/text.d.ts.map +0 -1
- package/dist/core/text.js.map +0 -1
- package/dist/core/ui.d.ts +0 -38
- package/dist/core/ui.d.ts.map +0 -1
- package/dist/core/ui.js.map +0 -1
- package/dist/core/vim-keys.d.ts +0 -8
- package/dist/core/vim-keys.d.ts.map +0 -1
- package/dist/core/vim-keys.js.map +0 -1
- package/dist/features/calendar.d.ts +0 -29
- package/dist/features/calendar.d.ts.map +0 -1
- package/dist/features/calendar.js.map +0 -1
- package/dist/features/docs.d.ts +0 -8
- package/dist/features/docs.d.ts.map +0 -1
- package/dist/features/docs.js.map +0 -1
- package/dist/features/repair.d.ts +0 -10
- package/dist/features/repair.d.ts.map +0 -1
- package/dist/features/repair.js +0 -29
- package/dist/features/repair.js.map +0 -1
- package/dist/features/status.d.ts +0 -31
- package/dist/features/status.d.ts.map +0 -1
- package/dist/features/status.js.map +0 -1
- package/dist/features/theme.d.ts +0 -8
- package/dist/features/theme.d.ts.map +0 -1
- package/dist/features/theme.js.map +0 -1
- package/dist/features/website.d.ts +0 -30
- package/dist/features/website.d.ts.map +0 -1
- package/dist/features/website.js +0 -48
- package/dist/features/website.js.map +0 -1
- package/dist/i18n/index.d.ts +0 -209
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/index.js.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/main.d.ts +0 -12
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/types.d.ts +0 -48
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -6
- package/dist/types.js.map +0 -1
package/dist/features/theme.js
CHANGED
|
@@ -1,117 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Theme CLI command handler (non-interactive)
|
|
3
|
+
*/
|
|
3
4
|
import { applyColorModePreference, loadPreferences, resetPreferences, setColorMode, setIconMode, } from '../config/preferences.js';
|
|
4
|
-
import {
|
|
5
|
-
import { success, warning } from '../core/ui.js';
|
|
5
|
+
import { resetIconCache } from '../core/icons.js';
|
|
6
6
|
import { t } from '../i18n/index.js';
|
|
7
7
|
const ICON_MODES = ['auto', 'ascii', 'unicode'];
|
|
8
8
|
const COLOR_MODES = ['auto', 'on', 'off'];
|
|
9
|
-
|
|
9
|
+
function formatThemeSummary() {
|
|
10
10
|
const trans = t();
|
|
11
11
|
const prefs = loadPreferences();
|
|
12
|
-
|
|
13
|
-
`${chalk.dim(trans.theme.iconMode + ':')} ${prefs.iconMode}`,
|
|
14
|
-
`${chalk.dim(trans.theme.colorMode + ':')} ${prefs.colorMode}`,
|
|
15
|
-
'',
|
|
16
|
-
chalk.dim('NBTCA_ICON_MODE / NBTCA_COLOR_MODE can override saved preferences'),
|
|
17
|
-
].join('\n');
|
|
18
|
-
note(content, trans.theme.current);
|
|
19
|
-
}
|
|
20
|
-
function notifyThemeChange(saved, successMessage, warningMessage) {
|
|
21
|
-
if (saved) {
|
|
22
|
-
success(successMessage);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
warning(warningMessage);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export async function showThemeMenu() {
|
|
29
|
-
while (true) {
|
|
30
|
-
const trans = t();
|
|
31
|
-
const prefs = loadPreferences();
|
|
32
|
-
const action = await select({
|
|
33
|
-
message: trans.theme.chooseAction,
|
|
34
|
-
options: [
|
|
35
|
-
{
|
|
36
|
-
value: 'summary',
|
|
37
|
-
label: `${pickIcon('ℹ️', '[i]')} ${trans.theme.current}`,
|
|
38
|
-
hint: `${trans.theme.iconMode}: ${prefs.iconMode} | ${trans.theme.colorMode}: ${prefs.colorMode}`,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
value: 'icon',
|
|
42
|
-
label: `${pickIcon('🎨', '[*]')} ${trans.theme.iconMode}`,
|
|
43
|
-
hint: prefs.iconMode,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
value: 'color',
|
|
47
|
-
label: `${pickIcon('🖌️', '[*]')} ${trans.theme.colorMode}`,
|
|
48
|
-
hint: prefs.colorMode,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
value: 'reset',
|
|
52
|
-
label: `${pickIcon('♻️', '[r]')} ${trans.theme.reset}`,
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
value: 'back',
|
|
56
|
-
label: `${pickIcon('←', '[^]')} ${trans.theme.backToMenu}`,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
});
|
|
60
|
-
if (isCancel(action) || action === 'back')
|
|
61
|
-
return;
|
|
62
|
-
if (action === 'summary') {
|
|
63
|
-
printThemeSummary();
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
if (action === 'icon') {
|
|
67
|
-
const mode = await select({
|
|
68
|
-
message: trans.theme.chooseIconMode,
|
|
69
|
-
options: [
|
|
70
|
-
{ value: 'auto', label: trans.theme.modeAuto, hint: prefs.iconMode === 'auto' ? `${pickIcon('✓', '*')} current` : undefined },
|
|
71
|
-
{ value: 'ascii', label: trans.theme.modeAscii, hint: prefs.iconMode === 'ascii' ? `${pickIcon('✓', '*')} current` : undefined },
|
|
72
|
-
{ value: 'unicode', label: trans.theme.modeUnicode, hint: prefs.iconMode === 'unicode' ? `${pickIcon('✓', '*')} current` : undefined },
|
|
73
|
-
],
|
|
74
|
-
initialValue: prefs.iconMode,
|
|
75
|
-
});
|
|
76
|
-
if (isCancel(mode))
|
|
77
|
-
continue;
|
|
78
|
-
const saved = setIconMode(mode);
|
|
79
|
-
notifyThemeChange(saved, trans.theme.updated, trans.theme.updatedSessionOnly);
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (action === 'color') {
|
|
83
|
-
const mode = await select({
|
|
84
|
-
message: trans.theme.chooseColorMode,
|
|
85
|
-
options: [
|
|
86
|
-
{ value: 'auto', label: trans.theme.modeAuto, hint: prefs.colorMode === 'auto' ? `${pickIcon('✓', '*')} current` : undefined },
|
|
87
|
-
{ value: 'on', label: trans.theme.modeOn, hint: prefs.colorMode === 'on' ? `${pickIcon('✓', '*')} current` : undefined },
|
|
88
|
-
{ value: 'off', label: trans.theme.modeOff, hint: prefs.colorMode === 'off' ? `${pickIcon('✓', '*')} current` : undefined },
|
|
89
|
-
],
|
|
90
|
-
initialValue: prefs.colorMode,
|
|
91
|
-
});
|
|
92
|
-
if (isCancel(mode))
|
|
93
|
-
continue;
|
|
94
|
-
const saved = setColorMode(mode);
|
|
95
|
-
applyColorModePreference(false);
|
|
96
|
-
notifyThemeChange(saved, trans.theme.updated, trans.theme.updatedSessionOnly);
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
if (action === 'reset') {
|
|
100
|
-
const saved = resetPreferences();
|
|
101
|
-
applyColorModePreference(false);
|
|
102
|
-
notifyThemeChange(saved, trans.theme.reset, trans.theme.resetSessionOnly);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
12
|
+
return `${trans.theme.iconMode}: ${prefs.iconMode}, ${trans.theme.colorMode}: ${prefs.colorMode}`;
|
|
105
13
|
}
|
|
106
14
|
export function runThemeCommand(args) {
|
|
107
15
|
const trans = t();
|
|
108
16
|
const [scope, value] = args;
|
|
109
17
|
if (!scope) {
|
|
110
|
-
|
|
111
|
-
return { ok: true, message: '' };
|
|
18
|
+
return { ok: true, message: formatThemeSummary() };
|
|
112
19
|
}
|
|
113
20
|
if (scope === 'reset') {
|
|
114
21
|
const saved = resetPreferences();
|
|
22
|
+
resetIconCache();
|
|
115
23
|
applyColorModePreference(false);
|
|
116
24
|
const message = saved ? trans.theme.reset : trans.theme.resetSessionOnly;
|
|
117
25
|
return { ok: true, message };
|
|
@@ -122,6 +30,7 @@ export function runThemeCommand(args) {
|
|
|
122
30
|
return { ok: false, message: `${trans.theme.invalidValue} auto, ascii, unicode` };
|
|
123
31
|
}
|
|
124
32
|
const saved = setIconMode(mode);
|
|
33
|
+
resetIconCache();
|
|
125
34
|
return { ok: true, message: saved ? trans.theme.updated : trans.theme.updatedSessionOnly };
|
|
126
35
|
}
|
|
127
36
|
if (scope === 'color') {
|
|
@@ -135,4 +44,3 @@ export function runThemeCommand(args) {
|
|
|
135
44
|
}
|
|
136
45
|
return { ok: false, message: trans.theme.usage };
|
|
137
46
|
}
|
|
138
|
-
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version update checker
|
|
3
|
+
* Non-blocking check against npm registry for newer versions.
|
|
4
|
+
*/
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import { APP_INFO } from '../config/data.js';
|
|
7
|
+
import { t } from '../i18n/index.js';
|
|
8
|
+
const NPM_REGISTRY_URL = `https://registry.npmjs.org/@nbtca/prompt/latest`;
|
|
9
|
+
/**
|
|
10
|
+
* Fetch latest version from npm registry.
|
|
11
|
+
* Returns null on any failure (network, timeout, parse).
|
|
12
|
+
*/
|
|
13
|
+
async function fetchLatestVersion() {
|
|
14
|
+
try {
|
|
15
|
+
const controller = new AbortController();
|
|
16
|
+
const timeout = setTimeout(() => controller.abort(), 3000);
|
|
17
|
+
const res = await fetch(NPM_REGISTRY_URL, {
|
|
18
|
+
signal: controller.signal,
|
|
19
|
+
headers: { 'Accept': 'application/json' },
|
|
20
|
+
});
|
|
21
|
+
clearTimeout(timeout);
|
|
22
|
+
if (!res.ok)
|
|
23
|
+
return null;
|
|
24
|
+
const data = (await res.json());
|
|
25
|
+
return data.version ?? null;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Compare semver strings. Returns true if remote > local.
|
|
33
|
+
*/
|
|
34
|
+
function isNewer(local, remote) {
|
|
35
|
+
const parse = (v) => v.split('.').map(Number);
|
|
36
|
+
const l = parse(local);
|
|
37
|
+
const r = parse(remote);
|
|
38
|
+
for (let i = 0; i < 3; i++) {
|
|
39
|
+
if ((r[i] ?? 0) > (l[i] ?? 0))
|
|
40
|
+
return true;
|
|
41
|
+
if ((r[i] ?? 0) < (l[i] ?? 0))
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Non-blocking update check for TUI startup.
|
|
48
|
+
* Resolves to a notification string or null.
|
|
49
|
+
*/
|
|
50
|
+
export async function checkForUpdate() {
|
|
51
|
+
const latest = await fetchLatestVersion();
|
|
52
|
+
if (!latest || !isNewer(APP_INFO.version, latest))
|
|
53
|
+
return null;
|
|
54
|
+
const trans = t();
|
|
55
|
+
return `${trans.update.available.replace('{latest}', latest).replace('{current}', APP_INFO.version)} ${chalk.dim(trans.update.command)}`;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Explicit update check command (nbtca update).
|
|
59
|
+
*/
|
|
60
|
+
export async function runUpdateCheck() {
|
|
61
|
+
const trans = t();
|
|
62
|
+
const latest = await fetchLatestVersion();
|
|
63
|
+
if (!latest) {
|
|
64
|
+
console.log(chalk.yellow(trans.update.checkFailed));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (isNewer(APP_INFO.version, latest)) {
|
|
68
|
+
console.log(chalk.yellow(`${trans.update.available.replace('{latest}', latest).replace('{current}', APP_INFO.version)}`));
|
|
69
|
+
console.log(chalk.dim(trans.update.command));
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
console.log(chalk.green(`${trans.update.upToDate.replace('{version}', APP_INFO.version)}`));
|
|
73
|
+
}
|
|
74
|
+
}
|
package/dist/i18n/index.js
CHANGED
|
@@ -6,19 +6,13 @@ import fs from 'fs';
|
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import { fileURLToPath } from 'url';
|
|
8
8
|
import { dirname } from 'path';
|
|
9
|
+
import { getConfigDir } from '../config/paths.js';
|
|
9
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
11
|
const __dirname = dirname(__filename);
|
|
11
12
|
/**
|
|
12
13
|
* Language configuration
|
|
13
14
|
*/
|
|
14
15
|
let currentLanguage = 'zh'; // Default to Chinese
|
|
15
|
-
/**
|
|
16
|
-
* Get configuration directory path
|
|
17
|
-
*/
|
|
18
|
-
function getConfigDir() {
|
|
19
|
-
const homeDir = process.env['HOME'] || process.env['USERPROFILE'] || '';
|
|
20
|
-
return path.join(homeDir, '.nbtca');
|
|
21
|
-
}
|
|
22
16
|
/**
|
|
23
17
|
* Get language configuration file path
|
|
24
18
|
*/
|
|
@@ -31,15 +25,13 @@ function getLanguageConfigPath() {
|
|
|
31
25
|
export function loadLanguagePreference() {
|
|
32
26
|
try {
|
|
33
27
|
const configPath = getLanguageConfigPath();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
currentLanguage = config.language;
|
|
38
|
-
}
|
|
28
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
29
|
+
if (config.language === 'zh' || config.language === 'en') {
|
|
30
|
+
currentLanguage = config.language;
|
|
39
31
|
}
|
|
40
32
|
}
|
|
41
|
-
catch
|
|
42
|
-
// If loading fails, use default (Chinese)
|
|
33
|
+
catch {
|
|
34
|
+
// If loading fails (file missing or invalid), use default (Chinese)
|
|
43
35
|
}
|
|
44
36
|
return currentLanguage;
|
|
45
37
|
}
|
|
@@ -57,7 +49,7 @@ export function saveLanguagePreference(language) {
|
|
|
57
49
|
currentLanguage = language;
|
|
58
50
|
return true;
|
|
59
51
|
}
|
|
60
|
-
catch
|
|
52
|
+
catch {
|
|
61
53
|
return false;
|
|
62
54
|
}
|
|
63
55
|
}
|
|
@@ -111,4 +103,3 @@ export function clearTranslationCache() {
|
|
|
111
103
|
}
|
|
112
104
|
// Initialize language preference on module load
|
|
113
105
|
loadLanguagePreference();
|
|
114
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -7,35 +7,20 @@
|
|
|
7
7
|
"loading": "Loading...",
|
|
8
8
|
"error": "Error",
|
|
9
9
|
"success": "Success",
|
|
10
|
-
"goodbye": "Goodbye!"
|
|
10
|
+
"goodbye": "Goodbye!",
|
|
11
|
+
"current": "current"
|
|
11
12
|
},
|
|
12
13
|
"menu": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"docsDesc": "Technical docs and tutorials",
|
|
20
|
-
"website": "Official Website",
|
|
21
|
-
"websiteDesc": "Visit NBTCA homepage",
|
|
22
|
-
"github": "GitHub",
|
|
23
|
-
"githubDesc": "Open source projects and code",
|
|
24
|
-
"roadmap": "Roadmap",
|
|
25
|
-
"roadmapDesc": "Open NBTCA roadmap project board",
|
|
14
|
+
"events": "Events",
|
|
15
|
+
"eventsDesc": "Upcoming activities",
|
|
16
|
+
"docs": "Docs",
|
|
17
|
+
"docsDesc": "Knowledge base",
|
|
18
|
+
"status": "Status",
|
|
19
|
+
"statusDesc": "Service health",
|
|
26
20
|
"links": "Links",
|
|
27
|
-
"linksDesc": "Website
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"aboutDesc": "Project info and help",
|
|
31
|
-
"status": "Service Status",
|
|
32
|
-
"statusDesc": "Check service health in terminal",
|
|
33
|
-
"language": "Language",
|
|
34
|
-
"languageDesc": "Change display language",
|
|
35
|
-
"theme": "Theme",
|
|
36
|
-
"themeDesc": "Configure icons and color mode",
|
|
37
|
-
"navigationHint": "Navigation: j/k or up/down | Jump: g/G | Quit: q or Ctrl+C",
|
|
38
|
-
"quickCommandHint": "Tip: use `nbtca <command> --help` for script-friendly mode",
|
|
21
|
+
"linksDesc": "Website, GitHub, Roadmap",
|
|
22
|
+
"settings": "Settings",
|
|
23
|
+
"settingsDesc": "Language, theme, about",
|
|
39
24
|
"chooseAction": "Choose an action"
|
|
40
25
|
},
|
|
41
26
|
"about": {
|
|
@@ -50,8 +35,6 @@
|
|
|
50
35
|
"author": "Author"
|
|
51
36
|
},
|
|
52
37
|
"calendar": {
|
|
53
|
-
"title": "Recent Events",
|
|
54
|
-
"subtitle": "(Next 30 days)",
|
|
55
38
|
"loading": "Loading event calendar...",
|
|
56
39
|
"noEvents": "No upcoming events",
|
|
57
40
|
"error": "Failed to load event calendar",
|
|
@@ -59,11 +42,14 @@
|
|
|
59
42
|
"eventsFound": "events found",
|
|
60
43
|
"dateTime": "Date & Time",
|
|
61
44
|
"eventName": "Event Name",
|
|
62
|
-
"location": "Location"
|
|
45
|
+
"location": "Location",
|
|
46
|
+
"untitledEvent": "Untitled Event",
|
|
47
|
+
"tbdLocation": "TBD",
|
|
48
|
+
"subscribeHint": "Subscribe to calendar",
|
|
49
|
+
"viewDetail": "Select an event for details:",
|
|
50
|
+
"noDescription": "No additional details"
|
|
63
51
|
},
|
|
64
52
|
"docs": {
|
|
65
|
-
"title": "Knowledge Base",
|
|
66
|
-
"subtitle": "Browse documentation from terminal or open in browser",
|
|
67
53
|
"loading": "Loading documentation list...",
|
|
68
54
|
"loadingDir": "Loading directory",
|
|
69
55
|
"categoryTutorial": "Tutorials",
|
|
@@ -95,33 +81,27 @@
|
|
|
95
81
|
"browserError": "Failed to open browser",
|
|
96
82
|
"browserErrorHint": "Please visit manually: https://docs.nbtca.space",
|
|
97
83
|
"retry": "Retry?",
|
|
98
|
-
"pagerNotAvailable": "Pager not available, using standard output",
|
|
99
84
|
"endOfDocument": "End of document - Press q to quit",
|
|
100
|
-
"terminalProfile": "Terminal profile",
|
|
101
|
-
"terminalSupport": "Support",
|
|
102
|
-
"terminalBasic": "Basic",
|
|
103
|
-
"terminalEnhanced": "Enhanced",
|
|
104
|
-
"terminalAdvanced": "Advanced",
|
|
105
|
-
"navigationHint": "Navigation: j/k or up/down | Enter: open | q/Ctrl+C: quit",
|
|
106
85
|
"githubRateLimited": "GitHub API rate limit reached. Resets at {time}.",
|
|
107
86
|
"githubForbidden": "GitHub API access denied (403).",
|
|
108
87
|
"githubTokenHint": "Tip: set GITHUB_TOKEN for a higher rate limit.",
|
|
109
88
|
"fetchDirFailed": "Failed to fetch directory: {error}",
|
|
110
|
-
"fetchFileFailed": "Failed to fetch file: {error}"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"opened": "Repair service page opened in browser",
|
|
117
|
-
"error": "Failed to open browser",
|
|
118
|
-
"errorHint": "Please visit manually: https://nbtca.space/repair"
|
|
89
|
+
"fetchFileFailed": "Failed to fetch file: {error}",
|
|
90
|
+
"searchPrompt": "Search documents by title:",
|
|
91
|
+
"searchPlaceholder": "Enter keyword...",
|
|
92
|
+
"searching": "Searching documents...",
|
|
93
|
+
"searchResults": "results found",
|
|
94
|
+
"searchNoResults": "No documents match your search"
|
|
119
95
|
},
|
|
120
|
-
"
|
|
121
|
-
"
|
|
96
|
+
"links": {
|
|
97
|
+
"choose": "Open a link:",
|
|
98
|
+
"website": "Official Website",
|
|
99
|
+
"github": "GitHub",
|
|
100
|
+
"roadmap": "Roadmap",
|
|
101
|
+
"repair": "Repair Service",
|
|
102
|
+
"opening": "Opening...",
|
|
122
103
|
"opened": "Opened in browser",
|
|
123
|
-
"error": "Failed to open browser"
|
|
124
|
-
"errorHint": "Please visit manually"
|
|
104
|
+
"error": "Failed to open browser"
|
|
125
105
|
},
|
|
126
106
|
"status": {
|
|
127
107
|
"checking": "Checking service status...",
|
|
@@ -134,6 +114,11 @@
|
|
|
134
114
|
"url": "URL",
|
|
135
115
|
"up": "UP",
|
|
136
116
|
"down": "DOWN",
|
|
117
|
+
"serviceWebsite": "Website",
|
|
118
|
+
"serviceDocs": "Docs",
|
|
119
|
+
"serviceCalendar": "Calendar",
|
|
120
|
+
"serviceGithub": "GitHub",
|
|
121
|
+
"serviceRoadmap": "Roadmap",
|
|
137
122
|
"watchStarted": "Starting status watch (every {seconds}s)",
|
|
138
123
|
"watchUpdated": "Last updated",
|
|
139
124
|
"watchHint": "Press Ctrl+C to stop",
|
|
@@ -146,7 +131,7 @@
|
|
|
146
131
|
},
|
|
147
132
|
"theme": {
|
|
148
133
|
"current": "Current theme settings",
|
|
149
|
-
"chooseAction": "
|
|
134
|
+
"chooseAction": "Settings",
|
|
150
135
|
"chooseIconMode": "Choose icon mode:",
|
|
151
136
|
"chooseColorMode": "Choose color mode:",
|
|
152
137
|
"modeAuto": "Auto",
|
|
@@ -165,12 +150,16 @@
|
|
|
165
150
|
"invalidValue": "Invalid value. Use one of:"
|
|
166
151
|
},
|
|
167
152
|
"language": {
|
|
168
|
-
"title": "Language Settings",
|
|
169
|
-
"currentLanguage": "Current Language",
|
|
170
153
|
"selectLanguage": "Select a language:",
|
|
171
154
|
"zh": "简体中文 (Simplified Chinese)",
|
|
172
155
|
"en": "English",
|
|
173
156
|
"changed": "Language changed successfully",
|
|
174
157
|
"changedSessionOnly": "Language changed for this session only (failed to save config)"
|
|
158
|
+
},
|
|
159
|
+
"update": {
|
|
160
|
+
"available": "Update available: {current} → {latest}",
|
|
161
|
+
"upToDate": "You are on the latest version ({version})",
|
|
162
|
+
"checkFailed": "Could not check for updates",
|
|
163
|
+
"command": "Run: npm i -g @nbtca/prompt"
|
|
175
164
|
}
|
|
176
165
|
}
|
|
@@ -7,35 +7,20 @@
|
|
|
7
7
|
"loading": "加载中...",
|
|
8
8
|
"error": "错误",
|
|
9
9
|
"success": "成功",
|
|
10
|
-
"goodbye": "再见!"
|
|
10
|
+
"goodbye": "再见!",
|
|
11
|
+
"current": "当前"
|
|
11
12
|
},
|
|
12
13
|
"menu": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"docsDesc": "技术文档和教程",
|
|
20
|
-
"website": "官方网站",
|
|
21
|
-
"websiteDesc": "访问 NBTCA 主页",
|
|
22
|
-
"github": "GitHub",
|
|
23
|
-
"githubDesc": "开源项目和代码",
|
|
24
|
-
"roadmap": "Roadmap 看板",
|
|
25
|
-
"roadmapDesc": "打开 NBTCA 路线图项目看板",
|
|
14
|
+
"events": "活动",
|
|
15
|
+
"eventsDesc": "近期活动安排",
|
|
16
|
+
"docs": "文档",
|
|
17
|
+
"docsDesc": "知识库",
|
|
18
|
+
"status": "状态",
|
|
19
|
+
"statusDesc": "服务健康检查",
|
|
26
20
|
"links": "链接",
|
|
27
|
-
"linksDesc": "
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"aboutDesc": "项目信息和帮助",
|
|
31
|
-
"status": "服务状态",
|
|
32
|
-
"statusDesc": "在终端检查服务健康状态",
|
|
33
|
-
"language": "切换语言",
|
|
34
|
-
"languageDesc": "更改显示语言",
|
|
35
|
-
"theme": "主题设置",
|
|
36
|
-
"themeDesc": "配置图标和颜色模式",
|
|
37
|
-
"navigationHint": "导航: j/k 或 up/down | 跳转: g/G | 退出: q 或 Ctrl+C",
|
|
38
|
-
"quickCommandHint": "提示: 使用 `nbtca <command> --help` 获取可脚本化模式",
|
|
21
|
+
"linksDesc": "官网、GitHub、路线图",
|
|
22
|
+
"settings": "设置",
|
|
23
|
+
"settingsDesc": "语言、主题、关于",
|
|
39
24
|
"chooseAction": "选择一个操作"
|
|
40
25
|
},
|
|
41
26
|
"about": {
|
|
@@ -50,8 +35,6 @@
|
|
|
50
35
|
"author": "作者"
|
|
51
36
|
},
|
|
52
37
|
"calendar": {
|
|
53
|
-
"title": "近期活动",
|
|
54
|
-
"subtitle": "(最近30天)",
|
|
55
38
|
"loading": "正在获取活动日历...",
|
|
56
39
|
"noEvents": "近期暂无活动安排",
|
|
57
40
|
"error": "无法获取活动日历",
|
|
@@ -59,11 +42,14 @@
|
|
|
59
42
|
"eventsFound": "个活动",
|
|
60
43
|
"dateTime": "日期时间",
|
|
61
44
|
"eventName": "活动名称",
|
|
62
|
-
"location": "地点"
|
|
45
|
+
"location": "地点",
|
|
46
|
+
"untitledEvent": "未命名活动",
|
|
47
|
+
"tbdLocation": "待定",
|
|
48
|
+
"subscribeHint": "订阅日历",
|
|
49
|
+
"viewDetail": "选择活动查看详情:",
|
|
50
|
+
"noDescription": "暂无详细信息"
|
|
63
51
|
},
|
|
64
52
|
"docs": {
|
|
65
|
-
"title": "知识库",
|
|
66
|
-
"subtitle": "从终端浏览文档或在浏览器中打开",
|
|
67
53
|
"loading": "正在加载文档列表...",
|
|
68
54
|
"loadingDir": "正在加载目录",
|
|
69
55
|
"categoryTutorial": "教程",
|
|
@@ -95,33 +81,27 @@
|
|
|
95
81
|
"browserError": "无法打开浏览器",
|
|
96
82
|
"browserErrorHint": "请手动访问: https://docs.nbtca.space",
|
|
97
83
|
"retry": "是否重试?",
|
|
98
|
-
"pagerNotAvailable": "Pager不可用,使用标准输出",
|
|
99
84
|
"endOfDocument": "文档结束 - 按 q 退出",
|
|
100
|
-
"terminalProfile": "终端类型",
|
|
101
|
-
"terminalSupport": "支持",
|
|
102
|
-
"terminalBasic": "基础",
|
|
103
|
-
"terminalEnhanced": "增强",
|
|
104
|
-
"terminalAdvanced": "高级",
|
|
105
|
-
"navigationHint": "导航: j/k 或 up/down | Enter: 打开 | q/Ctrl+C: 退出",
|
|
106
85
|
"githubRateLimited": "GitHub API 速率限制已达上限,将在 {time} 重置。",
|
|
107
86
|
"githubForbidden": "GitHub API 拒绝访问 (403)。",
|
|
108
87
|
"githubTokenHint": "提示: 设置 GITHUB_TOKEN 环境变量可获得更高的速率限制。",
|
|
109
88
|
"fetchDirFailed": "无法获取目录内容: {error}",
|
|
110
|
-
"fetchFileFailed": "无法获取文件内容: {error}"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"opened": "已在浏览器中打开维修服务页面",
|
|
117
|
-
"error": "无法打开浏览器",
|
|
118
|
-
"errorHint": "请手动访问: https://nbtca.space/repair"
|
|
89
|
+
"fetchFileFailed": "无法获取文件内容: {error}",
|
|
90
|
+
"searchPrompt": "按标题搜索文档:",
|
|
91
|
+
"searchPlaceholder": "输入关键词...",
|
|
92
|
+
"searching": "正在搜索文档...",
|
|
93
|
+
"searchResults": "个结果",
|
|
94
|
+
"searchNoResults": "未找到匹配的文档"
|
|
119
95
|
},
|
|
120
|
-
"
|
|
121
|
-
"
|
|
96
|
+
"links": {
|
|
97
|
+
"choose": "打开链接:",
|
|
98
|
+
"website": "官方网站",
|
|
99
|
+
"github": "GitHub",
|
|
100
|
+
"roadmap": "路线图",
|
|
101
|
+
"repair": "维修服务",
|
|
102
|
+
"opening": "正在打开...",
|
|
122
103
|
"opened": "已在浏览器中打开",
|
|
123
|
-
"error": "无法打开浏览器"
|
|
124
|
-
"errorHint": "请手动访问"
|
|
104
|
+
"error": "无法打开浏览器"
|
|
125
105
|
},
|
|
126
106
|
"status": {
|
|
127
107
|
"checking": "正在检查服务状态...",
|
|
@@ -134,6 +114,11 @@
|
|
|
134
114
|
"url": "URL",
|
|
135
115
|
"up": "正常",
|
|
136
116
|
"down": "异常",
|
|
117
|
+
"serviceWebsite": "官网",
|
|
118
|
+
"serviceDocs": "文档",
|
|
119
|
+
"serviceCalendar": "日历",
|
|
120
|
+
"serviceGithub": "GitHub",
|
|
121
|
+
"serviceRoadmap": "看板",
|
|
137
122
|
"watchStarted": "开始监控服务状态(每 {seconds} 秒)",
|
|
138
123
|
"watchUpdated": "最近更新",
|
|
139
124
|
"watchHint": "按 Ctrl+C 停止",
|
|
@@ -146,7 +131,7 @@
|
|
|
146
131
|
},
|
|
147
132
|
"theme": {
|
|
148
133
|
"current": "当前主题设置",
|
|
149
|
-
"chooseAction": "
|
|
134
|
+
"chooseAction": "设置",
|
|
150
135
|
"chooseIconMode": "选择图标模式:",
|
|
151
136
|
"chooseColorMode": "选择颜色模式:",
|
|
152
137
|
"modeAuto": "自动",
|
|
@@ -165,12 +150,16 @@
|
|
|
165
150
|
"invalidValue": "无效取值,可选:"
|
|
166
151
|
},
|
|
167
152
|
"language": {
|
|
168
|
-
"title": "语言设置",
|
|
169
|
-
"currentLanguage": "当前语言",
|
|
170
153
|
"selectLanguage": "选择语言:",
|
|
171
154
|
"zh": "简体中文",
|
|
172
155
|
"en": "English",
|
|
173
156
|
"changed": "语言已切换",
|
|
174
157
|
"changedSessionOnly": "语言仅在当前会话生效(无法写入配置文件)"
|
|
158
|
+
},
|
|
159
|
+
"update": {
|
|
160
|
+
"available": "有新版本可用: {current} → {latest}",
|
|
161
|
+
"upToDate": "已是最新版本 ({version})",
|
|
162
|
+
"checkFailed": "无法检查更新",
|
|
163
|
+
"command": "运行: npm i -g @nbtca/prompt"
|
|
175
164
|
}
|
|
176
165
|
}
|