GithubHelp home page GithubHelp logo

phibr0 / obsidian-dictionary Goto Github PK

View Code? Open in Web Editor NEW
344.0 344.0 42.0 11.32 MB

Dictionary - Obsidian Plugin | This plugin adds a multilingual dictionary to the Obsidian note taking tool.

License: GNU Affero General Public License v3.0

TypeScript 89.24% JavaScript 0.71% Svelte 9.75% CSS 0.30%
dictionary obsidian-md obsidian-plugin

obsidian-dictionary's Introduction

obsidian-dictionary's People

Contributors

chgv99 avatar comnori avatar daniil-shevtsov avatar dlccyes avatar estevaofuzaro98 avatar federicodep avatar heliostatic avatar mgmeyers avatar mthlily avatar ouatis avatar oxdc avatar phibr0 avatar quorafind avatar silentdot avatar yo-goto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

obsidian-dictionary's Issues

Don’t the dictionary APIs support plural forms?

I just ran across a valid, but odd lookup: plural of "second" → "seconds" brought up odd-looking (at first glance) suggestions, and the lookup didn’t recognise the plural form:

Knowledgebase - Obsidian v0 12 12_001

I’m sure the suggestion is valid (like in "I second that motion"), but it looks odd at the first glance.

Don’t the dictionary APIs support plural forms?

In _constants.ts, LANGUAGE codes shouldn’t be mixed

In _constants.ts, there is a mixture of codes for language, like

    "en_US": "English (US)",
    "en_GB": "English (UK)",
    "pt-BR": "Brazilian Portuguese",

Some are using an underscore _ as separator between language and country, some use a hyphen -. Although some OSes use the underscore, I’d suggest using RFC 5646 codes instead (those with a hyphen).

For non-English speakers it might also be nice to use localized language names, like the Obsidian language selector does. Example:

export const LANGUAGES = {
    "en_US": "English (US)",
    "hi": "हिन्दी",
    "es": "Español",
    "fr": "Français",
    "ja": "日本語",
    "ru": "Русский",
    "en_GB": "English (UK)",
    "de": "Deutsch",
    "it": "Italiano",
    "ko": "한국어 (韓國語), 조선말 (朝鮮語)",
    "pt-BR": "Português do Brasil",
    "ar": "اَلْعَرَبِيَّةُ‎",
    "tr": "Türkçe"
}

2.14.5: {{lang}} as RFC1766 value ("ru", "en-GB", "en-US")?

{{lang}} in the filename prefix/suffix currently returns only the "…as spoken in" part of a RFC1766 language identifier, like US.

Could we please have return {{lang}} a complete RFC1766 language code, like en-US, ru, pt-BR?

This is the way the HTML lang attribute works, and so {{lang}} could directly be used with that (in the template, for instance).

Use it on the iPod Touch

I have some troubleshooting on how to use it on my iPod Touch, not on desktop. Could you show me how to use it on my mobile

Clearer Icons

Hello! Firstly, WOW! I just want to thank you and @mgmeyers for this fantastic plugin. I work on writing assignments in Obsidian almost every day and this has been a lifesaver for me. I just wanted to highlight a small detail change, nothing crazy. The icons look a bit muddied while using certain themes. They're a bit hard to see, especially in a darker theme. So I think the icons would look better with a fill opacity of 0.0. I added a few screenshots to show this better. Thanks so much! :)

Screen Shot 2021-05-28 at 4 30 24 PM

Screen Shot 2021-05-28 at 4 30 58 PM

Screen Shot 2021-05-28 at 4 36 49 PM

2.14.5: Make subfolders work with {{lang}} prefix

It would be nice to be able to use subfolders of the dictionary folder for different languages:

  • Local Dictionary Folder: Dictionary
  • Filename prefix: {{lang}}/
  • Filename suffix: (empty)

Thus, we’d get something like

  • Dictionary/de
  • Dictionary/en-US
  • Dictionary/en-GB

