WEB-20368 JSON Schema: rename "Add" chooser title to the "Select JSON Schema File"

This commit is contained in:
irengrig
2016-02-17 13:39:17 +01:00
parent 1af342b137
commit 73bb2fd885
3 changed files with 8 additions and 2 deletions
@@ -37,3 +37,6 @@ quickfix.add.double.quotes.desc=Wrap with double quotes
surround.with.object.literal.desc=object literal
json.template.context.type=JSON
#json schema
json.schema.add.schema.chooser.title=Select JSON Schema File
@@ -1,5 +1,6 @@
package com.jetbrains.jsonSchema;
import com.intellij.json.JsonBundle;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
@@ -131,7 +132,8 @@ public class JsonSchemaMappingsConfigurable extends MasterDetailsComponent imple
private void addProjectSchema() {
final VirtualFile file =
FileChooser.chooseFile(FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor(), myProject, null);
FileChooser.chooseFile(FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor().withTitle(
JsonBundle.message("json.schema.add.schema.chooser.title")), myProject, null);
if (file != null) {
final String relativePath = VfsUtil.getRelativePath(file, myProject.getBaseDir());
if (relativePath == null) {
@@ -1,5 +1,6 @@
package com.jetbrains.jsonSchema;
import com.intellij.json.JsonBundle;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonShortcuts;
import com.intellij.openapi.application.ModalityState;
@@ -81,7 +82,7 @@ public class JsonSchemaMappingsView {
final JPanel wrapper = new JPanel(new BorderLayout());
final JPanel wrapper2 = new JPanel(new BorderLayout());
mySchemaField = new TextFieldWithBrowseButton();
SwingHelper.installFileCompletionAndBrowseDialog(myProject, mySchemaField, "Select JSON Schema File",
SwingHelper.installFileCompletionAndBrowseDialog(myProject, mySchemaField, JsonBundle.message("json.schema.add.schema.chooser.title"),
FileChooserDescriptorFactory.createSingleFileDescriptor());
attachNavigateToSchema();
final JBLabel label = new JBLabel("JSON schema file:");