-
Notifications
You must be signed in to change notification settings - Fork 46
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
base: master
Are you sure you want to change the base?
Conversation
…tes-obsidian into multilanguage
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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)}`))) { |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
Sorry about that! GitHub freaked out when I deleted my branch earlier today! It should be good now! |
OK no problem, I merged
How did you get this working for you? The only relevant thing changed is |
Sorry, we switched to yarn on this release! I'll add to the changelog now |
…into multilanguage
@argenos I merged master back into this branch and set it as ready for review, are you willing to review it? |
…into multilanguage
Just did yarn install
Implements #19