Currently, if trying this on "New Note", it shows a modal saying file exists (it did, in Dictionary). When I select "Yes, overwrite", instead of creating a new subfolder en-US, it stays in the modal but seems to affect the synonym list beneath it (seems like clicking "through" the modal).

I’d have expected it

  • to check for an existing entry in the (then non-existent) Dictionary/en-US folder,
    • probably show an error stating it doesn’t exist and ask for creation
  • then simply create the subfolder Dictionary/en-US and put the new note there.

For people wishing for their Dictionaries named Dictionary en-US etc., it’d also be helpful to use {{lang}} in the Dictionary folder name.

Related: #37, #38

[Bug]: Latest release tagged incorrectly

Describe the bug

The latest release should have been tagged 2.17.5, but it was tagged 1.17.5. This has broken the plugin's automatic updates in Obsidian. It must be manually updated.

Relevant errors (if available)

https://github.com/phibr0/obsidian-dictionary/releases/download/2.17.5/manifest.json
Failed to load resource: the server responded with a status of 404 ()

Steps to reproduce

Click the plugin's update button in Obsidian's list of community plugins.

Expected Behavior

The update will install correctly.

Addition context

No response

Language

No response

API Name

No response

Operating system

Windows

Add origin of word to note

Describe the feature

The sidebar shows info for the origin of the word. Is it possible to include this in the note generated for that word?

Does this fix a problem? If so, specify.

n/a

Did you consider other alternatives?

copy it over manually

Screenshots and recordings

No response

2.15.0: Upon overwriting a note, a "No file open" pane is left

I presume that on overwrite you delete the old file first, then create a new one and open it in a new pane.

Unfortunately, if one happens to be in the "old" note, this results in a "No file is open" pane being left on screen (where the old file was open), and a new pane being created.

Can this easily be solved?

Second - Knowledgebase - Obsidian 0 12 12_136

Note for the docs: This allows using Templater code within your template (if Templater is set to activate on new file creation), like for creating a current date stamp in the YAML! Might be beneficial to mention that in the docs.

Here is an example template:

---
# {{notice}}
date: <% tp.date.now() %>
dictionary: {{lang}}
word: "{{word}}"
---

# {{word}}

## {{pronunciationHeader}}

{{phoneticList}}

## {{meaningHeader}}

{{meanings}}

[Bug]: The plugin is causing obsidian to show a black screen on launching

Describe the bug

The recent update to the plugin might have caused some issue with the workspace file or the workspaces json file in the .obsidian folder since after installing the update 2.16.5 obsidian just shows a black screen after launching.

Relevant errors (if available)

No response

Steps to reproduce

  1. Install update 2.16.5
  2. Relaunch obsidian
  3. Loading is complete but nothing shows up on the screen

Expected Behavior

No response

Addition context

No response

Language

No response

API Name

No response

Operating system

Windows

[Bug]: Dictionary view not loading definition

Describe the bug

When I look up certain words in the dictionary sidebar, it does not produce a definition. Just the loading wheel turning endlessly without resolve.

Words that are found produce a definition but loading wheel continues to spin after the result is displayed

The synonyms dropdown works when I highlight the word.

Relevant errors (if available)

Uncaught (in promise) TypeError: Cannot read property 'text' of undefined
    at Rr (eval at <anonymous> (app.js:1), <anonymous>:23:33878)
    at n (eval at <anonymous> (app.js:1), <anonymous>:23:3244)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:23:3513)

Steps to reproduce

  1. Downloaded plugin, updated to 2.18.1

  2. Opened dictionary view

  3. Entered word 'underlined' (without quotes)

  4. Loading wheel spins

  5. Look up 'happy' in dictionary view

  6. Definition of 'happy' comes up

  7. Loading wheel continues to spin

Expected Behavior

  1. The dictionary result
  2. Loading wheel goes away

Addition context

No response

Language

English

API Name

Free-Dictionary-API

Operating system

macOS

Systran API is now defunct

