javdict 1.2.12 → 1.3.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- English | [中文](README_zh.md) | [日本語](README_ja.md) | [한국어](README_ko.md) | [Deutsch](README_de.md)
1
+ English | [中文](README_zh.md) | [日本語](README_jp.md) | [한국어](README_kr.md) | [Deutsch](README_de.md)
2
2
 
3
3
  # AvDict 🎬
4
4
 
@@ -92,6 +92,16 @@ jav ABF-331
92
92
  jav JUR-067
93
93
  ```
94
94
 
95
+ **Query with specific language output:**
96
+ ```bash
97
+ jav --lang en SSIS-001 # English
98
+ jav --lang zh SSIS-001 # 中文
99
+ jav --lang jp SSIS-001 # 日本語
100
+ jav --lang kr SSIS-001 # 한국어
101
+ jav --lang de SSIS-001 # Deutsch
102
+ jav -l en SSIS-001 # shorthand
103
+ ```
104
+
95
105
  **Output raw JSON:**
96
106
 
97
107
  ```bash
@@ -128,6 +138,7 @@ Arguments:
128
138
 
129
139
  Options:
130
140
  -v, --version Print version number
141
+ -l, --lang <lang> Output language: zh/en/jp/kr/de (default: zh)
131
142
  -r, --raw Output raw JSON instead of formatted display
132
143
  --setup Configure JAVDB Cookie (optional, improves coverage)
133
144
  --clear-cache Clear local result cache
package/README_de.md CHANGED
@@ -1,4 +1,4 @@
1
- [English](README.md) | [中文](README_zh.md) | [日本語](README_ja.md) | [한국어](README_ko.md) | Deutsch
1
+ [English](README.md) | [中文](README_zh.md) | [日本語](README_jp.md) | [한국어](README_kr.md) | Deutsch
2
2
 
3
3
  # AvDict 🎬
4
4
 
@@ -94,6 +94,16 @@ jav ABF-331
94
94
  jav JUR-067
95
95
  ```
96
96
 
97
+ **Ausgabe in bestimmter Sprache:**
98
+ ```bash
99
+ jav --lang de SSIS-001 # Deutsch
100
+ jav --lang zh SSIS-001 # 中文
101
+ jav --lang en SSIS-001 # English
102
+ jav --lang jp SSIS-001 # 日本語
103
+ jav --lang kr SSIS-001 # 한국어
104
+ jav -l de SSIS-001 # Kurzform
105
+ ```
106
+
97
107
  **Rohdaten als JSON ausgeben:**
98
108
 
99
109
  ```bash
@@ -130,6 +140,7 @@ Arguments:
130
140
 
131
141
  Options:
132
142
  -v, --version Versionsnummer ausgeben
143
+ -l, --lang <Sprache> Ausgabesprache: zh/en/jp/kr/de (Standard: zh)
133
144
  -r, --raw Ausgabe als rohes JSON
134
145
  --setup JAVDB Cookie konfigurieren(optional, verbessert Abdeckung)
135
146
  --clear-cache Lokalen Cache leeren
@@ -1,4 +1,4 @@
1
- [English](README.md) | [中文](README_zh.md) | 日本語 | [한국어](README_ko.md) | [Deutsch](README_de.md)
1
+ [English](README.md) | [中文](README_zh.md) | 日本語 | [한국어](README_kr.md) | [Deutsch](README_de.md)
2
2
 
3
3
  # AvDict 🎬
4
4
 
@@ -94,6 +94,16 @@ jav ABF-331
94
94
  jav JUR-067
95
95
  ```
96
96
 
97
+ **言語を指定して出力:**
98
+ ```bash
99
+ jav --lang jp SSIS-001 # 日本語(デフォルト設定時)
100
+ jav --lang zh SSIS-001 # 中文
101
+ jav --lang en SSIS-001 # English
102
+ jav --lang kr SSIS-001 # 한국어
103
+ jav --lang de SSIS-001 # Deutsch
104
+ jav -l ja SSIS-001 # 省略形
105
+ ```
106
+
97
107
  **生の JSON データで出力:**
98
108
 
99
109
  ```bash
@@ -130,6 +140,7 @@ Arguments:
130
140
 
131
141
  Options:
132
142
  -v, --version バージョンを表示
143
+ -l, --lang <言語> 出力言語:zh/en/jp/kr/de(デフォルト:zh)
133
144
  -r, --raw 生の JSON 形式で出力
