i18n: add bundle for idea/refactoring/ui
This commit is contained in:
@@ -1011,4 +1011,9 @@ unsupported.usage.0=Unsupported usage: {0}
|
||||
|
||||
do.you.want.to.delete.this.parameter.in.expected.declaration.and.all.related.actual.ones=Do you want to delete this parameter in expected declaration and all related actual ones?
|
||||
do.you.want.to.delete.expected.declaration.together.with.all.related.actual.ones=Do you want to delete expected declaration together with all related actual ones?
|
||||
delete.with.usage.search=delete (with usage search)
|
||||
delete.with.usage.search=delete (with usage search)
|
||||
|
||||
destination.not.found.for.package.0=Destination not found for package ''{0}''
|
||||
leave.in.same.source.root=Leave in same source root
|
||||
test.root.is.selected.while.the.source.root.is.expected=Test root is selected while the source root is expected
|
||||
source.root.is.selected.while.the.test.root.is.expected=Source root is selected while the test root is expected
|
||||
@@ -38,6 +38,8 @@ import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||
|
||||
import static org.jetbrains.kotlin.idea.roots.ProjectRootUtilsKt.getSuitableDestinationSourceRoots;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -238,7 +240,7 @@ public class CreateKotlinClassDialog extends DialogWrapper {
|
||||
myTargetDirectory = WriteAction.compute(() -> {
|
||||
PsiDirectory baseDir = getBaseDir(packageName);
|
||||
if (baseDir == null && destination instanceof MultipleRootsMoveDestination) {
|
||||
errorString[0] = "Destination not found for package '" + packageName + "'";
|
||||
errorString[0] = KotlinBundle.message("destination.not.found.for.package.0", packageName);
|
||||
return null;
|
||||
}
|
||||
return destination.getTargetDirectory(baseDir);
|
||||
|
||||
+4
-3
@@ -27,6 +27,7 @@ import com.intellij.refactoring.move.moveClassesOrPackages.MoveClassesOrPackages
|
||||
import com.intellij.refactoring.move.moveClassesOrPackages.MultipleRootsMoveDestination;
|
||||
import com.intellij.ui.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -39,7 +40,7 @@ import static org.jetbrains.kotlin.idea.roots.ProjectRootUtilsKt.getKotlinAwareD
|
||||
|
||||
// Based on com.intellij.refactoring.move.moveClassesOrPackages.DestinationFolderComboBox
|
||||
public abstract class KotlinDestinationFolderComboBox extends ComboboxWithBrowseButton {
|
||||
private static final String LEAVE_IN_SAME_SOURCE_ROOT = "Leave in same source root";
|
||||
private static final String LEAVE_IN_SAME_SOURCE_ROOT = KotlinBundle.message("leave.in.same.source.root");
|
||||
private static final DirectoryChooser.ItemWrapper NULL_WRAPPER = new DirectoryChooser.ItemWrapper(null, null);
|
||||
private PsiDirectory myInitialTargetDirectory;
|
||||
private List<VirtualFile> mySourceRoots;
|
||||
@@ -180,11 +181,11 @@ public abstract class KotlinDestinationFolderComboBox extends ComboboxWithBrowse
|
||||
boolean inTestSourceContent = fileIndex.isInTestSourceContent(myInitialTargetDirectory.getVirtualFile());
|
||||
if (isSelectionInTestSourceContent != inTestSourceContent) {
|
||||
if (inTestSourceContent && reportBaseInTestSelectionInSource()) {
|
||||
updateErrorMessage.pass("Source root is selected while the test root is expected");
|
||||
updateErrorMessage.pass(KotlinBundle.message("source.root.is.selected.while.the.test.root.is.expected"));
|
||||
}
|
||||
|
||||
if (isSelectionInTestSourceContent && reportBaseInSourceSelectionInTest()) {
|
||||
updateErrorMessage.pass("Test root is selected while the source root is expected");
|
||||
updateErrorMessage.pass(KotlinBundle.message("test.root.is.selected.while.the.source.root.is.expected"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user