[i18n] move properties used in xml.dom* modules to XmlDomBundle (IDEA-209382)

GitOrigin-RevId: ebd24779ada7bed6eef602d29ef5d37fa55566b8
This commit is contained in:
nik
2020-02-18 10:25:37 +03:00
committed by intellij-monorepo-bot
parent 71612d92dd
commit 0af4cae2f2
17 changed files with 51 additions and 69 deletions

View File

@@ -624,9 +624,6 @@ editbox.enter.tag.name=Enter tag name:
title.tag.name=Tag Name
title.xml=XML
title.html=HTML
action.add=Add
action.edit=Edit
action.remove=R&emove
checkbox.color.background=Background
checkbox.color.foreground=Foreground
checkbox.color.effects=Effects

View File

@@ -501,11 +501,9 @@ intention.edit.interceptor.binding.family=Interceptor bindings
intention.edit.interceptor.binding.text=Edit Interceptor ''{0}'' bindings
powered.by=Powered by:
powered.by.plugin=''{0}'' plugin
error.cannot.convert.default.message=Invalid value: ''{0}''
error.cannot.resolve.default.message=Cannot resolve symbol ''{0}''
error.cannot.resolve.0.1=Cannot resolve {0} ''{1}''
unknown.encoding.0=Unknown encoding: ''{0}''
error.unknown.enum.value.message=Unknown enum value ''{0}''
i18nize.cant.create.properties.file.because.its.name.is.associated=Can''t create properties file ''{0}'' because its name is associated with the {1}.
i18nize.error.creating.properties.file=Error creating properties file
node.excluded.flag.tooltip=Excluded

View File

@@ -1040,19 +1040,8 @@ scope.view.title=Scopes
scope.view.empty.text=No files in the current scope.
scope.view.empty.link=Show all project files
select.in.title.project.view=Project View
child.tag.0.should.be.defined=''{0}'' child tag should be defined
attribute.0.should.be.defined=''{0}'' attribute should be defined
value.must.not.be.empty=Value must not be empty
value.must.be.identifier=Value must be identifier
model.highlighting.identity={0} with such name already exists
model.highlighting.identity.in.other.file={0} with such name already exists in file ''{1}''
dom.elements.tree.childs.contain.errors=Children contain errors
team.server.license.not.found=This IDEA distribution is only licensed to be used with JetBrains TeamCity.
unknown.error=Unknown error
value.should.be.integer=Value should be integer
scopes.display.name=Scopes
scopes.no.scoped=No scopes added.
add.local.scope.action.text=Local

View File

@@ -143,7 +143,6 @@ class.filter.editor.add.dialog.title=New Filter
label.class.filter.editor.add.dialog.filter.pattern=Enter the filter pattern:
choose.class=Choose class
big.text.control.window.title=Text
tool.window.name.module.duplicates=Duplicates
welcome.screen.disabled.plugins.description=(disabled)
welcome.screen.incompatible.plugins.description=(incompatible)

View File

@@ -58,9 +58,6 @@ xml.inspections.check.file.with.xerces=File does not pass external validation
xml.inspections.check.dtd.references=Unresolved DTD reference
xml.dtd.unresolved.entity.reference=Unresolved Entity Reference {0}
xml.dtd.unresolved.element.reference=Unresolved Dtd Element Reference {0}
insert.required.tag.fix=Insert required child tag {0}
insert.required.tag.fix.family=Insert required child tag
# rename refactoring
rename.current.tag=Rename {0} to:
xml.inspections.duplicate.id=Duplicate ID
@@ -249,8 +246,6 @@ 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
unknown.error=Unknown error
root.tag=Root Tag

View File

@@ -23,4 +23,22 @@ class.decorator.or.has.default.constructor=''{0}'' should have default construct
interface.not.allowed=Interface is not allowed
enum.not.allowed=Enum is not allowed
abstract.class.not.allowed=Abstract class is not allowed
abstract.class.not.allowed=Abstract class is not allowed
action.remove=R&emove
error.cannot.convert.default.message=Invalid value: ''{0}''
action.edit=Edit
value.should.be.integer=Value should be integer
dom.elements.tree.childs.contain.errors=Children contain errors
action.add=Add
error.unknown.enum.value.message=Unknown enum value ''{0}''
model.highlighting.identity.in.other.file={0} with such name already exists in file ''{1}''
model.highlighting.identity={0} with such name already exists
value.must.be.identifier=Value must be identifier
value.must.not.be.empty=Value must not be empty
attribute.0.should.be.defined=''{0}'' attribute should be defined
child.tag.0.should.be.defined=''{0}'' child tag should be defined
define.0.attribute=Define {0} attribute
define.attribute=Define attribute
insert.required.tag.fix.family=Insert required child tag
insert.required.tag.fix=Insert required child tag {0}
big.text.control.window.title=Text

