Merge pull request #987 from mrtizmo/diagnostics_ja

Diagnostics module JA translations
This commit is contained in:
Richard Cordovano 2014-12-06 19:56:31 -05:00
commit 581c65f3cc
4 changed files with 85 additions and 27 deletions

View File

@ -1,3 +1,4 @@
CTL_PerformancePanelAction=Performance Diagnostics
PerformancePanel.jLabel1.text=Image Reading:
PerformancePanel.jLabel2.text=Database Reading:
PerformancePanel.jLabel3.text=CPU:
@ -8,4 +9,21 @@ PerformancePanel.startButton.text=Start
PerformancePanel.statusLabel.text=\
PerformancePanel.jLabel4.text=File Reading:
PerformancePanel.fileReadLabel.text=\
PerformancePanel.jLabel5.text=This panel performs a series of tests to help identify bottlenecks in the system.
PerformancePanel.jLabel5.text=This panel performs a series of tests to help identify bottlenecks in the system.
PerformancePanel.title=Performance Diagnostics
PerformancePanel.cpuTest.basemsg=Running CPU Test
PerformancePanel.cpuTest.cpuLabel.md5AlgNotFound.text=MD5 Algorithm not found
PerformancePanel.cpuTest.cpuLabel.MBHashedPerSec.text={0} MB hashed / sec
PerformancePanel.imgTest.statusMsg.runningImgReadTest.text=Running Image Reading Test
PerformancePanel.label.caseNotOpen.text=Case Not Open
PerformancePanel.label.noImgInCase.text=No Images In Case
PerformancePanel.ImgTest.imgLabel.MBReadPerSec.text={0} MB read / sec ({1})
PerformancePanel.FileReadTest.fileReadLabel.skipped.text=Skipped
PerformancePanel.FileReadTest.statusMsg.runningFileReadTest.text=Running File Reading Test
PerformancePanel.fileReadLabel.imgPathNotExist.text=Image Path Doesn't Exist
PerformancePanel.fileReadLabel.errMakeFileReader.text=Error making file reader
PerformancePanel.ImgTest.fileReadLabel.MBReadPerSec.text={0} MB read / sec ({1})
PerformancePanel.dbTest.status.running=Running DB Test
PerformancePanel.dbTest.dbLabel.recordsPerSec.text={0} records / sec
PerformancePanel.dbTest.dbLabel.errPerformQuery.text=Error Performing Query
PerformancePanel.done.statusMsg.err.text=Error\: {0}

View File

@ -0,0 +1,22 @@
CTL_PerformancePanelAction=\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u8A3A\u65AD
PerformancePanel.cpuTest.basemsg=CPU\u30C6\u30B9\u30C8\u5B9F\u884C\u4E2D
PerformancePanel.cpuTest.cpuLabel.MBHashedPerSec.text=\uFF11\u79D2\u3054\u3068\u306B{0}MB\u30CF\u30C3\u30B7\u30E5\u5B8C\u4E86
PerformancePanel.cpuTest.cpuLabel.md5AlgNotFound.text=MD5\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
PerformancePanel.dbTest.dbLabel.errPerformQuery.text=\u30AF\u30A8\u30EA\u5B9F\u884C\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
PerformancePanel.dbTest.dbLabel.recordsPerSec.text=\uFF11\u79D2\u3054\u3068\u306B{0}\u30EC\u30B3\u30FC\u30C9
PerformancePanel.dbTest.status.running=DB\u30C6\u30B9\u30C8\u5B9F\u884C\u4E2D
PerformancePanel.done.statusMsg.err.text=\u30A8\u30E9\u30FC\uFF1A{0}
PerformancePanel.fileReadLabel.errMakeFileReader.text=\u30D5\u30A1\u30A4\u30EB\u30EA\u30FC\u30C0\u30FC\u4F5C\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
PerformancePanel.fileReadLabel.imgPathNotExist.text=\u30A4\u30E1\u30FC\u30B8\u30D1\u30B9\u304C\u5B58\u5728\u3057\u307E\u305B\u3093
PerformancePanel.FileReadTest.fileReadLabel.skipped.text=\u30B9\u30AD\u30C3\u30D7\u3055\u308C\u307E\u3057\u305F
PerformancePanel.FileReadTest.statusMsg.runningFileReadTest.text=\u30D5\u30A1\u30A4\u30EB\u30EA\u30FC\u30C7\u30A3\u30F3\u30B0\u30C6\u30B9\u30C8\u5B9F\u884C\u4E2D
PerformancePanel.imgTest.statusMsg.runningImgReadTest.text=\u30A4\u30E1\u30FC\u30B8\u30EA\u30FC\u30C7\u30A3\u30F3\u30B0\u30C6\u30B9\u30C8\u5B9F\u884C\u4E2D
PerformancePanel.jLabel1.text=\u30A4\u30E1\u30FC\u30B8\u30EA\u30FC\u30C7\u30A3\u30F3\u30B0\uFF1A
PerformancePanel.jLabel2.text=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30EA\u30FC\u30C7\u30A3\u30F3\u30B0\uFF1A
PerformancePanel.jLabel3.text=CPU\uFF1A
PerformancePanel.jLabel4.text=\u30D5\u30A1\u30A4\u30EB\u30EA\u30FC\u30C7\u30A3\u30F3\u30B0\uFF1A
PerformancePanel.jLabel5.text=\u30B7\u30B9\u30C6\u30E0\u306E\u30DC\u30C8\u30EB\u30CD\u30C3\u30AF\u3092\u7279\u5B9A\u3059\u308B\u4E00\u9023\u306E\u30C6\u30B9\u30C8\u3092\u884C\u3046\u30D1\u30CD\u30EB\u3067\u3059\u3002
PerformancePanel.label.caseNotOpen.text=\u30B1\u30FC\u30B9\u304C\u958B\u3044\u3066\u3044\u307E\u305B\u3093
PerformancePanel.label.noImgInCase.text=\u30B1\u30FC\u30B9\u306B\u30A4\u30E1\u30FC\u30B8\u304C\u3042\u308A\u307E\u305B\u3093
PerformancePanel.startButton.text=\u958B\u59CB
PerformancePanel.title=\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u8A3A\u65AD

View File

@ -34,6 +34,8 @@ import java.util.concurrent.ExecutionException;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import org.openide.util.NbBundle;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.datamodel.AbstractFile;
@ -48,7 +50,8 @@ public class PerformancePanel extends javax.swing.JDialog {
* Creates new form PerformancePanel
*/
public PerformancePanel() {
super((JFrame) WindowManager.getDefault().getMainWindow(), "Performance Diagnostics", true);
super((JFrame) WindowManager.getDefault().getMainWindow(),
NbBundle.getMessage(PerformancePanel.class, "PerformancePanel.title"), true);
initComponents();
}
@ -258,14 +261,15 @@ public class PerformancePanel extends javax.swing.JDialog {
private void doCpuTest() {
final String msg = "Running CPU Test";
final String msg = NbBundle.getMessage(this.getClass(), "PerformancePanel.cpuTest.basemsg");
MessageDigest md;
long start = new Date().getTime();
try {
md = MessageDigest.getInstance("MD5");
md = MessageDigest.getInstance("MD5"); // NON-NLS
} catch (NoSuchAlgorithmException ex) {
setCpuLabel("MD5 Algo not found");
setCpuLabel(
NbBundle.getMessage(this.getClass(), "PerformancePanel.cpuTest.cpuLabel.md5AlgNotFound.text"));
return;
}
@ -285,20 +289,22 @@ public class PerformancePanel extends javax.swing.JDialog {
long end = new Date().getTime();
cpuStats = (bytesRead / (1024 * 1024)) / ((end - start) / 1000);
setCpuLabel(cpuStats + " MB hashed / sec");
setCpuLabel(NbBundle.getMessage(this.getClass(), "PerformancePanel.cpuTest.cpuLabel.MBHashedPerSec.text",
cpuStats));
setStatusMsg("");
}
private void doImgTest() {
imgReadStats = 0;
setStatusMsg("Running Image Reading Test");
setStatusMsg(
NbBundle.getMessage(this.getClass(), "PerformancePanel.imgTest.statusMsg.runningImgReadTest.text"));
Case curCase;
try {
curCase = Case.getCurrentCase();
}
catch (Exception e) {
setImgLabel("Case Not Open");
setImgLabel(NbBundle.getMessage(this.getClass(), "PerformancePanel.label.caseNotOpen.text"));
setStatusMsg("");
return;
}
@ -307,7 +313,7 @@ public class PerformancePanel extends javax.swing.JDialog {
try {
dataSources = curCase.getDataSources();
} catch (TskCoreException ex) {
setImgLabel("No Images In Case");
setImgLabel(NbBundle.getMessage(this.getClass(), "PerformancePanel.label.noImgInCase.text"));
setStatusMsg("");
return;
}
@ -318,7 +324,7 @@ public class PerformancePanel extends javax.swing.JDialog {
}
}
if (image == null) {
setImgLabel("No Images In Case");
setImgLabel(NbBundle.getMessage(this.getClass(), "PerformancePanel.label.noImgInCase.text"));
setStatusMsg("");
return;
}
@ -356,25 +362,30 @@ public class PerformancePanel extends javax.swing.JDialog {
imgReadStats = (bytesRead / (1024 * 1024)) / elapsed;
else
imgReadStats = 0;
setImgLabel(imgReadStats + " MB read / sec (" + bytesRead + ")");
setImgLabel(NbBundle.getMessage(this.getClass(), "PerformancePanel.ImgTest.imgLabel.MBReadPerSec.text",
imgReadStats, bytesRead));
setStatusMsg("");
}
private void doFileReadTest() {
fileReadStats = 0;
// TODO: this is always true. Why display a "Skipped" label and then go on to run the test?
if (true) {
setFileReadLabel("Skipped");
setFileReadLabel(
NbBundle.getMessage(this.getClass(), "PerformancePanel.FileReadTest.fileReadLabel.skipped.text"));
}
setStatusMsg("Running File Reading Test");
setStatusMsg(NbBundle.getMessage(this.getClass(),
"PerformancePanel.FileReadTest.statusMsg.runningFileReadTest.text"));
Case curCase;
try {
curCase = Case.getCurrentCase();
}
catch (Exception e) {
setFileReadLabel("Case Not Open");
setFileReadLabel(
NbBundle.getMessage(this.getClass(), "PerformancePanel.label.caseNotOpen.text"));
setStatusMsg("");
return;
}
@ -383,7 +394,8 @@ public class PerformancePanel extends javax.swing.JDialog {
try {
dataSources = curCase.getDataSources();
} catch (TskCoreException ex) {
setFileReadLabel("No Images In Case");
setFileReadLabel(
NbBundle.getMessage(this.getClass(), "PerformancePanel.label.noImgInCase.text"));
setStatusMsg("");
return;
}
@ -394,14 +406,16 @@ public class PerformancePanel extends javax.swing.JDialog {
}
}
if (image == null) {
setFileReadLabel("No Images In Case");
setFileReadLabel(
NbBundle.getMessage(this.getClass(), "PerformancePanel.label.noImgInCase.text"));
setStatusMsg("");
return;
}
File file = new File(image.getPaths()[0]);
if (file.exists() == false) {
setFileReadLabel("Image Path Doesn't Exist");
setFileReadLabel(
NbBundle.getMessage(this.getClass(), "PerformancePanel.fileReadLabel.imgPathNotExist.text"));
setStatusMsg("");
return;
}
@ -410,7 +424,8 @@ public class PerformancePanel extends javax.swing.JDialog {
try {
fileReader = new FileReader(file);
} catch (FileNotFoundException ex) {
setFileReadLabel("Error making file reader");
setFileReadLabel(
NbBundle.getMessage(this.getClass(), "PerformancePanel.fileReadLabel.errMakeFileReader.text"));
setStatusMsg("");
return;
}
@ -451,20 +466,22 @@ public class PerformancePanel extends javax.swing.JDialog {
fileReadStats = (bytesRead / (1024 * 1024)) / elapsed;
else
fileReadStats = 0;
setFileReadLabel(fileReadStats + " MB read / sec (" + bytesRead + ")");
setFileReadLabel(
NbBundle.getMessage(this.getClass(), "PerformancePanel.ImgTest.fileReadLabel.MBReadPerSec.text",
fileReadStats, bytesRead));
setStatusMsg("");
}
private void doDbTest() {
dbStats = 0;
setStatusMsg("Running DB Test");
setStatusMsg(NbBundle.getMessage(this.getClass(), "PerformancePanel.dbTest.status.running"));
Case curCase;
try {
curCase = Case.getCurrentCase();
}
catch (Exception e) {
setDbLabel("Case Not Open");
setDbLabel(NbBundle.getMessage(this.getClass(), "PerformancePanel.label.caseNotOpen.text"));
return;
}
@ -472,7 +489,7 @@ public class PerformancePanel extends javax.swing.JDialog {
SleuthkitCase tskCase = curCase.getSleuthkitCase();
long start = new Date().getTime();
List<AbstractFile> files = tskCase.findAllFilesWhere("obj_id < 50000");
List<AbstractFile> files = tskCase.findAllFilesWhere("obj_id < 50000"); // NON-NLS
long end = new Date().getTime();
long elapsed = (end - start) / 1000;
@ -481,9 +498,10 @@ public class PerformancePanel extends javax.swing.JDialog {
else
dbStats = 0;
setDbLabel(dbStats + " records / sec");
setDbLabel(NbBundle.getMessage(this.getClass(), "PerformancePanel.dbTest.dbLabel.recordsPerSec.text",
dbStats));
} catch (TskCoreException ex) {
setDbLabel("Error Performing Query");
setDbLabel(NbBundle.getMessage(this.getClass(), "PerformancePanel.dbTest.dbLabel.errPerformQuery.text"));
}
setStatusMsg("");
@ -494,7 +512,8 @@ public class PerformancePanel extends javax.swing.JDialog {
try {
get();
} catch (InterruptedException | ExecutionException ex) {
setStatusMsg("Error: " + ex.getMessage());
setStatusMsg(NbBundle.getMessage(this.getClass(), "PerformancePanel.done.statusMsg.err.text",
ex.getMessage()));
}
startButton.setEnabled(true);
}

View File

@ -35,7 +35,6 @@ import org.openide.util.NbBundle.Messages;
displayName = "#CTL_PerformancePanelAction"
)
@ActionReference(path = "Menu/Help", position = 1437)
@Messages("CTL_PerformancePanelAction=Performance Diagnostics")
public final class PerformancePanelAction implements ActionListener {
@Override