-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In _constants.ts, LANGUAGE codes shouldn’t be mixed #22
Comments
Looks good, would you like to open a PR for this? Also changing the way the Language Codes are handled might bring issues with already existing caches. |
Sure, caches might be corrupted. Plus, I don’t know if any upstream code or APIs already use the "wrong" language codes. I suspect at least the Free Dictionary API might. Haven’t done PRs for ever so long, and I’m not too fluent with Typescript/Javascript, so I fear I might mess things up, especially since I’m quite short on time currently. Maybe I should better leave it to you, since you know your code much better … |
Just for the fun of it: If I was to try a PR, how would the build environment look like (i.e., what’s to install on a Linux, Debian-type, system)? And how to build (in order to test the changes before making a PR)? Is there any good documention for building Typescript Obsidian plugins you could link me to? |
You can read about how to get started here: https://github.com/obsidianmd/obsidian-sample-plugin There currently isn't much documentation (it will probably come after Obsidian 1.0) except the Obsidian Definition File https://github.com/obsidianmd/obsidian-api . If you need help your best bet will be the Obsidian Discord, which you can find on their Website. |
Thanks for these! If I get some spare time, I’ll give it a spin … |
The Languages Codes are like that because initially the Plugin was only using the https://freedictionaryapi.dev which was using these Codes. I agree that this is pretty unfortunate and I will fix this too. |
In
_constants.ts
, there is a mixture of codes for language, likeSome 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:
The text was updated successfully, but these errors were encountered: