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.text.install=Install
|
||||
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
|
||||
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
|
||||
|
||||
+14
-4
@@ -28,6 +28,8 @@ import com.intellij.openapi.roots.ModifiableRootModel
|
||||
import com.intellij.openapi.vfs.LocalFileSystem
|
||||
import com.intellij.openapi.vfs.VfsUtil.createDirectoryIfMissing
|
||||
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.KotlinIdeaGradleBundle
|
||||
import org.jetbrains.kotlin.idea.formatter.KotlinStyleGuideCodeStyle
|
||||
@@ -162,9 +164,13 @@ abstract class GradleKotlinFrameworkSupportProvider(
|
||||
protected abstract fun getDependencies(sdk: Sdk?): List<String>
|
||||
protected open fun getTestDependencies(): List<String> = listOf()
|
||||
|
||||
@NonNls
|
||||
protected abstract fun getPluginId(): String
|
||||
|
||||
@NonNls
|
||||
protected abstract fun getPluginExpression(): String
|
||||
|
||||
@Nls
|
||||
protected abstract fun getDescription(): String
|
||||
}
|
||||
|
||||
@@ -253,7 +259,8 @@ open class GradleKotlinJSBrowserFrameworkSupportProvider(
|
||||
super.addSupport(buildScriptData, module, sdk, specifyPluginVersionIfNeeded, explicitPluginVersion)
|
||||
|
||||
getNewFileWriter(module, "src/main/resources", "index.html")?.use {
|
||||
it.write("""
|
||||
it.write(
|
||||
"""
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -265,18 +272,21 @@ open class GradleKotlinJSBrowserFrameworkSupportProvider(
|
||||
|
||||
</body>
|
||||
</html>
|
||||
""".trimIndent().trim())
|
||||
""".trimIndent().trim()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
getNewFileWriter(module, "src/main/kotlin", "main.kt")?.use {
|
||||
it.write("""
|
||||
it.write(
|
||||
"""
|
||||
import kotlin.browser.document
|
||||
|
||||
fun main() {
|
||||
document.write("Hello, world!")
|
||||
}
|
||||
""".trimIndent().trim())
|
||||
""".trimIndent().trim()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.platform.js.JsPlatforms
|
||||
|
||||
class KotlinJsGradleModuleConfigurator : KotlinWithGradleConfigurator() {
|
||||
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 kotlinPluginName: String = KOTLIN_JS
|
||||
override fun getKotlinPluginExpression(forKotlinDsl: Boolean): String =
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ class KotlinMPPGradleProjectTaskRunner extends ProjectTaskRunner
|
||||
else {
|
||||
projectName = projectFile.getName();
|
||||
}
|
||||
String executionName = KotlinIdeaGradleBundle.message("build.0", projectName);
|
||||
String executionName = KotlinIdeaGradleBundle.message("build.0.project", projectName);
|
||||
settings.setExecutionName(executionName);
|
||||
settings.setExternalProjectPath(rootProjectPath);
|
||||
settings.setTaskNames(ContainerUtil.collect(ContainerUtil.concat(cleanTasks, buildTasks).iterator()));
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ class KotlinMPPGradleProjectTaskRunner extends ProjectTaskRunner
|
||||
else {
|
||||
projectName = projectFile.getName();
|
||||
}
|
||||
String executionName = KotlinIdeaGradleBundle.message("build.0", projectName);
|
||||
String executionName = KotlinIdeaGradleBundle.message("build.0.project", projectName);
|
||||
settings.setExecutionName(executionName);
|
||||
settings.setExternalProjectPath(rootProjectPath);
|
||||
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"
|
||||
}
|
||||
|
||||
override val name: String = KotlinIdeaGradleBundle.message("text.default.kotlin.gradle.script")
|
||||
override val fileExtension: String =
|
||||
KOTLIN_DSL_SCRIPT_EXTENSION
|
||||
override val name: String get() = KotlinIdeaGradleBundle.message("text.default.kotlin.gradle.script")
|
||||
override val fileExtension: String = KOTLIN_DSL_SCRIPT_EXTENSION
|
||||
|
||||
override val scriptCompilationConfiguration: ScriptCompilationConfiguration = ScriptCompilationConfiguration.Default
|
||||
override val hostConfiguration: ScriptingHostConfiguration = ScriptingHostConfiguration(defaultJvmScriptingHostConfiguration)
|
||||
|
||||
@@ -123,7 +123,7 @@ class KotlinConsoleRunner(
|
||||
var compilerHelper: ConsoleCompilerHelper by Delegates.notNull()
|
||||
|
||||
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 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
|
||||
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)
|
||||
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 targetMethodAnnotations: List<Annotation> get() = emptyList()
|
||||
|
||||
companion object {
|
||||
val KOTLIN_SCRIPT: String get() = "Kotlin Script"
|
||||
}
|
||||
}
|
||||
|
||||
object StandardScriptDefinition : KotlinScriptDefinition(ScriptTemplateWithArgs::class)
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ abstract class KotlinScriptDefinitionAdapterFromNewAPIBase : KotlinScriptDefinit
|
||||
override val template: KClass<*> get() = baseClass
|
||||
|
||||
override val name: String
|
||||
get() = scriptCompilationConfiguration[ScriptCompilationConfiguration.displayName] ?: "Kotlin Script"
|
||||
get() = scriptCompilationConfiguration[ScriptCompilationConfiguration.displayName] ?: KOTLIN_SCRIPT
|
||||
|
||||
override val fileType: LanguageFileType = KotlinFileType.INSTANCE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user