-
-
Notifications
You must be signed in to change notification settings - Fork 90
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 support for chinese lang #33
Conversation
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.
@subframe7536 Thank you for your contribution!
Please see my comment below 🙂
@@ -20,7 +20,7 @@ export const formatDiagnosticMessage = (message: string, format: (type: string) | |||
message | |||
// format declare module snippet | |||
.replaceAll( | |||
/'(declare module )'(.*)';'/g, | |||
/['“](declare module )['”](.*)['“];['”]/g, |
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.
It should be better to replace all the “
characters by '
at the beginning in one replace instead of adding it to all the others.
WDYT?
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.
I thought the same way, but I can't guarantee that all “”
inside error messages are just used as the replacement of ''
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.
I didn't see ”
inside a type before, but I didn't use the Chinese language pack so we'll go with the safe option for now 🙂
Thank you!
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.
There is a minor conflict. Can you fix it so I can merge it?
Thank you!
@@ -20,7 +20,7 @@ export const formatDiagnosticMessage = (message: string, format: (type: string) | |||
message | |||
// format declare module snippet | |||
.replaceAll( | |||
/'(declare module )'(.*)';'/g, | |||
/['“](declare module )['”](.*)['“];['”]/g, |
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.
I didn't see ”
inside a type before, but I didn't use the Chinese language pack so we'll go with the safe option for now 🙂
Thank you!
when the extension of
Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code
installed, it use“”
to wrap the code in error hint.add support for it