i18n: add bundle for idea/intentions

This commit is contained in:
Dmitry Gridin
2020-03-10 12:39:43 +07:00
parent a3defb300a
commit c1dc72e677
149 changed files with 879 additions and 318 deletions
@@ -199,10 +199,10 @@ overridden.marker.implementations.choose.implementation.find.usages=Overriding p
overridden.marker.overrides.choose.implementation.title=Choose Super Implementation of {0}
overridden.marker.overrides.choose.implementation.find.usages=Super Implementations of {0}
remove.expression = Remove ''{0}''
unwrap.expression = Unwrap ''{0}''
remove.else = Remove else in ''{0}''
unwrap.else = Unwrap else in ''{0}''
remove.expression=Remove ''{0}''
unwrap.expression=Unwrap ''{0}''
remove.else=Remove else in ''{0}''
unwrap.else=Unwrap else in ''{0}''
override.declaration.x.in.y={0} in {1}
override.declaration.x.implements.y={0} in {1} implements {2} in {3}.
@@ -491,27 +491,27 @@ find.usages.checkbox.name.expected.properties=Expected properties
find.usages.action.text.find.usages.of=find usages of
find.usages.type.named.argument=Named argument
find.usages.type.type.alias=Type alias
find.usages.type.callable.reference = Callable reference
find.usages.type.type.constraint = Type constraint
find.usages.type.value.parameter.type = Parameter type
find.usages.type.nonLocal.property.type = Class/object property type
find.usages.type.function.return.type = Function return types
find.usages.type.superType = Supertype
find.usages.type.is = Target type of 'is' operation
find.usages.type.class.object = Nested class/object
find.usages.type.companion.object = Companion object
find.usages.type.function.call = Function call
find.usages.type.implicit.get = Implicit 'get'
find.usages.type.implicit.set = Implicit 'set'
find.usages.type.implicit.invoke = Implicit 'invoke'
find.usages.type.implicit.iteration = Implicit iteration
find.usages.type.property.delegation = Property delegation
find.usages.type.extension.receiver.type = Extension receiver type
find.usages.type.super.type.qualifier = Super type qualifier
find.usages.type.receiver = Receiver
find.usages.type.delegate = Delegate
find.usages.type.packageDirective = Package directive
find.usages.type.packageMemberAccess = Package member access
find.usages.type.callable.reference=Callable reference
find.usages.type.type.constraint=Type constraint
find.usages.type.value.parameter.type=Parameter type
find.usages.type.nonLocal.property.type=Class/object property type
find.usages.type.function.return.type=Function return types
find.usages.type.superType=Supertype
find.usages.type.is=Target type of 'is' operation
find.usages.type.class.object=Nested class/object
find.usages.type.companion.object=Companion object
find.usages.type.function.call=Function call
find.usages.type.implicit.get=Implicit 'get'
find.usages.type.implicit.set=Implicit 'set'
find.usages.type.implicit.invoke=Implicit 'invoke'
find.usages.type.implicit.iteration=Implicit iteration
find.usages.type.property.delegation=Property delegation
find.usages.type.extension.receiver.type=Extension receiver type
find.usages.type.super.type.qualifier=Super type qualifier
find.usages.type.receiver=Receiver
find.usages.type.delegate=Delegate
find.usages.type.packageDirective=Package directive
find.usages.type.packageMemberAccess=Package member access
formatter.button.text.use.import.with.when.at.least=Use import with '*' when at least
formatter.button.text.use.import.with=Use import with '*'
@@ -852,7 +852,7 @@ searching.usages.of.0.parameter=Searching usages of ''{0}''parameter
selected.code.fragment.has.multiple.exit.points=Selected code fragment has multiple exit points
selected.code.fragment.has.multiple.output.values=Selected code fragment has more than 3 output values:
selected.code.fragment.has.output.values.and.exit.points=Selected code fragment has output values as well as alternative exit points
setter.of.0.will.become.invisible.after.extraction = Setter of {0} will become invisible after extraction
setter.of.0.will.become.invisible.after.extraction=Setter of {0} will become invisible after extraction
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}
@@ -1560,7 +1560,6 @@ constructor.has.non.null.self.reference.parameter=Constructor has non-null self
assign.backing.field.fix.text=Assign backing field
existing.backing.field.is.not.assigned.by.the.setter=Existing backing field is not assigned by the setter
replace.with.error=Replace with '?: error(...)'
replace.with.operator=Replace with '!!' operator
replace.assert.with.operator=Replace assert with operator
assert.should.be.replaced.with.operator=assert should be replaced with operator
simplify.negated.operation=Simplify negated operation
@@ -1599,4 +1598,224 @@ use.expression.body.instead.of.0=Use expression body instead of {0}
convert.to.expression.body.fix.text=Convert to expression body
when.has.only.else.branch.and.should.be.simplified='when' has only 'else' branch and should be simplified
wrap.unary.operator.quickfix.text=Wrap unary operator and value with ()
make.0.1=Make ''{0}'' {1}
make.0.1=Make ''{0}'' {1}
replace.with.0.operator=Replace with ''{0}'' operator
do.you.want.to.make.new.extension.an.expected.declaration=Do you want to make new extension an expected declaration?
loop.to.call.fix.family.name=Replace with stdlib operations
loop.to.call.fix.family.name2=Replace with stdlib operations with use of 'asSequence()'
loop.can.be.replaced.with.stdlib.operations=Loop can be replaced with stdlib operations
text.add.setter=Add setter
text.add.getter=Add getter
text.add.getter.and.setter=Add getter and setter
text.add.use.site.target.0=Add use-site target ''{0}''
choose.use.site.target=Choose use-site target
add.use.site.target=Add use-site target
add.braces.to.0.statement=Add braces to ''{0}'' statement
add.braces.to.when.entry=Add braces to 'when' entry
add.jvmoverloads.annotation.to.0=Add ''@JvmOverloads'' annotation to {0}
text.primary.constructor=primary constructor
function.0=function ''{0}''
looking.for.usages.in.java.files=Looking for usages in Java files...
add.return.at.0=Add return@{0}
add.0.to.argument=Add ''{0} ='' to argument
add.val.var.to.parameter.0=Add val/var to parameter ''{0}''
add.val.var.to.primary.constructor.parameter=Add val/var to primary constructor parameter
make.primary.constructor.0=Make primary constructor {0}
change.visibility.modifier=Change visibility modifier
0.may.break.code={0} (may break code)
convert.to.vararg.parameter=Convert to vararg parameter
replace.with=Replace '||' with '&&'
replace.with2=Replace '&&' with '||'
can.t.modify.0=Can''t modify {0}
0.already.exists={0} already exists
type.arguments.will.be.lost.after.conversion.0=Type arguments will be lost after conversion: {0}
call.with.arguments.will.be.skipped.0=Call with arguments will be skipped: {0}
looking.for.usages.and.conflicts=Looking for usages and conflicts...
following.expression.won.t.be.processed.since.refactoring.can.t.preserve.its.semantics.0=Following expression won''t be processed since refactoring can''t preserve its semantics: {0}
callable.reference.transformation.is.not.supported.0=Callable reference transformation is not supported: {0}
can.t.replace.non.kotlin.reference.with.call.expression.0=Can''t replace non-Kotlin reference with call expression: {0}
convert.0.to.1=Convert ''{0}'' to ''{1}''
convert.lambda.to.reference=Convert lambda to reference
select.target.code.block.file=Select target code block / file
select.target.file=Select target file
replace.expression.with.if.expression=Replace '!!' expression with 'if' expression
eliminate.argument.of.when=Eliminate argument of 'when'
replace.elvis.expression.with.if.expression=Replace elvis expression with 'if' expression
flatten.when.expression=Flatten 'when' expression
replace.if.expression.with.return=Replace 'if' expression with return
lift.return.out.of.if.expression=Lift return out of 'if' expression
replace.if.with.when=Replace 'if' with 'when'
replace.safe.access.expression.with.if.expression=Replace safe access expression with 'if' expression
replace.assignment.with.if.expression=Replace assignment with 'if' expression
replace.assignment.with.when.expression=Replace assignment with 'when' expression
replace.property.initializer.with.if.expression=Replace property initializer with 'if' expression
replace.property.initializer.with.when.expression=Replace property initializer with 'when' expression
replace.return.with.if.expression=Replace return with 'if' expression
replace.return.with.when.expression=Replace return with 'when' expression
replace.when.with.if=Replace 'when' with 'if'
replace.call.with.unary.operator=Replace call with unary operator
replace.contains.call.with.in.operator=Replace 'contains' call with 'in' operator
replace.invoke.with.direct.call=Replace 'invoke' with direct call
copy.concatenation.text.to.clipboard=Copy concatenation text to clipboard
split.property.declaration=Split property declaration
replace.with.stdlib.operations.with.use.of.assequence=Replace with stdlib operations with use of 'asSequence()'
replace.with.stdlib.operations=Replace with stdlib operations
use.withindex.instead.of.manual.index.increment=Use withIndex() instead of manual index increment
add.braces=Add braces
add.indices.to.for.loop=Add indices to 'for' loop
add.jvmoverloads.annotation=Add '@JvmOverloads' annotation
add.jvmstatic.annotation=Add '@JvmStatic' annotation
add.labeled.return.to.last.expression.in.a.lambda=Add labeled return to last expression in a lambda
add.missing.component=Add missing component
add.names.to.call.arguments=Add names to call arguments
add.names.to.this.argument.and.following.arguments=Add names to this argument and following arguments
add.name.to.argument=Add name to argument
make.open=Make open
add.throws.annotation=Add '@Throws' annotation
add.remaining.branches=Add remaining branches
convert.anonymous.function.to.lambda.expression=Convert anonymous function to lambda expression
convert.to.lambda.expression=Convert to lambda expression
put.arguments.on.separate.lines=Put arguments on separate lines
put.parameters.on.separate.lines=Put parameters on separate lines
demorgan.law=DeMorgan Law
replace.with.end.of.line.comment=Replace with end of line comment
convert.collection.constructor.to.function=Convert Collection constructor to function
convert.to.sealed.class=Convert to sealed class
replace.with.a.for.loop=Replace with a 'for' loop
convert.function.to.property=Convert function to property
convert.function.type.parameter.to.receiver=Convert function type parameter to receiver
convert.function.type.receiver.to.parameter=Convert function type receiver to parameter
convert.to.nullable.var=Convert to nullable var
convert.to.ordinary.property=Convert to ordinary property
replace.with.block.comment=Replace with block comment
convert.to.lateinit.var=Convert to lateinit var
convert.object.literal.to.class=Convert object literal to class
convert.to.lazy.property=Convert to lazy property
convert.parameter.to.receiver=Convert parameter to receiver
convert.to.secondary.constructor=Convert to secondary constructor
convert.property.getter.to.initializer=Convert property getter to initializer
convert.property.initializer.to.getter=Convert property initializer to getter
convert.property.to.function=Convert property to function
can.t.replace.foreign.reference.with.call.expression.0=Can''t replace foreign reference with call expression: {0}
unrecognized.reference.will.be.skipped.0=Unrecognized reference will be skipped: {0}
property.overloaded.in.child.class.constructor=Property overloaded in child class constructor
property.has.an.actual.declaration.in.the.class.constructor=Property has an actual declaration in the class constructor
convert.to.comparisons=Convert to comparisons
convert.receiver.to.parameter=Convert receiver to parameter
convert.reference.to.lambda=Convert reference to lambda
following.problems.are.found=Following problems are found:\n
all.expected.and.actual.classes.must.be.sealed.classes=All expected and actual classes must be sealed classes.\n
all.inheritors.must.be.nested.objects.of.the.class.itself.and.may.not.inherit.from.other.classes.or.interfaces=All inheritors must be nested objects of the class itself and may not inherit from other classes or interfaces.\n
searching.inheritors=Searching inheritors...
convert.to.enum.class=Convert to enum class
convert.to.primary.constructor=Convert to primary constructor
rename.to.01=Rename to {0}
replace.0.name.with.spaces=Replace {0} name with spaces
convert.to.block.body=Convert to block body
convert.template.to.concatenated.string=Convert template to concatenated string
replace.with.a.foreach.function.call=Replace with a 'forEach' function call
convert.concatenation.to.raw.string=Convert concatenation to raw string
convert.concatenation.to.template=Convert concatenation to template
convert.try.finally.to.use=Convert try-finally to .use()
convert.to.unsafe.cast=Convert to unsafe cast
convert.to.0.as.1=Convert to ''{0} as {1}''
convert.to.0.unsafecast.1=Convert to ''{0}.unsafeCast<{1}>()''
convert.to.unsafecast.call=Convert to unsafeCast() call
convert.to.array.parameter=Convert to array parameter
create.kotlin.subclass=Create Kotlin subclass
use.destructuring.declaration=Use destructuring declaration
implement.as.constructor.parameter=Implement as constructor parameter
implement.abstract.member=Implement abstract member
import.members.from.0=Import members from ''{0}''
import.members.with=Import members with '*'
add.import.for.0=Add import for ''{0}''
add.import.for.member=Add import for member
indent.raw.string=Indent raw string
replace.infix.call.with.ordinary.call=Replace infix call with ordinary call
insert.curly.braces.around.variable=Insert curly braces around variable
add.explicit.type.arguments=Add explicit type arguments
introduce.backing.property=Introduce backing property
introduce.import.alias=Introduce import alias
invert.if.condition=Invert 'if' condition
iterate.over.0=Iterate over ''{0}''
iterate.over.collection=Iterate over collection
join.declaration.and.assignment=Join declaration and assignment
can.be.joined.with.assignment=Can be joined with assignment
put.arguments.on.one.line=Put arguments on one line
put.parameters.on.one.line=Put parameters on one line
convert.lambda.expression.to.anonymous.function=Convert lambda expression to anonymous function
convert.to.anonymous.function=Convert to anonymous function
merge.else.if=Merge 'else if'
merge.if.s=Merge 'if's
move.lambda.argument.into.parentheses=Move lambda argument into parentheses
class.0.already.contains.1=Class ''{0}'' already contains {1}
0.in.1.will.require.class.instance=''{0}'' in {1} will require class instance
searching.for.0=Searching for {0}
move.out.of.companion.object=Move out of companion object
calls.with.explicit.extension.receiver.won.t.be.processed.0=Calls with explicit extension receiver won''t be processed: {0}
usages.of.outer.class.instance.inside.of.property.0.won.t.be.processed=Usages of outer class instance inside of property ''{0}'' won''t be processed
companion.object.already.contains.0=Companion object already contains {0}
0.references.type.parameters.of.the.containing.class={0} references type parameters of the containing class
0.is.overridden.by.declaration.s.in.a.subclass={0} is overridden by declaration(s) in a subclass
move.to.companion.object=Move to companion object
move.to.top.level=Move to top level
package.0.already.contains.1=Package ''{0}'' already contains {1}
move.to.class.body=Move to class body
move.to.constructor=Move to constructor
convert.boolean.const.to.elvis=Convert Boolean? == const to elvis
convert.object.literal.to.lambda=Convert object literal to lambda
convert.to.lambda=Convert to lambda
replace.by.0=Replace by ''{0}''
replace.by.reconstructed.type=Replace by reconstructed type
remove.argument.name=Remove argument name
remove.braces.from.when.entry=Remove braces from 'when' entry
remove.braces.from.0.statement=Remove braces from ''{0}'' statement
remove.braces=Remove braces
remove.constructor.keyword=Remove constructor keyword
redundant.empty.class.body=Redundant empty class body
remove.unnecessary.parentheses.from.function.call.with.lambda=Remove unnecessary parentheses from function call with lambda
remove.empty.primary.constructor=Remove empty primary constructor
remove.empty.constructor.body=Remove empty constructor body
remove.explicit.lambda.parameter.types.may.break.code=Remove explicit lambda parameter types (may break code)
remove.explicit.supertype.qualification=Remove explicit supertype qualification
remove.explicit.type.arguments=Remove explicit type arguments
remove.explicit.type.specification=Remove explicit type specification
remove.indices.in.for.loop=Remove indices in 'for' loop
index.is.not.used.in.the.loop.body=Index is not used in the loop body
remove.return.0=Remove return@{0}
remove.labeled.return.from.last.expression.in.a.lambda=Remove labeled return from last expression in a lambda
remove.redundant.calls.of.the.conversion.method=Remove redundant calls of the conversion method
remove.single.expression.string.template=Remove single-expression string template
redundant.string.template=Redundant string template
remove.unnecessary.parentheses=Remove unnecessary parentheses
rename.class.to.0=Rename class to {0}
rename.class.to.containing.file.name=Rename class to containing file name
rename.file.to.0.1=Rename file to {0}.{1}
rename.file.to.match.top.level.class.name=Rename file to match top-level class name
replace.0.with=Replace ''{0}()'' with ''+=''
replace.with1=Replace with '+='
replace.explicit.parameter.0.with.it=Replace explicit parameter ''{0}'' with ''it''
replace.it.with.explicit.parameter=Replace 'it' with explicit parameter
replace.with.0.1.2=Replace with {0}[{1}] ?: {2}
replace.with.indexing.and.elvis.operator=Replace with indexing and elvis operator
replace.size.check.with.isnotempty=Replace size check with 'isNotEmpty'
replace.size.zero.check.with.isempty=Replace size zero check with 'isEmpty'
replace.with.parameter.name=Replace '_' with parameter name
replace.with.ordinary.assignment=Replace with ordinary assignment
simplify.boolean.expression=Simplify boolean expression
specify.explicit.lambda.signature=Specify explicit lambda signature
specify.all.types.explicitly.in.destructuring.declaration=Specify all types explicitly in destructuring declaration
cannot.infer.type.for.this.declaration=Cannot infer type for this declaration
split.if.into.two=Split 'if' into two
flip.0=Flip ''{0}''
flip.binary.expression=Flip binary expression
flip.equals=Flip 'equals'
replace.with.infix.function.call=Replace with infix function call
to.ordinary.string.literal=To ordinary string literal
to.raw.string.literal=To raw string literal
remove.underscores=Remove underscores
add.underscores=Add underscores
excluded.methods=Excluded methods
use.of.0.method.instead.of.property.access.syntax=Use of {0} method instead of property access syntax
use.property.access.syntax=Use property access syntax
convert.to.object.declaration=Convert to object declaration
@@ -16,6 +16,7 @@ import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiFile
import com.intellij.psi.util.PsiTreeUtil
import org.jetbrains.annotations.Nls
import org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection
import org.jetbrains.kotlin.psi.CREATE_BY_PATTERN_MAY_NOT_REFORMAT
import org.jetbrains.kotlin.psi.KtBlockExpression
@@ -26,13 +27,14 @@ import org.jetbrains.kotlin.psi.psiUtil.parentsWithSelf
@Suppress("EqualsOrHashCode")
abstract class SelfTargetingIntention<TElement : PsiElement>(
val elementType: Class<TElement>,
private var text: String,
private val familyName: String = text
@Nls private var text: String,
@Nls private val familyName: String = text
) : IntentionAction {
@Nls
protected val defaultText: String = text
protected fun setText(text: String) {
protected fun setText(@Nls text: String) {
this.text = text
}
@@ -114,13 +116,13 @@ abstract class SelfTargetingIntention<TElement : PsiElement>(
abstract class SelfTargetingRangeIntention<TElement : PsiElement>(
elementType: Class<TElement>,
text: String,
familyName: String = text
@Nls text: String,
@Nls familyName: String = text
) : SelfTargetingIntention<TElement>(elementType, text, familyName) {
abstract fun applicabilityRange(element: TElement): TextRange?
override final fun isApplicableTo(element: TElement, caretOffset: Int): Boolean {
final override fun isApplicableTo(element: TElement, caretOffset: Int): Boolean {
val range = applicabilityRange(element) ?: return false
return range.containsOffset(caretOffset)
}
@@ -128,13 +130,13 @@ abstract class SelfTargetingRangeIntention<TElement : PsiElement>(
abstract class SelfTargetingOffsetIndependentIntention<TElement : KtElement>(
elementType: Class<TElement>,
text: String,
familyName: String = text
@Nls text: String,
@Nls familyName: String = text
) : SelfTargetingRangeIntention<TElement>(elementType, text, familyName) {
abstract fun isApplicableTo(element: TElement): Boolean
override final fun applicabilityRange(element: TElement): TextRange? {
final override fun applicabilityRange(element: TElement): TextRange? {
return if (isApplicableTo(element)) element.textRange else null
}
}