i18n: update bundle in idea-gradle
#KT-37483
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
action.label.text.load.script.configuration=Load script configuration
|
action.label.text.load.script.configuration=Load script configuration
|
||||||
action.text.install=Install
|
action.text.install=Install
|
||||||
action.text.show.kotlin.gradle.dsl.logs.in=Show Kotlin Gradle DSL Logs in {0}
|
action.text.show.kotlin.gradle.dsl.logs.in=Show Kotlin Gradle DSL Logs in {0}
|
||||||
build.0=Build {0}
|
build.0.project=Build {0}
|
||||||
change.build.gradle.configuration=Change build.gradle configuration
|
change.build.gradle.configuration=Change build.gradle configuration
|
||||||
description.text.a.single.platform.kotlin.library.or.application.targeting.javascript=A single-platform Kotlin library or application targeting JavaScript
|
description.text.a.single.platform.kotlin.library.or.application.targeting.javascript=A single-platform Kotlin library or application targeting JavaScript
|
||||||
description.text.a.single.platform.kotlin.library.or.application.targeting.js.for.browser=A single-platform Kotlin library or application targeting JavaScript for browser
|
description.text.a.single.platform.kotlin.library.or.application.targeting.js.for.browser=A single-platform Kotlin library or application targeting JavaScript for browser
|
||||||
|
|||||||
+14
-4
@@ -28,6 +28,8 @@ import com.intellij.openapi.roots.ModifiableRootModel
|
|||||||
import com.intellij.openapi.vfs.LocalFileSystem
|
import com.intellij.openapi.vfs.LocalFileSystem
|
||||||
import com.intellij.openapi.vfs.VfsUtil.createDirectoryIfMissing
|
import com.intellij.openapi.vfs.VfsUtil.createDirectoryIfMissing
|
||||||
import com.intellij.psi.PsiFile
|
import com.intellij.psi.PsiFile
|
||||||
|
import org.jetbrains.annotations.Nls
|
||||||
|
import org.jetbrains.annotations.NonNls
|
||||||
import org.jetbrains.kotlin.idea.KotlinIcons
|
import org.jetbrains.kotlin.idea.KotlinIcons
|
||||||
import org.jetbrains.kotlin.idea.KotlinIdeaGradleBundle
|
import org.jetbrains.kotlin.idea.KotlinIdeaGradleBundle
|
||||||
import org.jetbrains.kotlin.idea.formatter.KotlinStyleGuideCodeStyle
|
import org.jetbrains.kotlin.idea.formatter.KotlinStyleGuideCodeStyle
|
||||||
@@ -162,9 +164,13 @@ abstract class GradleKotlinFrameworkSupportProvider(
|
|||||||
protected abstract fun getDependencies(sdk: Sdk?): List<String>
|
protected abstract fun getDependencies(sdk: Sdk?): List<String>
|
||||||
protected open fun getTestDependencies(): List<String> = listOf()
|
protected open fun getTestDependencies(): List<String> = listOf()
|
||||||
|
|
||||||
|
@NonNls
|
||||||
protected abstract fun getPluginId(): String
|
protected abstract fun getPluginId(): String
|
||||||
|
|
||||||
|
@NonNls
|
||||||
protected abstract fun getPluginExpression(): String
|
protected abstract fun getPluginExpression(): String
|
||||||
|
|
||||||
|
@Nls
|
||||||
protected abstract fun getDescription(): String
|
protected abstract fun getDescription(): String
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +259,8 @@ open class GradleKotlinJSBrowserFrameworkSupportProvider(
|
|||||||
super.addSupport(buildScriptData, module, sdk, specifyPluginVersionIfNeeded, explicitPluginVersion)
|
super.addSupport(buildScriptData, module, sdk, specifyPluginVersionIfNeeded, explicitPluginVersion)
|
||||||
|
|
||||||
getNewFileWriter(module, "src/main/resources", "index.html")?.use {
|
getNewFileWriter(module, "src/main/resources", "index.html")?.use {
|
||||||
it.write("""
|
it.write(
|
||||||
|
"""
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@@ -265,18 +272,21 @@ open class GradleKotlinJSBrowserFrameworkSupportProvider(
|
|||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
""".trimIndent().trim())
|
""".trimIndent().trim()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getNewFileWriter(module, "src/main/kotlin", "main.kt")?.use {
|
getNewFileWriter(module, "src/main/kotlin", "main.kt")?.use {
|
||||||
it.write("""
|
it.write(
|
||||||
|
"""
|
||||||
import kotlin.browser.document
|
import kotlin.browser.document
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
document.write("Hello, world!")
|
document.write("Hello, world!")
|
||||||
}
|
}
|
||||||
""".trimIndent().trim())
|
""".trimIndent().trim()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.platform.js.JsPlatforms
|
|||||||
|
|
||||||
class KotlinJsGradleModuleConfigurator : KotlinWithGradleConfigurator() {
|
class KotlinJsGradleModuleConfigurator : KotlinWithGradleConfigurator() {
|
||||||
override val name: String = "gradle-js"
|
override val name: String = "gradle-js"
|
||||||
override val presentableText: String = KotlinIdeaGradleBundle.message("presentable.text.javascript.with.gradle")
|
override val presentableText: String get() = KotlinIdeaGradleBundle.message("presentable.text.javascript.with.gradle")
|
||||||
override val targetPlatform: TargetPlatform = JsPlatforms.defaultJsPlatform
|
override val targetPlatform: TargetPlatform = JsPlatforms.defaultJsPlatform
|
||||||
override val kotlinPluginName: String = KOTLIN_JS
|
override val kotlinPluginName: String = KOTLIN_JS
|
||||||
override fun getKotlinPluginExpression(forKotlinDsl: Boolean): String =
|
override fun getKotlinPluginExpression(forKotlinDsl: Boolean): String =
|
||||||
|
|||||||
+1
-1
@@ -152,7 +152,7 @@ class KotlinMPPGradleProjectTaskRunner extends ProjectTaskRunner
|
|||||||
else {
|
else {
|
||||||
projectName = projectFile.getName();
|
projectName = projectFile.getName();
|
||||||
}
|
}
|
||||||
String executionName = KotlinIdeaGradleBundle.message("build.0", projectName);
|
String executionName = KotlinIdeaGradleBundle.message("build.0.project", projectName);
|
||||||
settings.setExecutionName(executionName);
|
settings.setExecutionName(executionName);
|
||||||
settings.setExternalProjectPath(rootProjectPath);
|
settings.setExternalProjectPath(rootProjectPath);
|
||||||
settings.setTaskNames(ContainerUtil.collect(ContainerUtil.concat(cleanTasks, buildTasks).iterator()));
|
settings.setTaskNames(ContainerUtil.collect(ContainerUtil.concat(cleanTasks, buildTasks).iterator()));
|
||||||
|
|||||||
+1
-1
@@ -150,7 +150,7 @@ class KotlinMPPGradleProjectTaskRunner extends ProjectTaskRunner
|
|||||||
else {
|
else {
|
||||||
projectName = projectFile.getName();
|
projectName = projectFile.getName();
|
||||||
}
|
}
|
||||||
String executionName = KotlinIdeaGradleBundle.message("build.0", projectName);
|
String executionName = KotlinIdeaGradleBundle.message("build.0.project", projectName);
|
||||||
settings.setExecutionName(executionName);
|
settings.setExecutionName(executionName);
|
||||||
settings.setExternalProjectPath(rootProjectPath);
|
settings.setExternalProjectPath(rootProjectPath);
|
||||||
settings.setTaskNames(ContainerUtil.collect(ContainerUtil.concat(cleanTasks, buildTasks).iterator()));
|
settings.setTaskNames(ContainerUtil.collect(ContainerUtil.concat(cleanTasks, buildTasks).iterator()));
|
||||||
|
|||||||
+2
-3
@@ -255,9 +255,8 @@ class GradleScriptDefinitionsContributor(private val project: Project) : ScriptD
|
|||||||
private const val KOTLIN_DSL_SCRIPT_EXTENSION = "gradle.kts"
|
private const val KOTLIN_DSL_SCRIPT_EXTENSION = "gradle.kts"
|
||||||
}
|
}
|
||||||
|
|
||||||
override val name: String = KotlinIdeaGradleBundle.message("text.default.kotlin.gradle.script")
|
override val name: String get() = KotlinIdeaGradleBundle.message("text.default.kotlin.gradle.script")
|
||||||
override val fileExtension: String =
|
override val fileExtension: String = KOTLIN_DSL_SCRIPT_EXTENSION
|
||||||
KOTLIN_DSL_SCRIPT_EXTENSION
|
|
||||||
|
|
||||||
override val scriptCompilationConfiguration: ScriptCompilationConfiguration = ScriptCompilationConfiguration.Default
|
override val scriptCompilationConfiguration: ScriptCompilationConfiguration = ScriptCompilationConfiguration.Default
|
||||||
override val hostConfiguration: ScriptingHostConfiguration = ScriptingHostConfiguration(defaultJvmScriptingHostConfiguration)
|
override val hostConfiguration: ScriptingHostConfiguration = ScriptingHostConfiguration(defaultJvmScriptingHostConfiguration)
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class KotlinConsoleRunner(
|
|||||||
var compilerHelper: ConsoleCompilerHelper by Delegates.notNull()
|
var compilerHelper: ConsoleCompilerHelper by Delegates.notNull()
|
||||||
|
|
||||||
private val consoleScriptDefinition = object : KotlinScriptDefinition(Any::class) {
|
private val consoleScriptDefinition = object : KotlinScriptDefinition(Any::class) {
|
||||||
override val name = KotlinIdeaReplBundle.message("kotlin.repl")
|
override val name get() = KotlinIdeaReplBundle.message("kotlin.repl")
|
||||||
override fun isScript(fileName: String): Boolean = fileName.startsWith(consoleView.virtualFile.name)
|
override fun isScript(fileName: String): Boolean = fileName.startsWith(consoleView.virtualFile.name)
|
||||||
override fun getScriptName(script: KtScript) = Name.identifier("REPL")
|
override fun getScriptName(script: KtScript) = Name.identifier("REPL")
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -21,7 +21,7 @@ import kotlin.script.templates.standard.ScriptTemplateWithArgs
|
|||||||
// TODO: make deprecated and drop usages where possible
|
// TODO: make deprecated and drop usages where possible
|
||||||
open class KotlinScriptDefinition(open val template: KClass<out Any>) : UserDataHolderBase() {
|
open class KotlinScriptDefinition(open val template: KClass<out Any>) : UserDataHolderBase() {
|
||||||
|
|
||||||
open val name: String = "Kotlin Script"
|
open val name: String = KOTLIN_SCRIPT
|
||||||
|
|
||||||
// TODO: consider creating separate type (subtype? for kotlin scripts)
|
// TODO: consider creating separate type (subtype? for kotlin scripts)
|
||||||
open val fileType: LanguageFileType = KotlinFileType.INSTANCE
|
open val fileType: LanguageFileType = KotlinFileType.INSTANCE
|
||||||
@@ -63,6 +63,10 @@ open class KotlinScriptDefinition(open val template: KClass<out Any>) : UserData
|
|||||||
open val targetClassAnnotations: List<Annotation> get() = emptyList()
|
open val targetClassAnnotations: List<Annotation> get() = emptyList()
|
||||||
|
|
||||||
open val targetMethodAnnotations: List<Annotation> get() = emptyList()
|
open val targetMethodAnnotations: List<Annotation> get() = emptyList()
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
val KOTLIN_SCRIPT: String get() = "Kotlin Script"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object StandardScriptDefinition : KotlinScriptDefinition(ScriptTemplateWithArgs::class)
|
object StandardScriptDefinition : KotlinScriptDefinition(ScriptTemplateWithArgs::class)
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ abstract class KotlinScriptDefinitionAdapterFromNewAPIBase : KotlinScriptDefinit
|
|||||||
override val template: KClass<*> get() = baseClass
|
override val template: KClass<*> get() = baseClass
|
||||||
|
|
||||||
override val name: String
|
override val name: String
|
||||||
get() = scriptCompilationConfiguration[ScriptCompilationConfiguration.displayName] ?: "Kotlin Script"
|
get() = scriptCompilationConfiguration[ScriptCompilationConfiguration.displayName] ?: KOTLIN_SCRIPT
|
||||||
|
|
||||||
override val fileType: LanguageFileType = KotlinFileType.INSTANCE
|
override val fileType: LanguageFileType = KotlinFileType.INSTANCE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user