mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
localize "XML" hardcoded literals
GitOrigin-RevId: 46234af4795ffca6aac2c97f1b5e7b2b17c20ddc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a4beb0f89b
commit
ec5f79a00b
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.json.codeinsight;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.json.JsonBundle;
|
||||
import com.intellij.json.highlighting.JsonSyntaxHighlighterFactory;
|
||||
import com.intellij.json.psi.JsonNumberLiteral;
|
||||
@@ -75,7 +76,7 @@ public class JsonLiteralAnnotator implements Annotator {
|
||||
private static void highlightPropertyKey(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
|
||||
if (JsonPsiUtil.isPropertyKey(element)) {
|
||||
if (Holder.DEBUG) {
|
||||
holder.newAnnotation(HighlightSeverity.INFORMATION, JsonBundle.message("property.key")).textAttributes(JsonSyntaxHighlighterFactory.JSON_PROPERTY_KEY).create();
|
||||
holder.newAnnotation(HighlightSeverity.INFORMATION, CommonBundle.message("property.key")).textAttributes(JsonSyntaxHighlighterFactory.JSON_PROPERTY_KEY).create();
|
||||
}
|
||||
else {
|
||||
holder.newSilentAnnotation(HighlightSeverity.INFORMATION).textAttributes(JsonSyntaxHighlighterFactory.JSON_PROPERTY_KEY).create();
|
||||
|
||||
@@ -75,4 +75,9 @@ block.comment=Block comment
|
||||
line.comment=Line comment
|
||||
property.key=property key
|
||||
all=All
|
||||
image=Image
|
||||
image=Image
|
||||
remove=Remove
|
||||
xml=XML
|
||||
html=HTML
|
||||
xhtml=XHTML
|
||||
dtd=DTD
|
||||
@@ -310,3 +310,14 @@ could.not.save.generated.xml.document.0=Could not save generated XML document: {
|
||||
change.template.data.language=Change template data language
|
||||
xml.actions=XML Actions
|
||||
choose.tag.name=Choose Tag Name
|
||||
define.attribute=Define attribute
|
||||
define.0.attribute=Define {0} attribute
|
||||
choose.url=Choose Url
|
||||
the.attribute.is.marked.as.deprecated=The attribute is marked as deprecated
|
||||
the.tag.is.marked.as.deprecated=The tag is marked as deprecated
|
||||
unknown.error=Unknown error
|
||||
rename.attribute.to.0=Rename attribute to {0}
|
||||
rename.attribute=Rename attribute
|
||||
tag.should.have.one.of.following.attributes.0=Tag should have one of following attributes: {0}
|
||||
redundant.default.attribute.value.assignment=Redundant default attribute value assignment
|
||||
root.tag=Root Tag
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.intellij.ide.util.PsiNavigationSupport;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.xml.XmlAttribute;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.xml.XmlBundle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -42,13 +43,13 @@ public class DefineAttributeQuickFix implements LocalQuickFix {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return "Define " + myAttrName + " attribute";
|
||||
return XmlBundle.message("define.0.attribute", myAttrName);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getFamilyName() {
|
||||
return "Define attribute";
|
||||
return XmlBundle.message("define.attribute");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.intellij.util.xml.tree.actions;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.application.ApplicationBundle;
|
||||
@@ -52,7 +53,7 @@ public class DeleteDomElement extends BaseDomTreeAction {
|
||||
|
||||
final DomElement domElement = ((BaseDomElementNode)selectedNode).getDomElement();
|
||||
|
||||
final int ret = Messages.showOkCancelDialog(getPresentationText(selectedNode, "Remove") + "?", "Remove",
|
||||
final int ret = Messages.showOkCancelDialog(getPresentationText(selectedNode, "Remove") + "?", CommonBundle.message("remove"),
|
||||
Messages.getQuestionIcon());
|
||||
if (ret == Messages.OK) {
|
||||
WriteCommandAction.writeCommandAction(domElement.getManager().getProject(), DomUtil.getFile(domElement)).run(() -> domElement.undefine());
|
||||
|
||||
@@ -17,10 +17,10 @@ package com.intellij.util.xml.ui;
|
||||
|
||||
import com.intellij.openapi.util.Factory;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.intellij.psi.html.HtmlTag;
|
||||
import com.intellij.psi.xml.XmlAttribute;
|
||||
import com.intellij.psi.xml.XmlAttributeValue;
|
||||
import com.intellij.xml.XmlAttributeDescriptor;
|
||||
import com.intellij.xml.XmlBundle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -49,7 +50,7 @@ public class XmlDefaultAttributeValueInspection extends XmlSuppressableInspectio
|
||||
}
|
||||
String defaultValue = descriptor.getDefaultValue();
|
||||
if (defaultValue != null && defaultValue.equals(value.getValue()) && !value.getTextRange().isEmpty()) {
|
||||
holder.registerProblem(value, "Redundant default attribute value assignment", ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
holder.registerProblem(value, XmlBundle.message("redundant.default.attribute.value.assignment"), ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
new RemoveAttributeIntentionFix(((XmlAttribute)parent).getLocalName()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.intellij.psi.XmlElementVisitor;
|
||||
import com.intellij.psi.meta.PsiMetaData;
|
||||
import com.intellij.psi.xml.*;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.xml.XmlBundle;
|
||||
import com.intellij.xml.util.XmlUtil;
|
||||
import org.intellij.lang.annotations.Language;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -34,7 +35,7 @@ public class XmlDeprecatedElementInspection extends XmlSuppressableInspectionToo
|
||||
if (checkDeprecated(tag.getDescriptor(), pattern)) {
|
||||
ASTNode nameNode = XmlChildRole.START_TAG_NAME_FINDER.findChild(tag.getNode());
|
||||
if (nameNode != null) {
|
||||
holder.registerProblem(nameNode.getPsi(), "The tag is marked as deprecated", ProblemHighlightType.LIKE_DEPRECATED);
|
||||
holder.registerProblem(nameNode.getPsi(), XmlBundle.message("the.tag.is.marked.as.deprecated"), ProblemHighlightType.LIKE_DEPRECATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +43,7 @@ public class XmlDeprecatedElementInspection extends XmlSuppressableInspectionToo
|
||||
@Override
|
||||
public void visitXmlAttribute(XmlAttribute attribute) {
|
||||
if (checkDeprecated(attribute.getDescriptor(), pattern)) {
|
||||
holder.registerProblem(attribute.getNameElement(), "The attribute is marked as deprecated", ProblemHighlightType.LIKE_DEPRECATED);
|
||||
holder.registerProblem(attribute.getNameElement(), XmlBundle.message("the.attribute.is.marked.as.deprecated"), ProblemHighlightType.LIKE_DEPRECATED);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -133,14 +133,14 @@ public class HtmlUnknownAttributeInspectionBase extends HtmlUnknownElementInspec
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Rename attribute";
|
||||
return XmlBundle.message("rename.attribute");
|
||||
}
|
||||
|
||||
@Nls
|
||||
@NotNull
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Rename attribute to " + name;
|
||||
return XmlBundle.message("rename.attribute.to.0", name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.intellij.psi.xml.XmlChildRole;
|
||||
import com.intellij.psi.xml.XmlElement;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.xml.XmlBundle;
|
||||
import com.intellij.xml.XmlTagRuleProvider;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -229,7 +230,8 @@ public abstract class XmlTagRuleProviderBase extends XmlTagRuleProvider {
|
||||
}
|
||||
}
|
||||
|
||||
holder.registerProblem(tagNameElement, "Tag should have one of following attributes: " + StringUtil.join(myAttributeNames, ", "),
|
||||
holder.registerProblem(tagNameElement,
|
||||
XmlBundle.message("tag.should.have.one.of.following.attributes.0", StringUtil.join(myAttributeNames, ", ")),
|
||||
myProblemHighlightType,
|
||||
fixes);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.ide.highlighter;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.lang.dtd.DTDLanguage;
|
||||
@@ -33,7 +34,7 @@ public class DTDFileType extends LanguageFileType {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return "DTD";
|
||||
return CommonBundle.message("dtd");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.ide.highlighter;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.lang.Language;
|
||||
@@ -49,7 +50,7 @@ public class HtmlFileType extends XmlLikeFileType {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return "HTML";
|
||||
return CommonBundle.message("html");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.ide.highlighter;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.lang.xhtml.XHTMLLanguage;
|
||||
@@ -32,7 +33,7 @@ public class XHtmlFileType extends HtmlFileType {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return "XHTML";
|
||||
return CommonBundle.message("xhtml");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.ide.highlighter;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.lang.xml.XMLLanguage;
|
||||
@@ -35,7 +36,7 @@ public class XmlFileType extends XmlLikeFileType implements DomSupportEnabled {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return "XML";
|
||||
return CommonBundle.message("xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user