Open Moonbase59 opened 3 years ago
A Synonym Provider is not needed, the Synonym Popover won't work but the Sidebar lookup still should. Let me investigate
I think i already found the Error. These russian letters need to be urlencoded like so: https://api.dictionaryapi.dev/api/v2/entries/ru/%D0%91%D0%BE%D0%BB%D1%8C%D1%88%D0%BE%D0%B9
Could you please try again with the newest Version?
Yeah, thanks!
In the meantime, list of languages I could use:
de
en-US
en-GB
es
fr
it
ko
tr
Languages that didn’t work:
hi
ja
ru
pt-BR
ar
zh
These are all Languages with "non standard" letters right?
Still not functioning (2.15.1):
These are the ones that worked:
These are all Languages with "non standard" letters right?
I’d say "standard" lol, because Unicode. But yes, non-latin script, and odd word separators. Plus, with Arabic, a right-to-left language.
Yeah but they seem to get encoded differently in a URL
These russian letters need to be urlencoded like so: https://api.dictionaryapi.dev/api/v2/entries/ru/%D0%91%D0%BE%D0%BB%D1%8C%D1%88%D0%BE%D0%B9
Or atleast this API is doing it
Would probably not hurt always using encodeURIComponent()
on the search phrases.
Did that in 2.15.1, need to investigate some more tomorrow for the other languages
Btw, do we have an offline dictionary for Chinese? When selecting Chinese, it always switches to the Offline Dictionary …
Thanks for keeping on the track!
Yes, the offline Dictionary works in english and chinese
But there’s no online directory for Chinese?
Just to be sure, hindi works in 2.15.1?
But there’s no online directory?
No, just the offline Dictionary for now.
Just to be sure, hindi works in 2.15.1?
Hm. It worked before (see screenshot), and if I look something up, it shows it in the pane, but now it won’t create a file anymore?!
Try the word for "yes" → हाँ
Odd. The word for "dictionary" it writes a note for → शब्दकोश
Any Console Errors?
Here you go, had to clean all the old errors first ;-)
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:4684 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.
DevTools failed to load SourceMap: Could not parse content for app://obsidian.md/main.js.map: Unexpected end of JSON input
VM147:4543 Uncaught (in promise) TypeError: Cannot read property 'split' of undefined
at LocalDictionaryBuilder.cap (eval at <anonymous> (app.js:1), <anonymous>:4543:30)
at eval (eval at <anonymous> (app.js:1), <anonymous>:4560:43)
at Array.forEach (<anonymous>)
at LocalDictionaryBuilder.eval (eval at <anonymous> (app.js:1), <anonymous>:4559:30)
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 LocalDictionaryBuilder.newNote (eval at <anonymous> (app.js:1), <anonymous>:4549:16)
at Array.click_handler (eval at <anonymous> (app.js:1), <anonymous>:3091:60)
cap @ VM147:4543
eval @ VM147:4560
eval @ VM147:4559
eval @ VM147:31
__awaiter @ VM147:27
newNote @ VM147:4549
click_handler @ VM147:3091
click_handler @ VM147:2615
async function (async)
click_handler @ VM147:3091
click_handler @ VM147:2615
Happens the moment I click "new note" (with the word हाँ
on screen)
What are you splitting? Remember we have a lot of languages that don’t have a word separator.
"//This really needs a refactor" :rofl:
I think I was splitting the word to capitalize it correctly, but that doesnt make any sense when you just enter one word, might remove it which should fix these errors
Wonder why string was undef, though.
The undefined
Strings should be fixed now
Japanese is also working: ありがとう
Btw, do we have an offline dictionary for Chinese? When selecting Chinese, it always switches to the Offline Dictionary …
Well not really, its basically an English to Chinese Dictionary..
What still needs to be investigated:
I found why all these Issues just started to happen..
https://github.com/meetDeveloper/freeDictionaryAPI/commit/e1a9c6c2245b5684f9503ff6d6f51e2ac6dfeae1
Removed references to language other than english. API will soon start to use wiktionary as its source for defintion and currently it provides good support for English only.
See #43
Sad. Just now when you got so far … Confirm undef not giving errors anymore in 2.15.2, Hindi "yes" note created.
@phibr0 @Moonbase59 As I have not changed any code in Dictionary API so I do not think that this bug is caused due to any recent changes from my side. As I said on other ticket, I will keep non english languages also up but have removed it from the website and github to avoid new users to use API for non english words. Adding wiktionary support for other languages will take some time as I am sole developer of Free Dictionary API but will keep them up.
Yeah already investigating, the API works, just not in Obsidian. Thank you so much!
Russian is working again! (Tested with: Привет)
Hm. Don’t work here. Your word didn’t show anything, my list words above show "No Definitions Found". Using v2.15.5.
Portuguese always returns "No Definitions Found", even when using previously searched words. Version 2.15.5.
Russian is working again, but the issue still persists when using Brazilian Portuguese.
Version 2.16.3
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: