diff --git a/java/idea-ui/resources/messages/JavaUiBundle.properties b/java/idea-ui/resources/messages/JavaUiBundle.properties index 85006cd45608..50a6c0c78a23 100644 --- a/java/idea-ui/resources/messages/JavaUiBundle.properties +++ b/java/idea-ui/resources/messages/JavaUiBundle.properties @@ -1,3 +1,5 @@ +action.TemplateProjectStructure.text=Structure for New Projects... +action.TemplateProjectStructure.description=Configure default structure for all new projects build.script.found.notification={0} build {1,choice,1#script|1"); - cbText.append(IdeBundle.message("checkbox.include.non.project.items", IdeUICustomization.getInstance().getProjectConceptName())); + cbText.append(IdeUICustomization.getInstance().projectMessage("checkbox.include.non.project.items")); cbText.append(" "); if (!UIUtil.isUnderWin10LookAndFeel()) cbText.append(""); cbText.append("").append(getShortcut()).append(""); diff --git a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/ClassSearchEverywhereContributor.java b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/ClassSearchEverywhereContributor.java index cee835fc8e38..e043e6df212a 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/ClassSearchEverywhereContributor.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/ClassSearchEverywhereContributor.java @@ -2,7 +2,6 @@ package com.intellij.ide.actions.searcheverywhere; import com.intellij.codeInsight.navigation.NavigationUtil; -import com.intellij.ide.IdeBundle; import com.intellij.ide.actions.GotoClassAction; import com.intellij.ide.actions.GotoClassPresentationUpdater; import com.intellij.ide.util.gotoByName.FilteringGotoByModel; @@ -59,7 +58,7 @@ public class ClassSearchEverywhereContributor extends AbstractGotoSEContributor @NotNull public String includeNonProjectItemsText() { - return IdeBundle.message("checkbox.include.non.project.classes", IdeUICustomization.getInstance().getProjectConceptName()); + return IdeUICustomization.getInstance().projectMessage("checkbox.include.non.project.items"); } @Override diff --git a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/FileSearchEverywhereContributor.java b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/FileSearchEverywhereContributor.java index eb9fd6ab0eff..58bffc1a78ac 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/FileSearchEverywhereContributor.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/FileSearchEverywhereContributor.java @@ -48,7 +48,7 @@ public class FileSearchEverywhereContributor extends AbstractGotoSEContributor { } public String includeNonProjectItemsText() { - return IdeBundle.message("checkbox.include.non.project.files", IdeUICustomization.getInstance().getProjectConceptName()); + return IdeUICustomization.getInstance().projectMessage("checkbox.include.non.project.files"); } @Override diff --git a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereUI.java b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereUI.java index 2bc07545cb78..395a97d90bc8 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereUI.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereUI.java @@ -461,8 +461,8 @@ public class SearchEverywhereUI extends BigPopupUI implements DataProvider, Quic rebuildList(); }; if (contributor == null) { - actions = Arrays.asList(new CheckBoxSearchEverywhereToggleAction( - IdeBundle.message("checkbox.include.non.project.items", IdeUICustomization.getInstance().getProjectConceptName())) { + String actionText = IdeUICustomization.getInstance().projectMessage("checkbox.include.non.project.items"); + actions = Arrays.asList(new CheckBoxSearchEverywhereToggleAction(actionText) { final SearchEverywhereManagerImpl seManager = (SearchEverywhereManagerImpl)SearchEverywhereManager.getInstance(myProject); @Override public boolean isEverywhere() { diff --git a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SymbolSearchEverywhereContributor.java b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SymbolSearchEverywhereContributor.java index cff57e9cc78e..603be197ff54 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SymbolSearchEverywhereContributor.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SymbolSearchEverywhereContributor.java @@ -34,7 +34,7 @@ public class SymbolSearchEverywhereContributor extends AbstractGotoSEContributor @NotNull public String includeNonProjectItemsText() { - return IdeBundle.message("checkbox.include.non.project.symbols", IdeUICustomization.getInstance().getProjectConceptName()); + return IdeUICustomization.getInstance().projectMessage("checkbox.include.non.project.symbols"); } @Override diff --git a/platform/lang-impl/src/com/intellij/ide/impl/ProjectViewSelectInGroupTarget.java b/platform/lang-impl/src/com/intellij/ide/impl/ProjectViewSelectInGroupTarget.java index a3738e45dfac..447acd7564b5 100644 --- a/platform/lang-impl/src/com/intellij/ide/impl/ProjectViewSelectInGroupTarget.java +++ b/platform/lang-impl/src/com/intellij/ide/impl/ProjectViewSelectInGroupTarget.java @@ -65,6 +65,6 @@ public class ProjectViewSelectInGroupTarget implements CompositeSelectInTarget, @Override public String toString() { - return IdeUICustomization.getInstance().getProjectViewSelectInTitle(); + return IdeUICustomization.getInstance().projectMessage("select.in.item.project.view"); } } diff --git a/platform/lang-impl/src/com/intellij/ide/todo/TodoView.java b/platform/lang-impl/src/com/intellij/ide/todo/TodoView.java index 5c273cfe9a5e..adea1ae46780 100644 --- a/platform/lang-impl/src/com/intellij/ide/todo/TodoView.java +++ b/platform/lang-impl/src/com/intellij/ide/todo/TodoView.java @@ -143,7 +143,7 @@ public class TodoView implements PersistentStateComponent, Dispo public void initToolWindow(@NotNull ToolWindow toolWindow) { // Create panels ContentFactory contentFactory = ContentFactory.SERVICE.getInstance(); - Content allTodosContent = contentFactory.createContent(null, IdeUICustomization.getInstance().getProjectDisplayName(), false); + Content allTodosContent = contentFactory.createContent(null, IdeUICustomization.getInstance().projectMessage("tab.title.project"), false); toolWindow.setHelpId("find.todoList"); myAllTodos = new TodoPanel(myProject, state.all, false, allTodosContent) { @Override diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoClassModel2.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoClassModel2.java index c704578a9adc..1f84c63587de 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoClassModel2.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoClassModel2.java @@ -60,13 +60,13 @@ public class GotoClassModel2 extends FilteringGotoByModel { @Override public String getCheckBoxName() { - return IdeBundle.message("checkbox.include.non.project.classes", IdeUICustomization.getInstance().getProjectConceptName()); + return IdeUICustomization.getInstance().projectMessage("checkbox.include.non.project.items"); } @NotNull @Override public String getNotInMessage() { - return IdeBundle.message("label.no.matches.found.in.project", IdeUICustomization.getInstance().getProjectConceptName()); + return IdeUICustomization.getInstance().projectMessage("label.no.matches.found.in.project"); } @NotNull diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoFileModel.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoFileModel.java index ae8b36d2dae4..dc1cc6690f4d 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoFileModel.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoFileModel.java @@ -91,10 +91,9 @@ public class GotoFileModel extends FilteringGotoByModel implements Dum if (NonProjectScopeDisablerEP.isSearchInNonProjectDisabled()) { return null; } - return IdeBundle.message("checkbox.include.non.project.files", IdeUICustomization.getInstance().getProjectConceptName()); + return IdeUICustomization.getInstance().projectMessage("checkbox.include.non.project.files"); } - @NotNull @Override public String getNotInMessage() { diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoSymbolModel2.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoSymbolModel2.java index 61a2ab0296dc..fb1f6fbfbe01 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoSymbolModel2.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoSymbolModel2.java @@ -72,13 +72,13 @@ public class GotoSymbolModel2 extends FilteringGotoByModel { @Override public String getCheckBoxName() { - return IdeBundle.message("checkbox.include.non.project.symbols", IdeUICustomization.getInstance().getProjectConceptName()); + return IdeUICustomization.getInstance().projectMessage("checkbox.include.non.project.symbols"); } @NotNull @Override public String getNotInMessage() { - return IdeBundle.message("label.no.matches.found.in.project", IdeUICustomization.getInstance().getProjectConceptName()); + return IdeUICustomization.getInstance().projectMessage("label.no.matches.found.in.project"); } @NotNull diff --git a/platform/lang-impl/src/com/intellij/psi/search/scope/NonProjectFilesScope.java b/platform/lang-impl/src/com/intellij/psi/search/scope/NonProjectFilesScope.java index 520af0eee316..3d3599c8354f 100644 --- a/platform/lang-impl/src/com/intellij/psi/search/scope/NonProjectFilesScope.java +++ b/platform/lang-impl/src/com/intellij/psi/search/scope/NonProjectFilesScope.java @@ -15,7 +15,7 @@ import org.jetbrains.annotations.NotNull; * @author Konstantin Bulenkov */ public final class NonProjectFilesScope extends NamedScope { - public static final String NAME = IdeUICustomization.getInstance().getNonProjectFilesScopeTitle(); + public static final String NAME = IdeUICustomization.getInstance().projectMessage("scope.name.non.project.files"); public static final NonProjectFilesScope INSTANCE = new NonProjectFilesScope(); private NonProjectFilesScope() { diff --git a/platform/platform-api/resources/messages/IdeBundle.properties b/platform/platform-api/resources/messages/IdeBundle.properties index a7916c7f3081..ed8215928e4f 100644 --- a/platform/platform-api/resources/messages/IdeBundle.properties +++ b/platform/platform-api/resources/messages/IdeBundle.properties @@ -58,7 +58,6 @@ search.in.the.background=Search in the background checkbox.save.files.automatically=Save files automatically if application is idle for checkbox.save.files.on.frame.deactivation=Save files on frame deactivation checkbox.synchronize.files.on.frame.activation=Synchronize files on frame or editor tab activation -checkbox.reopen.last.project.on.startup=Reopen last {0} on startup title.accessibility=Accessibility checkbox.support.screen.readers=Support screen readers (requires restart) checkbox.acessibility.contrast.scrollbars=Use contrast scrollbars @@ -274,14 +273,8 @@ title.open.file.or.project=Open File or Project button.cancel=&Cancel error.cannot.load.project=Cannot load project: {0} title.cannot.load.project=Cannot Load Project -action.close.project=Close Pro_ject action.close.projects.in.current.window=Close Pro_jects in Current Window -border.title.project.opening={0} Opening -radio.button.open.project.in.the.same.window=Open {0} in the same window -radio.button.confirm.window.to.open.project.in=Confirm window to open {0} in -radio.button.open.project.in.the.new.window=Open {0} in new window - title.cannot.convert.project=Cannot Convert Project dialog.title.convert.project=Convert Project conversion.dialog.text.1=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}. @@ -699,7 +692,6 @@ title.customizations=Menus and Toolbars label.choosebyname.no.matches.found=No matches found label.choosebyname.searching=Searching... prompt.gotoclass.enter.class.name=Enter {0} name: -checkbox.include.non.project.classes=Include &non-&&{0} items label.no.matches.found.in.project=No matches found in {0} label.no.matches.found=no matches found prompt.gotofile.enter.file.name=Enter file name: @@ -710,8 +702,6 @@ label.no.enabled.actions.found=No enabled actions found label.no.files.found=No files found label.no.actions.found=No actions found prompt.gotosymbol.enter.symbol.name=Enter symbol name: -checkbox.include.non.project.symbols=Include &non-&&{0} symbols -checkbox.include.non.project.items=Include &non-&&{0} items error.failed.to.create.directory=Failed to create directory \"{0}\" label.select.compiler.output.path=Select c&ompiler output path: title.select.compiler.output.path=Select compiler output path diff --git a/platform/platform-api/resources/messages/OptionsBundle.properties b/platform/platform-api/resources/messages/OptionsBundle.properties index 761305fa649a..30113ddc1ba7 100644 --- a/platform/platform-api/resources/messages/OptionsBundle.properties +++ b/platform/platform-api/resources/messages/OptionsBundle.properties @@ -253,7 +253,6 @@ stylesheet.code.style.group.settings.description=Configure the code style used i # suppress inspection "UnusedProperty" - for generating list of inner configurables, see ConfigurableEditor#createDefaultContent sql.code.style.group.settings.description=Configure the code style used in SQL dialects. -configurable.default.project.tooltip=For new {0}s configurable.current.project.tooltip=For current {0} control.panel.classic.view.button=Classic &View @@ -355,8 +354,6 @@ exportable.JavaCodeFoldingSettings.presentable.name=Code Folding Settings exportable.PostfixTemplatesSettings.presentable.name=Postfix Completion exportable.UpdatesConfigurable.presentable.name=Updates -title.for.new.projects={0} for New {1}s - # # Descriptions of common code style properties. # Properties have no direct links in code, property names are generated programmatically diff --git a/platform/platform-api/resources/messages/ProjectBundle.properties b/platform/platform-api/resources/messages/ProjectBundle.properties index 3975da8a024b..d2d9586b31cb 100644 --- a/platform/platform-api/resources/messages/ProjectBundle.properties +++ b/platform/platform-api/resources/messages/ProjectBundle.properties @@ -12,13 +12,8 @@ project.load.undefined.path.variables.message=There are undefined path variables project.load.undefined.path.variables.all.needed=All path variables should be defined project.load.undefined.path.variables.title=Path Variables Not Defined project.load.default.error=Error Loading Default Project -project.load.progress=Loading Project -project.loading.name=Loading {0} Project -project.unsaved=Unsaved Project -project.cannot.save=Could not save project project.loading.components=Loading components... project.preparing.workspace=Preparing workspace... -project.checking.configuration=Checking project configuration... project.load.waiting.watcher=Scanning project directories... project.reload.write.failed=Error writing to file ''{0}''. Project may reload incorrectly. project.reload.write.failed.title=Write Error diff --git a/platform/platform-api/resources/messages/ProjectConceptBundle.properties b/platform/platform-api/resources/messages/ProjectConceptBundle.properties new file mode 100644 index 000000000000..9bfadc49d401 --- /dev/null +++ b/platform/platform-api/resources/messages/ProjectConceptBundle.properties @@ -0,0 +1,32 @@ +# This message bundle contains strings which somehow mention 'project' concept. Other IDEs may use a different term for that (e.g. Rider +# uses 'solution'), so they change these messages accordingly. +tab.title.project=Project +action.close.project.text=Close Pro_ject +select.in.item.project.view=Project View +scope.name.non.project.files=Non-Project Files +toolwindow.title.project.view=Project + +progress.text.project.checking.configuration=Checking project configuration... +progress.title.project.loading.name=Loading {0} Project +progress.title.loading.project=Loading Project +dialog.title.unsaved.project=Unsaved Project +notification.title.cannot.save.project=Could not save project + +configurable.default.project.tooltip=For new projects +configurable.current.project.tooltip=For current project +title.for.new.projects={0} for New Projects +action.TemplateProjectProperties.text.template={0} for New Projects... +action.TemplateProjectProperties.description.template=Configure default settings for all new projects + +#these 3 strings are used only in the old implementation of Go To Class/File/Symbol popups which is now available via Registry key only +checkbox.include.non.project.items=Include &non-project items +checkbox.include.non.project.files=Include &non-project files +checkbox.include.non.project.symbols=Include &non-project symbols + +label.no.matches.found.in.project=No matches found in project + +checkbox.reopen.last.project.on.startup=Reopen last project on startup +border.title.project.opening=Project Opening +radio.button.open.project.in.the.same.window=Open project in the same window +radio.button.confirm.window.to.open.project.in=Confirm window to open project in +radio.button.open.project.in.the.new.window=Open project in new window diff --git a/platform/platform-api/src/com/intellij/openapi/ui/Banner.java b/platform/platform-api/src/com/intellij/openapi/ui/Banner.java index 597237162b5e..cea1f49644cc 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/Banner.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/Banner.java @@ -2,7 +2,6 @@ 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; @@ -109,10 +108,9 @@ class Banner extends NonOpaquePanel implements PropertyChangeListener{ public void forProject(Project project) { if (project != null) { myProjectIcon.setVisible(true); - String projectConceptName = IdeUICustomization.getInstance().getProjectConceptName(); myProjectIcon.setText(project.isDefault() - ? OptionsBundle.message("configurable.default.project.tooltip", projectConceptName) - : OptionsBundle.message("configurable.current.project.tooltip", projectConceptName)); + ? IdeUICustomization.getInstance().projectMessage("configurable.default.project.tooltip") + : IdeUICustomization.getInstance().projectMessage("configurable.current.project.tooltip")); } else { myProjectIcon.setVisible(false); } diff --git a/platform/platform-api/src/com/intellij/ui/IdeUICustomization.java b/platform/platform-api/src/com/intellij/ui/IdeUICustomization.java index db537c5c2e99..4c969f0b53a0 100644 --- a/platform/platform-api/src/com/intellij/ui/IdeUICustomization.java +++ b/platform/platform-api/src/com/intellij/ui/IdeUICustomization.java @@ -3,8 +3,6 @@ package com.intellij.ui; import com.intellij.ide.IdeBundle; import com.intellij.openapi.components.ServiceManager; -import com.intellij.openapi.project.ProjectBundle; -import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -19,33 +17,39 @@ public class IdeUICustomization { } /** - * Returns the name to be displayed in the UI for the "project" concept (Rider changes this to "solution"). + * @deprecated it's hard to properly localize 'project' term in the middle of a sentence; if you need to use a 'project' term, + * put the whole message to ProjectConceptBundle.properties and refer to it via {@link #projectMessage} instead */ - @Nls(capitalization = Nls.Capitalization.Title) + @Deprecated @NotNull public String getProjectConceptName() { return "project"; } + /** + * Returns a message which mentions 'project' concept. + */ @NotNull - public String projectMessage(@NotNull @PropertyKey(resourceBundle = ProjectBundle.BUNDLE) String key, Object @NotNull ... params) { - return ProjectBundle.message(key, params); + public String projectMessage(@NotNull @PropertyKey(resourceBundle = ProjectConceptBundle.BUNDLE) String key, Object @NotNull ... params) { + return ProjectConceptBundle.message(key, params); } /** - * Returns the name to be displayed in the UI for the "Project" concept (Rider changes this to "Solution"). + * @deprecated use {@code projectMessage("tab.title.project")} instead */ + @Deprecated @Nls(capitalization = Nls.Capitalization.Title) public String getProjectDisplayName() { - return StringUtil.capitalize(getProjectConceptName()); + return projectMessage("tab.title.project"); } /** - * Returns the name of the "Close Project" action (with mnemonic if needed). + * @deprecated use {@code projectMessage("action.close.project.text")} instead */ + @Deprecated @Nls public String getCloseProjectActionText() { - return IdeBundle.message("action.close.project"); + return projectMessage("action.close.project.text"); } /** @@ -53,20 +57,23 @@ public class IdeUICustomization { */ @Nls public String getProjectViewTitle() { - return StringUtil.capitalize(getProjectConceptName()); + return projectMessage("toolwindow.title.project.view"); } /** - * Returns the title of the Project view Select In target. + * @deprecated use {@code projectMessage("select.in.item.project.view")} instead */ + @Deprecated public String getProjectViewSelectInTitle() { - return getProjectViewTitle() + " View"; + return projectMessage("select.in.item.project.view"); } + /** - * Returns the title of the "Non-Project Files" scope. + * @deprecated use {@code projectMessage("scope.name.non.project.files")} instead */ + @Deprecated public String getNonProjectFilesScopeTitle() { - return "Non-" + StringUtil.capitalize(getProjectConceptName()) + " Files"; + return projectMessage("scope.name.non.project.files"); } public String getSelectAutopopupByCharsText() { diff --git a/platform/platform-api/src/com/intellij/ui/ProjectConceptBundle.java b/platform/platform-api/src/com/intellij/ui/ProjectConceptBundle.java new file mode 100644 index 000000000000..2f39708348f3 --- /dev/null +++ b/platform/platform-api/src/com/intellij/ui/ProjectConceptBundle.java @@ -0,0 +1,25 @@ +// Copyright 2000-2020 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.ui; + +import com.intellij.DynamicBundle; +import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.PropertyKey; + +/** + * This message bundle contains strings which somehow mention 'project' concept. Other IDEs may use a different term for that (e.g. Rider + * use 'solution'). Don't use this class directly, use {@link IdeUICustomization#projectMessage} instead. + */ +class ProjectConceptBundle extends DynamicBundle { + @NonNls public static final String BUNDLE = "messages.ProjectConceptBundle"; + private static final ProjectConceptBundle INSTANCE = new ProjectConceptBundle(); + + private ProjectConceptBundle() { + super(BUNDLE); + } + + @NotNull + static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { + return INSTANCE.getMessage(key, params); + } +} diff --git a/platform/platform-impl/src/com/intellij/ide/GeneralSettingsConfigurable.kt b/platform/platform-impl/src/com/intellij/ide/GeneralSettingsConfigurable.kt index fdb2524849ff..aaf2b65c093a 100644 --- a/platform/platform-impl/src/com/intellij/ide/GeneralSettingsConfigurable.kt +++ b/platform/platform-impl/src/com/intellij/ide/GeneralSettingsConfigurable.kt @@ -17,7 +17,7 @@ import com.intellij.util.PlatformUtils // @formatter:off private val model = GeneralSettings.getInstance() -private val myChkReopenLastProject get() = CheckboxDescriptor(IdeBundle.message("checkbox.reopen.last.project.on.startup", IdeUICustomization.getInstance().projectConceptName), PropertyBinding(model::isReopenLastProject, model::setReopenLastProject)) +private val myChkReopenLastProject get() = CheckboxDescriptor(IdeUICustomization.getInstance().projectMessage("checkbox.reopen.last.project.on.startup"), PropertyBinding(model::isReopenLastProject, model::setReopenLastProject)) private val myConfirmExit get() = CheckboxDescriptor(IdeBundle.message("checkbox.confirm.application.exit"), PropertyBinding(model::isConfirmExit, model::setConfirmExit)) private val myShowWelcomeScreen get() = CheckboxDescriptor(IdeBundle.message("checkbox.show.welcome.screen"), PropertyBinding(model::isShowWelcomeScreen, model::setShowWelcomeScreen)) private val myChkSyncOnFrameActivation get() = CheckboxDescriptor(IdeBundle.message("checkbox.synchronize.files.on.frame.activation"), PropertyBinding(model::isSyncOnFrameActivation, model::setSyncOnFrameActivation)) @@ -51,8 +51,6 @@ class GeneralSettingsConfigurable: BoundCompositeSearchableConfigurable IdeUICustomization.getInstance().projectMessage("action.TemplateProjectProperties.text.template", CommonBundle.settingsTitle())); + getTemplatePresentation().setDescription(() -> IdeUICustomization.getInstance().projectMessage("action.TemplateProjectProperties.description.template")); } @Override diff --git a/platform/platform-impl/src/com/intellij/openapi/options/ex/SingleConfigurableEditor.java b/platform/platform-impl/src/com/intellij/openapi/options/ex/SingleConfigurableEditor.java index a3c873945e15..df53aecbc9da 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/ex/SingleConfigurableEditor.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/ex/SingleConfigurableEditor.java @@ -8,12 +8,10 @@ import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.diagnostic.Logger; 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; @@ -46,8 +44,7 @@ public class SingleConfigurableEditor extends DialogWrapper { myShowApplyButton = showApplyButton; String title = createTitleString(configurable); if (project != null && project.isDefault()) { - title = OptionsBundle.message("title.for.new.projects", - title, StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName())); + title = IdeUICustomization.getInstance().projectMessage("title.for.new.projects", title); } setTitle(title); diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java index 86cdaca386d0..0055ed390e6b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java @@ -2,7 +2,6 @@ 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.RelativeFont; @@ -54,10 +53,9 @@ final class Banner extends SimpleBanner { } else { myProjectIcon.setVisible(true); - String projectConceptName = IdeUICustomization.getInstance().getProjectConceptName(); myProjectIcon.setText(project.isDefault() - ? OptionsBundle.message("configurable.default.project.tooltip", projectConceptName) - : OptionsBundle.message("configurable.current.project.tooltip", projectConceptName)); + ? IdeUICustomization.getInstance().projectMessage("configurable.default.project.tooltip") + : IdeUICustomization.getInstance().projectMessage("configurable.current.project.tooltip")); } } diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsDialog.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsDialog.java index 5989f07e2620..92e2a2988f1c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsDialog.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsDialog.java @@ -11,11 +11,9 @@ import com.intellij.openapi.actionSystem.DataProvider; import com.intellij.openapi.actionSystem.ShortcutSet; 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.registry.Registry; -import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.IdeUICustomization; import com.intellij.ui.SearchTextField.FindAction; import com.intellij.util.ui.JBDimension; @@ -84,8 +82,7 @@ public class SettingsDialog extends DialogWrapper implements DataProvider { String name = configurable == null ? null : configurable.getDisplayName(); String title = CommonBundle.settingsTitle(); if (project != null && project.isDefault()) { - title = OptionsBundle.message("title.for.new.projects", - title, StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName())); + title = IdeUICustomization.getInstance().projectMessage("title.for.new.projects", title); } setTitle(name == null ? title : name.replace('\n', ' ')); diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java index e37ab6f649e3..c72ea27d5e57 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java @@ -732,10 +732,9 @@ public class SettingsTreeView extends JComponent implements Accessible, Disposab protected void setProjectIcon(JLabel projectIcon, Configurable configurable, @Nullable Project project, boolean selected) { if (project != null) { projectIcon.setIcon(AllIcons.General.ProjectConfigurable); - String projectConceptName = IdeUICustomization.getInstance().getProjectConceptName(); projectIcon.setToolTipText(project.isDefault() - ? OptionsBundle.message("configurable.default.project.tooltip", projectConceptName) - : OptionsBundle.message("configurable.current.project.tooltip", projectConceptName)); + ? IdeUICustomization.getInstance().projectMessage("configurable.default.project.tooltip") + : IdeUICustomization.getInstance().projectMessage("configurable.current.project.tooltip")); projectIcon.setVisible(true); } else { diff --git a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java index aed247271f03..79cddd8957bc 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java @@ -522,7 +522,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements Disposable { else { project = doCreateProject(null, file); ConversionResult finalConversionResult = conversionResult; - ProgressManager.getInstance().run(new Task.Modal(project, IdeUICustomization.getInstance().projectMessage("project.load.progress"), true) { + ProgressManager.getInstance().run(new Task.Modal(project, IdeUICustomization.getInstance().projectMessage("progress.title.loading.project"), true) { @Override public void run(@NotNull ProgressIndicator indicator) { try { @@ -904,7 +904,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements Disposable { count++; } } - return Messages.showYesNoDialog(project, message.toString(), IdeUICustomization.getInstance().projectMessage("project.unsaved"), Messages.getWarningIcon()) == Messages.YES; + return Messages.showYesNoDialog(project, message.toString(), IdeUICustomization.getInstance().projectMessage("dialog.title.unsaved.project"), Messages.getWarningIcon()) == Messages.YES; } public static class UnableToSaveProjectNotification extends Notification { @@ -917,7 +917,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements Disposable { } public UnableToSaveProjectNotification(@NotNull Project project, @NotNull List readOnlyFiles) { - super("Project Settings", IdeUICustomization.getInstance().projectMessage("project.cannot.save"), + super("Project Settings", IdeUICustomization.getInstance().projectMessage("notification.title.cannot.save.project"), "Unable to save project files. Please ensure project files are writable and you have permissions to modify them." + " Try to save project again.", NotificationType.ERROR, (notification, event) -> { diff --git a/platform/platform-impl/src/com/intellij/platform/PlatformProjectOpenProcessor.kt b/platform/platform-impl/src/com/intellij/platform/PlatformProjectOpenProcessor.kt index ccbdd5bedaa7..b7641a736376 100644 --- a/platform/platform-impl/src/com/intellij/platform/PlatformProjectOpenProcessor.kt +++ b/platform/platform-impl/src/com/intellij/platform/PlatformProjectOpenProcessor.kt @@ -304,7 +304,7 @@ private fun prepareProject(file: Path, options: OpenProjectTask, baseDir: Path): } else { val indicator = ProgressManager.getInstance().progressIndicator - indicator?.text = IdeUICustomization.getInstance().projectMessage("project.checking.configuration") + indicator?.text = IdeUICustomization.getInstance().projectMessage("progress.text.project.checking.configuration") project = convertAndLoadProject(baseDir, options) indicator?.text = "" } diff --git a/platform/platform-impl/src/com/intellij/platform/ProjectFrameAllocator.kt b/platform/platform-impl/src/com/intellij/platform/ProjectFrameAllocator.kt index d03f64023236..4fd33eb84079 100644 --- a/platform/platform-impl/src/com/intellij/platform/ProjectFrameAllocator.kt +++ b/platform/platform-impl/src/com/intellij/platform/ProjectFrameAllocator.kt @@ -64,7 +64,7 @@ internal class ProjectUiFrameAllocator(private var options: OpenProjectTask, pri override fun run(task: () -> Unit): Boolean { var completed = false - val progressTitle = IdeUICustomization.getInstance().projectMessage("project.loading.name", options.projectName ?: projectFile.fileName) + val progressTitle = IdeUICustomization.getInstance().projectMessage("progress.title.project.loading.name", options.projectName ?: projectFile.fileName) ApplicationManager.getApplication().invokeAndWait { val frame = createFrameIfNeeded() val progressTask = createModalTask(progressTitle) { diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index 4c56b288678f..9f2bf39cf192 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -336,10 +336,6 @@ 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.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...