Use "for new projects" in the UI instead of "default" (IDEA-190218)
authorDmitry Jemerov <yole@jetbrains.com>
Fri, 13 Apr 2018 10:07:38 +0000 (12:07 +0200)
committerDmitry Jemerov <yole@jetbrains.com>
Fri, 13 Apr 2018 10:09:49 +0000 (12:09 +0200)
java/idea-ui/src/com/intellij/ide/actions/TemplateProjectStructureAction.java
platform/platform-api/src/com/intellij/openapi/ui/Banner.java
platform/platform-impl/src/com/intellij/ide/actions/TemplateProjectPropertiesAction.java
platform/platform-impl/src/com/intellij/openapi/options/ex/SingleConfigurableEditor.java
platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java
platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsDialog.java
platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java
platform/platform-resources-en/src/messages/ActionsBundle.properties
platform/platform-resources-en/src/messages/OptionsBundle.properties

index 47a1e6409276dd528d4eed1e79e93aab58f92082..bd97c98765ddea5df4e683f2a784b9fa0ae0320d 100644 (file)
  */
 package com.intellij.ide.actions;
 
+import com.intellij.idea.ActionsBundle;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.project.ProjectManager;
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.ui.IdeUICustomization;
 
 public class TemplateProjectStructureAction extends ShowStructureSettingsAction {
+  public TemplateProjectStructureAction() {
+    String projectConceptName = StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName());
+    getTemplatePresentation().setText(ActionsBundle.message("action.TemplateProjectStructure.text.template", projectConceptName));
+    getTemplatePresentation().setDescription(ActionsBundle.message("action.TemplateProjectStructure.description.template", projectConceptName));
+  }
 
   @Override
   public void actionPerformed(AnActionEvent e) {
index 6015b29f1063edf5000ca8fa23e6c181ee2238f8..bd5251b3b67253beb241920f7b48de7a85b7ccfa 100644 (file)
@@ -18,11 +18,11 @@ package com.intellij.openapi.ui;
 import com.intellij.icons.AllIcons;
 import com.intellij.openapi.options.OptionsBundle;
 import com.intellij.openapi.project.Project;
+import com.intellij.ui.IdeUICustomization;
 import com.intellij.ui.RelativeFont;
 import com.intellij.ui.components.labels.LinkLabel;
 import com.intellij.ui.components.labels.LinkListener;
 import com.intellij.ui.components.panels.NonOpaquePanel;
-import java.util.HashMap;
 import com.intellij.util.ui.JBUI;
 import com.intellij.util.ui.PlatformColors;
 import org.jetbrains.annotations.NotNull;
@@ -33,6 +33,7 @@ import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 
@@ -122,9 +123,9 @@ class Banner extends NonOpaquePanel implements PropertyChangeListener{
   public void forProject(Project project) {
     if (project != null) {
       myProjectIcon.setVisible(true);
-      myProjectIcon.setText(OptionsBundle.message(project.isDefault()
-                                                  ? "configurable.default.project.tooltip"
-                                                  : "configurable.current.project.tooltip"));
+      myProjectIcon.setText(project.isDefault()
+                            ? OptionsBundle.message("configurable.default.project.tooltip", IdeUICustomization.getInstance().getProjectConceptName())
+                            : OptionsBundle.message("configurable.current.project.tooltip"));
     } else {
       myProjectIcon.setVisible(false);
     }
index 6c2b7d8e62f68faebc69275fb77518d39f04087b..44a84ef1308be10e620c277074acbe463660813e 100644 (file)
  */
 package com.intellij.ide.actions;
 
+import com.intellij.CommonBundle;
+import com.intellij.idea.ActionsBundle;
 import com.intellij.openapi.actionSystem.AnAction;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.options.ShowSettingsUtil;
 import com.intellij.openapi.project.DumbAware;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.project.ex.ProjectManagerEx;
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.ui.IdeUICustomization;
 
 public class TemplateProjectPropertiesAction extends AnAction implements DumbAware {
+  public TemplateProjectPropertiesAction() {
+    String projectConceptName = StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName());
+    getTemplatePresentation().setText(ActionsBundle.message("action.TemplateProjectProperties.text.template", CommonBundle.settingsTitle(), projectConceptName));
+    getTemplatePresentation().setDescription(ActionsBundle.message("action.TemplateProjectProperties.description.template", projectConceptName));
+  }
+
   public void actionPerformed(AnActionEvent e) {
     Project defaultProject = ProjectManagerEx.getInstanceEx().getDefaultProject();
     ShowSettingsUtil.getInstance().showSettingsDialog(defaultProject, ShowSettingsUtilImpl.getConfigurableGroups(defaultProject, false));
index 9b4d528b664fdcf08cdee6e1141c43d897570bc4..bc9036104ae0f91b9922e2e56e19caa9f3219256 100644 (file)
@@ -24,11 +24,14 @@ import com.intellij.openapi.help.HelpManager;
 import com.intellij.openapi.options.BaseConfigurable;
 import com.intellij.openapi.options.Configurable;
 import com.intellij.openapi.options.ConfigurationException;
+import com.intellij.openapi.options.OptionsBundle;
 import com.intellij.openapi.project.IndexNotReadyException;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.DialogWrapper;
 import com.intellij.openapi.ui.Messages;
+import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.openapi.wm.ex.IdeFocusTraversalPolicy;
+import com.intellij.ui.IdeUICustomization;
 import com.intellij.util.Alarm;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
@@ -58,7 +61,11 @@ public class SingleConfigurableEditor extends DialogWrapper {
     myDimensionKey = dimensionKey;
     myShowApplyButton = showApplyButton;
     String title = createTitleString(configurable);
-    if (project != null && project.isDefault()) title = "Default " + title;
+    if (project != null && project.isDefault()) {
+      title = OptionsBundle.message("title.for.new.projects",
+                                    title, StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName()));
+    }
+
     setTitle(title);
 
     myProject = project;
index b74692227853fbea1fc3a499e1ba50d2c60e5faf..38a3035d96100e6eb680f0de23190a14e7086cd6 100644 (file)
@@ -4,6 +4,7 @@ package com.intellij.openapi.options.newEditor;
 import com.intellij.icons.AllIcons;
 import com.intellij.openapi.options.OptionsBundle;
 import com.intellij.openapi.project.Project;
+import com.intellij.ui.IdeUICustomization;
 import com.intellij.ui.JBColor;
 import com.intellij.ui.RelativeFont;
 import com.intellij.ui.components.breadcrumbs.Breadcrumbs;
@@ -53,9 +54,9 @@ final class Banner extends SimpleBanner {
     }
     else {
       myProjectIcon.setVisible(true);
-      myProjectIcon.setText(OptionsBundle.message(project.isDefault()
-                                                  ? "configurable.default.project.tooltip"
-                                                  : "configurable.current.project.tooltip"));
+      myProjectIcon.setText(project.isDefault()
+                            ? OptionsBundle.message("configurable.default.project.tooltip", IdeUICustomization.getInstance().getProjectConceptName())
+                            : OptionsBundle.message("configurable.current.project.tooltip"));
     }
   }
 
index 279f727f4af7f709afe1e271a069de493e7b3e38..d89b3fe8f6a80d14c8493d3a08693824281a1dff 100644 (file)
@@ -11,8 +11,11 @@ import com.intellij.openapi.application.TransactionGuard;
 import com.intellij.openapi.help.HelpManager;
 import com.intellij.openapi.options.Configurable;
 import com.intellij.openapi.options.ConfigurableGroup;
+import com.intellij.openapi.options.OptionsBundle;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.DialogWrapper;
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.ui.IdeUICustomization;
 import com.intellij.ui.SearchTextField.FindAction;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
@@ -73,7 +76,10 @@ public class SettingsDialog extends DialogWrapper implements DataProvider {
   private void init(Configurable configurable, @Nullable Project project) {
     String name = configurable == null ? null : configurable.getDisplayName();
     String title = CommonBundle.settingsTitle();
-    if (project != null && project.isDefault()) title = "Default " + title;
+    if (project != null && project.isDefault()) {
+      title = OptionsBundle.message("title.for.new.projects",
+                                    title, StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName()));
+    }
     setTitle(name == null ? title : name.replace('\n', ' '));
     ShortcutSet set = getFindActionShortcutSet();
     if (set != null) new FindAction().registerCustomShortcutSet(set, getRootPane(), myDisposable);
index 4370b441ecb916cec5171de1e02c8f042211382c..e17998f48b658cace547053cac1bd96ab7462b6a 100644 (file)
@@ -652,9 +652,9 @@ public class SettingsTreeView extends JComponent implements Accessible, Disposab
       projectIcon.setIcon(selected
         ? AllIcons.General.ProjectConfigurableSelected
         : AllIcons.General.ProjectConfigurable);
-      projectIcon.setToolTipText(OptionsBundle.message(project.isDefault()
-        ? "configurable.default.project.tooltip"
-        "configurable.current.project.tooltip"));
+      projectIcon.setToolTipText(project.isDefault()
+                                 ? OptionsBundle.message("configurable.default.project.tooltip", IdeUICustomization.getInstance().getProjectConceptName())
+                                 : OptionsBundle.message("configurable.current.project.tooltip"));
       projectIcon.setVisible(true);
     }
     else {
index 07127d732c4de6e985e293f2978a81a3106d6c7d..1dab0c8d3b9b975ec7d7be361ec466d1f0526017 100644 (file)
@@ -303,10 +303,10 @@ action.CloseProject.text=Close Pro_ject
 action.CloseProject.description=Close current project
 action.ShowProjectStructureSettings.text=Project Structure...
 action.ShowProjectStructureSettings.description=Configure project structure
-action.TemplateProjectProperties.text=Def_ault Settings...
-action.TemplateProjectProperties.description=Configure default settings for all new projects
-action.TemplateProjectStructure.text=Default Project Structure...
-action.TemplateProjectStructure.description=Configure default structure for all new projects
+action.TemplateProjectProperties.text.template={0} for New {1}s...
+action.TemplateProjectProperties.description.template=Configure default settings for all new {0}s
+action.TemplateProjectStructure.text.template=Structure for New {0}s...
+action.TemplateProjectStructure.description.template=Configure default structure for all new {0}s
 action.SaveAll.text=_Save All
 action.SaveAll.description=Save all files and settings
 action.ExportSettings.text=_Export Settings...
index 5d3116904cb2ef6c93bb77a988e8fa437b82d71b..4a4159a9ed19abe24d943abc10864179f37cc66e 100644 (file)
@@ -280,7 +280,7 @@ configurable.group.other.settings.display.name=Other Settings
 configurable.group.other.settings.description=<html><body>\
   Settings that are related to non-bundled custom plugins and are not assigned to any other category.
 
-configurable.default.project.tooltip=For default project
+configurable.default.project.tooltip=For new {0}s
 configurable.current.project.tooltip=For current project
 
 control.panel.classic.view.button=Classic &View
@@ -378,4 +378,6 @@ exportable.ImportFilteringUsageViewSetting.presentable.name=Usage View: Imports
 exportable.XPathView.XPathViewPlugin.presentable.name=XPath Viewer
 exportable.ExternalResourceManagerImpl.presentable.name=Java EE External Resources
 exportable.JavaCodeFoldingSettings.presentable.name=Code Folding Settings
-exportable.PostfixTemplatesSettings.presentable.name=Postfix Completion
\ No newline at end of file
+exportable.PostfixTemplatesSettings.presentable.name=Postfix Completion
+        
+title.for.new.projects={0} for New {1}s
\ No newline at end of file