i18n: add bundle for idea/refactoring/rename

- Modify `text.parameter` value to `Parameter`;
use `text.parameter.0` in previous usages
- Add @Nls and @NonNls annotations to few places
This commit is contained in:
Roman Golyshev
2020-02-26 22:42:18 +03:00
committed by Dmitry Gridin
parent 4fc76e25a8
commit e1cb561398
18 changed files with 103 additions and 32 deletions
@@ -856,6 +856,7 @@ setter.of.0.will.become.invisible.after.extraction = Setter of {0} will become i
text.0.1.must.be.moved.with.sealed.parent.class.and.all.its.subclasses={0} ''{1}'' must be moved with sealed parent class and all its subclasses
text.0.already.contains.1={0} already contains {1}
text.0.already.contains.nested.class.1={0} already contains nested class named {1}
text.0.already.declared.in.1={0} is already declared in {1}
text.0.have.no.inheritors.warning={0} doesn''t have inheritors\nPushing members down will result in them being deleted. Would you like to proceed?
text.0.in.1.will.override.corresponding.member.of.2.after.refactoring={0} in {1} will override corresponding member of {2} after refactoring
text.0.inherits.from.1.it.will.not.be.affected.by.refactoring={0} inherits from {1}.\nIt won''t be affected by the refactoring
@@ -867,6 +868,8 @@ text.0.uses.1.which.is.not.accessible.from.2={0} uses {1}, which is not accessib
text.0.uses.1.which.will.be.inaccessible.after.move={0} uses {1} which will be inaccessible after move
text.0.uses.1.which.will.not.be.accessible.from.subclass={0} uses {1} which won''t be accessible from the subclass.
text.0.uses.internal.1.which.will.be.inaccessible.after.move={0} uses internal {1} which will be inaccessible after move
text.0.will.be.shadowed.by.1={0} will be shadowed by {1}
text.0.will.clash.with.existing.1.in.2={0} after rename will clash with existing {1} in {2}
text.0.will.no.longer.be.accessible.after.signature.change={0} will no longer be accessible after signature change
text.all.declarations.must.belong.to.the.same.directory.or.class=All declarations must belong to the same directory or class
text.all=All
@@ -889,12 +892,16 @@ text.class.0.already.exists.in.package.1=Class {0} already exists in package {1}
text.class.0.already.exists.in.the.target.scope=Class {0} already exists in the target scope
text.class.0.is.final={0} is final
text.constructor=constructor
text.convert._it_.to.explicit.lambda.parameter=Convert 'it' to explicit lambda parameter
text.create.destructuring.declaration=Create destructuring declaration
text.create.single.variable=Create single variable
text.declaration=declaration
text.declarations.clash.move.0.destination.1.declared.in.scope.2=Following declarations would clash: to move {0} and destination {1} declared in scope {2}
text.default.value=\ // default value = {0}
text.destination.class.should.be.kotlin.class=Destination class must be a Kotlin class
text.do.you.want.to.rename.0.as.well=Do you want to rename {0}() as well?
text.do.you.want.to.rename.base.property.from.0=Do you want to rename base property from \n{0}
text.do.you.want.to.rename.base.property=Do you want to rename base property
text.duplicating.local.variable=Duplicating local variable ''{0}''
text.duplicating.parameter=Duplicating parameter ''{0}''
text.duplicating.property=Duplicating property ''{0}''
@@ -942,13 +949,14 @@ text.no.files.to.move=There is no given files to move
text.no.name.provided.for.type.alias=No name provided for type alias
text.no.package.corresponds.to.directory=No package corresponds to this directory
text.non.kotlin.0.will.not.be.affected.by.refactoring=Non-Kotlin {0} won''t be affected by the refactoring
text.overload=Overload
text.package.directive.dont.match.file.location=Package directive doesn't match file location
text.parameter.0=parameter ''{0}''
text.parameter.name=Parameter &name:\u0020
text.parameter.reference.can.t.be.safely.replaced.with.0.since.1.is.ambiguous.in.this.context=Parameter reference can''t be safely replaced with {0} since {1} is ambiguous in this context
text.parameter.reference.can.t.be.safely.replaced.with.0.since.target.function.can.t.be.referenced.in.this.context=Parameter reference can''t be safely replaced with {0} since target function can''t be referenced in this context
text.parameter.type=Parameter &type:\u0020
text.parameter=parameter ''{0}''
text.parameter=Parameter
text.parameters=&Parameters
text.proceed.with.extraction=Proceed with extraction
text.process.duplicates=Process Duplicates
@@ -966,6 +974,16 @@ text.refactoring.is.not.applicable.to.this.code.fragment=Refactoring is not appl
text.references.in.code.to.0.1.and.its.declarations=References in code to {0} {1} and its declarations
text.remove.0.no.longer.used=Remove {0} no longer used
text.remove=remove
text.rename.as.part.of.phrase=rename
text.rename.is.not.applicable.to.secondary.constructors=Rename is not applicable to secondary constructors
text.rename.is.not.applicable.to.synthetic.declarations=Rename is not applicable to synthetic declaration
text.rename.not.applicable.to.backing.field.reference=Rename is not applicable to backing field reference
text.rename.not.applicable.to.dynamically.invoked.methods=Rename is not applicable to dynamically invoked members
text.rename.overloads.title=Rename Overloads
text.rename.overloads.to=Rename overloads to:
text.rename.parameters.in.hierarchy.to=Rename parameter in hierarchy to:
text.rename.parameters.title=Rename Parameters
text.rename.warning=Rename warning
text.sealed.class.0.must.be.moved.with.all.its.subclasses=Sealed class ''{0}'' must be moved with all its subclasses
text.select.target.code.block.file=Select target code block / file
text.select.target.code.block=Select target code block
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.idea.util.application
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.command.CommandProcessor
import com.intellij.openapi.project.Project
import org.jetbrains.annotations.Nls
fun <T> runReadAction(action: () -> T): T {
return ApplicationManager.getApplication().runReadAction<T>(action)
@@ -28,15 +29,15 @@ fun <T> runWriteAction(action: () -> T): T {
return ApplicationManager.getApplication().runWriteAction<T>(action)
}
fun Project.executeWriteCommand(name: String, command: () -> Unit) {
fun Project.executeWriteCommand(@Nls name: String, command: () -> Unit) {
CommandProcessor.getInstance().executeCommand(this, { runWriteAction(command) }, name, null)
}
fun <T> Project.executeWriteCommand(name: String, groupId: Any? = null, command: () -> T): T {
fun <T> Project.executeWriteCommand(@Nls name: String, groupId: Any? = null, command: () -> T): T {
return executeCommand<T>(name, groupId) { runWriteAction(command) }
}
fun <T> Project.executeCommand(name: String, groupId: Any? = null, command: () -> T): T {
fun <T> Project.executeCommand(@Nls name: String, groupId: Any? = null, command: () -> T): T {
@Suppress("UNCHECKED_CAST") var result: T = null as T
CommandProcessor.getInstance().executeCommand(this, { result = command() }, name, groupId)
@Suppress("USELESS_CAST")