From b1bc54681eb8dcf38c65e41360359f00a78bee18 Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Mon, 3 Jan 2022 16:11:56 +0100 Subject: [PATCH] XML: follow quick-fix/intention text convention GitOrigin-RevId: dfd4b04ca3f207dc3a32791e4f995c259abc8b91 --- .../xml/util/CheckValidXmlInScriptBodyInspection.java | 6 +----- xml/openapi/resources/messages/XmlBundle.properties | 3 +-- .../resources/messages/XmlAnalysisBundle.properties | 2 +- xml/xml-psi-api/resources/messages/XmlPsiBundle.properties | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/xml/impl/src/com/intellij/xml/util/CheckValidXmlInScriptBodyInspection.java b/xml/impl/src/com/intellij/xml/util/CheckValidXmlInScriptBodyInspection.java index 73ebc86b793c..1d64a178445b 100644 --- a/xml/impl/src/com/intellij/xml/util/CheckValidXmlInScriptBodyInspection.java +++ b/xml/impl/src/com/intellij/xml/util/CheckValidXmlInScriptBodyInspection.java @@ -30,11 +30,7 @@ public class CheckValidXmlInScriptBodyInspection extends CheckValidXmlInScriptBo @Override @NotNull public String getText() { - final String character = getXmlCharacter(); - - return character.equals("&") - ? XmlBundle.message("xml.quickfix.unescaped.xml.character.ampersand") - : XmlBundle.message("xml.quickfix.unescaped.xml.character.text", character); + return XmlBundle.message("xml.quickfix.unescaped.xml.character.text", getXmlCharacter()); } @Override diff --git a/xml/openapi/resources/messages/XmlBundle.properties b/xml/openapi/resources/messages/XmlBundle.properties index 415c4e19bbb5..be30de442f59 100644 --- a/xml/openapi/resources/messages/XmlBundle.properties +++ b/xml/openapi/resources/messages/XmlBundle.properties @@ -120,8 +120,7 @@ xml.options.border.title.bem=BEM xml.progress.changing.to.default.namespace=Changing to default namespace xml.quickfix.unescaped.xml.character.family=Escape char -xml.quickfix.unescaped.xml.character.text=Escape {0} -xml.quickfix.unescaped.xml.character.ampersand=Escape ampersand +xml.quickfix.unescaped.xml.character.text=Escape ''{0}'' xml.schemas.border.title.default.html.language.level=Default HTML language level xml.schemas.radio.button.html.4.http.www.w3.org.tr.html4.loose.dtd=HTML 4 ("http://www.w3.org/TR/html4/loose.dtd") diff --git a/xml/xml-analysis-api/resources/messages/XmlAnalysisBundle.properties b/xml/xml-analysis-api/resources/messages/XmlAnalysisBundle.properties index f3992051276a..d15ba9a80417 100644 --- a/xml/xml-analysis-api/resources/messages/XmlAnalysisBundle.properties +++ b/xml/xml-analysis-api/resources/messages/XmlAnalysisBundle.properties @@ -57,7 +57,7 @@ xml.intention.rename.start.tag=Rename start tag ''{0}'' to ''{1}'' xml.intention.replace.tag.empty.body.with.empty.end=Collapse empty tag xml.intention.remove.unused.namespace.location=Remove unused namespace location -xml.quickfix.escape.ampersand=Escape ampersand +xml.quickfix.escape.ampersand=Escape '\\&' xml.quickfix.change.root.element.to=Change root tag name to {0} xml.quickfix.declare.id.in.comment=Declare invalid id in comment annotation xml.quickfix.remove.attribute.family=Remove attribute diff --git a/xml/xml-psi-api/resources/messages/XmlPsiBundle.properties b/xml/xml-psi-api/resources/messages/XmlPsiBundle.properties index a616f4d0b40a..89f617f86dd4 100644 --- a/xml/xml-psi-api/resources/messages/XmlPsiBundle.properties +++ b/xml/xml-psi-api/resources/messages/XmlPsiBundle.properties @@ -63,7 +63,7 @@ xml.terms.namespace.alias=namespace xml.find.usages.presentable.name.of.containing.file={0} of file {1} -xml.quickfix.insert.required.attribute.text=Insert required attribute {0} +xml.quickfix.insert.required.attribute.text=Insert required attribute ''{0}'' xml.quickfix.insert.required.attribute.family=Insert required attribute xml.quickfix.add.attribute.value.text=Add attribute value xml.quickfix.create.namespace.declaration.text=Create {0} declaration