i18n packaging tool

GitOrigin-RevId: 531beded8b272ea8142f656a649092d3d4efd6d1
This commit is contained in:
Anna Kozlova
2021-06-07 19:54:01 +02:00
committed by intellij-monorepo-bot
parent 3936dd9462
commit be3ebe66ee
5 changed files with 30 additions and 17 deletions

View File

@@ -1,2 +1,5 @@
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
java.version.14.or.higher.is.required.to.build.platform.specific.package.using.jpackage=Java version 14 or higher is required to build platform specific package using jpackage
java.version.7.or.higher.is.required.to.build.javafx.package=Java version 7 or higher is required to build JavaFX package
jpackage.task.has.failed=jpackage task has failed
no.archive.found=No archive found

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2021 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.
// Copyright 2000-2021 JetBrains s.r.o. and contributors. 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.jpackage;
import com.intellij.execution.CommandLineUtil;
@@ -102,14 +102,14 @@ public class JPackageArtifactBuildTaskProvider extends ArtifactBuildTaskProvider
}
}
if (javaSdk == null) {
error("Java version 14 or higher is required to build platform specific package using jpackage");
error(JavaFXJpsBundle.message("java.version.14.or.higher.is.required.to.build.platform.specific.package.using.jpackage"));
return;
}
final String homePath = javaSdk.getHomePath();
final String jpackagePath = homePath + File.separatorChar + "bin" + File.separatorChar + "jpackage";
final String archiveName = getArchiveName();
if (archiveName == null) {
error("No archive found");
error(JavaFXJpsBundle.message("no.archive.found"));
return;
}
@@ -135,7 +135,7 @@ public class JPackageArtifactBuildTaskProvider extends ArtifactBuildTaskProvider
final int errorCode = startProcess(commands);
if (errorCode != 0) {
error("jpackage task has failed");
error(JavaFXJpsBundle.message("jpackage.task.has.failed"));
}
}

View File

@@ -153,4 +153,13 @@ library.formsfx.description=Enables the developer to create forms with ease and
library.validatorfx.description=Validation library for JavaFX inspired by ControlsFX that tries to overcome its shortcomings.
library.ikonli.description=Icon packs that can be used in Java applications.
library.bootstrapfx.description=Provides a CSS stylesheet that closely resembles the Twitter Bootstrap while being custom tailored for JavaFX\u2019s unique CSS flavor.
library.tilesfx.description=A JavaFX library containing tiles for Dashboards.
library.tilesfx.description=A JavaFX library containing tiles for Dashboards.
needs.at.least.jdk.14.containing.the.jpackage.tool=Needs at least JDK 14 containing the jpackage tool
platform.specific.package=Platform specific package
label.description=Description
label.vendor=Vendor
label.copyright=Copyright
label.version=Version
label.main.class=Main class
show.verbose.output.when.building.the.platform.specific.package=Show verbose output when building the platform specific package
packaging.artifact.tab.name=Packaging

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2021 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.
// Copyright 2000-2021 JetBrains s.r.o. and contributors. 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.packaging.jpackage;
import com.intellij.execution.ExecutionBundle;
@@ -17,6 +17,7 @@ import com.intellij.util.ui.FormBuilder;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.javaFX.JavaFXBundle;
import javax.swing.*;
import javax.swing.text.JTextComponent;
@@ -45,7 +46,7 @@ public class JPackageArtifactPropertiesEditor extends ArtifactPropertiesEditor {
@Nls
@Override
public String getTabName() {
return "Packaging";
return JavaFXBundle.message("packaging.artifact.tab.name");
}
@Override
@@ -71,14 +72,14 @@ public class JPackageArtifactPropertiesEditor extends ArtifactPropertiesEditor {
myVendor = new JTextField(myProperties.vendor);
myDescription = new JBTextArea(myProperties.description, 5, 50);
myDescription.setMinimumSize(new Dimension(100, 50));
myVerbose = new JCheckBox("Show verbose output when building the platform specific package", myProperties.verbose);
myVerbose = new JCheckBox(JavaFXBundle.message("show.verbose.output.when.building.the.platform.specific.package"), myProperties.verbose);
final FormBuilder builder = new FormBuilder();
builder.addLabeledComponent("Main class", myMainClass);
builder.addLabeledComponent("Version", myVersion);
builder.addLabeledComponent("Copyright", myCopyright);
builder.addLabeledComponent("Vendor", myVendor);
builder.addLabeledComponent("Description", new JBScrollPane(myDescription));
builder.addLabeledComponent(JavaFXBundle.message("label.main.class"), myMainClass);
builder.addLabeledComponent(JavaFXBundle.message("label.version"), myVersion);
builder.addLabeledComponent(JavaFXBundle.message("label.copyright"), myCopyright);
builder.addLabeledComponent(JavaFXBundle.message("label.vendor"), myVendor);
builder.addLabeledComponent(JavaFXBundle.message("label.description"), new JBScrollPane(myDescription));
builder.addComponent(myVerbose);
return builder.getPanel();
}

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2021 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.
// Copyright 2000-2021 JetBrains s.r.o. and contributors. 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.packaging.jpackage;
import com.intellij.icons.AllIcons;
@@ -36,7 +36,7 @@ import java.util.Set;
public class JPackageArtifactType extends ArtifactType {
private JPackageArtifactType() {
super("jpackage", () -> "Platform specific package");
super("jpackage", () -> JavaFXBundle.message("platform.specific.package"));
}
@Override
public @NotNull Icon getIcon() {
@@ -60,7 +60,7 @@ public class JPackageArtifactType extends ArtifactType {
final Project project = manager.getContext().getProject();
final Sdk sdk = getJPackageCompatibleSdk(artifact, project);
if (sdk == null) {
manager.registerError("Needs at least JDK 14 containing the jpackage tool", "no-jpackage");
manager.registerError(JavaFXBundle.message("needs.at.least.jdk.14.containing.the.jpackage.tool"), "no-jpackage");
}
}