So it turns out the Systran api used to detect parts-of-speech is no longer available on rapid api.

I'm putting this here as an FYI, as I think everything still works fine. I'm happy to make a PR to remove it at some point, unless you happen to get around to it first.

2.10.1: Dictionary View doesn’t show

When trying to open the dictionary side pane, I get:

app.js:1 Failed to open view TypeError: _a.getElementById is not a function
    at append_styles (eval at <anonymous> (app.js:1), <anonymous>:529:75)
    at add_css$1 (eval at <anonymous> (app.js:1), <anonymous>:2284:2)
    at init (eval at <anonymous> (app.js:1), <anonymous>:1003:22)
    at new DictionaryView$1 (eval at <anonymous> (app.js:1), <anonymous>:2923:3)
    at DictionaryView.eval (eval at <anonymous> (app.js:1), <anonymous>:3052:26)
    at Generator.next (<anonymous>)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:31:71)
    at new Promise (<anonymous>)
    at __awaiter (eval at <anonymous> (app.js:1), <anonymous>:27:12)
    at DictionaryView.onOpen (eval at <anonymous> (app.js:1), <anonymous>:3051:16)
(anonymous) @ app.js:1

Workspace 1_160

Word issue

As silly as it sounds,

The word "Project" is locking things up on Free API

Absolutely no idea why.

Missing to type http in audio link make it unusable

I couldnt play pronunciations. I thought it is a problem with using proxy but i noticed the link is something like this //ssl.gstatic.com instead of https://ssl which works fine as I tested it. Please fix that misstyping. I can fix it manually in notes but it is not usable in side pane.

Thanks

[FEATURE] Create flashcards directly from meanings

Currently, I tried creating flashcards of the format

Word
#flashcard
Meaning

But the meaning it takes is a long form. With a lot of headers. If possible can we have a way to just create a flashcard with the most suitable meaning.

Error requesting synonyms (french word)

Hello, when I try to looking for synonyms, I have nothing and error in console :

VM228:2514 GET https://api.dictionaryapi.dev/api/v2/entries/fr/aux 404
eval @ VM228:2514
eval @ VM228:31
__awaiter @ VM228:27
requestSynonyms @ VM228:2511
eval @ VM228:2698
eval @ VM228:31
__awaiter @ VM228:27
requestSynonyms @ VM228:2697
eval @ VM228:3080
fulfilled @ VM228:28
Promise.then (async)
step @ VM228:30
eval @ VM228:31
__awaiter @ VM228:27
openSynonymPopover @ VM228:3058
SynonymPopover @ VM228:3050
eval @ VM228:3148
a @ app.js:1
setTimeout (async)
a @ app.js:1
setTimeout (async)
l @ app.js:1
VM228:3083 Error requesting synonyms for word aux TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:2519:52)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)

2.11.0: Still doesn’t show the Dictionary view

title says it, just testing the new release

Knowledgebase - Obsidian v0 12 10_062

Did close the pane and reopened it using cmd palette. Also restarted Obsidian after update.

Are there any changes in data.json? When upgrading from 2.10.0 to 2.11.0, this still contains my old cached definitions, so I assume it is merged somehow or left undisturbed? cache.json was created, though. Think I should uninstall/reinstall?

More options for new note creation

Currently, when hitting new note button. It creates the note and opens it in a new tab. I want to have the option to open it in current tab or not open it at all and just creat the note. Opening a new tab messes with my tabs size configuration for some reason.

Thanks

request: multilingual support

I'd use this plugin super often if it supported either:

  • On-the-fly language switching (command palette/hotkey/UI element)
  • Having multiple dictionaries active at once

Having either of those would make it wonderful!

Make a template for each language

If someone likes to learn more than one languages like me he needs to keep them in separate decks in Anki. So the template for obsidian to Anki plugin needs to be slightly different.

Thanks in advanced

2.14.5: Make {{lang}} available in the template?