134
145
  --setup JAVDB Cookie を設定(任意、カバレッジ向上)
135
146
  --clear-cache ローカルキャッシュを削除
@@ -1,4 +1,4 @@
1
- [English](README.md) | [中文](README_zh.md) | [日本語](README_ja.md) | 한국어 | [Deutsch](README_de.md)
1
+ [English](README.md) | [中文](README_zh.md) | [日本語](README_jp.md) | 한국어 | [Deutsch](README_de.md)
2
2
 
3
3
  # AvDict 🎬
4
4
 
@@ -94,6 +94,16 @@ jav ABF-331
94
94
  jav JUR-067
95
95
  ```
96
96
 
97
+ **언어를 지정하여 출력:**
98
+ ```bash
99
+ jav --lang kr SSIS-001 # 한국어
100
+ jav --lang zh SSIS-001 # 中文
101
+ jav --lang en SSIS-001 # English
102
+ jav --lang jp SSIS-001 # 日本語
103
+ jav --lang de SSIS-001 # Deutsch
104
+ jav -l ko SSIS-001 # 축약형
105
+ ```
106
+
97
107
  **원시 JSON 출력:**
98
108
 
99
109
  ```bash
@@ -130,6 +140,7 @@ Arguments:
130
140
 
131
141
  Options:
132
142
  -v, --version 버전 출력
143
+ -l, --lang <언어> 출력 언어: zh/en/jp/kr/de (기본값: zh)
133
144
  -r, --raw 원시 JSON 형식으로 출력
134
145
  --setup JAVDB Cookie 설정(선택, 커버리지 향상)
135
146
  --clear-cache 로컬 캐시 삭제
package/README_zh.md CHANGED
@@ -1,4 +1,4 @@
1
- [English](README.md) | 中文 | [日本語](README_ja.md) | [한국어](README_ko.md) | [Deutsch](README_de.md)
1
+ [English](README.md) | 中文 | [日本語](README_jp.md) | [한국어](README_kr.md) | [Deutsch](README_de.md)
2
2
 
3
3
  # AvDict 🎬
4
4
 
@@ -94,6 +94,16 @@ jav ABF-331
94
94
  jav JUR-067
95
95
  ```
96
96
 
97
+ **指定语言输出:**
98
+ ```bash
99
+ jav --lang zh SSIS-001 # 中文(默认)
100
+ jav --lang en SSIS-001 # English
101
+ jav --lang jp SSIS-001 # 日本語
102
+ jav --lang kr SSIS-001 # 한국어
103
+ jav --lang de SSIS-001 # Deutsch
104
+ jav -l en SSIS-001 # 缩写
105
+ ```
106
+
97
107
  **输出原始 JSON 数据:**
98
108
 
99
109
  ```bash
@@ -130,6 +140,7 @@ Arguments:
130
140
 
131
141
  Options:
132
142
  -v, --version 显示版本号
143
+ -l, --lang <语言> 输出语言:zh/en/jp/kr/de(默认:zh)
133
144
  -r, --raw 以原始 JSON 格式输出结果
134
145
  --setup 配置 JAVDB Cookie(可选,提高覆盖率)
135
146
  --clear-cache 清空本地缓存
package/index.js CHANGED
@@ -8,6 +8,7 @@ import { display } from './lib/display.js';
8
8
  import { clearCache, setConfig } from './lib/cache.js';
9
9
  import ora from 'ora';
10
10
  import chalk from 'chalk';
11
+ import { getLang } from './lib/i18n.js';
11
12
 
12
13
  const require = createRequire(import.meta.url);
13
14
  const pkg = require('./package.json');
@@ -20,31 +21,35 @@ program
20
21
  .option('-r, --raw', '显示原始详细数据')
21
22
  .option('--clear-cache', '清空本地缓存')
22
23
  .option('--setup', '配置JAVDB Cookie(可选,提高查询覆盖率)')
