ProjectLayout i18n

GitOrigin-RevId: 38088c8bf0d0d4d99728703ff633612846ce175d
This commit is contained in:
Tagir Valeev
2020-08-07 08:24:34 +00:00
committed by intellij-monorepo-bot
parent 2a6c4de72e
commit 3bb8ec2c99
6 changed files with 41 additions and 24 deletions
@@ -486,4 +486,18 @@ jar.repository.manager.version.resolve.progress.text=Loading {0} versions
repository.library.properties.include.transitive.dependencies=Include &transitive dependencies
library.options.panel.existing.library.combobox.label.unnamed=<unnamed>
attach.source.provider.download.sources.action.name=Download Sources
attach.source.provider.download.sources.action.busy.text=Download sources...
attach.source.provider.download.sources.action.busy.text=Download sources...
progress.details.building.library.dependencies.for.module=Building library dependencies for module {0}
progress.details.building.module.dependencies.for.module=Building module dependencies for module {0}
progress.text.scanning.for.libraries=Scanning for libraries {0}
progress.text.building.initial.libraries.layout=Building initial libraries layout...
error.library.with.name.already.exists=Library with name {0} already exists
error.module.with.name.already.exists=Module with name {0} already exists
libraries.layout.step.description=Please review libraries found. At this stage you can set library names that will be used in the project,\nexclude particular libraries from the project, or move individual files between the libraries.
module.structure.step.description=Please review suggested module structure for the project. At this stage you can set module names,\nexclude particular modules from the project, merge or split individual modules.\nAll dependencies between the modules as well as dependencies on the libraries will be automatically updated.
label.select.jars.to.extract.to.new.library=&Select jars to extract to the new library:
label.select.content.roots.to.extract.to.new.module=&Select content roots to extract to the new module:
title.module.dependencies=Module dependencies
title.modules=Modules
title.library.contents=Library contents
title.libraries=Libraries
@@ -1,6 +1,8 @@
// 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.util.importProject;
import com.intellij.ide.JavaUiBundle;
import java.io.File;
import java.util.Collection;
import java.util.Collections;
@@ -64,12 +66,12 @@ public class LibrariesLayoutPanel extends ProjectLayoutPanel<LibraryDescriptor>{
@Override
protected String getEntriesChooserTitle() {
return "Libraries";
return JavaUiBundle.message("title.libraries");
}
@Override
protected String getDependenciesTitle() {
return "Library contents";
return JavaUiBundle.message("title.library.contents");
}
@Override
@@ -79,17 +81,16 @@ public class LibrariesLayoutPanel extends ProjectLayoutPanel<LibraryDescriptor>{
@Override
protected String getSplitDialogChooseFilesPrompt() {
return "&Select jars to extract to the new library:";
return JavaUiBundle.message("label.select.jars.to.extract.to.new.library");
}
@Override
protected String getNameAlreadyUsedMessage(final String name) {
return "library with name " + name + " already exists";
return JavaUiBundle.message("error.library.with.name.already.exists", name);
}
@Override
protected String getStepDescriptionText() {
return "Please review libraries found. At this stage you can set library names that will be used in the project,\n" +
"exclude particular libraries from the project, or move individual files between the libraries.";
return JavaUiBundle.message("libraries.layout.step.description");
}
}
@@ -23,6 +23,7 @@ import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleType;
import com.intellij.openapi.roots.ModifiableRootModel;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.util.SmartList;
import com.intellij.util.containers.MultiMap;
import com.intellij.util.text.CaseInsensitiveStringHashingStrategy;
@@ -94,7 +95,7 @@ public class ModuleDescriptor {
return contentRoot.getName();
}
public String getName() {
public @NlsSafe String getName() {
return myName;
}
@@ -1,6 +1,7 @@
// 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.ide.util.importProject;
import com.intellij.ide.JavaUiBundle;
import com.intellij.ide.util.projectWizard.importSources.DetectedProjectRoot;
import com.intellij.ide.util.projectWizard.importSources.DetectedSourceRoot;
import com.intellij.ide.util.projectWizard.importSources.impl.ProjectFromSourcesBuilderImpl;
@@ -210,10 +211,10 @@ public abstract class ModuleInsight {
for (File contentRoot : moduleContentRoots) {
final ModuleDescriptor checkedModule = contentRootToModules.get(contentRoot);
myProgress.setText2("Building library dependencies for module " + checkedModule.getName());
myProgress.setText2(JavaUiBundle.message("progress.details.building.library.dependencies.for.module", checkedModule.getName()));
buildJarDependencies(checkedModule);
myProgress.setText2("Building module dependencies for module " + checkedModule.getName());
myProgress.setText2(JavaUiBundle.message("progress.details.building.module.dependencies.for.module", checkedModule.getName()));
for (File aContentRoot : moduleContentRoots) {
final ModuleDescriptor aModule = contentRootToModules.get(aContentRoot);
if (checkedModule.equals(aModule)) {
@@ -252,13 +253,13 @@ public abstract class ModuleInsight {
try {
try {
for (File root : myEntryPointRoots) {
myProgress.setText("Scanning for libraries " + root.getPath());
myProgress.setText(JavaUiBundle.message("progress.text.scanning.for.libraries", root.getPath()));
scanRootForLibraries(root);
}
}
catch (ProcessCanceledException ignored) {
}
myProgress.setText("Building initial libraries layout...");
myProgress.setText(JavaUiBundle.message("progress.text.building.initial.libraries.layout"));
final List<LibraryDescriptor> libraries = buildInitialLibrariesLayout(myJarToPackagesMap.keySet());
// correct library names so that there are no duplicates
final Set<String> libNames = new HashSet<>(myExistingProjectLibraryNames);
@@ -1,6 +1,7 @@
// 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.util.importProject;
import com.intellij.ide.JavaUiBundle;
import org.jetbrains.annotations.Nullable;
import java.io.File;
@@ -79,12 +80,12 @@ public class ModulesLayoutPanel extends ProjectLayoutPanel<ModuleDescriptor>{
@Override
protected String getEntriesChooserTitle() {
return "Modules";
return JavaUiBundle.message("title.modules");
}
@Override
protected String getDependenciesTitle() {
return "Module dependencies";
return JavaUiBundle.message("title.module.dependencies");
}
@Override
@@ -94,18 +95,16 @@ public class ModulesLayoutPanel extends ProjectLayoutPanel<ModuleDescriptor>{
@Override
protected String getSplitDialogChooseFilesPrompt() {
return "&Select content roots to extract to the new module:";
return JavaUiBundle.message("label.select.content.roots.to.extract.to.new.module");
}
@Override
protected String getNameAlreadyUsedMessage(final String name) {
return "Module with name " + name + " already exists";
return JavaUiBundle.message("error.module.with.name.already.exists", name);
}
@Override
protected String getStepDescriptionText() {
return "Please review suggested module structure for the project. At this stage you can set module names,\n" +
"exclude particular modules from the project, merge or split individual modules.\n" +
"All dependencies between the modules as well as dependencies on the libraries will be automatically updated.";
return JavaUiBundle.message("module.structure.step.description");
}
}
@@ -12,6 +12,7 @@ import com.intellij.openapi.ui.InputValidator;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.ui.Splitter;
import com.intellij.openapi.ui.ex.MultiLineLabel;
import com.intellij.openapi.util.NlsContexts;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.DocumentAdapter;
import com.intellij.ui.IdeBorderFactory;
@@ -271,15 +272,15 @@ abstract class ProjectLayoutPanel<T> extends JPanel {
protected abstract void setElementName(T entry, String name);
protected abstract String getSplitDialogChooseFilesPrompt();
protected abstract @NlsContexts.Label String getSplitDialogChooseFilesPrompt();
protected abstract String getNameAlreadyUsedMessage(final String name);
protected abstract @NlsContexts.DialogMessage String getNameAlreadyUsedMessage(final String name);
protected abstract String getStepDescriptionText();
protected abstract @NlsContexts.DialogMessage String getStepDescriptionText();
protected abstract String getEntriesChooserTitle();
protected abstract @NlsContexts.TabTitle String getEntriesChooserTitle();
protected abstract String getDependenciesTitle();
protected abstract @NlsContexts.TabTitle String getDependenciesTitle();
protected abstract String getElementTypeName();