Considering #37, it would be nice to be able to use {{lang}} in the template, too, for instance to use the lang attribute, or at least create YAML like this:

---
# {{notice}}
dictionary: {{lang}}
word: "{{word}}"
---

so the dictionary notes could later be evaluated using Dataview, for instance.

request: option to edit the template for new notes

The New Note feature of this plugin works well with a particular use-case of mine, so I appreciate it, but it seems that the template for it can't be edited. I'm hoping that you would allow editing of the template perhaps via the options, like what you see in the Note Refactor plugin.

Similarly, maybe also have the option to change the default file name, like perhaps the user wants to automatically add an emoji or something like that, or the option to have the word's first letter to be capitalized (as it currently is) or not (what I personally prefer).

Hope these are doable and easy to implement, don't want this simple request to cause too much trouble on your part. Thank you so much for what you do!

Suggestion: Use separate file for the cache, reduce size

Just a suggestion: If one uses definition caching, the cache grows rapidly, even after the fix not to double-cache. I don’t think it’s wise to keep all this together with the plugin settings in data.json.

Instead, I propose to use a separate cache.json, which would also make the deleting of the cache much easier.

The data file currently uses a lot of space because it is "pretty" JSON. I don’t think users will ever manually edit it, so I also propose to use something like JSON.stringify() to make it more compact and faster loading.

How do you feel about that?

Error: File already exists when trying to make a new note

This is one to think about: Let’s take the word 'human'. In English, this can be a noun as well as an adjective, in German it’s an adjective.

I’m bilingual and switch between English and German quite a lot, so it sometimes happens a word is in both languages, but I still want to make a note of it. When trying this with 'human', the plugin detects the file Human.md already present in my Dictionary folder and simply gives an error message Error: File already exists.

This poses two problems:

  • What if I wish to overwrite the original with a new version (say, from another synonym provider)?
  • How to distinguish dictionary notes in multiple languages?

I’d propose the following solutions:

  • For existing notes in the dictionary folder, either
    • overwrite the existing file (potentially dangerous if someone manually edited it!), or
    • show a modal asking if it should be overwritten.
  • For multiple language dictionaries:
    • Let the user template the dictionary name. So if she wanted the dictionary split into multiple language Dictionaries, maybe use something like Dictionary ({{language}}) and fill in the currently selected dictionary language upon note creation. This would then use folder names like Dictionary (German) or Dictionary (English (US)), in my example.
      Since the two-letter ISO 639 and RFC 5646 codes are quite popular, these might also be used and generate something like Dictionary (en-US) or Dictionary (de-DE). Maybe even with a second template variable like {{lang}} or something?
      If no template variable was used in the dictionary name, assume a "one-for-all" folder. This would be the case for most users that only use one language.

Case-insensitive lookup?

I know this might not always make sense, but I often run into lookup cases like "Human" which the lookup doesn’t find (although the context menu shows synonyms).

Using the English dictionary, try looking up

  • "Human" → nothing found
  • "human" → found

If case-insensitive lookup was added, it should follow the usual Unicode rules, because we’ve got too many languages where a simple "ASCII" upper-/lowercase will fail. Don’t know how far JS is in that respect.

2.14.4: Type error on lookup

I have

  • Dictionary 2.14.4 (on Obsidian 0.12.12/Linux)
  • Language: English (US)
  • Definition Provider: Free Dictionary API
  • Synonym Provider: Free Dictionary API

Trying to look up "Autogenerated" gives the follwing type error:

Auswahl_131

Console:

