Kaynağa Gözat

SDK:
- move ModelImportTool info text to bundle file instead hardcoding it

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9473 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 13 yıl önce
ebeveyn
işleme
d1ea296b39

+ 8 - 2
jme3-model-importer/src/com/jme3/gde/modelimporter/Bundle.properties

@@ -29,5 +29,11 @@ ModelImporterVisualPanel2.jLabel2.text=Assets failed to load
 ModelImporterVisualPanel2.statusLabel.text=jLabel3
 ModelImporterVisualPanel3.jLabel2.text=Assets failed to load
 ModelImporterVisualPanel3.jLabel1.text_1=Asset List
-ModelImporterVisualPanel3.statusLabel.text=jLabel3
-ModelImporterVisualPanel3.infoTextArea.text_1=Check if the model looks as expected, if some textures fail to load, make sure they are in the same folder or a subfolder of the model. If no textures can be found the model will be displayed in red. With the buttons above you can move the camera.
+ModelImporterVisualPanel3.statusLabel.text=Import Status
+ModelImporterVisualPanel3.statusLabel.text_good=Model loaded successfully.
+ModelImporterVisualPanel3.statusLabel.text_missing=Model loaded, some assets could not be loaded.
+ModelImporterVisualPanel3.statusLabel.text_failed=Model cannot be loaded.
+ModelImporterVisualPanel3.infoTextArea.text_1=Import Status Help
+ModelImporterVisualPanel3.infoTextArea.text_good=Check if the model looks as expected.\nWith the buttons above you can move the camera.
+ModelImporterVisualPanel3.infoTextArea.text_missing=Check if the model looks as expected, some textures fail to load, make sure they are in the same folder or a subfolder of the model. Textures that can not be found will be replaced with a red material.\nWith the buttons above you can move the camera.
+ModelImporterVisualPanel3.infoTextArea.text_failed=This file can not be loaded, it is either in an unsupported format or is incompatible.\nCheck the bottom right corner of the SDK for a little warning sign. If it is there double-click it and report the contained stack trace at jmonkeyengine.org.

+ 6 - 16
jme3-model-importer/src/com/jme3/gde/modelimporter/ModelImporterVisualPanel3.java

@@ -86,25 +86,15 @@ public final class ModelImporterVisualPanel3 extends JPanel {
                 jList1.setListData(assets.toArray());
                 jList2.setListData(failed.toArray());
                 if (failed.size() > 0) {
-                    statusLabel.setText("Model loaded, some assets could not be loaded.");
-                    infoTextArea.setText("Check if the model looks as expected,"
-                            + " some textures fail to load, make sure they are in the same folder or a subfolder of the model."
-                            + " Textures that can not be found will be replaced with a red material."
-                            + "\nWith the buttons above you can move the camera.");
+                    statusLabel.setText(org.openide.util.NbBundle.getMessage(ModelImporterVisualPanel3.class, "ModelImporterVisualPanel3.statusLabel.text_missing"));
+                    infoTextArea.setText(org.openide.util.NbBundle.getMessage(ModelImporterVisualPanel3.class, "ModelImporterVisualPanel3.infoTextArea.text_missing"));
                 } else {
-                    statusLabel.setText("Model loaded successfully.");
-                    infoTextArea.setText("Check if the model looks as expected."
-                            + "\nWith the buttons above you can move the camera.");
+                    statusLabel.setText(org.openide.util.NbBundle.getMessage(ModelImporterVisualPanel3.class, "ModelImporterVisualPanel3.statusLabel.text_good"));
+                    infoTextArea.setText(org.openide.util.NbBundle.getMessage(ModelImporterVisualPanel3.class, "ModelImporterVisualPanel3.infoTextArea.text_good"));
                 }
             } else {
-                statusLabel.setText("Model cannot be loaded.");
-                infoTextArea.setText("This file can not be loaded, it is either in an unsupported format or is incompatible."
-                        + "\n Check the bottom right corner of the SDK for a little warning sign. If it is there"
-                        + " double-click it and report the contained stack trace at jmonkeyengine.org");
-//                Message msg = new NotifyDescriptor.Message(
-//                        "Cannot import this file!",
-//                        NotifyDescriptor.ERROR_MESSAGE);
-//                DialogDisplayer.getDefault().notifyLater(msg);
+                statusLabel.setText(org.openide.util.NbBundle.getMessage(ModelImporterVisualPanel3.class, "ModelImporterVisualPanel3.statusLabel.text_failed"));
+                infoTextArea.setText(org.openide.util.NbBundle.getMessage(ModelImporterVisualPanel3.class, "ModelImporterVisualPanel3.infoTextArea.text_failed"));
             }
         } catch (Exception e) {
             statusLabel.setText("Error importing file");