Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Oct 28, 2024
1 parent 29d2460 commit b4ac4d2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import com.intellij.javascript.nodejs.PackageJsonData
import com.intellij.lang.javascript.JSBundle
import com.intellij.lang.javascript.JavaScriptBundle
import com.intellij.lang.javascript.linter.JSLinterGuesser
import com.intellij.lang.javascript.linter.JSLinterUtil
import com.intellij.notification.Notification
Expand Down Expand Up @@ -62,15 +62,15 @@ class TemplateLintEnabler : DirectoryProjectConfigurator {
}

fun notifyEnabled(project: Project, dependency: String) {
val message = JSBundle.message("js.linter.guesser.linter.enabled.because.of.package.json.section",
val message = JavaScriptBundle.message("js.linter.guesser.linter.enabled.because.of.package.json.section",
"TemplateLint",
dependency)

JSLinterUtil.NOTIFICATION_GROUP.createNotification(message, MessageType.INFO).addAction(object : NotificationAction("Disable TemplateLint") {
override fun actionPerformed(e: AnActionEvent, notification: Notification) {
JSLinterGuesser.LOG.info("TemplateLint disabled by user")
templateLintEnabled(project, false)
JSLinterUtil.NOTIFICATION_GROUP.createNotification(JSBundle.message("js.linter.guesser.linter.disabled", "TemplateLint"), MessageType.INFO).notify(project)
JSLinterUtil.NOTIFICATION_GROUP.createNotification(JavaScriptBundle.message("js.linter.guesser.linter.disabled", "TemplateLint"), MessageType.INFO).notify(project)
}
}).notify(project)
}
Expand Down

0 comments on commit b4ac4d2

Please sign in to comment.