app.js:1 Obsidian Developer Console
main.ts:27 loading markdown-table-editor plugin
main.ts:40 Dataview: Version 0.4.x Loaded
main.ts:77 DiceRoller plugin loaded
main.ts:49 loading Find unlinked files and unresolved links plugin
main.ts:40 loading Hotkeys for templates plugin v1.4.2
main.ts:10 Loading Hotkeys++ plugin
main.ts:125 loading plugin
VM122:2 Loading Obsidian Leaflet v3.24.10
main.ts:55 loading plugin
main.ts:17 Sortable: loading plugin...
main.ts:25 Sortable: loaded plugin.
main.ts:17 Loading snippets plugin
main.ts:27 Loading Pandoc plugin
main.ts:31 Loading status bar pomodoro timer
VM147:4649 loading dictionary
VM148:10348 [Longform] Starting Longform 1.0.3…
main.ts:20 loading open-note-to-window-title plugin
index.ts:356 Dataview: Parsed all file prefixes (0.001s)
main.ts:148 Hotkeys for templates -> active plugins: templater-obsidian,core
VM148:10529 [Longform] Loaded and watching projects.
index.ts:409 Dataview: Initialized CSV row cache (loading 5 CSV files).
index.ts:247 Dataview: Task & metadata parsing queued in 0.001s.
app://ssl.gstatic.com/dictionary/static/sounds/20200429/get--_gb_1.mp3:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
app://ssl.gstatic.com/dictionary/static/sounds/20200429/second--_gb_1.mp3:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:2368 TypeError: (intermediate value).first is not a function
    at FreeDictionaryDefinitionProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3627:53)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:2368
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:2368 TypeError: (intermediate value).first is not a function
    at FreeDictionaryDefinitionProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3627:53)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:2368
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
VM147:4430 Error requesting synonyms for word Autogenerated TypeError: (intermediate value).first is not a function
    at FreeDictionarySynonymProvider.eval (eval at <anonymous> (app.js:1), <anonymous>:3679:57)
    at Generator.next (<anonymous>)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:28:58)
eval @ VM147:4430
DevTools failed to load SourceMap: Could not parse content for app://obsidian.md/main.js.map: Unexpected end of JSON input

[Feature Request] Lookup from Context Menu in Preview

The rationale: Many of us use Dataview to show content in lists and tables. These can’t be seen in edit mode, obviously. Would be nice if words could be clicked in preview mode, and a context menu shown with "lookup". Links might present a problem though—didn’t find a way to highlight part of a link (say, a note’s file name).

Make Synonyms in Spanish available

Hello! First of all, excellent plugin, it has helped me a lot in the last week. I would like to have the possibility to use the Spanish synonyms provider. At the moment it is only available for English and French.

Thank you very much.

Support auto look up in sidebar

Currently, one may double-click a word, then its synonym would automatically show up in a list below the selected word. Similarly, is it possible to autofill in the selected word in the sidebar (maybe also automatically expand the dictionary sidebar), to be able to automatically look up the word? This way, one may not need to type the word again in the sidebar.

In case that there are users do not want this auto lookup feature, this can be an option in the configuration pane of the plugin.

When activating the plugin, "DevTools failed to load SourceMap …"

When activating the plugin in a fresh vault, I get in the Dev Console:

VM203:4243 loading dictionary
DevTools failed to load SourceMap: Could not parse content for app://obsidian.md/main.js.map: Unexpected end of JSON input

It seems to work nevertheless, but the warning is somehow disturbing …

Is it possible to make an offline Synonym Suggestion option?

Describe the feature

Being able to use Synonym Suggestion without internet connection.

Does this fix a problem? If so, specify.

Since almost every other writing related plugin is useable when offline. It will be great to have an offline writing workflow which includes a synonym suggestion feature.

Did you consider other alternatives?

No response

Screenshots and recordings

No response

2.15.0: Russian & Portuguese doesn’t seem to work at all

Russian apparently uses the Free Dictionary API but has no synonym provider.

It doesn’t seem to work at all (not even an error message), try words like

Москва
Ру́сский
русский
словарь
язык

Same for Portuguese, word list I tried:

língua
dicionário
brasileiro
brasileira

Can't get any results

First of all. Thanks for this great plugin.

I can't get any results when highlighting a text. I works when I search for the stuff on the right pane. Is there anything else I should enable. The synonym suggestion is enabled so I don't know what else I should change

