PY-40431 Extract messages from intellij.python.terminal module to the message bundle

GitOrigin-RevId: c0d584eff9d43e03895009bbfbf580ff31c058ed
This commit is contained in:
Alexander Koshevoy
2020-02-07 18:10:17 +03:00
committed by intellij-monorepo-bot
parent 9d0e3e09be
commit 831d39b705
3 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1 @@
activate.virtualenv.checkbox.text=Activate virtualenv

View File

@@ -0,0 +1,28 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.sdk;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class PyTerminalBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.PyTerminalBundle";
private static final PyTerminalBundle INSTANCE = new PyTerminalBundle();
private PyTerminalBundle() {
super(BUNDLE);
}
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params);
}
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
}

View File

@@ -81,7 +81,7 @@ class PyVirtualEnvTerminalCustomizer : LocalTerminalCustomizer() {
override fun getConfigurable(project: Project): UnnamedConfigurable = object : UnnamedConfigurable {
val settings = PyVirtualEnvTerminalSettings.getInstance(project)
var myCheckbox: JCheckBox = JCheckBox("Activate virtualenv")
var myCheckbox: JCheckBox = JCheckBox(PyTerminalBundle.message("activate.virtualenv.checkbox.text"))
override fun createComponent() = myCheckbox