Skip to content

Commit 39a06f2

Browse files
committed
Unwanted commands removed. Tooltips altered to HackerNews.
1 parent 61704d3 commit 39a06f2

File tree

8 files changed

+12
-19
lines changed

8 files changed

+12
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This Plugin adds a Dictionary to the [Obsidian](https://obsidian.md) Note-Taking
66

77
## Usage
88

9-
Open the *Command Palette* (default: `ctrl` + `p`), search for *Open Dictionary View* and run the command. You will see that a new View appears in the right Sidebar of Obsidian. You can set your default Language in Obsidian's Settings under *Plugin Options* > *Obsidian Dictionary* > *Default Language*.
9+
Open the *Command Palette* (default: `ctrl` + `p`), search for *Open HackerNews* and run the command. You will see that a new View appears in the right Sidebar of Obsidian. You can set your default Language in Obsidian's Settings under *Plugin Options* > *Obsidian Dictionary* > *Default Language*.
1010

1111
## Supported Languages
1212

cache.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

src/_constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { DictionaryCache, DictionarySettings } from "src/types";
22
import t from 'src/l10n/helpers';
33

44
export const VIEW_TYPE = 'dictionary-view';
5-
export const VIEW_DISPLAY_TEXT = t('Dictionary');
5+
export const VIEW_DISPLAY_TEXT = t('HackerNews');
66
export const VIEW_ICON = 'quote-glyph';
77

88
export const LANGUAGES = {

src/l10n/locale/de.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
export default {
44
//main.ts
5-
'Open Dictionary View': 'Öffne Wörterbuch',
5+
'Open HackerNews': 'Öffne Wörterbuch',
66
'Open Language Switcher': 'Sprache wechseln',
77

88
//_constants.ts
9-
'Dictionary': 'Wörterbuch',
9+
'HackerNews': 'Wörterbuch',
1010

1111
//customContextMenu.ts
1212
'Cut': 'Ausschneiden',

src/l10n/locale/en.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
export default {
44
//main.ts
5-
'Open Dictionary View': 'Open Dictionary View',
5+
'Open HackerNews': 'Open HackerNews',
66
'Open Language Switcher': 'Open Language Switcher',
77

88
//_constants.ts
9-
'Dictionary': 'Dictionary',
9+
'HackerNews': 'HackerNews',
1010

1111
//customContextMenu.ts
1212
'Cut': 'Cut',

src/l10n/locale/zh-cn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
export default {
44
//main.ts
5-
'Open Dictionary View': '打开查词面板',
5+
'Open HackerNews': '打开查词面板',
66

77
//_constants.ts
8-
'Dictionary': '词典',
8+
'HackerNews': '词典',
99

1010
//customContextMenu.ts
1111
'Cut': '剪切',

src/main.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export default class DictionaryPlugin extends Plugin {
4747
this.app.workspace.revealLeaf(this.app.workspace.getLeavesOfType(VIEW_TYPE).first());
4848

4949
this.addCommand({
50-
id: 'dictionary-open-view',
51-
name: t('Open Dictionary View'),
50+
id: 'hackernews-open-view',
51+
name: t('Open HackerNews'),
5252
callback: async () => {
5353
if (this.app.workspace.getLeavesOfType(VIEW_TYPE).length == 0) {
5454
await this.app.workspace.getRightLeaf(false).setViewState({
@@ -59,14 +59,6 @@ export default class DictionaryPlugin extends Plugin {
5959
},
6060
});
6161

62-
this.addCommand({
63-
id: 'dictionary-open-language-switcher',
64-
name: t('Open Language Switcher'),
65-
callback: () => {
66-
new LanguageChooser(this.app, this).open();
67-
},
68-
});
69-
7062
this.registerDomEvent(document.body, "pointerup", () => {
7163
if (!this.settings.shouldShowSynonymPopover) {
7264
return;

src/ui/settings/settingsTab.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class SettingsTab extends PluginSettingTab {
122122
.setName(t('Local Dictionary Folder'))
123123
.setDesc(t('Specify a Folder, where all new Notes created by the Dictionary are placed. Please note that this Folder needs to already exist.'))
124124
.addText(text => text
125-
.setPlaceholder(t('Dictionary'))
125+
.setPlaceholder(t('HackerNews'))
126126
.setValue(plugin.settings.folder)
127127
.onChange(async (value) => {
128128
plugin.settings.folder = value;

0 commit comments

Comments
 (0)