P.s. it is working inside the created notes for words. It is just not working on the rest of the vault

Change default language based on YAML data

Describe the feature

As I understand, currently this plugin could automatically switch languages based on folders. Nevertheless, I have notes in Italian, English and French placed everywhere in every folder of my vault.

What I would like to have is for the plugin to read the lang: parameter in YAML and consequently set the language for that note.

For example:

lang: it

would set the language of the page in Italian.

Furthermore, it should be possible to set a default language, so that if lang: is not specified, it is the one chosen to be the main one.

Does this fix a problem? If so, specify.

Did you consider other alternatives?

Right now I am using the plugin for English notes only.

Screenshots and recordings

Current folder setup, to which the YAML setup should be added:
Screenshot 2021-09-05 at 5 35 53 PM

2.15.0: Protocol sometimes missing from audio link, making it unplayable

Using 2.15.0, English (US), definition & synonym provider "Free Dictionary API", looking up, for instance "right hand", delivers an audio link that’s unplayable, both in pane and generated note, due to the protocol missing:

<source src="//ssl.gstatic.com/dictionary/static/sounds/20200429/right_hand--1_gb_1.4.mp3">

Manually adding the https: protocol makes it playable.

Since we might encounter APIs that don’t use https:, it might be clever to check if the returned audio link uses a protocol, if not, add the one used to make the request.

[Feature Request] Local Dictionary Builder: Save to csv to better support DataView

Hello, thank you for this wonderful plug-in.

I learn the language in obsidian, so I often query new words, mark them in the text, and finally use DataView to summarize them.

However, all the words in the dictionary are split into separate markdown files.

As far as I know, DataView will support querying from CSV soon. I think this format may be also suitable for dictionary plugin with a lot of data.

Will the dictionary plug-in consider supporting this format?

[Bug]: Error when closing all open leafs

Describe the bug

When I close all open markdown files, this error is thrown:

Screen Shot 2021-10-07 at 5 44 13 PM

For the most part, this error doesn't cause any issues, but it will prevent Kanban boards from cleaning up after themselves if they are the last leaf to close.

Relevant errors (if available)

Uncaught (in promise) TypeError: Cannot read property 'path' of null
    at t.getFileCache (app.js:1)
    at _t.eval (eval at <anonymous> (app.js:1), <anonymous>:35:4930)
    at Generator.next (<anonymous>)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:6:982)
    at new Promise (<anonymous>)
    at _ (eval at <anonymous> (app.js:1), <anonymous>:6:802)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:35:4832)
    at t.e.tryTrigger (app.js:1)
    at t.e.trigger (app.js:1)
    at t.trigger (app.js:1)
t.getFileCache @ app.js:1
eval @ VM219:35
eval @ VM219:6
_ @ VM219:6
eval @ VM219:35
e.tryTrigger @ app.js:1
e.trigger @ app.js:1
t.trigger @ app.js:1
t.activeLeafEvents @ app.js:1
a @ app.js:1
setTimeout (async)
l @ app.js:1
t.setActiveLeaf @ app.js:1
t.onLayoutChange @ app.js:1
t.insertChild @ app.js:1
t.createLeafInParent @ app.js:1
t.onLayoutChange @ app.js:1
t.removeChild @ app.js:1
t.detach @ app.js:1
t.detach @ app.js:1
eval @ VM173:71
o @ VM173:23
(anonymous) @ app.js:1
(anonymous) @ app.js:1

Steps to reproduce

Open a single markdown file and close it so that the No file is open message appears.

Expected Behavior

No response

Addition context

No response

Language

No response

API Name

No response

Operating system

macOS

Only first occurrence of template variable gets replaced

Playing around with the template functionality I noticed that only the first occurrence of a placeholder gets replaced.

Given the following template...

## {{word}} (Glossary)
?
{{meanings}}

—
**Source:**
https://www.google.de/search?q=Wörterbuch#dobs={{word}}

...second {{word}} placeholder doesn't get replaced currently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.