dsh-plugin-look-up 0.1.0 → 0.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.
Files changed (3) hide show
  1. package/client.js +3 -3
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/client.js CHANGED
@@ -30,7 +30,7 @@ window.__ModuleLoader__.load({
30
30
  helperMissing: 'The dictionary helper is missing. Reinstall the plugin.',
31
31
  timeout: 'The dictionary took too long. Try again.',
32
32
  failed: 'Lookup failed. Try again.',
33
- copy: 'Copy',
33
+ copyWord: 'Copy word',
34
34
  copied: 'Copied',
35
35
  openInDictionary: 'Open in Dictionary',
36
36
  source: 'macOS system dictionaries · offline',
@@ -45,7 +45,7 @@ window.__ModuleLoader__.load({
45
45
  helperMissing: '词典组件缺失,请重新安装插件。',
46
46
  timeout: '查询超时,请重试。',
47
47
  failed: '查询失败,请重试。',
48
- copy: '复制',
48
+ copyWord: '复制单词',
49
49
  copied: '已复制',
50
50
  openInDictionary: '在词典中打开',
51
51
  source: 'macOS 系统词典 · 本地查询',
@@ -626,7 +626,7 @@ window.__ModuleLoader__.load({
626
626
  'data-copied': copied ? 'true' : undefined,
627
627
  onMouseDown: (event) => event.stopPropagation(),
628
628
  onClick: () => copyWord(result.word ?? card.word)
629
- }, copied ? t('copied') : t('copy'))
629
+ }, copied ? t('copied') : t('copyWord'))
630
630
  : null,
631
631
  card.status === 'ready' && navigator.platform !== undefined && /Mac/u.test(navigator.platform)
632
632
  ? h('button', {
package/index.js CHANGED
@@ -171,7 +171,7 @@ async function lookupWord(word) {
171
171
  async function openInDictionary(word) {
172
172
  if (process.platform !== 'darwin') return { ok: false, code: 'unsupported' }
173
173
  try {
174
- await execFileAsync('/usr/bin/open', ['-g', `dict://${encodeURIComponent(word)}`], {
174
+ await execFileAsync('/usr/bin/open', [`dict://${encodeURIComponent(word)}`], {
175
175
  timeout: HELPER_TIMEOUT_MS,
176
176
  encoding: 'utf8'
177
177
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-look-up",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "macOS Look Up inside DSH chat: select a word and read system-dictionary definitions in place, offline.",
5
5
  "type": "module",
6
6
  "license": "MIT",