View File

@@ -15,7 +15,6 @@
*/
package com.intellij.util.xml;
import com.intellij.codeInsight.CodeInsightBundle;
import com.intellij.psi.xml.XmlElement;
import com.intellij.psi.xml.XmlTag;
import com.intellij.util.ReflectionUtil;
@@ -62,7 +61,7 @@ public class EnumConverter<T extends Enum> extends ResolvingConverter<T>{
@Override
public String getErrorMessage(@Nullable final String s, final ConvertContext context) {
return CodeInsightBundle.message("error.unknown.enum.value.message", s);
return XmlDomBundle.message("error.unknown.enum.value.message", s);
}
@Override

View File

@@ -21,7 +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 com.intellij.util.xml.XmlDomBundle;
import org.jetbrains.annotations.NotNull;
/**
@@ -43,13 +43,13 @@ public class DefineAttributeQuickFix implements LocalQuickFix {
@Override
@NotNull
public String getName() {
return XmlBundle.message("define.0.attribute", myAttrName);
return XmlDomBundle.message("define.0.attribute", myAttrName);
}
@Override
@NotNull
public String getFamilyName() {
return XmlBundle.message("define.attribute");
return XmlDomBundle.message("define.attribute");
}
@Override

View File

@@ -18,7 +18,6 @@ package com.intellij.util.xml.highlighting;
import com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.ide.IdeBundle;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
@@ -35,7 +34,6 @@ import com.intellij.util.xml.impl.*;
import com.intellij.util.xml.reflect.AbstractDomChildrenDescription;
import com.intellij.util.xml.reflect.DomCollectionChildDescription;
import com.intellij.util.xml.reflect.DomGenericInfo;
import com.intellij.xml.XmlBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -69,14 +67,14 @@ public class DomHighlightingHelperImpl extends DomHighlightingHelper {
final String xmlElementName = element.getXmlElementName();
String namespace = element.getXmlElementNamespace();
if (element instanceof GenericAttributeValue) {
return Collections.singletonList(holder.createProblem(element, IdeBundle.message("attribute.0.should.be.defined", xmlElementName),
return Collections.singletonList(holder.createProblem(element, XmlDomBundle.message("attribute.0.should.be.defined", xmlElementName),
new DefineAttributeQuickFix(xmlElementName, namespace)));
}
return Collections.singletonList(
holder.createProblem(
element,
HighlightSeverity.ERROR,
IdeBundle.message("child.tag.0.should.be.defined", xmlElementName),
XmlDomBundle.message("child.tag.0.should.be.defined", xmlElementName),
new AddRequiredSubtagFix(xmlElementName, namespace)
)
);
@@ -94,7 +92,7 @@ public class DomHighlightingHelperImpl extends DomHighlightingHelper {
final DomCollectionChildDescription childDescription = (DomCollectionChildDescription)description;
final Required annotation = description.getAnnotation(Required.class);
if (annotation != null && annotation.value()) {
list.add(holder.createProblem(element, childDescription, IdeBundle.message("child.tag.0.should.be.defined", ((DomCollectionChildDescription)description).getXmlElementName())));
list.add(holder.createProblem(element, childDescription, XmlDomBundle.message("child.tag.0.should.be.defined", ((DomCollectionChildDescription)description).getXmlElementName())));
}
}
}
@@ -167,8 +165,8 @@ public class DomHighlightingHelperImpl extends DomHighlightingHelper {
final GenericDomValue genericDomValue = domElement.getGenericInfo().getNameDomElement(element);
if (genericDomValue != null) {
return Collections.singletonList(holder.createProblem(genericDomValue, DomUtil.getFile(domElement).equals(DomUtil.getFile(element))
? IdeBundle.message("model.highlighting.identity", typeName)
: IdeBundle.message("model.highlighting.identity.in.other.file", typeName,
? XmlDomBundle.message("model.highlighting.identity", typeName)
: XmlDomBundle.message("model.highlighting.identity.in.other.file", typeName,
domElement.getXmlTag().getContainingFile()
.getName())));
}
@@ -200,10 +198,10 @@ public class DomHighlightingHelperImpl extends DomHighlightingHelper {
if (stringValue == null) return null;
if (required.nonEmpty() && isEmpty(child, stringValue)) {
return annotator.createProblem(child, IdeBundle.message("value.must.not.be.empty"));
return annotator.createProblem(child, XmlDomBundle.message("value.must.not.be.empty"));
}
if (required.identifier() && !isIdentifier(stringValue)) {
return annotator.createProblem(child, IdeBundle.message("value.must.be.identifier"));
return annotator.createProblem(child, XmlDomBundle.message("value.must.be.identifier"));
}
return null;
}
@@ -246,13 +244,13 @@ public class DomHighlightingHelperImpl extends DomHighlightingHelper {
@Override
@NotNull
public String getName() {
return XmlBundle.message("insert.required.tag.fix", tagName);
return XmlDomBundle.message("insert.required.tag.fix", tagName);
}
@Override
@NotNull
public String getFamilyName() {
return XmlBundle.message("insert.required.tag.fix.family");
return XmlDomBundle.message("insert.required.tag.fix.family");
}
@Override

View File

@@ -6,7 +6,6 @@ import com.intellij.ide.TypePresentationService;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.application.ApplicationBundle;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.ui.popup.ListPopup;
import com.intellij.psi.xml.XmlFile;
@@ -15,6 +14,7 @@ import com.intellij.util.ReflectionUtil;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.DomUtil;
import com.intellij.util.xml.MergedObject;
import com.intellij.util.xml.XmlDomBundle;
import com.intellij.util.xml.reflect.DomCollectionChildDescription;
import com.intellij.util.xml.tree.BaseDomElementNode;
import com.intellij.util.xml.tree.DomElementsGroupNode;
@@ -110,7 +110,7 @@ public class AddElementInCollectionAction extends AddDomElementAction {
@Override
protected String getActionText(final AnActionEvent e) {
String text = ApplicationBundle.message("action.add");
String text = XmlDomBundle.message("action.add");
if (e.getPresentation().isEnabled()) {
final DomElementsGroupNode selectedNode = getDomElementsGroupNode(getTreeView(e));
if (selectedNode != null) {

View File

@@ -19,14 +19,10 @@ 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;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.ui.Messages;
import com.intellij.ui.treeStructure.SimpleNode;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.DomFileElement;
import com.intellij.util.xml.DomUtil;
import com.intellij.util.xml.ElementPresentation;
import com.intellij.util.xml.*;
import com.intellij.util.xml.tree.BaseDomElementNode;
import com.intellij.util.xml.tree.DomFileElementNode;
import com.intellij.util.xml.tree.DomModelTreeView;
@@ -82,10 +78,10 @@ public class DeleteDomElement extends BaseDomTreeAction {
if (enabled) {
e.getPresentation().setText(getPresentationText(selectedNode, ApplicationBundle.message("action.remove")));
e.getPresentation().setText(getPresentationText(selectedNode, XmlDomBundle.message("action.remove")));
}
else {
e.getPresentation().setText(ApplicationBundle.lazyMessage("action.remove"));
e.getPresentation().setText(XmlDomBundle.lazyMessage("action.remove"));
}
e.getPresentation().setIcon(AllIcons.General.Remove);

View File

@@ -25,8 +25,8 @@ import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFileFactory;
import com.intellij.ui.EditorTextField;
import com.intellij.ui.ReferenceEditorWithBrowseButton;
import com.intellij.ui.UIBundle;
import com.intellij.util.Function;
import com.intellij.util.xml.XmlDomBundle;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -101,7 +101,7 @@ public class TextControl extends EditorTextFieldControl<TextPanel> {
builder.setDimensionServiceKey("TextControl");
builder.setCenterPanel(textArea);
builder.setPreferredFocusComponent(textArea);
builder.setTitle(UIBundle.message("big.text.control.window.title"));
builder.setTitle(XmlDomBundle.message("big.text.control.window.title"));
builder.addCloseButton();
builder.show();
}

View File

@@ -15,8 +15,6 @@
*/
package com.intellij.util.xml;
import com.intellij.codeInsight.CodeInsightBundle;
import com.intellij.ide.IdeBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.Nullable;
@@ -44,7 +42,7 @@ public abstract class Converter<T> {
*/
@Nullable
public String getErrorMessage(@Nullable String s, final ConvertContext context) {
return CodeInsightBundle.message("error.cannot.convert.default.message", s);
return XmlDomBundle.message("error.cannot.convert.default.message", s);
}
@@ -71,7 +69,7 @@ public abstract class Converter<T> {
@Override
public String getErrorMessage(final String s, final ConvertContext context) {
return IdeBundle.message("value.should.be.integer");
return XmlDomBundle.message("value.should.be.integer");
}
};

View File

@@ -16,7 +16,6 @@
package com.intellij.util.xml.tree;
import com.intellij.ide.IdeBundle;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.ui.treeStructure.SimpleNode;
@@ -24,6 +23,7 @@ import com.intellij.util.ReflectionUtil;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.ElementPresentationManager;
import com.intellij.util.xml.ElementPresentationTemplate;
import com.intellij.util.xml.XmlDomBundle;
import com.intellij.util.xml.highlighting.DomElementAnnotationsManager;
import com.intellij.util.xml.highlighting.DomElementProblemDescriptor;
import com.intellij.util.xml.highlighting.DomElementsProblemsHolder;
@@ -81,7 +81,7 @@ public class DomElementsGroupNode extends AbstractDomElementNode {
showErrors ? getWavedAttributes(SimpleTextAttributes.STYLE_BOLD) : new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, SimpleTextAttributes.REGULAR_ATTRIBUTES.getFgColor());
addColoredFragment(getNodeName(), textAttributes);
addColoredFragment(" (" + childrenCount + ')', showErrors ? IdeBundle.message("dom.elements.tree.childs.contain.errors") : null,
addColoredFragment(" (" + childrenCount + ')', showErrors ? XmlDomBundle.message("dom.elements.tree.childs.contain.errors") : null,
SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
}
else {

View File

@@ -2,7 +2,6 @@
package com.intellij.util.xml.ui;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.application.ApplicationBundle;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.project.Project;
@@ -17,6 +16,7 @@ import com.intellij.util.ReflectionUtil;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.ColumnInfo;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.XmlDomBundle;
import com.intellij.util.xml.highlighting.DomCollectionProblemDescriptor;
import com.intellij.util.xml.highlighting.DomElementAnnotationsManager;
import com.intellij.util.xml.highlighting.DomElementProblemDescriptor;
@@ -412,7 +412,7 @@ public class DomCollectionControl<T extends DomElement> extends DomUIControl imp
public static class EditAction extends AnAction {
public EditAction() {
super(ApplicationBundle.message("action.edit"), null, IconUtil.getEditIcon());
super(XmlDomBundle.message("action.edit"), null, IconUtil.getEditIcon());
setShortcutSet(CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.EDIT));
}
@@ -434,7 +434,7 @@ public class DomCollectionControl<T extends DomElement> extends DomUIControl imp
public static class RemoveAction extends AnAction {
public RemoveAction() {
super(ApplicationBundle.message("action.remove"), null, IconUtil.getRemoveIcon());
super(XmlDomBundle.message("action.remove"), null, IconUtil.getRemoveIcon());
setShortcutSet(CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.REMOVE));
}

View File

@@ -3,17 +3,13 @@ package com.intellij.util.xml.ui.actions;
import com.intellij.ide.TypePresentationService;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.application.ApplicationBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.ui.popup.ListPopup;
import com.intellij.ui.CommonActionsPanel;
import com.intellij.util.IconUtil;
import com.intellij.util.ReflectionUtil;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.DomManager;
import com.intellij.util.xml.ElementPresentationManager;
import com.intellij.util.xml.TypeChooser;
import com.intellij.util.xml.*;
import com.intellij.util.xml.reflect.DomCollectionChildDescription;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -26,7 +22,7 @@ import java.util.List;
public abstract class AddDomElementAction extends AnAction {
public AddDomElementAction() {
super(ApplicationBundle.lazyMessage("action.add"), IconUtil.getAddIcon());
super(XmlDomBundle.lazyMessage("action.add"), IconUtil.getAddIcon());
}
@Override
@@ -115,7 +111,7 @@ public abstract class AddDomElementAction extends AnAction {
icon = ElementPresentationManager.getIconForClass(rawType);
// }
}
actions.add(createAddingAction(e, ApplicationBundle.message("action.add") + " " + name, icon, type, description));
actions.add(createAddingAction(e, XmlDomBundle.message("action.add") + " " + name, icon, type, description));
}
}
if (actions.size() > 1 && showAsPopup()) {
@@ -157,7 +153,7 @@ public abstract class AddDomElementAction extends AnAction {
protected final ActionGroup myGroup;
protected ShowPopupAction(ActionGroup group) {
super(ApplicationBundle.message("action.add"), null, IconUtil.getAddIcon());
super(XmlDomBundle.message("action.add"), null, IconUtil.getAddIcon());
myGroup = group;
setShortcutSet(CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.ADD));
}

View File

@@ -3,7 +3,6 @@ package com.intellij.util.xml.ui.actions;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.application.ApplicationBundle;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.psi.SmartPointerManager;
import com.intellij.psi.SmartPsiElementPointer;
@@ -21,7 +20,7 @@ import java.lang.reflect.Type;
public abstract class DefaultAddAction<T extends DomElement> extends AnAction {
public DefaultAddAction() {
super(ApplicationBundle.lazyMessage("action.add"));
super(XmlDomBundle.lazyMessage("action.add"));
}
public DefaultAddAction(@Nls(capitalization = Nls.Capitalization.Title) String text) {