mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[i18n] extract messages related to 'project' concept to a separate bundle
So implementors of IdeUICustomization::projectMessage may know which keys they need to support. Also usages of IdeUICustomization::getProjectConceptName are replaced by projectMessage calls to avoid problems with localizing messages where 'project' term is inserted in the middle of a sentence. GitOrigin-RevId: d1f7d5ad7f4075df126d6b6dece337ef4f43b636
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b0c1c32624
commit
eed9a7276c
@@ -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<scripts} found
|
||||
build.script.found.notification.import=Import
|
||||
build.script.found.notification.import.all=Import All
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
// Copyright 2000-2018 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.ide.actions;
|
||||
|
||||
import com.intellij.idea.ActionsBundle;
|
||||
import com.intellij.ide.JavaUiBundle;
|
||||
import com.intellij.openapi.actionSystem.ActionPlaces;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.project.ProjectManager;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.IdeUICustomization;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class TemplateProjectStructureAction extends ShowStructureSettingsAction {
|
||||
public TemplateProjectStructureAction() {
|
||||
String projectConceptName = StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName());
|
||||
getTemplatePresentation().setText(ActionsBundle.lazyMessage("action.TemplateProjectStructure.text.template", projectConceptName));
|
||||
getTemplatePresentation().setDescription(ActionsBundle.lazyMessage("action.TemplateProjectStructure.description.template", projectConceptName));
|
||||
getTemplatePresentation().setText(JavaUiBundle.lazyMessage("action.TemplateProjectStructure.text"));
|
||||
getTemplatePresentation().setDescription(JavaUiBundle.lazyMessage("action.TemplateProjectStructure.description"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -709,7 +709,7 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA
|
||||
UIManager.getColor("SearchEverywhere.shortcutForeground") : foregroundColor;
|
||||
|
||||
StringBuilder cbText = new StringBuilder("<html>");
|
||||
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("<b>");
|
||||
cbText.append("<font color=#").append(ColorUtil.toHex(shortcutColor)).append(">").append(getShortcut()).append("</font>");
|
||||
|
||||
+1
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -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() {
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public class TodoView implements PersistentStateComponent<TodoView.State>, 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
|
||||
|
||||
@@ -60,13 +60,13 @@ public class GotoClassModel2 extends FilteringGotoByModel<Language> {
|
||||
|
||||
@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
|
||||
|
||||
@@ -91,10 +91,9 @@ public class GotoFileModel extends FilteringGotoByModel<FileType> 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() {
|
||||
|
||||
@@ -72,13 +72,13 @@ public class GotoSymbolModel2 extends FilteringGotoByModel<Language> {
|
||||
|
||||
@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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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<Searchab
|
||||
private val model = GeneralSettings.getInstance()
|
||||
|
||||
override fun createPanel(): DialogPanel {
|
||||
val projectConceptName = IdeUICustomization.getInstance().projectConceptName
|
||||
|
||||
return panel {
|
||||
titledRow("Startup/Shutdown") {
|
||||
row {
|
||||
@@ -68,7 +66,7 @@ class GeneralSettingsConfigurable: BoundCompositeSearchableConfigurable<Searchab
|
||||
}
|
||||
}
|
||||
}
|
||||
titledRow(IdeBundle.message("border.title.project.opening", projectConceptName.capitalize())) {
|
||||
titledRow(IdeUICustomization.getInstance().projectMessage("border.title.project.opening")) {
|
||||
row(IdeBundle.message("settings.general.default.directory")) {
|
||||
textFieldWithBrowseButton(model::getDefaultProjectDirectory, model::setDefaultProjectDirectory,
|
||||
fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor()
|
||||
@@ -78,13 +76,13 @@ class GeneralSettingsConfigurable: BoundCompositeSearchableConfigurable<Searchab
|
||||
}
|
||||
buttonGroup(model::getConfirmOpenNewProject, model::setConfirmOpenNewProject) {
|
||||
row {
|
||||
radioButton(IdeBundle.message("radio.button.open.project.in.the.new.window", projectConceptName), GeneralSettings.OPEN_PROJECT_NEW_WINDOW)
|
||||
radioButton(IdeUICustomization.getInstance().projectMessage("radio.button.open.project.in.the.new.window"), GeneralSettings.OPEN_PROJECT_NEW_WINDOW)
|
||||
}
|
||||
row {
|
||||
radioButton(IdeBundle.message("radio.button.open.project.in.the.same.window", projectConceptName), GeneralSettings.OPEN_PROJECT_SAME_WINDOW)
|
||||
radioButton(IdeUICustomization.getInstance().projectMessage("radio.button.open.project.in.the.same.window"), GeneralSettings.OPEN_PROJECT_SAME_WINDOW)
|
||||
}
|
||||
row {
|
||||
radioButton(IdeBundle.message("radio.button.confirm.window.to.open.project.in", projectConceptName), GeneralSettings.OPEN_PROJECT_ASK)
|
||||
radioButton(IdeUICustomization.getInstance().projectMessage("radio.button.confirm.window.to.open.project.in"), GeneralSettings.OPEN_PROJECT_ASK)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class CloseProjectAction extends AnAction implements DumbAware {
|
||||
public CloseProjectAction() {
|
||||
getTemplatePresentation().setText(IdeUICustomization.getInstance().getCloseProjectActionText());
|
||||
getTemplatePresentation().setText(IdeUICustomization.getInstance().projectMessage("action.close.project.text"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +46,7 @@ public final class CloseProjectAction extends AnAction implements DumbAware {
|
||||
presentation.setText(IdeBundle.lazyMessage("action.close.projects.in.current.window"));
|
||||
}
|
||||
else {
|
||||
presentation.setText(IdeUICustomization.getInstance().getCloseProjectActionText());
|
||||
presentation.setText(IdeUICustomization.getInstance().projectMessage("action.close.project.text"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-5
@@ -2,22 +2,19 @@
|
||||
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;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class TemplateProjectPropertiesAction extends AnAction implements DumbAware {
|
||||
public TemplateProjectPropertiesAction() {
|
||||
String projectConceptName = StringUtil.capitalize(IdeUICustomization.getInstance().getProjectConceptName());
|
||||
getTemplatePresentation().setText(ActionsBundle.lazyMessage("action.TemplateProjectProperties.text.template", CommonBundle.settingsTitle(), projectConceptName));
|
||||
getTemplatePresentation().setDescription(ActionsBundle.lazyMessage("action.TemplateProjectProperties.description.template", projectConceptName));
|
||||
getTemplatePresentation().setText(() -> IdeUICustomization.getInstance().projectMessage("action.TemplateProjectProperties.text.template", CommonBundle.settingsTitle()));
|
||||
getTemplatePresentation().setDescription(() -> IdeUICustomization.getInstance().projectMessage("action.TemplateProjectProperties.description.template"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-4
@@ -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);
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -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', ' '));
|
||||
|
||||
|
||||
+2
-3
@@ -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 {
|
||||
|
||||
+3
-3
@@ -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<VirtualFile> 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." +
|
||||
" <a href=\"\">Try to save project again</a>.", NotificationType.ERROR,
|
||||
(notification, event) -> {
|
||||
|
||||
@@ -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 = ""
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user