diff --git a/python/python-psi-impl/resources/messages/PyPsiBundle.properties b/python/python-psi-impl/resources/messages/PyPsiBundle.properties index 7f07197f72c8..b77bcde4eb1f 100644 --- a/python/python-psi-impl/resources/messages/PyPsiBundle.properties +++ b/python/python-psi-impl/resources/messages/PyPsiBundle.properties @@ -772,6 +772,11 @@ INSP.python.trailing.suffix.not.support=Python does not support a trailing ''{0} # PyInterpreterInspection python.sdk.no.interpreter.configured.owner=No Python interpreter configured for the {0} +# PyInspectionsSuppressor +INSP.python.suppressor.suppress.for.function=Suppress for function +INSP.python.suppressor.suppress.for.class=Suppress for class +INSP.python.suppressor.suppress.for.statement=Suppress for statement + find.usages.unnamed= find.usages.keyword.argument=keyword argument find.usages.variable=variable diff --git a/python/python-psi-impl/src/com/jetbrains/python/inspections/PyInspectionsSuppressor.java b/python/python-psi-impl/src/com/jetbrains/python/inspections/PyInspectionsSuppressor.java index 40ccb8ada427..3aab889f8aa0 100644 --- a/python/python-psi-impl/src/com/jetbrains/python/inspections/PyInspectionsSuppressor.java +++ b/python/python-psi-impl/src/com/jetbrains/python/inspections/PyInspectionsSuppressor.java @@ -7,6 +7,7 @@ import com.intellij.psi.PsiComment; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiWhiteSpace; import com.intellij.psi.util.PsiTreeUtil; +import com.jetbrains.python.PyPsiBundle; import com.jetbrains.python.codeInsight.controlflow.ScopeOwner; import com.jetbrains.python.inspections.quickfix.PySuppressInspectionFix; import com.jetbrains.python.psi.*; @@ -25,13 +26,13 @@ public class PyInspectionsSuppressor implements InspectionSuppressor { public SuppressQuickFix @NotNull [] getSuppressActions(@Nullable PsiElement element, @NotNull String toolId) { if (PY_INCORRECT_DOCSTRING_INSPECTION_ID.equals(toolId) || PY_MISSING_OR_EMPTY_DOCSTRING_INSPECTION_ID.equals(toolId)) { return new SuppressQuickFix[]{ - new PySuppressInspectionFix(toolId, "Suppress for function", PyFunction.class), - new PySuppressInspectionFix(toolId, "Suppress for class", PyClass.class) + new PySuppressInspectionFix(toolId, PyPsiBundle.message("INSP.python.suppressor.suppress.for.function"), PyFunction.class), + new PySuppressInspectionFix(toolId, PyPsiBundle.message("INSP.python.suppressor.suppress.for.class"), PyClass.class) }; } else { return new SuppressQuickFix[]{ - new PySuppressInspectionFix(toolId, "Suppress for statement", PyStatement.class) { + new PySuppressInspectionFix(toolId, PyPsiBundle.message("INSP.python.suppressor.suppress.for.statement"), PyStatement.class) { @Override public PsiElement getContainer(PsiElement context) { if (PsiTreeUtil.getParentOfType(context, PyStatementList.class, false, ScopeOwner.class) != null || @@ -41,8 +42,8 @@ public class PyInspectionsSuppressor implements InspectionSuppressor { return null; } }, - new PySuppressInspectionFix(toolId, "Suppress for function", PyFunction.class), - new PySuppressInspectionFix(toolId, "Suppress for class", PyClass.class) + new PySuppressInspectionFix(toolId, PyPsiBundle.message("INSP.python.suppressor.suppress.for.function"), PyFunction.class), + new PySuppressInspectionFix(toolId, PyPsiBundle.message("INSP.python.suppressor.suppress.for.class"), PyClass.class) }; } }