mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
i18n: javafx
GitOrigin-RevId: bc078a644c46440cb52cd340f6310b61b2bc8dcf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1e511c85c1
commit
033dc1ab2b
@@ -3,6 +3,7 @@
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
||||
@@ -140,4 +140,13 @@ scene.builder.editor.tab.name=Scene Builder
|
||||
constant.not.found=Constant ''{0}'' is not found
|
||||
cannot.class.name.to.field.name=Cannot set {0} to field ''{1}''
|
||||
enum.constant.not.found=No enum constant ''{0}'' in {1}
|
||||
dialect.display.name=Java FX
|
||||
dialect.display.name=Java FX
|
||||
group.name.javafx=JavaFX
|
||||
inspection.java.fx.resource.property.value.display.name=The value from properties file is incompatible with the attribute type
|
||||
bundled.ant.not.found=Bundled ant not found.
|
||||
javafx.sign.task.has.failed.for.0=JavaFX sign task has failed for: {0}.
|
||||
javafx.generate.certificate.task.has.failed=JavaFX generate certificate task has failed.
|
||||
unable.to.build.javafx.artifact.not.specified=Unable to build JavaFX artifact. {0} should be specified in artifact''s settings.
|
||||
fx.deploy.task.has.failed=fx:deploy task has failed.
|
||||
cant.build.artifact.fx.deploy.is.not.available.in.this.jdk=Can't build artifact - fx:deploy is not available in this JDK
|
||||
java.version.7.or.higher.is.required.to.build.javafx.package=Java version 7 or higher is required to build JavaFX package
|
||||
@@ -9,13 +9,16 @@ import com.intellij.execution.process.ProcessOutputTypes;
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.io.FileUtilRt;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.ArrayUtilRt;
|
||||
import com.intellij.util.PathUtilRt;
|
||||
import com.intellij.util.io.ZipUtil;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.plugins.javaFX.JavaFXBundle;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -69,9 +72,9 @@ public abstract class AbstractJavaFxPackager {
|
||||
|
||||
protected abstract JavaFxPackagerConstants.NativeBundles getNativeBundle();
|
||||
|
||||
protected abstract void registerJavaFxPackagerError(final String message);
|
||||
protected abstract void registerJavaFxPackagerError(final @Nls String message);
|
||||
|
||||
protected abstract void registerJavaFxPackagerInfo(final String message);
|
||||
protected abstract void registerJavaFxPackagerInfo(final @Nls String message);
|
||||
|
||||
protected abstract JavaFxApplicationIcons getIcons();
|
||||
|
||||
@@ -100,7 +103,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
try {
|
||||
final String taskDefJar = homePath + "/lib/ant-javafx.jar";
|
||||
if (!new File(taskDefJar).exists()) {
|
||||
registerJavaFxPackagerError("Can't build artifact - fx:deploy is not available in this JDK");
|
||||
registerJavaFxPackagerError(JavaFXBundle.message("cant.build.artifact.fx.deploy.is.not.available.in.this.jdk"));
|
||||
return;
|
||||
}
|
||||
final StringBuilder buf = new StringBuilder();
|
||||
@@ -124,7 +127,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
}
|
||||
}
|
||||
else {
|
||||
registerJavaFxPackagerError("fx:deploy task has failed.");
|
||||
registerJavaFxPackagerError(JavaFXBundle.message("fx.deploy.task.has.failed"));
|
||||
}
|
||||
}
|
||||
finally {
|
||||
@@ -149,7 +152,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
|
||||
private boolean checkNotEmpty(final String text, final String title) {
|
||||
if (StringUtil.isEmptyOrSpaces(text)) {
|
||||
registerJavaFxPackagerError("Unable to build JavaFX artifact. " + title + " should be specified in artifact's settings.");
|
||||
registerJavaFxPackagerError(JavaFXBundle.message("unable.to.build.javafx.artifact.not.specified", title));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -168,7 +171,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
registerJavaFxPackagerError("JavaFX generate certificate task has failed.");
|
||||
registerJavaFxPackagerError(JavaFXBundle.message("javafx.generate.certificate.task.has.failed"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +186,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
|
||||
final int signedResult = startProcess(signCommandLine);
|
||||
if (signedResult != 0) {
|
||||
registerJavaFxPackagerError("JavaFX sign task has failed for: " + jar2Sign + ".");
|
||||
registerJavaFxPackagerError(JavaFXBundle.message("javafx.sign.task.has.failed.for.0", jar2Sign));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,8 +252,8 @@ public abstract class AbstractJavaFxPackager {
|
||||
private int startProcess(List<String> commands) {
|
||||
try {
|
||||
final AtomicInteger exitCode = new AtomicInteger();
|
||||
final StringBuilder errorOutput = new StringBuilder();
|
||||
final List<String> delayedInfoOutput = new ArrayList<>();
|
||||
final @NlsSafe StringBuilder errorOutput = new StringBuilder();
|
||||
final List<@NlsSafe String> delayedInfoOutput = new ArrayList<>();
|
||||
boolean isVerbose = getMsgOutputLevel() != null && getMsgOutputLevel().isVerbose();
|
||||
|
||||
final Process process = new ProcessBuilder(CommandLineUtil.toCommandLine(commands)).start();
|
||||
@@ -299,7 +302,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
if (!StringUtil.isEmptyOrSpaces(message)) {
|
||||
registerJavaFxPackagerError(message);
|
||||
}
|
||||
for (String info : delayedInfoOutput) {
|
||||
for (@NlsSafe String info : delayedInfoOutput) {
|
||||
registerJavaFxPackagerInfo(info);
|
||||
}
|
||||
}
|
||||
@@ -314,7 +317,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
private int startAntTarget(String buildText, String javaHome) {
|
||||
final String antHome = getAntHome();
|
||||
if (antHome == null) {
|
||||
registerJavaFxPackagerError("Bundled ant not found.");
|
||||
registerJavaFxPackagerError(JavaFXBundle.message("bundled.ant.not.found"));
|
||||
return -1;
|
||||
}
|
||||
final ArrayList<String> commands = new ArrayList<>();
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<orderEntry type="module" module-name="intellij.java" />
|
||||
<orderEntry type="module" module-name="intellij.java.compiler" />
|
||||
<orderEntry type="module" module-name="intellij.java.compiler.impl" />
|
||||
<orderEntry type="module" module-name="intellij.javaFX.common" />
|
||||
<orderEntry type="module" module-name="intellij.javaFX.common" exported="" />
|
||||
<orderEntry type="module" module-name="intellij.java.manifest" />
|
||||
<orderEntry type="module" module-name="intellij.java.ui" />
|
||||
<orderEntry type="module" module-name="intellij.properties" />
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
java.fx.packager=Java FX Packager
|
||||
java.version.7.or.higher.is.required.to.build.javafx.package=Java version 7 or higher is required to build JavaFX package
|
||||
@@ -0,0 +1,30 @@
|
||||
// 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 org.jetbrains.plugins.javaFX;
|
||||
|
||||
import com.intellij.AbstractBundle;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class JavaFXJpsBundle extends AbstractBundle {
|
||||
|
||||
private static final @NonNls String BUNDLE = "messages.JavaFXJpsBundle";
|
||||
private static final JavaFXJpsBundle INSTANCE = new JavaFXJpsBundle();
|
||||
|
||||
private JavaFXJpsBundle() {
|
||||
super(BUNDLE);
|
||||
}
|
||||
|
||||
public static @Nls @NotNull String message(@PropertyKey(resourceBundle = BUNDLE) @NotNull String key, Object @NotNull ... params) {
|
||||
return INSTANCE.getMessage(key, params);
|
||||
}
|
||||
|
||||
public
|
||||
static @NotNull Supplier<@Nls @NotNull String> messagePointer(@PropertyKey(resourceBundle = BUNDLE) @NotNull String key,
|
||||
Object @NotNull ... params) {
|
||||
return INSTANCE.getLazyMessage(key, params);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.plugins.javaFX;
|
||||
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jps.builders.artifacts.ArtifactBuildTaskProvider;
|
||||
import org.jetbrains.jps.incremental.BuildTask;
|
||||
@@ -44,8 +45,6 @@ import java.util.Set;
|
||||
|
||||
public class JpsJavaFxArtifactBuildTaskProvider extends ArtifactBuildTaskProvider {
|
||||
|
||||
public static final String COMPILER_NAME = "Java FX Packager";
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<? extends BuildTask> createArtifactBuildTasks(@NotNull JpsArtifact artifact,
|
||||
@@ -88,7 +87,8 @@ public class JpsJavaFxArtifactBuildTaskProvider extends ArtifactBuildTaskProvide
|
||||
}
|
||||
}
|
||||
if (javaSdk == null) {
|
||||
context.processMessage(new CompilerMessage(COMPILER_NAME, BuildMessage.Kind.ERROR, "Java version 7 or higher is required to build JavaFX package"));
|
||||
context.processMessage(new CompilerMessage(JavaFXJpsBundle.message("java.fx.packager"), BuildMessage.Kind.ERROR,
|
||||
JavaFXJpsBundle.message("java.version.7.or.higher.is.required.to.build.javafx.package")));
|
||||
return;
|
||||
}
|
||||
new JpsJavaFxPackager(myProps, context, myArtifact).buildJavaFxArtifact(javaSdk.getHomePath());
|
||||
@@ -167,13 +167,13 @@ public class JpsJavaFxArtifactBuildTaskProvider extends ArtifactBuildTaskProvide
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerJavaFxPackagerError(String message) {
|
||||
myCompileContext.processMessage(new CompilerMessage(COMPILER_NAME, BuildMessage.Kind.ERROR, message));
|
||||
protected void registerJavaFxPackagerError(@Nls String message) {
|
||||
myCompileContext.processMessage(new CompilerMessage(JavaFXJpsBundle.message("java.fx.packager"), BuildMessage.Kind.ERROR, message));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerJavaFxPackagerInfo(String message) {
|
||||
myCompileContext.processMessage(new CompilerMessage(COMPILER_NAME, BuildMessage.Kind.INFO, message));
|
||||
protected void registerJavaFxPackagerInfo(@Nls String message) {
|
||||
myCompileContext.processMessage(new CompilerMessage(JavaFXJpsBundle.message("java.fx.packager"), BuildMessage.Kind.INFO, message));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,21 +21,21 @@
|
||||
<useScopeEnlarger implementation="org.jetbrains.plugins.javaFX.fxml.refs.JavaFxScopeEnlarger"/>
|
||||
<renamePsiElementProcessor implementation="org.jetbrains.plugins.javaFX.refactoring.JavaFxRenameFxIdFieldProcessor" order="first"/>
|
||||
|
||||
<localInspection language="XML" shortName="JavaFxDefaultTag" groupName="JavaFX"
|
||||
<localInspection language="XML" shortName="JavaFxDefaultTag" groupKey="group.name.javafx"
|
||||
enabledByDefault="true" level="WARNING" implementationClass="org.jetbrains.plugins.javaFX.fxml.codeInsight.inspections.JavaFxDefaultTagInspection"
|
||||
key="inspection.java.fx.default.tag.display.name"/>
|
||||
<localInspection language="XML" implementationClass="org.jetbrains.plugins.javaFX.fxml.codeInsight.inspections.JavaFxUnresolvedFxIdReferenceInspection"
|
||||
enabledByDefault="true" level="WARNING" groupName="JavaFX"
|
||||
enabledByDefault="true" level="WARNING" groupKey="group.name.javafx"
|
||||
key="inspection.java.fx.unresolved.fx.id.reference.display.name"/>
|
||||
<localInspection language="XML" shortName="JavaFxUnusedImports" implementationClass="org.jetbrains.plugins.javaFX.fxml.codeInsight.inspections.JavaFxUnusedImportsInspection"
|
||||
enabledByDefault="true" level="WARNING" groupName="JavaFX" key="inspection.java.fx.unused.imports.display.name"/>
|
||||
enabledByDefault="true" level="WARNING" groupKey="group.name.javafx" key="inspection.java.fx.unused.imports.display.name"/>
|
||||
<localInspection language="XML" shortName="JavaFxRedundantPropertyValue" implementationClass="org.jetbrains.plugins.javaFX.fxml.codeInsight.inspections.JavaFxRedundantPropertyValueInspection"
|
||||
enabledByDefault="true" level="WARNING" groupName="JavaFX"
|
||||
enabledByDefault="true" level="WARNING" groupKey="group.name.javafx"
|
||||
key="inspection.java.fx.redundant.property.value.display.name"/>
|
||||
<localInspection language="XML" shortName="JavaFxColorRgb" groupName="JavaFX"
|
||||
<localInspection language="XML" shortName="JavaFxColorRgb" groupKey="group.name.javafx"
|
||||
enabledByDefault="true" level="WARNING" implementationClass="org.jetbrains.plugins.javaFX.fxml.codeInsight.inspections.JavaFxColorRgbInspection"
|
||||
key="inspection.java.fx.color.rgb.display.name"/>
|
||||
<localInspection language="XML" shortName="JavaFxEventHandler" groupName="JavaFX"
|
||||
<localInspection language="XML" shortName="JavaFxEventHandler" groupKey="group.name.javafx"
|
||||
enabledByDefault="true" level="WARNING" implementationClass="org.jetbrains.plugins.javaFX.fxml.codeInsight.inspections.JavaFxEventHandlerInspection"
|
||||
key="inspection.java.fx.event.handler.display.name"/>
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<psi.referenceContributor implementation="org.jetbrains.plugins.javaFX.resources.FxmlResourceReferencesContributor" language="XML"/>
|
||||
|
||||
<localInspection language="XML" shortName="JavaFxResourcePropertyValue" displayName="The value from properties file is incompatible with the attribute type" groupName="JavaFX"
|
||||
enabledByDefault="true" level="WARNING" implementationClass="org.jetbrains.plugins.javaFX.resources.JavaFxResourcePropertyValueInspection"/>
|
||||
<localInspection language="XML" shortName="JavaFxResourcePropertyValue" groupKey="group.name.javafx"
|
||||
enabledByDefault="true" level="WARNING" implementationClass="org.jetbrains.plugins.javaFX.resources.JavaFxResourcePropertyValueInspection"
|
||||
key="inspection.java.fx.resource.property.value.display.name" bundle="messages.JavaFXBundle"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
@@ -23,6 +23,7 @@ import com.intellij.packaging.ui.ArtifactPropertiesEditor;
|
||||
import com.intellij.util.xmlb.XmlSerializerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.plugins.javaFX.JavaFXBundle;
|
||||
import org.jetbrains.plugins.javaFX.packaging.preloader.JavaFxPreloaderArtifactProperties;
|
||||
import org.jetbrains.plugins.javaFX.packaging.preloader.JavaFxPreloaderArtifactPropertiesProvider;
|
||||
import org.jetbrains.plugins.javaFX.packaging.preloader.JavaFxPreloaderArtifactType;
|
||||
@@ -83,7 +84,8 @@ public class JavaFxArtifactProperties extends ArtifactProperties<JavaFxArtifactP
|
||||
}
|
||||
|
||||
if (fxCompatibleSdk == null) {
|
||||
compileContext.addMessage(CompilerMessageCategory.ERROR, "Java version 7 or higher is required to build JavaFX package", null, -1, -1);
|
||||
compileContext.addMessage(CompilerMessageCategory.ERROR,
|
||||
JavaFXBundle.message("java.version.7.or.higher.is.required.to.build.javafx.package"), null, -1, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user