diff --git a/idea/idea-analysis/resources/org/jetbrains/kotlin/idea/KotlinBundle.properties b/idea/idea-analysis/resources/org/jetbrains/kotlin/idea/KotlinBundle.properties
index daa1c4f6f56..5703763829e 100644
--- a/idea/idea-analysis/resources/org/jetbrains/kotlin/idea/KotlinBundle.properties
+++ b/idea/idea-analysis/resources/org/jetbrains/kotlin/idea/KotlinBundle.properties
@@ -140,10 +140,7 @@ kotlin.compiler.js.option.panel.title=Kotlin to JavaScript
kotlin.compiler.js.option.generate.sourcemaps=Generate &source maps
kotlin.compiler.js.option.output.prefix=File to &prepend to generated code:
kotlin.compiler.js.option.output.postfix=File to append to generated c&ode:
-kotlin.compiler.js.option.output.prefix.browse.title=Choose file to prepend to generated code
-kotlin.compiler.js.option.output.postfix.browse.title=Choose file to append to generated code
-kotlin.compiler.js.option.output.copy.files=&Copy library runtime files
-kotlin.compiler.js.option.output.copy.dir=O&utput directory for library &runtime files:
+kotlin.compiler.js.option.output.copy.files=&Copy library runtime fileskotlin.compiler.js.option.output.copy.dir=O&utput directory for library &runtime files:
# Android Lint
android.klint.inspections.group.name=Android Lint for Kotlin
diff --git a/idea/resources/messages/KotlinConfigurationBundle.properties b/idea/resources/messages/KotlinConfigurationBundle.properties
new file mode 100644
index 00000000000..56287734de5
--- /dev/null
+++ b/idea/resources/messages/KotlinConfigurationBundle.properties
@@ -0,0 +1,46 @@
+action.text.ignore=Ignore
+action.text.update=Update
+description.always=Always
+description.amd=AMD
+description.commonjs=CommonJS
+description.never=Never
+description.plain.put.to.global.scope=Plain (put to global scope)
+description.umd.detect.amd.or.commonjs.if.available.fallback.to.plain=UMD (detect AMD or CommonJS if available, fallback to plain)
+description.when.inlining.a.function.from.other.module.with.embedded.sources=When inlining a function from other module with embedded sources
+error.text.shouldn.t.add.null.urls.to.custom.repositories=Shouldn''t add null urls to custom repositories
+feature.text.new.experimental.project.wizard=New Kotlin project wizard
+feature.text.new.java.to.kotlin.converter=New Java to Kotlin converter
+message.enter.fully.qualified.method.name=Enter fully-qualified method name:
+message.text.a.new.version.is.available=A new version {0} is available
+message.text.a.new.version.is.found=A new version {0} is found but it''s not verified by {1}.
+message.text.update.check.failed=Update check failed: {0}
+message.text.you.have.the.latest.version.of.the.plugin.installed=You have the latest version of the plugin installed.
+message.verifier.disabled=(verifier disabled)
+migration.text.api.version=API version: {0} -> {1}
+migration.text.detected.migration=Detected migration:
+migration.text.language.version=Language version: {0} -> {1}
+migration.text.migrations.for.kotlin.code.are.available=Migrations for Kotlin code are available
+migration.text.run.migrations=Run migrations
+migration.text.standard.library=Standard library: {0} -> {1}
+migration.title.kotlin.migration=Kotlin Migration
+name.kotlin.compiler=Kotlin Compiler
+name.kotlin=Kotlin
+name.method=Method
+status.text.installation.failed=Installation failed
+status.text.installing=Installing...
+text.add.exclusion=Add exclusion
+text.and=and
+text.other.s=other(s)
+text.patched.original={0} (Patched! Original: {1})
+text.the.compiler.bundled.to.kotlin.plugin=The compiler bundled to Kotlin plugin ({0}) is older than external compiler used for building modules:
+text.this.may.cause.different.set.of.errors.and.warnings.reported.in.ide.p=This may cause different set of errors and warnings reported in IDE.
+title.choose.output.directory=Choose Output Directory
+title.early.access.preview.1.3.x=Early Access Preview 1.3.x
+title.early.access.preview.1.4.x=Early Access Preview 1.4.x
+title.edit.exclusion=Edit exclusion
+title.kotlin.compiler.js.option.output.postfix.browse.title=Choose file to append to generated code
+title.kotlin.compiler.js.option.output.prefix.browse.title=Choose file to prepend to generated code
+title.outdated.bundled.kotlin.compiler=Outdated Bundled Kotlin Compiler
+title.stable=Stable
+warning.text.following.modules.override.project.settings=Following modules override project settings:
+warning.text.modules.override.project.settings={0} modules override project settings
diff --git a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java
index 01223f1d1bd..07211d56f2c 100644
--- a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java
+++ b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java
@@ -9,7 +9,6 @@ import com.intellij.icons.AllIcons;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
import com.intellij.openapi.module.ModuleManager;
-import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.options.SearchableConfigurable;
import com.intellij.openapi.project.Project;
@@ -33,8 +32,8 @@ import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments;
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments;
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants;
import org.jetbrains.kotlin.config.*;
-import org.jetbrains.kotlin.idea.KotlinBundle;
import org.jetbrains.kotlin.idea.PluginStartupService;
+import org.jetbrains.kotlin.idea.configuration.KotlinConfigurationBundle;
import org.jetbrains.kotlin.idea.facet.DescriptionListCellRenderer;
import org.jetbrains.kotlin.idea.facet.KotlinFacet;
import org.jetbrains.kotlin.idea.project.NewInferenceForIDEAnalysisComponent;
@@ -43,12 +42,11 @@ import org.jetbrains.kotlin.idea.util.CidrUtil;
import org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt;
import org.jetbrains.kotlin.platform.IdePlatformKind;
import org.jetbrains.kotlin.platform.PlatformUtilKt;
+import org.jetbrains.kotlin.platform.TargetPlatform;
import org.jetbrains.kotlin.platform.impl.JsIdePlatformUtil;
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind;
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformUtil;
-import org.jetbrains.kotlin.config.JvmTarget;
import org.jetbrains.kotlin.platform.jvm.JdkPlatform;
-import org.jetbrains.kotlin.platform.TargetPlatform;
import javax.swing.*;
import java.util.*;
@@ -62,15 +60,19 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
private static final int MAX_WARNING_SIZE = 75;
static {
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_PLAIN, "Plain (put to global scope)");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_AMD, "AMD");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_COMMONJS, "CommonJS");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_UMD, "UMD (detect AMD or CommonJS if available, fallback to plain)");
+ moduleKindDescriptions
+ .put(K2JsArgumentConstants.MODULE_PLAIN, KotlinConfigurationBundle.message("description.plain.put.to.global.scope"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_AMD, KotlinConfigurationBundle.message("description.amd"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_COMMONJS, KotlinConfigurationBundle.message("description.commonjs"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_UMD, KotlinConfigurationBundle
+ .message("description.umd.detect.amd.or.commonjs.if.available.fallback.to.plain"));
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER, "Never");
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS, "Always");
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING,
- "When inlining a function from other module with embedded sources");
+ soruceMapSourceEmbeddingDescriptions
+ .put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER, KotlinConfigurationBundle.message("description.never"));
+ soruceMapSourceEmbeddingDescriptions
+ .put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS, KotlinConfigurationBundle.message("description.always"));
+ soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING, KotlinConfigurationBundle
+ .message("description.when.inlining.a.function.from.other.module.with.embedded.sources"));
}
@Nullable
@@ -189,13 +191,13 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
private void initializeNonCidrSettings(boolean isMultiEditor) {
setupFileChooser(labelForOutputPrefixFile, outputPrefixFile,
- KotlinBundle.message("kotlin.compiler.js.option.output.prefix.browse.title"),
+ KotlinConfigurationBundle.message("title.kotlin.compiler.js.option.output.prefix.browse.title"),
true);
setupFileChooser(labelForOutputPostfixFile, outputPostfixFile,
- KotlinBundle.message("kotlin.compiler.js.option.output.postfix.browse.title"),
+ KotlinConfigurationBundle.message("title.kotlin.compiler.js.option.output.postfix.browse.title"),
true);
setupFileChooser(labelForOutputDirectory, outputDirectory,
- "Choose Output Directory",
+ KotlinConfigurationBundle.message("title.choose.output.directory"),
false);
fillModuleKindList();
@@ -233,11 +235,12 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
int nameCountToShow = calculateNameCountToShowInWarning(modulesOverridingProjectSettings);
int allNamesCount = modulesOverridingProjectSettings.size();
if (nameCountToShow == 0) {
- return String.valueOf(allNamesCount) + " modules override project settings";
+ return KotlinConfigurationBundle.message("warning.text.modules.override.project.settings", String.valueOf(allNamesCount));
}
StringBuilder builder = new StringBuilder();
- builder.append("Following modules override project settings: ");
+ builder.append("");
+ builder.append(KotlinConfigurationBundle.message("warning.text.following.modules.override.project.settings")).append(" ");
CollectionsKt.joinTo(
modulesOverridingProjectSettings.subList(0, nameCountToShow),
builder,
@@ -254,7 +257,8 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
}
);
if (nameCountToShow < allNamesCount) {
- builder.append(" and ").append(allNamesCount - nameCountToShow).append(" other(s)");
+ builder.append(" ").append(KotlinConfigurationBundle.message("text.and")).append(" ").append(allNamesCount - nameCountToShow)
+ .append(" ").append(KotlinConfigurationBundle.message("text.other.s"));
}
return builder.toString();
}
@@ -503,10 +507,14 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
LanguageFeature.State state = (LanguageFeature.State) coroutineSupportComboBox.getSelectedItem();
if (state == null) return CommonCompilerArguments.DEFAULT;
switch (state) {
- case ENABLED: return CommonCompilerArguments.ENABLE;
- case ENABLED_WITH_WARNING: return CommonCompilerArguments.WARN;
- case ENABLED_WITH_ERROR: return CommonCompilerArguments.ERROR;
- default: return CommonCompilerArguments.DEFAULT;
+ case ENABLED:
+ return CommonCompilerArguments.ENABLE;
+ case ENABLED_WITH_WARNING:
+ return CommonCompilerArguments.WARN;
+ case ENABLED_WITH_ERROR:
+ return CommonCompilerArguments.ERROR;
+ default:
+ return CommonCompilerArguments.DEFAULT;
}
}
@@ -567,7 +575,8 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
k2jsCompilerArguments.setModuleKind(getSelectedModuleKind());
k2jsCompilerArguments.setSourceMapPrefix(sourceMapPrefix.getText());
- k2jsCompilerArguments.setSourceMapEmbedSources(generateSourceMapsCheckBox.isSelected() ? getSelectedSourceMapSourceEmbedding() : null);
+ k2jsCompilerArguments
+ .setSourceMapEmbedSources(generateSourceMapsCheckBox.isSelected() ? getSelectedSourceMapSourceEmbedding() : null);
k2jvmCompilerArguments.setJvmTarget(getSelectedJvmVersion());
@@ -627,7 +636,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
@Nls
@Override
public String getDisplayName() {
- return "Kotlin Compiler";
+ return KotlinConfigurationBundle.message("name.kotlin.compiler");
}
@Nullable
diff --git a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java.191 b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java.191
index cf9ade58e29..302a34bd40b 100644
--- a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java.191
+++ b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java.191
@@ -33,8 +33,8 @@ import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments;
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments;
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants;
import org.jetbrains.kotlin.config.*;
-import org.jetbrains.kotlin.idea.KotlinBundle;
import org.jetbrains.kotlin.idea.PluginStartupComponent;
+import org.jetbrains.kotlin.idea.configuration.KotlinConfigurationBundle;
import org.jetbrains.kotlin.idea.facet.DescriptionListCellRenderer;
import org.jetbrains.kotlin.idea.facet.KotlinFacet;
import org.jetbrains.kotlin.idea.project.NewInferenceForIDEAnalysisComponent;
@@ -62,15 +62,14 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
private static final int MAX_WARNING_SIZE = 75;
static {
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_PLAIN, "Plain (put to global scope)");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_AMD, "AMD");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_COMMONJS, "CommonJS");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_UMD, "UMD (detect AMD or CommonJS if available, fallback to plain)");
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_PLAIN, KotlinConfigurationBundle.message("description.plain.put.to.global.scope"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_AMD, KotlinConfigurationBundle.message("description.amd"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_COMMONJS, KotlinConfigurationBundle.message("description.commonjs"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_UMD, KotlinConfigurationBundle.message("description.umd.detect.amd.or.commonjs.if.available.fallback.to.plain"));
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER, "Never");
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS, "Always");
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING,
- "When inlining a function from other module with embedded sources");
+ soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER, KotlinConfigurationBundle.message("description.never"));
+ soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS, KotlinConfigurationBundle.message("description.always"));
+ soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING, KotlinConfigurationBundle.message("description.when.inlining.a.function.from.other.module.with.embedded.sources"));
}
@Nullable
@@ -189,13 +188,13 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
private void initializeNonCidrSettings(boolean isMultiEditor) {
setupFileChooser(labelForOutputPrefixFile, outputPrefixFile,
- KotlinBundle.message("kotlin.compiler.js.option.output.prefix.browse.title"),
+ KotlinConfigurationBundle.message("title.kotlin.compiler.js.option.output.prefix.browse.title"),
true);
setupFileChooser(labelForOutputPostfixFile, outputPostfixFile,
- KotlinBundle.message("kotlin.compiler.js.option.output.postfix.browse.title"),
+ KotlinConfigurationBundle.message("title.kotlin.compiler.js.option.output.postfix.browse.title"),
true);
setupFileChooser(labelForOutputDirectory, outputDirectory,
- "Choose Output Directory",
+ KotlinConfigurationBundle.message("title.choose.output.directory"),
false);
fillModuleKindList();
@@ -233,11 +232,12 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
int nameCountToShow = calculateNameCountToShowInWarning(modulesOverridingProjectSettings);
int allNamesCount = modulesOverridingProjectSettings.size();
if (nameCountToShow == 0) {
- return String.valueOf(allNamesCount) + " modules override project settings";
+ return KotlinConfigurationBundle.message("warning.text.modules.override.project.settings", String.valueOf(allNamesCount));
}
StringBuilder builder = new StringBuilder();
- builder.append("Following modules override project settings: ");
+ builder.append("");
+ builder.append(KotlinConfigurationBundle.message("warning.text.following.modules.override.project.settings")).append(" ");
CollectionsKt.joinTo(
modulesOverridingProjectSettings.subList(0, nameCountToShow),
builder,
@@ -254,7 +254,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
}
);
if (nameCountToShow < allNamesCount) {
- builder.append(" and ").append(allNamesCount - nameCountToShow).append(" other(s)");
+ builder.append(" ").append(KotlinConfigurationBundle.message("text.and")).append(" ").append(allNamesCount - nameCountToShow).append(" ").append(KotlinConfigurationBundle.message("text.other.s"));
}
return builder.toString();
}
@@ -627,7 +627,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
@Nls
@Override
public String getDisplayName() {
- return "Kotlin Compiler";
+ return KotlinConfigurationBundle.message("name.kotlin.compiler");
}
@Nullable
diff --git a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java.192 b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java.192
index cf9ade58e29..4b7f6d456d8 100644
--- a/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java.192
+++ b/idea/src/org/jetbrains/kotlin/idea/compiler/configuration/KotlinCompilerConfigurableTab.java.192
@@ -33,8 +33,9 @@ import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments;
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments;
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants;
import org.jetbrains.kotlin.config.*;
-import org.jetbrains.kotlin.idea.KotlinBundle;
import org.jetbrains.kotlin.idea.PluginStartupComponent;
+import org.jetbrains.kotlin.idea.configuration.ProjectUtilsKt;
+import org.jetbrains.kotlin.idea.configuration.KotlinConfigurationBundle;
import org.jetbrains.kotlin.idea.facet.DescriptionListCellRenderer;
import org.jetbrains.kotlin.idea.facet.KotlinFacet;
import org.jetbrains.kotlin.idea.project.NewInferenceForIDEAnalysisComponent;
@@ -62,15 +63,14 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
private static final int MAX_WARNING_SIZE = 75;
static {
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_PLAIN, "Plain (put to global scope)");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_AMD, "AMD");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_COMMONJS, "CommonJS");
- moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_UMD, "UMD (detect AMD or CommonJS if available, fallback to plain)");
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_PLAIN, KotlinConfigurationBundle.message("description.plain.put.to.global.scope"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_AMD, KotlinConfigurationBundle.message("description.amd"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_COMMONJS, KotlinConfigurationBundle.message("description.commonjs"));
+ moduleKindDescriptions.put(K2JsArgumentConstants.MODULE_UMD, KotlinConfigurationBundle.message("description.umd.detect.amd.or.commonjs.if.available.fallback.to.plain"));
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER, "Never");
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS, "Always");
- soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING,
- "When inlining a function from other module with embedded sources");
+ soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER, KotlinConfigurationBundle.message("description.never"));
+ soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS, KotlinConfigurationBundle.message("description.always"));
+ soruceMapSourceEmbeddingDescriptions.put(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING, KotlinConfigurationBundle.message("description.when.inlining.a.function.from.other.module.with.embedded.sources"));
}
@Nullable
@@ -189,13 +189,13 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
private void initializeNonCidrSettings(boolean isMultiEditor) {
setupFileChooser(labelForOutputPrefixFile, outputPrefixFile,
- KotlinBundle.message("kotlin.compiler.js.option.output.prefix.browse.title"),
+ KotlinConfigurationBundle.message("title.kotlin.compiler.js.option.output.prefix.browse.title"),
true);
setupFileChooser(labelForOutputPostfixFile, outputPostfixFile,
- KotlinBundle.message("kotlin.compiler.js.option.output.postfix.browse.title"),
+ KotlinConfigurationBundle.message("title.kotlin.compiler.js.option.output.postfix.browse.title"),
true);
setupFileChooser(labelForOutputDirectory, outputDirectory,
- "Choose Output Directory",
+ KotlinConfigurationBundle.message("title.choose.output.directory"),
false);
fillModuleKindList();
@@ -233,11 +233,12 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
int nameCountToShow = calculateNameCountToShowInWarning(modulesOverridingProjectSettings);
int allNamesCount = modulesOverridingProjectSettings.size();
if (nameCountToShow == 0) {
- return String.valueOf(allNamesCount) + " modules override project settings";
+ return KotlinConfigurationBundle.message("warning.text.modules.override.project.settings", String.valueOf(allNamesCount));
}
StringBuilder builder = new StringBuilder();
- builder.append("Following modules override project settings: ");
+ builder.append("");
+ builder.append(KotlinConfigurationBundle.message("warning.text.following.modules.override.project.settings")).append(" ");
CollectionsKt.joinTo(
modulesOverridingProjectSettings.subList(0, nameCountToShow),
builder,
@@ -254,7 +255,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
}
);
if (nameCountToShow < allNamesCount) {
- builder.append(" and ").append(allNamesCount - nameCountToShow).append(" other(s)");
+ builder.append(" ").append(KotlinConfigurationBundle.message("text.and")).append(" ").append(allNamesCount - nameCountToShow).append(" ").append(KotlinConfigurationBundle.message("text.other.s"));
}
return builder.toString();
}
@@ -627,7 +628,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
@Nls
@Override
public String getDisplayName() {
- return "Kotlin Compiler";
+ return KotlinConfigurationBundle.message("name.kotlin.compiler");
}
@Nullable
diff --git a/idea/src/org/jetbrains/kotlin/idea/configuration/ExperimentalFeatures.kt b/idea/src/org/jetbrains/kotlin/idea/configuration/ExperimentalFeatures.kt
index 24efdd73eb7..19f4c130714 100644
--- a/idea/src/org/jetbrains/kotlin/idea/configuration/ExperimentalFeatures.kt
+++ b/idea/src/org/jetbrains/kotlin/idea/configuration/ExperimentalFeatures.kt
@@ -20,13 +20,13 @@ import javax.swing.JPanel
object ExperimentalFeatures {
val NewJ2k = RegistryExperimentalFeature(
- title = "New Java to Kotlin converter",
+ title = KotlinConfigurationBundle.message("feature.text.new.java.to.kotlin.converter"),
registryKey = "kotlin.experimental.new.j2k",
enabledByDefault = true
)
val NewWizard = object : RegistryExperimentalFeature(
- title = "New Kotlin project wizard",
+ title = KotlinConfigurationBundle.message("feature.text.new.experimental.project.wizard"),
registryKey = "kotlin.experimental.project.wizard",
enabledByDefault = false
) {
diff --git a/idea/src/org/jetbrains/kotlin/idea/configuration/KotlinConfigurationBundle.kt b/idea/src/org/jetbrains/kotlin/idea/configuration/KotlinConfigurationBundle.kt
new file mode 100644
index 00000000000..b85396f59a5
--- /dev/null
+++ b/idea/src/org/jetbrains/kotlin/idea/configuration/KotlinConfigurationBundle.kt
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package org.jetbrains.kotlin.idea.configuration
+
+import org.jetbrains.annotations.NonNls
+import org.jetbrains.annotations.PropertyKey
+import org.jetbrains.kotlin.util.AbstractKotlinBundle
+
+@NonNls
+private const val BUNDLE = "messages.KotlinConfigurationBundle"
+
+object KotlinConfigurationBundle : AbstractKotlinBundle(BUNDLE) {
+ @JvmStatic
+ fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String = getMessage(key, *params)
+}
diff --git a/idea/src/org/jetbrains/kotlin/idea/configuration/KotlinLanguageConfiguration.kt b/idea/src/org/jetbrains/kotlin/idea/configuration/KotlinLanguageConfiguration.kt
index f0d315adb08..f304a85a8c6 100644
--- a/idea/src/org/jetbrains/kotlin/idea/configuration/KotlinLanguageConfiguration.kt
+++ b/idea/src/org/jetbrains/kotlin/idea/configuration/KotlinLanguageConfiguration.kt
@@ -28,17 +28,20 @@ class KotlinLanguageConfiguration : SearchableConfigurable, Configurable.NoScrol
UpdateChannel.values().find { it.ordinal == channelOrdinal }?.let { eapChannel ->
if (eapChannel != UpdateChannel.STABLE) {
- hosts.add(eapChannel.url ?: error("Shouldn't add null urls to custom repositories"))
+ hosts.add(eapChannel.url ?: error(KotlinConfigurationBundle.message("error.text.shouldn.t.add.null.urls.to.custom.repositories")))
}
}
}
enum class UpdateChannel(val url: String?, val title: String) {
- STABLE(null, "Stable"),
- EAP("https://plugins.jetbrains.com/plugins/eap/${KotlinPluginUtil.KOTLIN_PLUGIN_ID.idString}", "Early Access Preview 1.3.x"),
+ STABLE(null, KotlinConfigurationBundle.message("title.stable")),
+ EAP(
+ "https://plugins.jetbrains.com/plugins/eap/${KotlinPluginUtil.KOTLIN_PLUGIN_ID.idString}",
+ KotlinConfigurationBundle.message("title.early.access.preview.1.3.x")
+ ),
EAP_NEXT(
"https://plugins.jetbrains.com/plugins/eap-next/${KotlinPluginUtil.KOTLIN_PLUGIN_ID.idString}",
- "Early Access Preview 1.4.x"
+ KotlinConfigurationBundle.message("title.early.access.preview.1.4.x")
);
fun isInHosts(): Boolean {
@@ -60,7 +63,7 @@ class KotlinLanguageConfiguration : SearchableConfigurable, Configurable.NoScrol
override fun getId(): String = ID
- override fun getDisplayName(): String = "Kotlin"
+ override fun getDisplayName(): String = KotlinConfigurationBundle.message("name.kotlin")
override fun isModified() =
form.experimentalFeaturesPanel.isModified()
@@ -89,7 +92,7 @@ class KotlinLanguageConfiguration : SearchableConfigurable, Configurable.NoScrol
update?.let {
form.hideInstallButton()
- setInstalledVersion(it.pluginDescriptor.version, "Installing...")
+ setInstalledVersion(it.pluginDescriptor.version, KotlinConfigurationBundle.message("status.text.installing"))
form.installStatusLabel.text = installingStatus
@@ -111,7 +114,7 @@ class KotlinLanguageConfiguration : SearchableConfigurable, Configurable.NoScrol
},
errorCallback = {
if (versionForInstallation == it.pluginDescriptor.version) {
- form.installStatusLabel.text = "Installation failed"
+ form.installStatusLabel.text = KotlinConfigurationBundle.message("status.text.installation.failed")
form.showInstallButton()
setInstalledVersion(null, null)
}
@@ -150,7 +153,7 @@ class KotlinLanguageConfiguration : SearchableConfigurable, Configurable.NoScrol
when (pluginUpdateStatus) {
PluginUpdateStatus.LatestVersionInstalled -> {
form.setUpdateStatus(
- "You have the latest version of the plugin installed.",
+ KotlinConfigurationBundle.message("message.text.you.have.the.latest.version.of.the.plugin.installed"),
false
)
}
@@ -158,7 +161,13 @@ class KotlinLanguageConfiguration : SearchableConfigurable, Configurable.NoScrol
is PluginUpdateStatus.Update -> {
update = pluginUpdateStatus
versionForInstallation = update?.pluginDescriptor?.version
- form.setUpdateStatus("A new version ${pluginUpdateStatus.pluginDescriptor.version} is available", true)
+ form.setUpdateStatus(
+ KotlinConfigurationBundle.message(
+ "message.text.a.new.version.is.available",
+ pluginUpdateStatus.pluginDescriptor.version
+ ),
+ true
+ )
if (installedVersion != null && installedVersion == versionForInstallation) {
// Installation of the plugin has been started or finished
form.hideInstallButton()
@@ -167,11 +176,18 @@ class KotlinLanguageConfiguration : SearchableConfigurable, Configurable.NoScrol
}
is PluginUpdateStatus.CheckFailed ->
- form.setUpdateStatus("Update check failed: ${pluginUpdateStatus.message}", false)
+ form.setUpdateStatus(
+ KotlinConfigurationBundle.message("message.text.update.check.failed", pluginUpdateStatus.message),
+ false
+ )
is PluginUpdateStatus.Unverified -> {
val version = pluginUpdateStatus.updateStatus.pluginDescriptor.version
- val generalLine = "A new version $version is found but it's not verified by ${pluginUpdateStatus.verifierName}."
+ val generalLine = KotlinConfigurationBundle.message(
+ "message.text.a.new.version.is.found",
+ version,
+ pluginUpdateStatus.verifierName
+ )
val reasonLine = pluginUpdateStatus.reason ?: ""
val message = "$generalLine
$reasonLine"
form.setUpdateStatus(message, false)
diff --git a/idea/src/org/jetbrains/kotlin/idea/configuration/outdatedBundledCompilerNotification.kt b/idea/src/org/jetbrains/kotlin/idea/configuration/outdatedBundledCompilerNotification.kt
index 6e717fb7798..3180da9c8ab 100644
--- a/idea/src/org/jetbrains/kotlin/idea/configuration/outdatedBundledCompilerNotification.kt
+++ b/idea/src/org/jetbrains/kotlin/idea/configuration/outdatedBundledCompilerNotification.kt
@@ -45,8 +45,11 @@ fun notifyOutdatedBundledCompilerIfNecessary(project: Project) {
Notifications.Bus.notify(
Notification(
- OUTDATED_BUNDLED_COMPILER_GROUP_DISPLAY_ID, OUTDATED_BUNDLED_COMPILER_GROUP_DISPLAY_ID, message,
- NotificationType.WARNING, NotificationListener { notification, event ->
+ OUTDATED_BUNDLED_COMPILER_GROUP_DISPLAY_ID,
+ KotlinConfigurationBundle.message("title.outdated.bundled.kotlin.compiler"),
+ message,
+ NotificationType.WARNING,
+ NotificationListener { notification, event ->
if (event.eventType == HyperlinkEvent.EventType.ACTIVATED) {
when {
"update" == event.description -> {
@@ -127,10 +130,10 @@ fun createOutdatedBundledCompilerMessage(project: Project, bundledCompilerVersio
modulesStr = modulesStr.removeSuffix("
")
return """
-
The compiler bundled to Kotlin plugin ($bundledCompilerVersion) is older than external compiler used for building modules:
+${KotlinConfigurationBundle.message("text.the.compiler.bundled.to.kotlin.plugin", bundledCompilerVersion)}
This may cause different set of errors and warnings reported in IDE.
- """ +${KotlinConfigurationBundle.message("text.this.may.cause.different.set.of.errors.and.warnings.reported.in.ide.p")}
+${KotlinConfigurationBundle.message("action.text.update")} ${KotlinConfigurationBundle.message("action.text.ignore")}
""" .trimIndent().lines().joinToString(separator = "").replace("