24
+ .option('-l, --lang <lang>', '显示语言 zh/en/jp/kr/de', 'zh')
23
25
  .action(async (id, options) => {
24
26
 
27
+ const lang = options.lang || 'zh';
28
+ const t = getLang(lang); // 统一获取语言包
29
+
25
30
  if (options.setup) {
26
31
  console.log('');
27
- console.log(chalk.yellow('=== 配置 JAVDB Cookie(可选)==='));
32
+ console.log(chalk.yellow('=== ' + (t.setupTitle || '配置 JAVDB Cookie(可选)') + ' ==='));
28
33
  console.log('');
29
- console.log('不配置也可以正常使用,配置后覆盖率更高。');
34
+ console.log(t.setupDesc || '不配置也可以正常使用,配置后覆盖率更高。');
30
35
  console.log('');
31
- console.log('获取步骤:');
32
- console.log(' 1. Chrome 打开 https://javdb.com 并登录账号');
33
- console.log(' 2. 安装插件 "Get cookies.txt LOCALLY"');
34
- console.log(' 3. 导出 Cookie 文件,找到 _jdb_session 那行');
35
- console.log(' 4. 复制最后一列的值粘贴到下面');
36
+ console.log(t.setupSteps || '获取步骤:');
37
+ console.log(' 1. ' + (t.setupStep1 || 'Chrome 打开 https://javdb.com 并登录账号'));
38
+ console.log(' 2. ' + (t.setupStep2 || '安装插件 "Get cookies.txt LOCALLY"'));
39
+ console.log(' 3. ' + (t.setupStep3 || '导出 Cookie 文件,找到 _jdb_session 那行'));
40
+ console.log(' 4. ' + (t.setupStep4 || '复制最后一列的值粘贴到下面'));
36
41
  console.log('');
37
42
 
38
43
  const rl = createInterface({ input: process.stdin, output: process.stdout });
39
44
  await new Promise((resolve) => {
40
- rl.question(chalk.cyan('请粘贴 _jdb_session 的值(直接回车跳过): '), (session) => {
45
+ rl.question(chalk.cyan((t.setupPrompt || '请粘贴 _jdb_session 的值(直接回车跳过): ')), (session) => {
41
46
  rl.close();
42
47
  if (!session.trim()) {
43
- console.log(chalk.gray('\n已跳过,使用 JAVBUS + JavLibrary 作为数据源。'));
48
+ console.log(chalk.gray('\n' + (t.setupSkipped || '已跳过,使用 JAVBUS + JavLibrary 作为数据源。')));
44
49
  } else {
45
50
  setConfig({ session: session.trim() });
46
- console.log(chalk.green('\n✅ 配置保存成功!'));
47
- console.log(chalk.gray('保存位置: ~/.config/javinfo/config.json'));
51
+ console.log(chalk.green('\n✅ ' + (t.setupSuccess || '配置保存成功!')));
52
+ console.log(chalk.gray((t.setupSavePath || '保存位置: ~/.config/javinfo/config.json')));
48
53
  }
49
54
  console.log('');
50
55
  resolve();
@@ -54,7 +59,7 @@ program
54
59
  }
55
60
 
56
61
  if (options.clearCache) {
57
- clearCache();
62
+ clearCache(lang);
58
63
  process.exit(0);
59
64
  }
60
65
 
@@ -63,21 +68,25 @@ program
63
68
  process.exit(0);
64
69
  }
65
70
 
66
- const spinner = ora(`正在查询 ${id.toUpperCase()} ...`).start();
71
+ const spinner = ora(`${t.searching} ${id.toUpperCase()} ...`).start();
67
72
 
68
73
  try {
69
- const result = await search(id.toUpperCase());
74
+ const result = await search(id.toUpperCase(), lang);
70
75
  spinner.stop();
71
76
 
72
77
  if (!result) {
73
- console.log(chalk.red(`\n未找到番号: ${id.toUpperCase()}`));
78
+ console.log(chalk.red(`\n${t.notFound}: ${id.toUpperCase()}`));
79
+ // Windows 用户提示
80
+ if (process.platform === 'win32') {
81
+ process.stderr.write(chalk.gray(` ${t.windowsHint}\n`));
82
+ }
74
83
  process.exit(1);
75
84
  }
76
85
 
77
- display(result, options.raw);
86
+ display(result, options.raw, lang);
78
87
  } catch (err) {
79
88
  spinner.stop();
80
- console.error('\n查询失败:', err.message);
89
+ console.error(`\n${t.queryFailed}:`, err.message);
81
90
  process.exit(1);
82
91
  }
83
92
  });
package/lib/cache.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';
2
2
  import { homedir } from 'os';
3
3
  import { join } from 'path';
4
+ import { getLang } from './i18n.js';
4
5
 
5
6
  // 缓存文件存放在用户主目录下,和 yddict 的做法一致
6
7
  const CACHE_DIR = join(homedir(), '.config', 'javinfo');
@@ -14,7 +15,6 @@ function loadCache() {
14
15
  try {
15
16
  return JSON.parse(readFileSync(CACHE_FILE, 'utf-8'));
16
17
  } catch {
17
- // 文件损坏就当缓存不存在
18
18
  return {};
19
19
  }
20
20
  }
@@ -31,7 +31,6 @@ export function getCache(id) {
31
31
  const entry = cache[id];
32
32
  if (!entry) return null;
33
33
 
34
- // 检查是否过期
35
34
  const isExpired = Date.now() - entry.cachedAt > TTL;
36
35
  if (isExpired) return null;
37
36
 
@@ -47,10 +46,20 @@ export function setCache(id, data) {
47
46
  saveCache(cache);
48
47
  }
49
48
 
50
- export function clearCache() {
51
- if (existsSync(CACHE_FILE)) {
52
- writeFileSync(CACHE_FILE, '{}', 'utf-8');
53
- console.log('缓存已清空');
49
+ // 清空缓存(已支持多语言)
50
+ export function clearCache(lang = 'zh') {
51
+ const t = getLang(lang);
52
+
53
+ try {
54
+ if (existsSync(CACHE_FILE)) {
55
+ writeFileSync(CACHE_FILE, '{}', 'utf-8');
56
+ console.log(t.cacheCleared);
57
+ } else {
58
+ console.log(t.cacheCleared);
59
+ }
60
+ } catch (err) {
61
+ console.error(`${t.cacheClearFailed}: ${err.message}`);
62
+ console.error(`${t.cachePath}: ${CACHE_FILE}`);
54
63
  }
55
64
  }
56
65
 
package/lib/display.js CHANGED
@@ -1,19 +1,22 @@
1
1
  import chalk from 'chalk';
2
+ import { getLang } from './i18n.js';
2
3
 
3
4
  const DIVIDER = chalk.gray('─'.repeat(60));
4
5
 
5
6
  function row(label, value, color = chalk.white) {
6
7
  if (!value || (Array.isArray(value) && value.length === 0)) return;
7
- const paddedLabel = chalk.cyan(label.padEnd(8, ' ')); // 用全角空格对齐中文
8
+ const paddedLabel = chalk.cyan(label.padEnd(8, ' '));
8
9
  console.log(` ${paddedLabel} ${color(value)}`);
9
10
  }
10
11
 
11
- export function display(info, raw = false) {
12
+ export function display(info, raw = false, lang = 'zh') {
12
13
  if (raw) {
13
14
  console.log(JSON.stringify(info, null, 2));
14
15
  return;
15
16
  }
16
17
 
18
+ const t = getLang(lang);
19
+
17
20
  console.log('');
18
21
  console.log(DIVIDER);
19
22
  console.log(
@@ -29,29 +32,29 @@ export function display(info, raw = false) {
29
32
 
30
33
  console.log(DIVIDER);
31
34
 
32
- row('女优', info.actresses.join(' / '), chalk.magenta);
33
- row('男优', info.actors.join(' / '), chalk.blue);
34
- row('发售日期', info.releaseDate, chalk.green);
35
- row('时长', info.duration);
36
- row('制作商', info.studio, chalk.yellow);
37
- row('发行商', info.label);
38
- row('导演', info.director);
39
- row('系列', info.series);
40
- row('评分', info.score ? `${info.score}${info.scoreCount ? `(${info.scoreCount}人评价)` : ''}` : '', chalk.yellow);
41
- row('想看', info.wantCount ? `${info.wantCount} 人想看` : '', chalk.cyan);
35
+ row(t.actress, info.actresses.join(' / '), chalk.magenta);
36
+ row(t.actor, info.actors.join(' / '), chalk.blue);
37
+ row(t.releaseDate, info.releaseDate, chalk.green);
38
+ row(t.duration, info.duration);
39
+ row(t.studio, info.studio, chalk.yellow);
40
+ row(t.label, info.label);
41
+ row(t.director, info.director);
42
+ row(t.series, info.series);
43
+ row(t.rating, info.score ? `${info.score}${info.scoreCount ? `(${info.scoreCount})` : ''}` : '', chalk.yellow);
44
+ row(t.wishlist, info.wantCount ? `${info.wantCount}` : '', chalk.cyan);
42
45
 
43
46
  if (info.tags.length > 0) {
44
- const tagStr = info.tags.map(t => chalk.bgGray(` ${t} `)).join(' ');
45
- console.log(' ' + chalk.cyan('类别  ') + ' ' + tagStr);
47
+ const tagStr = info.tags.map(tag => chalk.bgGray(` ${tag} `)).join(' ');
48
+ console.log(' ' + chalk.cyan(t.tags.padEnd(8, ' ')) + ' ' + tagStr);
46
49
  }
47
50
 
48
51
  if (info.coverUrl) {
49
52
  console.log('');
50
- console.log(' ' + chalk.cyan('封面  ') + ' ' + chalk.underline.gray(info.coverUrl));
53
+ console.log(' ' + chalk.cyan(t.cover.padEnd(8, ' ')) + ' ' + chalk.underline.gray(info.coverUrl));
51
54
  }
52
55
 
53
56
  if (info.source) {
54
- console.log(' ' + chalk.gray(`数据来源: ${info.source}`));
57
+ console.log(' ' + chalk.gray(`${t.source}: ${info.source}`));
55
58
  }
56
59
 
57
60
  console.log(DIVIDER);
package/lib/fetcher.js CHANGED
@@ -2,6 +2,7 @@ import { execSync } from 'child_process';
2
2
  import * as cheerio from 'cheerio';
3
3
  import { getCache, setCache, getConfig } from './cache.js';
4
4
  import chalk from 'chalk';
5
+ import {getLang} from "./i18n.js";
5
6
 
6
7
  // ─── 通用请求函数(JAVBUS / JavLibrary 使用)────────────
7
8
  function fetchHtml(url, cookie = '') {
@@ -322,13 +323,15 @@ function parseJavdb(html, queryId) {
322
323
  return result.title ? result : null;
323
324
  }
324
325
 
325
- // ─── 主入口:依次尝试三个数据源 ─────────────────────────
326
- export async function search(id) {
327
- // FC2 格式识别:031926-100 → 031926_100(JAVDB 存储格式)
326
+ // ─── 主入口:依次尝试数据源 ─────────────────────────
327
+ export async function search(id, lang = 'zh') {
328
+ const t = getLang(lang);
329
+
330
+ // FC2 格式识别:031926-100 → 031926_100
328
331
  let searchId = id;
329
332
  if (/^\d{5,6}-\d+$/.test(id)) {
330
- searchId = id.replace(/-/g, '_'); // 全局替换,更安全
331
- console.log(chalk.gray(` 识别为FC2格式的车牌号: ${id}`));
333
+ searchId = id.replace(/-/g, '_');
334
+ console.log(chalk.gray(` ${t.fc2Detected}: ${id} → ${searchId}`));
332
335
  }
333
336
 
334
337
  const cached = getCache(id);
@@ -360,10 +363,5 @@ export async function search(id) {
360
363
  }
361
364
  }
362
365
 
363
- // Windows 用户提示
364
- if (process.platform === 'win32') {
365
- process.stderr.write(chalk.gray(' 温馨提示: 此车牌号需要JAVDB数据源,Windows暂不支持~\n'));
366
- }
367
-
368
366
  return null;
369
367
  }
package/lib/i18n.js ADDED
@@ -0,0 +1,176 @@
1
+ export const messages = {
2
+ zh: {
3
+ actress: '女优',
4
+ actor: '男优',
5
+ releaseDate: '发售日期',
6
+ duration: '时长',
7
+ studio: '制作商',
8
+ label: '发行商',
9
+ director: '导演',
10
+ series: '系列',
11
+ rating: '评分',
12
+ wishlist: '想看',
13
+ tags: '类别',
14
+ cover: '封面',
15
+ source: '数据来源',
16
+ searching: '正在查询',
17
+ notFound: '未找到番号',
18
+ queryFailed: '查询失败',
19
+ cacheCleared: '缓存已清空',
20
+ cacheClearFailed: '清空缓存失败',
21
+ cachePath: '缓存路径',
22
+ fc2Detected: '识别为FC2格式的车牌号',
23
+ windowsHint: '温馨提示: 此番号需要JAVDB数据源,Windows暂不支持~',
24
+ setupTitle: '配置 JAVDB Cookie(可选)',
25
+ setupDesc: '不配置也可以正常使用,配置后覆盖率更高。',
26
+ setupSteps: '获取步骤:',
27
+ setupStep1: 'Chrome 打开 https://javdb.com 并登录账号',
28
+ setupStep2: '安装插件 "Get cookies.txt LOCALLY"',
29
+ setupStep3: '导出 Cookie 文件,找到 _jdb_session 那行',
30
+ setupStep4: '复制最后一列的值粘贴到下面',
31
+ setupPrompt: '请粘贴 _jdb_session 的值(直接回车跳过): ',
32
+ setupSkipped: '已跳过,使用 JAVBUS + JavLibrary 作为数据源。',
33
+ setupSuccess: '配置保存成功!',
34
+ setupSavePath: '保存位置: ~/.config/javinfo/config.json',
35
+ },
36
+ en: {
37
+ actress: 'Actress',
38
+ actor: 'Actor',
39
+ releaseDate: 'Released',
40
+ duration: 'Duration',
41
+ studio: 'Studio',
42
+ label: 'Label',
43
+ director: 'Director',
44
+ series: 'Series',
45
+ rating: 'Rating',
46
+ wishlist: 'Wishlist',
47
+ tags: 'Tags',
48
+ cover: 'Cover',
49
+ source: 'Source',
50
+ searching: 'Searching',
51
+ notFound: 'Title not found',
52
+ queryFailed: 'Query failed',
53
+ cacheCleared: 'Cache cleared',
54
+ cacheClearFailed: 'Failed to clear cache',
55
+ cachePath: 'Cache path',
56
+ fc2Detected: 'FC2 format detected',
57
+ windowsHint: 'Note: This title requires JAVDB, which is unavailable on Windows.',
58
+ setupTitle: 'Setup JAVDB Cookie (Optional)',
59
+ setupDesc: 'You can use without configuration, but adding it improves coverage.',
60
+ setupSteps: 'Steps to get cookie:',
61
+ setupStep1: 'Open https://javdb.com in Chrome and log in',
62
+ setupStep2: 'Install extension "Get cookies.txt LOCALLY"',
63
+ setupStep3: 'Export cookies and find the _jdb_session line',
64
+ setupStep4: 'Copy the last column value and paste below',
65
+ setupPrompt: 'Paste the value of _jdb_session (press Enter to skip): ',
66
+ setupSkipped: 'Skipped. Using JAVBUS + JavLibrary as data sources.',
67
+ setupSuccess: 'Configuration saved successfully!',
68
+ setupSavePath: 'Saved to: ~/.config/javinfo/config.json',
69
+ },
70
+ jp: {
71
+ actress: '女優',
72
+ actor: '男優',
73
+ releaseDate: '発売日',
74
+ duration: '時間',
75
+ studio: 'メーカー',
76
+ label: 'レーベル',
77
+ director: '監督',
78
+ series: 'シリーズ',
79
+ rating: '評価',
80
+ wishlist: '観たい',
81
+ tags: 'カテゴリ',
82
+ cover: 'カバー',
83
+ source: 'データソース',
84
+ searching: '検索中',
85
+ notFound: '番号が見つかりません',
86
+ queryFailed: '検索失敗',
87
+ cacheCleared: 'キャッシュを削除しました',
88
+ cacheClearFailed: 'キャッシュの削除に失敗しました',
89
+ cachePath: 'キャッシュパス',
90
+ fc2Detected: 'FC2番号を検出しました',
91
+ windowsHint: '注意: この番号はJAVDBが必要ですが、WindowsではJAVDBが利用できません。',
92
+ setupTitle: 'JAVDB Cookieの設定(オプション)',
93
+ setupDesc: '設定しなくても使用できますが、設定すると検索範囲が広がります。',
94
+ setupSteps: '取得手順:',
95
+ setupStep1: 'Chromeで https://javdb.com を開いてログイン',
96
+ setupStep2: '拡張機能 "Get cookies.txt LOCALLY" をインストール',
97
+ setupStep3: 'Cookieをエクスポートし、_jdb_session の行を探す',
98
+ setupStep4: '最後の列の値をコピーして以下に貼り付け',
99
+ setupPrompt: '_jdb_session の値を貼り付けてください(Enterでスキップ): ',
100
+ setupSkipped: 'スキップしました。JAVBUS + JavLibrary をデータソースとして使用します。',
101
+ setupSuccess: '設定を保存しました!',
102
+ setupSavePath: '保存場所: ~/.config/javinfo/config.json',
103
+ },
104
+ kr: {
105
+ actress: '여배우',
106
+ actor: '남배우',
107
+ releaseDate: '발매일',
108
+ duration: '시간',
109
+ studio: '제작사',
110
+ label: '레이블',
111
+ director: '감독',
112
+ series: '시리즈',
113
+ rating: '평점',
114
+ wishlist: '보고싶어요',
115
+ tags: '카테고리',
116
+ cover: '커버',
117
+ source: '데이터 출처',
118
+ searching: '검색 중',
119
+ notFound: '번호를 찾을 수 없습니다',
120
+ queryFailed: '검색 실패',
121
+ cacheCleared: '캐시가 삭제되었습니다',
122
+ cacheClearFailed: '캐시 삭제 실패',
123
+ cachePath: '캐시 경로',
124
+ fc2Detected: 'FC2 형식 감지됨',
125
+ windowsHint: '알림: 이 번호는 JAVDB가 필요하지만 Windows에서는 사용할 수 없습니다.',
126
+ setupTitle: 'JAVDB Cookie 설정 (선택사항)',
127
+ setupDesc: '설정하지 않아도 사용할 수 있지만, 설정하면 검색 범위가 넓어집니다.',
128
+ setupSteps: '획득 단계:',
129
+ setupStep1: 'Chrome에서 https://javdb.com 을 열고 로그인',
130
+ setupStep2: '확장 프로그램 "Get cookies.txt LOCALLY" 설치',
131
+ setupStep3: '쿠키를 내보내고 _jdb_session 줄을 찾기',
132
+ setupStep4: '마지막 열의 값을 복사하여 아래에 붙여넣기',
133
+ setupPrompt: '_jdb_session 값을 붙여넣어주세요 (Enter로 건너뛰기): ',
134
+ setupSkipped: '건너뛰었습니다. JAVBUS + JavLibrary를 데이터 소스로 사용합니다.',
135
+ setupSuccess: '설정이 성공적으로 저장되었습니다!',
136
+ setupSavePath: '저장 위치: ~/.config/javinfo/config.json',
137
+ },
138
+ de: {
139
+ actress: 'Darstellerin',
140
+ actor: 'Darsteller',
141
+ releaseDate: 'Erscheinungsdatum',
142
+ duration: 'Laufzeit',
143
+ studio: 'Studio',
144
+ label: 'Label',
145
+ director: 'Regisseur',
146
+ series: 'Serie',
147
+ rating: 'Bewertung',
148
+ wishlist: 'Merkliste',
149
+ tags: 'Kategorien',
150
+ cover: 'Cover',
151
+ source: 'Datenquelle',
152
+ searching: 'Suche läuft',
153
+ notFound: 'Titel nicht gefunden',
154
+ queryFailed: 'Suche fehlgeschlagen',
155
+ cacheCleared: 'Cache geleert',
156
+ cacheClearFailed: 'Cache konnte nicht geleert werden',
157
+ cachePath: 'Cache-Pfad',
158
+ fc2Detected: 'FC2-Format erkannt',
159
+ windowsHint: 'Hinweis: Dieser Titel benötigt JAVDB, das unter Windows nicht verfügbar ist.',
160
+ setupTitle: 'JAVDB Cookie einrichten (optional)',
161
+ setupDesc: 'Ohne Konfiguration funktioniert es auch, aber mit Cookie ist die Abdeckung besser.',
162
+ setupSteps: 'Schritte zum Abrufen:',
163
+ setupStep1: 'Chrome öffnen, https://javdb.com aufrufen und anmelden',
164
+ setupStep2: 'Erweiterung "Get cookies.txt LOCALLY" installieren',
165
+ setupStep3: 'Cookies exportieren und die _jdb_session Zeile finden',
166
+ setupStep4: 'Den Wert der letzten Spalte kopieren und unten einfügen',
167
+ setupPrompt: 'Wert von _jdb_session einfügen (Enter zum Überspringen): ',
168
+ setupSkipped: 'Übersprungen. JAVBUS + JavLibrary werden als Datenquellen verwendet.',
169
+ setupSuccess: 'Konfiguration erfolgreich gespeichert!',
170
+ setupSavePath: 'Gespeichert unter: ~/.config/javinfo/config.json',
171
+ },
172
+ };
173
+
174
+ export function getLang(lang) {
175
+ return messages[lang] || messages.zh; // 默认中文
176
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javdict",
3
- "version": "1.2.12",
3
+ "version": "1.3.1",
4
4
  "description": "AV番号命令行查询工具",
5
5
  "main": "./index.js",
6
6
  "type": "module",