From c2e29bc7dcdfd4d8e070507b6f69966c8efab89f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 6 Sep 2011 18:39:32 +0200 Subject: [PATCH] avoid hard-coding product name --- .../conversion/impl/ui/ConvertProjectDialog.java | 11 ++++++++--- .../src/messages/IdeBundle.properties | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/conversion/impl/ui/ConvertProjectDialog.java b/platform/lang-impl/src/com/intellij/conversion/impl/ui/ConvertProjectDialog.java index 1d276e337c42..3600f5bb65b5 100644 --- a/platform/lang-impl/src/com/intellij/conversion/impl/ui/ConvertProjectDialog.java +++ b/platform/lang-impl/src/com/intellij/conversion/impl/ui/ConvertProjectDialog.java @@ -22,6 +22,7 @@ import com.intellij.conversion.impl.ConversionContextImpl; import com.intellij.conversion.impl.ConversionRunner; import com.intellij.conversion.impl.ProjectConversionUtil; import com.intellij.ide.IdeBundle; +import com.intellij.openapi.application.ApplicationNamesInfo; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.ui.Messages; @@ -65,8 +66,10 @@ public class ConvertProjectDialog extends DialogWrapper { myBackupDir = ProjectConversionUtil.getBackupDir(context.getProjectBaseDir()); myTextPane.setSize(new Dimension(350, Integer.MAX_VALUE)); - final String message = - IdeBundle.message("label.text.project.has.older.format", context.getProjectFile().getName(), myBackupDir.getAbsolutePath()); + final String message = IdeBundle.message("label.text.project.has.older.format", + context.getProjectFile().getName(), + ApplicationNamesInfo.getInstance().getProductName(), + myBackupDir.getAbsolutePath()); Messages.configureMessagePaneUi(myTextPane, message, false); myTextPane.addHyperlinkListener(new HyperlinkListener() { @@ -145,7 +148,9 @@ public class ConvertProjectDialog extends DialogWrapper { private boolean checkReadOnlyFiles() throws IOException { List files = getReadOnlyFiles(); if (!files.isEmpty()) { - final String message = IdeBundle.message("message.text.unlock.read.only.files", getFilesString(files)); + final String message = IdeBundle.message("message.text.unlock.read.only.files", + ApplicationNamesInfo.getInstance().getProductName(), + getFilesString(files)); final String[] options = {CommonBundle.getContinueButtonText(), CommonBundle.getCancelButtonText()}; if (Messages.showOkCancelDialog(myMainPanel, message, IdeBundle.message("dialog.title.convert.project"), options[0], options[1], null) != 0) { return false; diff --git a/platform/platform-resources-en/src/messages/IdeBundle.properties b/platform/platform-resources-en/src/messages/IdeBundle.properties index dedc6bf5254b..8c2eb4217dc7 100644 --- a/platform/platform-resources-en/src/messages/IdeBundle.properties +++ b/platform/platform-resources-en/src/messages/IdeBundle.properties @@ -234,12 +234,12 @@ error.project.file.is.corrupted=Project file is corrupted title.cannot.convert.project=Cannot Convert Project dialog.title.convert.project=Convert Project -label.text.project.has.older.format=The project ''{0}'' has an older format and will be converted. You won''t be able to open the project by earlier versions of IDEA. Details
\ - Old versions of project files will be saved to: ''{1}'' -message.text.unlock.read.only.files=The following files are read only. IDEA will unlock them.
{0} +label.text.project.has.older.format=The project ''{0}'' has an older format and will be converted. You may not be able to open the project with earlier versions of {1}. Details
\ + Old versions of project files will be saved to: ''{2}'' +message.text.unlock.read.only.files=The following files are read only. {0} will unlock them.
{1} error.message.cannot.make.files.writable=Cannot make the following files writable:\n{0} error.cannot.convert.project=Cannot convert project: {0} -message.files.doesn.t.exists.0.so.the.corresponding.modules.won.t.be.converted.do.you.want.to.continue=The following files doesn''t exists:
\ +message.files.doesn.t.exists.0.so.the.corresponding.modules.won.t.be.converted.do.you.want.to.continue=The following files don''t exists:
\ {0}The corresponding modules won''t be converted. Do you want to continue? select.in.project.settings=Project Structure