i18n: remove template name from bundle
#KT-37483
This commit is contained in:
@@ -341,27 +341,20 @@ action.new.file.text=Kotlin File/Class
|
||||
action.new.file.description=Creates new Kotlin file or class
|
||||
action.new.file.dialog.title=New Kotlin File/Class
|
||||
action.new.file.dialog.file.title=File
|
||||
action.new.file.dialog.file.description=Kotlin File
|
||||
action.new.file.dialog.class.title=Class
|
||||
action.new.file.dialog.class.description=Kotlin Class
|
||||
action.new.file.dialog.interface.title=Interface
|
||||
action.new.file.dialog.interface.description=Kotlin Interface
|
||||
action.new.file.dialog.enum.title=Enum class
|
||||
action.new.file.dialog.enum.description=Kotlin Enum
|
||||
action.new.file.dialog.object.title=Object
|
||||
action.new.file.dialog.object.description=Kotlin Object
|
||||
action.new.file.error.empty.name=Name can't be empty
|
||||
action.new.file.error.empty.name.part=Name can't have empty parts
|
||||
|
||||
action.new.script.name=Kotlin Script
|
||||
action.new.script.description=Creates new Kotlin script
|
||||
action.new.script.dialog.title=New Kotlin Script
|
||||
action.new.script.template.name=Kotlin Script
|
||||
|
||||
action.new.worksheet.name=Kotlin Worksheet
|
||||
action.new.worksheet.description=Creates new Kotlin Worksheet
|
||||
action.new.worksheet.dialog.title=New Kotlin Worksheet
|
||||
action.new.worksheet.template.name=Kotlin Worksheet
|
||||
|
||||
breadcrumbs.tooltip.indexing=Indexing…
|
||||
|
||||
|
||||
@@ -90,27 +90,27 @@ class NewKotlinFileAction : CreateFileFromTemplateAction(
|
||||
.addKind(
|
||||
KotlinBundle.message("action.new.file.dialog.file.title"),
|
||||
KotlinFileType.INSTANCE.icon,
|
||||
KotlinBundle.message("action.new.file.dialog.file.description")
|
||||
"Kotlin File"
|
||||
)
|
||||
.addKind(
|
||||
KotlinBundle.message("action.new.file.dialog.class.title"),
|
||||
KotlinIcons.CLASS,
|
||||
KotlinBundle.message("action.new.file.dialog.class.description")
|
||||
"Kotlin Class"
|
||||
)
|
||||
.addKind(
|
||||
KotlinBundle.message("action.new.file.dialog.interface.title"),
|
||||
KotlinIcons.INTERFACE,
|
||||
KotlinBundle.message("action.new.file.dialog.interface.description")
|
||||
"Kotlin Interface"
|
||||
)
|
||||
.addKind(
|
||||
KotlinBundle.message("action.new.file.dialog.enum.title"),
|
||||
KotlinIcons.ENUM,
|
||||
KotlinBundle.message("action.new.file.dialog.enum.description")
|
||||
"Kotlin Enum"
|
||||
)
|
||||
.addKind(
|
||||
KotlinBundle.message("action.new.file.dialog.object.title"),
|
||||
KotlinIcons.OBJECT,
|
||||
KotlinBundle.message("action.new.file.dialog.object.description")
|
||||
"Kotlin Object"
|
||||
)
|
||||
|
||||
builder.setValidator(NameValidator)
|
||||
@@ -232,7 +232,7 @@ class NewKotlinFileAction : CreateFileFromTemplateAction(
|
||||
|
||||
fun createFileFromTemplate(name: String, template: FileTemplate, dir: PsiDirectory): PsiFile? {
|
||||
val directorySeparators = when (template.name) {
|
||||
KotlinBundle.message("action.new.file.dialog.file.description") -> FILE_SEPARATORS
|
||||
"Kotlin File" -> FILE_SEPARATORS
|
||||
else -> FQNAME_SEPARATORS
|
||||
}
|
||||
val (className, targetDir) = findOrCreateTarget(dir, name, directorySeparators)
|
||||
|
||||
@@ -13,15 +13,17 @@ import com.intellij.openapi.project.DumbAware
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiDirectory
|
||||
import com.intellij.psi.PsiFile
|
||||
import org.jetbrains.annotations.Nls
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.KotlinIcons
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
|
||||
open class NewKotlinScriptAction(
|
||||
val actionName: String,
|
||||
val description: String,
|
||||
val dialogTitle: String,
|
||||
val templateName: String
|
||||
@Nls val actionName: String,
|
||||
@Nls val description: String,
|
||||
@Nls val dialogTitle: String,
|
||||
@NonNls val templateName: String
|
||||
) : CreateFileFromTemplateAction(
|
||||
actionName,
|
||||
description,
|
||||
@@ -32,7 +34,7 @@ open class NewKotlinScriptAction(
|
||||
actionName = KotlinBundle.message("action.new.script.name"),
|
||||
description = KotlinBundle.message("action.new.script.description"),
|
||||
dialogTitle = KotlinBundle.message("action.new.script.dialog.title"),
|
||||
templateName = KotlinBundle.message("action.new.script.template.name")
|
||||
templateName = "Kotlin Script"
|
||||
)
|
||||
|
||||
override fun postProcess(createdElement: PsiFile, templateName: String?, customProperties: Map<String, String>?) {
|
||||
|
||||
@@ -16,7 +16,7 @@ class NewKotlinWorksheetAction : NewKotlinScriptAction(
|
||||
actionName = KotlinBundle.message("action.new.worksheet.name"),
|
||||
description = KotlinBundle.message("action.new.worksheet.description"),
|
||||
dialogTitle = KotlinBundle.message("action.new.worksheet.dialog.title"),
|
||||
templateName = KotlinBundle.message("action.new.worksheet.template.name")
|
||||
templateName = "Kotlin Worksheet"
|
||||
) {
|
||||
|
||||
override fun createFileFromTemplate(name: String, template: FileTemplate, dir: PsiDirectory): PsiFile? {
|
||||
|
||||
Reference in New Issue
Block a user