Skip to content
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

Add multilanguage support #58

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

RensOliemans
Copy link

@RensOliemans RensOliemans commented Nov 4, 2021

Implements #19

Copy link
Author

@RensOliemans RensOliemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit of explaining


interface IDateCompletion {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this only had a label: string I removed it, that made the code a bit more readable (the interface contained only a string, now it's just a string), but if it was necessary then I can of course revert it

}

private getTimeSuggestions(inputStr: string, lang: string): string[] {
if (inputStr.match(new RegExp(`^${t("time", lang)}`))) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the way that I dealt with the suggestions: the regex contains translatable parts. So time for English, tijd voor Dutch, etc. Then everything about translations (both the actual suggestions, and the regex for determining them) was done the same way

@@ -15,7 +15,7 @@
"dom",
"es5",
"scripthost",
"es2015"
"es2019"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary for Array.flatMap. Not sure if this breaks anything, if it does I can revert it since a flatMap can easily be transformed into es2015 compatible code

@argenos argenos deleted the branch argenos:master November 17, 2021 13:47
@argenos argenos closed this Nov 17, 2021
@argenos argenos reopened this Nov 17, 2021
@argenos argenos changed the base branch from refactor/cm6-migration to develop November 17, 2021 17:14
@argenos
Copy link
Owner

argenos commented Nov 17, 2021

Sorry about that! GitHub freaked out when I deleted my branch earlier today! It should be good now!

@RensOliemans
Copy link
Author

OK no problem, I merged develop back into my branch. One issue which I had is that the new Obsidian version (v0.13.0) isn't on npm, that's why you added
"obsidian": "git+https://github.com/obsidianmd/obsidian-api.git#5687a75ecfdb78b6a832127cf6f9229e27e196a0",
in package.json. Unfortunately, neither npm nor yarn allows that version for specification for me.

yarn:

error Can't add "obsidian": invalid package version undefined.

npm:

npm ERR! Invalid Version:

How did you get this working for you? The only relevant thing changed is setInstructions in EditorSuggest, but I can't seem to install the correct version

@argenos
Copy link
Owner

argenos commented Nov 18, 2021

Sorry, we switched to yarn on this release! I'll add to the changelog now

src/lang/de.ts Outdated Show resolved Hide resolved
@RensOliemans RensOliemans changed the base branch from develop to master January 20, 2022 13:05
@RensOliemans RensOliemans marked this pull request as ready for review January 20, 2022 13:08
@RensOliemans
Copy link
Author

@argenos I merged master back into this branch and set it as ready for review, are you willing to review it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants