i18n: update bundles
#KT-37483
This commit is contained in:
@@ -2186,4 +2186,12 @@ intention.convert.lambda.line=Convert to {0,choice,0#single|1#multi}-line lambda
|
||||
intention.trailing.comma.custom.text={0,choice,0#Enable|1#Disable} a trailing comma by default in the formatter
|
||||
intention.trailing.comma.text=Enable/disable a trailing comma in the formatter
|
||||
fix.remove.argument.text=Remove argument
|
||||
fix.remove.redundant.star.text=Remove redundant *
|
||||
fix.remove.redundant.star.text=Remove redundant *
|
||||
refactoring.extract.to.separate.file.text=Extract to separate file
|
||||
action.usage.update.text=Usage update
|
||||
progress.title.analyze.extraction.data=Analyze extraction data...
|
||||
fix.move.file.to.package.dir.name.text=source root
|
||||
move.refactoring.error.text.cannot.perform.refactoring.since.the.following.files.already.exist=Cannot perform refactoring since the following files already exist:\n\n
|
||||
kotlin.script.definitions.model.name.is.enabled=Is Enabled
|
||||
kotlin.script.definitions.model.name.pattern.extension=Pattern/Extension
|
||||
kotlin.script.definitions.model.name.name=Name
|
||||
@@ -116,9 +116,8 @@ class NewKotlinFileAction : CreateFileFromTemplateAction(
|
||||
builder.setValidator(NameValidator)
|
||||
}
|
||||
|
||||
override fun getActionName(directory: PsiDirectory, newName: String, templateName: String): String {
|
||||
return KotlinBundle.message("action.new.file.text")
|
||||
}
|
||||
override fun getActionName(directory: PsiDirectory, newName: String, templateName: String): String =
|
||||
KotlinBundle.message("action.new.file.text")
|
||||
|
||||
override fun isAvailable(dataContext: DataContext): Boolean {
|
||||
if (super.isAvailable(dataContext)) {
|
||||
@@ -127,16 +126,13 @@ class NewKotlinFileAction : CreateFileFromTemplateAction(
|
||||
val projectFileIndex = ProjectRootManager.getInstance(project).fileIndex
|
||||
return ideView.directories.any { projectFileIndex.isInSourceContent(it.virtualFile) }
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return 0
|
||||
}
|
||||
override fun hashCode(): Int = 0
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return other is NewKotlinFileAction
|
||||
}
|
||||
override fun equals(other: Any?): Boolean = other is NewKotlinFileAction
|
||||
|
||||
override fun startInWriteAction() = false
|
||||
|
||||
@@ -158,13 +154,9 @@ class NewKotlinFileAction : CreateFileFromTemplateAction(
|
||||
return null
|
||||
}
|
||||
|
||||
override fun checkInput(inputString: String): Boolean {
|
||||
return true
|
||||
}
|
||||
override fun checkInput(inputString: String): Boolean = true
|
||||
|
||||
override fun canClose(inputString: String): Boolean {
|
||||
return getErrorText(inputString) == null
|
||||
}
|
||||
override fun canClose(inputString: String): Boolean = getErrorText(inputString) == null
|
||||
}
|
||||
|
||||
@get:TestOnly
|
||||
|
||||
+3
-3
@@ -52,14 +52,14 @@ fun notifyOutdatedBundledCompilerIfNecessary(project: Project) {
|
||||
NotificationType.WARNING,
|
||||
NotificationListener { notification, event ->
|
||||
if (event.eventType == HyperlinkEvent.EventType.ACTIVATED) {
|
||||
when {
|
||||
"update" == event.description -> {
|
||||
when (event.description) {
|
||||
"update" -> {
|
||||
val action = ActionManager.getInstance().getAction(ConfigurePluginUpdatesAction.ACTION_ID)
|
||||
val dataContext = DataManager.getInstance().dataContextFromFocus.result
|
||||
val actionEvent = AnActionEvent.createFromAnAction(action, null, ActionPlaces.ACTION_SEARCH, dataContext)
|
||||
action.actionPerformed(actionEvent)
|
||||
}
|
||||
"ignore" == event.description -> {
|
||||
"ignore" -> {
|
||||
if (!project.isDisposed) {
|
||||
PropertiesComponent.getInstance(project).setValue(SUPPRESSED_OUTDATED_COMPILER_PROPERTY_NAME, pluginVersion)
|
||||
}
|
||||
|
||||
+2
-1
@@ -13,6 +13,7 @@ import com.intellij.openapi.vfs.VirtualFileManager
|
||||
import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.psi.PsiManager
|
||||
import com.intellij.refactoring.RefactoringBundle
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.unsafeResolveToDescriptor
|
||||
import org.jetbrains.kotlin.idea.codeInsight.shorten.runRefactoringAndKeepDelayedRequests
|
||||
import org.jetbrains.kotlin.idea.core.util.range
|
||||
@@ -87,7 +88,7 @@ class MoveDeclarationsProcessor(
|
||||
fun performRefactoring() {
|
||||
psiDocumentManager.commitAllDocuments()
|
||||
|
||||
val commandName = "Usage update"
|
||||
val commandName = KotlinBundle.message("action.usage.update.text")
|
||||
val commandGroupId = Any() // we need to group both commands for undo
|
||||
|
||||
// temporary revert imports to the state before they have been changed
|
||||
|
||||
+3
-1
@@ -60,7 +60,9 @@ class ExtractionEngine(
|
||||
val project = extractionData.project
|
||||
|
||||
val adjustExtractionData = helper.adjustExtractionData(extractionData)
|
||||
val analysisResult = ProgressIndicatorUtils.underModalProgress(project, "Analyze extraction data...") {
|
||||
val analysisResult = ProgressIndicatorUtils.underModalProgress(project,
|
||||
KotlinBundle.message("progress.title.analyze.extraction.data")
|
||||
) {
|
||||
adjustExtractionData.performAnalysis()
|
||||
}
|
||||
|
||||
|
||||
@@ -375,10 +375,10 @@ fun <T> chooseContainerElement(
|
||||
private fun PsiElement.renderDeclaration(): String? {
|
||||
if (this is KtFunctionLiteral || isFunctionalExpression()) return renderText()
|
||||
|
||||
val descriptor = when {
|
||||
this is KtFile -> name
|
||||
this is KtElement -> analyze()[BindingContext.DECLARATION_TO_DESCRIPTOR, this]
|
||||
this is PsiMember -> getJavaMemberDescriptor()
|
||||
val descriptor = when (this) {
|
||||
is KtFile -> name
|
||||
is KtElement -> analyze()[BindingContext.DECLARATION_TO_DESCRIPTOR, this]
|
||||
is PsiMember -> getJavaMemberDescriptor()
|
||||
else -> null
|
||||
} ?: return null
|
||||
val name = renderName()
|
||||
@@ -391,7 +391,7 @@ fun <T> chooseContainerElement(
|
||||
}
|
||||
|
||||
private fun PsiElement.renderText(): String = when (this) {
|
||||
is SeparateFileWrapper -> "Extract to separate file"
|
||||
is SeparateFileWrapper -> KotlinBundle.message("refactoring.extract.to.separate.file.text")
|
||||
is PsiPackageBase -> qualifiedName
|
||||
else -> {
|
||||
val text = text ?: "<invalid text>"
|
||||
|
||||
@@ -376,10 +376,10 @@ fun <T> chooseContainerElement(
|
||||
private fun PsiElement.renderDeclaration(): String? {
|
||||
if (this is KtFunctionLiteral || isFunctionalExpression()) return renderText()
|
||||
|
||||
val descriptor = when {
|
||||
this is KtFile -> name
|
||||
this is KtElement -> analyze()[BindingContext.DECLARATION_TO_DESCRIPTOR, this]
|
||||
this is PsiMember -> getJavaMemberDescriptor()
|
||||
val descriptor = when (this) {
|
||||
is KtFile -> name
|
||||
is KtElement -> analyze()[BindingContext.DECLARATION_TO_DESCRIPTOR, this]
|
||||
is PsiMember -> getJavaMemberDescriptor()
|
||||
else -> null
|
||||
} ?: return null
|
||||
val name = renderName()
|
||||
@@ -392,7 +392,7 @@ fun <T> chooseContainerElement(
|
||||
}
|
||||
|
||||
private fun PsiElement.renderText(): String = when (this) {
|
||||
is SeparateFileWrapper -> "Extract to separate file"
|
||||
is SeparateFileWrapper -> KotlinBundle.message("refactoring.extract.to.separate.file.text")
|
||||
is PsiPackageBase -> qualifiedName
|
||||
else -> {
|
||||
val text = text ?: "<invalid text>"
|
||||
|
||||
+6
-2
@@ -40,12 +40,16 @@ class PackageDirectoryMismatchInspection : AbstractKotlinInspection() {
|
||||
|
||||
val fixes = mutableListOf<LocalQuickFix>()
|
||||
val qualifiedName = directive.qualifiedName
|
||||
val dirName = if (qualifiedName.isEmpty()) "source root" else "'${qualifiedName.replace('.', '/')}'"
|
||||
val dirName = if (qualifiedName.isEmpty())
|
||||
KotlinBundle.message("fix.move.file.to.package.dir.name.text")
|
||||
else
|
||||
"'${qualifiedName.replace('.', '/')}'"
|
||||
|
||||
fixes += MoveFileToPackageFix(dirName)
|
||||
val fqNameByDirectory = file.getFqNameByDirectory()
|
||||
when {
|
||||
fqNameByDirectory.isRoot ->
|
||||
fixes += ChangePackageFix("source root", fqNameByDirectory)
|
||||
fixes += ChangePackageFix(KotlinBundle.message("fix.move.file.to.package.dir.name.text"), fqNameByDirectory)
|
||||
fqNameByDirectory.hasIdentifiersOnly() ->
|
||||
fixes += ChangePackageFix("'${fqNameByDirectory.asString()}'", fqNameByDirectory)
|
||||
}
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ internal class MoveKotlinTopLevelDeclarationsModel(
|
||||
} else {
|
||||
val filePathsToReport = filesExistingInTargetDir.joinToString(
|
||||
separator = "\n",
|
||||
prefix = "Cannot perform refactoring since the following files already exist:\n\n"
|
||||
prefix = KotlinBundle.message("move.refactoring.error.text.cannot.perform.refactoring.since.the.following.files.already.exist")
|
||||
) { it.virtualFile.path }
|
||||
throw ConfigurationException(filePathsToReport)
|
||||
}
|
||||
|
||||
+12
-6
@@ -9,6 +9,7 @@ import com.intellij.ui.BooleanTableCellEditor
|
||||
import com.intellij.ui.BooleanTableCellRenderer
|
||||
import com.intellij.util.ui.ColumnInfo
|
||||
import com.intellij.util.ui.ListTableModel
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.core.script.StandardIdeScriptDefinition
|
||||
import org.jetbrains.kotlin.idea.core.script.settings.KotlinScriptingSettings
|
||||
import org.jetbrains.kotlin.scripting.definitions.ScriptDefinition
|
||||
@@ -32,11 +33,15 @@ class KotlinScriptDefinitionsModel private constructor(definitions: MutableList<
|
||||
items = definitions.mapTo(arrayListOf()) { KotlinScriptDefinitionsModelDescriptor(it, settings.isScriptDefinitionEnabled(it)) }
|
||||
}
|
||||
|
||||
private class ScriptDefinitionName : ColumnInfo<KotlinScriptDefinitionsModelDescriptor, String>("Name") {
|
||||
private class ScriptDefinitionName : ColumnInfo<KotlinScriptDefinitionsModelDescriptor, String>(
|
||||
KotlinBundle.message("kotlin.script.definitions.model.name.name")
|
||||
) {
|
||||
override fun valueOf(item: KotlinScriptDefinitionsModelDescriptor) = item.definition.name
|
||||
}
|
||||
|
||||
private class ScriptDefinitionPattern : ColumnInfo<KotlinScriptDefinitionsModelDescriptor, String>("Pattern/Extension") {
|
||||
private class ScriptDefinitionPattern : ColumnInfo<KotlinScriptDefinitionsModelDescriptor, String>(
|
||||
KotlinBundle.message("kotlin.script.definitions.model.name.pattern.extension")
|
||||
) {
|
||||
override fun valueOf(item: KotlinScriptDefinitionsModelDescriptor): String {
|
||||
val definition = item.definition
|
||||
return definition.asLegacyOrNull<KotlinScriptDefinitionFromAnnotatedTemplate>()?.scriptFilePattern?.pattern
|
||||
@@ -45,7 +50,9 @@ class KotlinScriptDefinitionsModel private constructor(definitions: MutableList<
|
||||
}
|
||||
}
|
||||
|
||||
private class ScriptDefinitionIsEnabled : ColumnInfo<KotlinScriptDefinitionsModelDescriptor, Boolean>("Is Enabled") {
|
||||
private class ScriptDefinitionIsEnabled : ColumnInfo<KotlinScriptDefinitionsModelDescriptor, Boolean>(
|
||||
KotlinBundle.message("kotlin.script.definitions.model.name.is.enabled")
|
||||
) {
|
||||
override fun valueOf(item: KotlinScriptDefinitionsModelDescriptor): Boolean = item.isEnabled
|
||||
override fun setValue(item: KotlinScriptDefinitionsModelDescriptor, value: Boolean) {
|
||||
item.isEnabled = value
|
||||
@@ -58,13 +65,12 @@ class KotlinScriptDefinitionsModel private constructor(definitions: MutableList<
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun createModel(definitions: List<ScriptDefinition>, settings: KotlinScriptingSettings): KotlinScriptDefinitionsModel {
|
||||
return KotlinScriptDefinitionsModel(definitions.mapTo(arrayListOf()) {
|
||||
fun createModel(definitions: List<ScriptDefinition>, settings: KotlinScriptingSettings): KotlinScriptDefinitionsModel =
|
||||
KotlinScriptDefinitionsModel(definitions.mapTo(arrayListOf()) {
|
||||
KotlinScriptDefinitionsModelDescriptor(
|
||||
it,
|
||||
settings.isScriptDefinitionEnabled(it)
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user