i18n: fix compilation
This commit is contained in:
+1
-1
@@ -188,7 +188,7 @@ abstract class KotlinGenerateTestSupportActionBase(
|
||||
}
|
||||
errorHint?.let { HintManager.getInstance().showErrorHint(editor, it) }
|
||||
} catch (e: IncorrectOperationException) {
|
||||
val message = KotlinBundle.message("action.generate.test.support.error.cant.generate.method", e.message)
|
||||
val message = KotlinBundle.message("action.generate.test.support.error.cant.generate.method", e.message.toString())
|
||||
HintManager.getInstance().showErrorHint(editor, message)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ fun confirmMemberRewrite(targetClass: KtClass, vararg descriptors: FunctionDescr
|
||||
if (ApplicationManager.getApplication().isUnitTestMode) return true
|
||||
|
||||
val functionsText = descriptors.joinToString(separator = " and ") { "'${MEMBER_RENDERER.render(it)}'" }
|
||||
val message = KotlinBundle.message("action.generate.functions.already.defined", functionsText, targetClass.name)
|
||||
val message = KotlinBundle.message("action.generate.functions.already.defined", functionsText, targetClass.name.toString())
|
||||
return Messages.showYesNoDialog(
|
||||
targetClass.project, message,
|
||||
CodeInsightBundle.message("generate.equals.and.hashcode.already.defined.title"),
|
||||
|
||||
@@ -113,8 +113,8 @@ fun buildNavigateToPropertyOverriddenDeclarationsPopup(e: MouseEvent?, element:
|
||||
|
||||
return NavigationPopupDescriptor(
|
||||
navigatingOverrides,
|
||||
KotlinBundle.message("overridden.marker.implementations.choose.implementation.title", propertyOrParameter.name),
|
||||
KotlinBundle.message("overridden.marker.implementations.choose.implementation.find.usages", propertyOrParameter.name), renderer
|
||||
KotlinBundle.message("overridden.marker.implementations.choose.implementation.title", propertyOrParameter.name.toString()),
|
||||
KotlinBundle.message("overridden.marker.implementations.choose.implementation.find.usages", propertyOrParameter.name.toString()), renderer
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ open class KotlinDefaultNamedDeclarationPresentation(private val declaration: Kt
|
||||
if ((declaration is KtFunction && declaration.isLocal) || (declaration is KtClassOrObject && declaration.isLocal)) {
|
||||
val containingDeclaration = declaration.getStrictParentOfType<KtNamedDeclaration>() ?: return null
|
||||
val containerName = containingDeclaration.fqName ?: containingDeclaration.name
|
||||
return KotlinBundle.message("presentation.text.in.container.paren", containerName)
|
||||
return KotlinBundle.message("presentation.text.in.container.paren", containerName.toString())
|
||||
}
|
||||
|
||||
val name = declaration.fqName
|
||||
|
||||
@@ -117,7 +117,7 @@ class AddFunctionToSupertypeFix private constructor(
|
||||
private fun actionName(functionData: FunctionData): String {
|
||||
return KotlinBundle.message(
|
||||
"fix.add.function.supertype.add.to",
|
||||
functionData.signaturePreview, functionData.targetClass.name
|
||||
functionData.signaturePreview, functionData.targetClass.name.toString()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class AddGenericUpperBoundFix(
|
||||
override fun getText(): String {
|
||||
val element = this.element
|
||||
return when {
|
||||
element != null -> KotlinBundle.message("fix.add.generic.upperbound.text", renderedUpperBound, element.name)
|
||||
element != null -> KotlinBundle.message("fix.add.generic.upperbound.text", renderedUpperBound, element.name.toString())
|
||||
else -> null
|
||||
} ?: ""
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class AddInlineModifierFix(
|
||||
override fun getText(): String {
|
||||
val element = this.element
|
||||
return when {
|
||||
element != null -> KotlinBundle.message("fix.add.modifier.inline.parameter.text", modifier.value, element.name)
|
||||
element != null -> KotlinBundle.message("fix.add.modifier.inline.parameter.text", modifier.value, element.name.toString())
|
||||
else -> null
|
||||
} ?: ""
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getParentOfType
|
||||
class AddInlineToFunctionFix(function: KtFunction) :
|
||||
KotlinQuickFixAction<KtFunction>(function) {
|
||||
override fun getFamilyName(): String = KotlinBundle.message("fix.add.modifier.inline.function.family")
|
||||
override fun getText(): String = KotlinBundle.message("fix.add.modifier.inline.function.text", element?.name)
|
||||
override fun getText(): String = KotlinBundle.message("fix.add.modifier.inline.function.text", element?.name.toString())
|
||||
|
||||
override fun invoke(project: Project, editor: Editor?, file: KtFile) {
|
||||
element?.addModifier(KtTokens.INLINE_KEYWORD)
|
||||
|
||||
@@ -92,7 +92,7 @@ class AddPropertyToSupertypeFix private constructor(
|
||||
}
|
||||
|
||||
private fun actionName(propertyData: PropertyData): String {
|
||||
return KotlinBundle.message("fix.add.property.to.supertype.text", propertyData.signaturePreview, propertyData.targetClass.name)
|
||||
return KotlinBundle.message("fix.add.property.to.supertype.text", propertyData.signaturePreview, propertyData.targetClass.name.toString())
|
||||
}
|
||||
|
||||
companion object : KotlinSingleIntentionActionFactory() {
|
||||
|
||||
@@ -57,7 +57,7 @@ class AddTypeAnnotationToValueParameterFix(element: KtParameter) : KotlinQuickFi
|
||||
override fun getFamilyName() = KotlinBundle.message("fix.add.type.annnotation.family")
|
||||
|
||||
override fun getText() =
|
||||
element?.let { KotlinBundle.message("fix.add.type.annnotation.text", typeNameShort, it.name) } ?: ""
|
||||
element?.let { KotlinBundle.message("fix.add.type.annnotation.text", typeNameShort.toString(), it.name.toString()) } ?: ""
|
||||
|
||||
override fun invoke(project: Project, editor: Editor?, file: KtFile) {
|
||||
val element = element ?: return
|
||||
|
||||
@@ -48,13 +48,13 @@ class ChangeParameterTypeFix(element: KtParameter, type: KotlinType) : KotlinQui
|
||||
isPrimaryConstructorParameter -> {
|
||||
KotlinBundle.message(
|
||||
"fix.change.return.type.text.primary.constructor",
|
||||
element.name, containingDeclarationName, typePresentation
|
||||
element.name.toString(), containingDeclarationName.toString(), typePresentation
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
KotlinBundle.message(
|
||||
"fix.change.return.type.text.function",
|
||||
element.name, containingDeclarationName, typePresentation
|
||||
element.name.toString(), containingDeclarationName.toString(), typePresentation
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
class ChangeToUseSpreadOperatorFix(element: KtExpression) : KotlinQuickFixAction<KtExpression>(element) {
|
||||
override fun getFamilyName() = KotlinBundle.message("fix.change.to.use.spread.operator.family")
|
||||
|
||||
override fun getText() = KotlinBundle.message("fix.change.to.use.spread.operator.text", element?.text, "*${element?.text}")
|
||||
override fun getText() = KotlinBundle.message("fix.change.to.use.spread.operator.text", element?.text.toString(), "*${element?.text}")
|
||||
|
||||
override fun invoke(project: Project, editor: Editor?, file: KtFile) {
|
||||
val element = element ?: return
|
||||
|
||||
Reference in New Issue
Block a user