Merge pull request #529 from mrtizmo/core-casemodule

Pulled static strings into Bundle - Core casemodule
This commit is contained in:
Richard Cordovano 2014-03-07 16:25:03 -05:00
commit 8869620cb1
37 changed files with 576 additions and 196 deletions

View File

@ -111,15 +111,18 @@ public final class AddImageAction extends CallableSystemAction implements Presen
final IngestConfigurator ingestConfig = Lookup.getDefault().lookup(IngestConfigurator.class);
if (null != ingestConfig && ingestConfig.isIngestRunning()) {
final String msg = "<html>Ingest is ongoing on another data source. Adding a new source now might slow down the current ingest.<br />Do you want to proceed and add a new data source now?</html>";
if (JOptionPane.showConfirmDialog(null, msg, "Ingest in progress", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.NO_OPTION) {
final String msg = NbBundle.getMessage(this.getClass(), "AddImageAction.ingestConfig.ongoingIngest.msg");
if (JOptionPane.showConfirmDialog(null, msg,
NbBundle.getMessage(this.getClass(),
"AddImageAction.ingestConfig.ongoingIngest.title"),
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.NO_OPTION) {
return;
}
}
iterator = new AddImageWizardIterator(this);
wizardDescriptor = new WizardDescriptor(iterator);
wizardDescriptor.setTitle("Add Data Source");
wizardDescriptor.setTitle(NbBundle.getMessage(this.getClass(), "AddImageAction.wizard.title"));
wizardDescriptor.putProperty(NAME, e);
if (dialog != null) {

View File

@ -24,6 +24,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
import org.sleuthkit.autopsy.coreutils.Logger;
@ -97,7 +99,9 @@ import org.sleuthkit.datamodel.TskException;
String currDir = process.currentDirectory();
if (currDir != null) {
if (!currDir.isEmpty() ) {
progressMonitor.setProgressText("Adding: " + currDir);
progressMonitor.setProgressText(
NbBundle.getMessage(this.getClass(), "AddImageTask.run.progress.adding",
currDir));
}
}
// this sleep here prevents the UI from locking up
@ -298,7 +302,7 @@ import org.sleuthkit.datamodel.TskException;
logger.log(Level.INFO, "interrupt() add image process");
addImageProcess.stop(); //it might take time to truly stop processing and writing to db
} catch (TskCoreException ex) {
throw new Exception("Error stopping add-image process.", ex);
throw new Exception(NbBundle.getMessage(this.getClass(), "AddImageTask.interrupt.exception.msg"), ex);
}
}

View File

@ -29,6 +29,7 @@ import javax.swing.event.ChangeListener;
import org.openide.WizardDescriptor;
import org.openide.util.HelpCtx;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
/**
@ -136,7 +137,8 @@ class AddImageWizardAddingProgressPanel implements WizardDescriptor.FinishablePa
public boolean isValid() {
// set the focus to the next button of the wizard dialog if it's enabled
if (imgAdded) {
Lookup.getDefault().lookup(AddImageAction.class).requestFocusButton("Next >");
Lookup.getDefault().lookup(AddImageAction.class).requestFocusButton(
NbBundle.getMessage(this.getClass(), "AddImageWizardAddingProgressPanel.isValid.focusNext"));
}
return imgAdded;
@ -147,7 +149,8 @@ class AddImageWizardAddingProgressPanel implements WizardDescriptor.FinishablePa
*/
void setStateStarted() {
component.getProgressBar().setIndeterminate(true);
component.setProgressBarTextAndColor("*This process may take some time for large data sources.", 0, Color.black);
component.setProgressBarTextAndColor(
NbBundle.getMessage(this.getClass(), "AddImageWizardAddingProgressPanel.stateStarted.progressBarText"), 0, Color.black);
}
/**

View File

@ -23,6 +23,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JProgressBar;
import org.openide.WizardDescriptor;
import org.openide.util.NbBundle;
/**
* visual component to display progress bar and status updates while adding an
@ -30,7 +31,8 @@ import org.openide.WizardDescriptor;
*/
class AddImageWizardAddingProgressVisual extends javax.swing.JPanel {
private static final String ADDING_DATA_SOURCE_COMPLETE = "Adding Data Source - Complete";
private static final String ADDING_DATA_SOURCE_COMPLETE = NbBundle
.getMessage(AddImageWizardAddingProgressVisual.class, "AddImageWizardAddingProgressVisual.addingDsComplete.text");
private String errorLog = "";
private boolean hasCriticalErrors = false;
@ -42,7 +44,7 @@ import org.openide.WizardDescriptor;
*/
@Override
public String getName() {
return "Add Data Source";
return NbBundle.getMessage(this.getClass(), "AddImageWizardAddingProgressVisual.getName.text");
}
/**
@ -115,10 +117,12 @@ import org.openide.WizardDescriptor;
//progressBar.setValue(100); //always invoked when process completed
if (hasCriticalErrors) {
statusLabel.setForeground(Color.RED);
statusLabel.setText("*Failed to add data source (critical errors encountered). Click below to view the log.");
statusLabel.setText(
NbBundle.getMessage(this.getClass(), "AddImageWizardAddingProgressVisual.showErrors.critText"));
} else {
statusLabel.setForeground(Color.BLACK);
statusLabel.setText("*Data Source added (non-critical errors encountered). Click below to view the log.");
statusLabel.setText(
NbBundle.getMessage(this.getClass(), "AddImageWizardAddingProgressVisual.showErrors.nonCritText"));
}
errorLog += errors + "\n";

View File

@ -25,6 +25,8 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.logging.Level;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -106,7 +108,8 @@ class AddImageWizardChooseDataSourcePanel implements WizardDescriptor.Panel<Wiza
void moveFocusToNext() {
// set the focus to the next button of the wizard dialog if it's enabled
if (isNextEnable) {
Lookup.getDefault().lookup(AddImageAction.class).requestFocusButton("Next >");
Lookup.getDefault().lookup(AddImageAction.class).requestFocusButton(
NbBundle.getMessage(this.getClass(), "AddImageWizardChooseDataSourcePanel.moveFocusNext"));
}
}

View File

@ -37,6 +37,7 @@ import javax.swing.JSeparator;
import javax.swing.event.DocumentEvent;
import javax.swing.ListCellRenderer;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
@ -183,7 +184,7 @@ final class AddImageWizardChooseDataSourceVisual extends JPanel {
*/
@Override
public String getName() {
return "Enter Data Source Information";
return NbBundle.getMessage(this.getClass(), "AddImageWizardChooseDataSourceVisual.getName.text");
}

View File

@ -19,6 +19,7 @@
package org.sleuthkit.autopsy.casemodule;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.ingest.IngestConfigurator;
import java.awt.Color;
import java.awt.Component;
@ -275,9 +276,11 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<WizardDe
//check the result and display to user
if (result == DataSourceProcessorCallback.DataSourceProcessorResult.NO_ERRORS)
progressPanel.getComponent().setProgressBarTextAndColor("*Data Source added.", 100, Color.black);
progressPanel.getComponent().setProgressBarTextAndColor(
NbBundle.getMessage(this.getClass(), "AddImageWizardIngestConfigPanel.dsProcDone.noErrs.text"), 100, Color.black);
else
progressPanel.getComponent().setProgressBarTextAndColor("*Errors encountered in adding Data Source.", 100, Color.red);
progressPanel.getComponent().setProgressBarTextAndColor(
NbBundle.getMessage(this.getClass(), "AddImageWizardIngestConfigPanel.dsProcDone.errs.text"), 100, Color.red);
//if errors, display them on the progress panel

View File

@ -18,6 +18,8 @@
*/
package org.sleuthkit.autopsy.casemodule;
import org.openide.util.NbBundle;
import java.awt.BorderLayout;
import javax.swing.JPanel;
@ -55,7 +57,7 @@ import javax.swing.JPanel;
*/
@Override
public String getName() {
return "Configure Ingest Modules";
return NbBundle.getMessage(this.getClass(), "AddImageWizardIngestConfigVisual.getName.text");
}
/**

View File

@ -26,6 +26,7 @@ import java.util.NoSuchElementException;
import javax.swing.JComponent;
import javax.swing.event.ChangeListener;
import org.openide.WizardDescriptor;
import org.openide.util.NbBundle;
/**
* The iterator class for the "Add Image" wizard panel. This class is used to
@ -112,7 +113,8 @@ class AddImageWizardIterator implements WizardDescriptor.Iterator<WizardDescript
*/
@Override
public String name() {
return "Step " + Integer.toString(index + 1) + " of " + getPanels().size();
return NbBundle.getMessage(this.getClass(), "AddImageWizardIterator.stepXofN", Integer.toString(index + 1),
getPanels().size());
}
/**

View File

@ -23,6 +23,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
import org.sleuthkit.autopsy.coreutils.Logger;
@ -180,7 +182,9 @@ import org.sleuthkit.datamodel.TskCoreException;
@Override
public void fileAdded(final AbstractFile newFile) {
if (count++ % 10 == 0) {
progressMonitor.setProgressText("Adding: " + newFile.getParentPath() + "/" + newFile.getName());
progressMonitor.setProgressText(
NbBundle.getMessage(this.getClass(), "AddLocalFilesTask.localFileAdd.progress.text",
newFile.getParentPath(), newFile.getName()));
}
}
}

View File

@ -1,61 +1,11 @@
CTL_AddImage=Add Data Source...
CTL_AddImageButton=Add Data Source
CTL_CaseAction=Case
CTL_CaseCloseAct=Close Case
CTL_CaseNewAction=New Case...
#CTL_CaseOpenActionOld=Open Case(old)...
CTL_CasePropertiesAction=Case Properties...
CTL_CaseTopComponent=Case Window
#CTL_NewCaseAct=New Case(Old)...
CTL_OpenAction=Open Case...
CTL_RecentCases=Recent Cases
CTL_CaseDeleteAction=Delete Case
CTL_SaveCaseAction=Save Case
CTL_testAction=test
CTL_testTopComponent=test Window
HINT_CaseTopComponent=This is a Case window
HINT_testTopComponent=This is a test window
Menu/File/org-sleuthkit-autopsy-casemodule-CaseCloseAct.shadow=
Menu/File/org-sleuthkit-autopsy-casemodule-OpenAction.shadow=Open Case
OpenIDE-Module-Name=Case
CaseVisualPanel1.jLabel1.text=Name
CaseVisualPanel1.jLabel2.text=Image Path:
CaseVisualPanel1.jLabel3.text=Database Path:
CaseTopComponent.jLabel1.text=Name
CaseVisualPanel1.NameField.text=
CaseVisualPanel1.ImgPath.text=
CaseVisualPanel1.DbPath.text=
CaseTopComponent.jLabel2.text=Image Path
CaseTopComponent.jLabel3.text=DB Path
CaseVisualPanel1.ImgPathBrowserButton.text=Browse
CaseVisualPanel1.DbPathBrowserButton.text=Browse
NewCaseVisualPanel1.jLabel1.text=Name
NewCaseVisualPanel1.jTextField1.text=
NewCaseVisualPanel1.jLabel2.text=Image Type:
NewCaseVisualPanel1.jRadioButton1.text=Raw Single .img .dd
NewCaseVisualPanel1.jRadioButton2.text=Raw Split .001 .002 etc
NewCaseVisualPanel1.jRadioButton3.text=Encase .e01
NewCaseVisualPanel1.nameLabel.text_1=Name
NewCaseVisualPanel1.NameField.text_1=
NewCaseVisualPanel1.TypeLabel.text_1=Image Type:
NewCaseVisualPanel1.rawSingleRadio.text_1=Raw Single .img .dd
NewCaseVisualPanel1.rawSplitRadio.text_1=Raw Split .001 .002 etc
NewCaseVisualPanel1.encaseRadio.text_1=EnCase .e01
NewCaseVisualPanel2.jLabel1.text=Image Path:
NewCaseVisualPanel2.jLabel2.text=DataBase Path:
NewCaseVisualPanel2.descriptionText.text=variable text
NewCaseVisualPanel2.ImgBrowserButton.text=Browse
NewCaseVisualPanel2.DcBrowserButton.text=Browse
NewCaseVisualPanel2.ImagePathField.text=
NewCaseVisualPanel2.DbPathField.text=
CaseVisualPanel1.jLabel4.text=Image Type:
CaseVisualPanel1.rawSingle.text=Raw Single .img .dd
CaseVisualPanel1.rawSplit.text=Raw Split .001 .002 etc
CaseVisualPanel1.encase.text=EnCase .e01 .e02 etc
CaseVisualPanel1.multipleSelectLabel.text=Single Image: Multiple Select Disabled
CaseVisualPanel1.jLabel5.text=If a database has not already been loaded / created for the chosen image use this button: (could take a few minutes)
CaseVisualPanel1.ProgressLabel.text=
CaseVisualPanel1.createDbButton.text=Create Database
NewCaseVisualPanel1.jLabel1.text_1=Enter New Case Information:
NewCaseVisualPanel1.caseNameLabel.text_1=Case Name:
NewCaseVisualPanel1.caseDirLabel.text=Base Directory:
@ -77,8 +27,6 @@ CasePropertiesForm.OKButton.text=OK
CasePropertiesForm.deleteCaseButton.text=Delete Case
CueBannerPanel.autopsyLogo.text=
CueBannerPanel.createNewLabel.text=Create New Case
CueBannerPanel.autopsyLabel.text=Autopsy
CueBannerPanel.welcomeLabel.text=Welcome to
CueBannerPanel.openLabel.text=Open Existing Case
CueBannerPanel.closeButton.text=Close
CueBannerPanel.openRecentLabel.text=Open Recent Case
@ -87,13 +35,6 @@ CueBannerPanel.openCaseButton.text=
CueBannerPanel.openRecentButton.text=
OpenRecentCasePanel.cancelButton.text=Cancel
OpenRecentCasePanel.jLabel1.text=Recent Cases
NewJPanel.jLabel1.text=
NewJPanel.jLabel2.text=NSRL Index
NewJPanel.jLabel5.text=The NSRL index is used to idenify "known" files.
NewJPanel.jFormattedTextField1.text=jFormattedTextField1
NewJPanel.jButton1.text=Rename
NewJPanel.jLabel4.text=Database:
AddImageVisualPanel2.indexImageCheckBox.text=Index image for keyword search
CasePropertiesForm.caseNumberLabel.text=Case Number:
CasePropertiesForm.examinerLabel.text=Examiner:
CasePropertiesForm.caseNumberTextField.text=
@ -108,7 +49,6 @@ AddImageErrorsDialog.copyButton.toolTipText=Copy errors to clipboard
AddImageErrorsDialog.copyButton.text=Copy
AddImageErrorsDialog.closeButton.toolTipText=Close this window
AddImageErrorsDialog.closeButton.text=Close
AddImageVisualPanel4.jLabel2.text=You can add another image or click Finish to return to the case and view results.
OpenRecentCasePanel.openButton.text=Open
ImageFilePanel.pathLabel.text=Browse for an image file:
ImageFilePanel.browseButton.text=Browse
@ -118,8 +58,6 @@ MissingImageDialog.selectButton.text=Select Image
MissingImageDialog.titleLabel.text=Search for missing image
MissingImageDialog.cancelButton.text=Cancel
LocalDiskPanel.errorLabel.text=Error Label
AddImageDonePanel.statusLabel.text=File system has been added to the local database. Files are being analyzed.
AddImageDonePanel.crDbLabel.text=Adding Data Source - Complete
LocalFilesPanel.infoLabel.text=Add local files and folders:
LocalFilesPanel.selectButton.text=Add
LocalFilesPanel.localFileChooser.dialogTitle=Select Local Files or Folders
@ -152,3 +90,142 @@ LocalDiskPanel.descLabel.text=(faster results, although some data will not be se
MissingImageDialog.browseButton.text=Browse
MissingImageDialog.pathNameTextField.text=
AddImageWizardAddingProgressVisual.progressTextArea.border.title=Status
AddImageAction.wizard.title=Add Data Source
AddImageAction.ingestConfig.ongoingIngest.msg=<html>Ingest is ongoing on another data source. Adding a new source now might slow down the current ingest.<br />Do you want to proceed and add a new data source now?</html>
AddImageAction.ingestConfig.ongoingIngest.title=Ingest in progress
AddImageTask.run.progress.adding=Adding\: {0}
AddImageTask.interrupt.exception.msg=Error stopping add-image process.
AddImageWizardAddingProgressPanel.isValid.focusNext=Next >
AddImageWizardAddingProgressPanel.stateStarted.progressBarText=*This process may take some time for large data sources.
AddImageWizardAddingProgressVisual.addingDsComplete.text=Adding Data Source - Complete
AddImageWizardAddingProgressVisual.getName.text=Add Data Source
AddImageWizardAddingProgressVisual.showErrors.critText=*Failed to add data source (critical errors encountered). Click below to view the log.
AddImageWizardAddingProgressVisual.showErrors.nonCritText=*Data Source added (non-critical errors encountered). Click below to view the log.
AddImageWizardChooseDataSourcePanel.moveFocusNext=Next >
AddImageWizardChooseDataSourceVisual.getName.text=Enter Data Source Information
AddImageWizardIngestConfigPanel.dsProcDone.noErrs.text=*Data Source added.
AddImageWizardIngestConfigPanel.dsProcDone.errs.text=*Errors encountered in adding Data Source.
AddImageWizardIngestConfigVisual.getName.text=Configure Ingest Modules
AddImageWizardIterator.stepXofN=Step {0} of {1}
AddLocalFilesTask.localFileAdd.progress.text=Adding\: {0}/{1}
Case.getCurCase.exception.noneOpen=Can't get the current case; there is no case open\!
Case.moduleErr=Module Error
Case.changeCase.errListenToCaseUpdates.msg=A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.
Case.create.exception.msg=Error creating a case\: {0} in dir {1}
Case.open.exception.blankCase.msg=Case name is blank.
Case.open.msgDlg.updated.msg=Updated case database schema.\
A backup copy of the database with the following path has been made\:\
{0}
Case.open.msgDlg.updated.title=Case Database Schema Update
Case.open.exception.checkFile.msg=Check that you selected the correct case file (usually with {0} extension)
Case.open.exception.gen.msg=Error opening the case
Case.checkImgExist.confDlg.doesntExist.msg={0} has detected that one of the images associated with \
this case are missing. Would you like to search for them now?\
Previously, the image was located at\:\
{1}\
Please note that you will still be able to browse directories and generate reports\
if you choose No, but you will not be able to view file content or run the ingest process.
Case.checkImgExist.confDlg.doesntExist.title=Missing Image
Case.addImg.exception.msg=Error adding image to the case
Case.closeCase.exception.msg=Error while trying to close the current case.
Case.deleteCase.exception.msg=Error deleting the case dir\: {0}
Case.deleteCase.exception.msg2=Error deleting the case dir\: {0}
Case.updateCaseName.exception.msg=Error while trying to update the case name.
Case.updateExaminer.exception.msg=Error while trying to update the examiner.
Case.updateCaseNum.exception.msg=Error while trying to update the case number.
Case.exception.errGetRootObj=Error getting root objects.
Case.createCaseDir.exception.existNotDir=Cannot create case dir, already exists and is not a directory\: {0}
Case.createCaseDir.exception.existCantRW=Cannot create case dir, already exists and cannot read/write\: {0}
Case.createCaseDir.exception.cantCreate=Cannot create case dir\: {0}
Case.createCaseDir.exception.cantCreateCaseDir=Could not create case directory\: {0}
Case.createCaseDir.exception.cantCreateModDir=Could not create modules output directory\: {0}
Case.createCaseDir.exception.gen=Could not create case directory\: {0}
CaseDeleteAction.closeConfMsg.text=Are you sure want to close and delete this case? \
Case Name\: {0}\
Case Directory\: {1}
CaseDeleteAction.closeConfMsg.title=Warning\: Closing the Current Case
CaseDeleteAction.msgDlg.fileInUse.msg=The delete action can't be fully completed because the folder or file in it is open by another program.\
\
Close the folder and file and try again or you can delete the case manually.
CaseDeleteAction.msgDlg.fileInUse.title=Error\: Folder In Use
CaseDeleteAction.msgDlg.caseDelete.msg=Case {0} has been deleted.
CaseOpenAction.autFilter.title={0} Case File ( {1})
CaseOpenAction.msgDlg.fileNotExist.msg=Error\: File doesn't exist.
CaseOpenAction.msgDlg.fileNotExist.title=Error
CaseOpenAction.msgDlg.cantOpenCase.msg=Error\: could not open the case in folder {0}\: {1}
CaseOpenAction.msgDlg.cantOpenCase.title=Error
CasePropertiesAction.window.title=Case Properties
CasePropertiesForm.updateCaseName.msgDlg.empty.msg=The caseName cannot be empty.
CasePropertiesForm.updateCaseName.msgDlg.empty.title=Error
CasePropertiesForm.updateCaseName.msgDlg.invalidSymbols.msg=The Case Name cannot contain any of this following symbol\: \\ / \: * ? " < > |
CasePropertiesForm.updateCaseName.msgDlg.invalidSymbols.title=Error
CasePropertiesForm.updateCaseName.confMsg.msg=Are you sure want to update the case name from "{0}" to "{1}"?
CasePropertiesForm.updateCaseName.confMsg.title=Create directory
CueBannerPanel.title.text=Open Recent Case
GeneralFilter.rawImageDesc.text=Raw Images (*.img, *.dd, *.001, *.aa, *.raw, *.bin)
GeneralFilter.encaseImageDesc.text=Encase Images (*.e01)
ImageDSProcessor.dsType.text=Image File
ImageDSProcessor.allDesc.text=All Supported Types
ImageFilePanel.moduleErr=Module Error
ImageFilePanel.moduleErr.msg=A module caused an error listening to ImageFilePanel updates. See log to determine which module. Some data could be incomplete.
LocalDiskDSProcessor.dsType.text=Local Disk
LocalDiskPanel.localDiskModel.loading.msg=Loading local disks...
LocalDiskPanel.moduleErr=Module Error
LocalDiskPanel.moduleErr.msg=A module caused an error listening to LocalDiskPanel updates. See log to determine which module. Some data could be incomplete.
LocalDiskPanel.errLabel.disksNotDetected.text=Disks were not detected. On some systems it requires admin privileges (or "Run as administrator").
LocalDiskPanel.errLabel.disksNotDetected.toolTipText=Disks were not detected. On some systems it requires admin privileges (or "Run as administrator").
LocalDiskPanel.errLabel.drivesNotDetected.text=Local drives were not detected. Auto-detection not supported on this OS or admin privileges required
LocalDiskPanel.errLabel.drivesNotDetected.toolTipText=Local drives were not detected. Auto-detection not supported on this OS or admin privileges required
LocalDiskPanel.errLabel.someDisksNotDetected.text=Some disks were not detected. On some systems it requires admin privileges (or "Run as administrator").
LocalDiskPanel.errLabel.someDisksNotDetected.toolTipText=Some disks were not detected. On some systems it requires admin privileges (or "Run as administrator").
LocalFilesDSProcessor.dsType=Logical Files
LocalFilesDSProcessor.toString.text=Logical Files
LocalFilesPanel.contentType.text=LOCAL
LocalFilesPanel.moduleErr=Module Error
LocalFilesPanel.moduleErr.msg=A module caused an error listening to LocalFilesPanel updates. See log to determine which module. Some data could be incomplete.
MissingImageDialog.allDesc.text=All Supported Types
MissingImageDialog.display.title=Search for Missing Image
MissingImageDialog.confDlg.noFileSel.msg=No image file has been selected, are you sure you\
would like to exit without finding the image.
MissingImageDialog.confDlg.noFileSel.title=Missing Image
NewCaseVisualPanel1.getName.text=Case Info
NewCaseVisualPanel1.caseDirBrowse.selectButton.text=Select
NewCaseVisualPanel2.getName.text=Additional Information
NewCaseWizardAction.closeCurCase.confMsg.msg=Do you want to save and close this case and proceed with the new case creation?
NewCaseWizardAction.closeCurCase.confMsg.title=Warning\: Closing the Current Case
NewCaseWizardAction.newCase.windowTitle.text=New Case Information
NewCaseWizardAction.getName.text=New Case Wizard
NewCaseWizardPanel1.validate.errMsg.invalidSymbols=The Case Name cannot contain any of the following symbols\: \\ / \: * ? " < > |
NewCaseWizardPanel1.validate.errMsg.dirExists=Case directory ''{0}'' already exists.
NewCaseWizardPanel1.validate.confMsg.createDir.msg=The base directory ''{0}'' doesn''t exist. \
\
Do you want to create that directory?
NewCaseWizardPanel1.validate.confMsg.createDir.title=Create directory
NewCaseWizardPanel1.validate.errMsg.cantCreateParDir.msg=Error\: Couldn''t create case parent directory {0}
NewCaseWizardPanel1.validate.errMsg.prevCreateBaseDir.msg=Prevented from creating base directory {0}
NewCaseWizardPanel1.validate.errMsg.cantCreateDir=Error\: Couldn't create directory.
NewCaseWizardPanel1.validate.errMsg.invalidBaseDir.msg=ERROR\: The Base Directory that you entered is not valid.\
Please enter a valid Base Directory.
NewCaseWizardPanel1.createDir.errMsg.cantCreateDir.msg=ERROR\: Could not create the case directory. \
Please enter a valid Case Name and Directory.
NewCaseWizardPanel2.validate.errCreateCase.msg=Error creating case
OpenRecentCasePanel.openCase.msgDlg.caseDoesntExist.msg=Error\: Case {0} doesn''t exist.
OpenRecentCasePanel.openCase.msgDlg.err=Error
OpenRecentCasePanel.colName.caseName=Case Name
OpenRecentCasePanel.colName.path=Path
RecentCases.exception.caseIdxOutOfRange.msg=Recent case index {0} is out of range.
RecentCases.getName.text=Clear Recent Cases
RecentItems.openRecentCase.msgDlg.text=Error\: Case {0} doesn''t exist.
RecentItems.openRecentCase.msgDlg.err=Error
StartupWindow.title.text=Welcome
UpdateRecentCases.menuItem.clearRecentCases.text=Clear Recent Cases
UpdateRecentCases.menuItem.empty=-Empty-
XMLCaseManagement.create.exception.msg=Error setting up Case XML file,
XMLCaseManagement.writeFile.exception.noCase.msg=No set case to write management file for.
XMLCaseManagement.writeFile.exception.errWriteToFile.msg=Error writing to case file
XMLCaseManagement.open.exception.errReadXMLFile.msg=Error reading case XML file\: {0}
XMLCaseManagement.open.msgDlg.notAutCase.msg=Error\: This is not an Autopsy config file ("{0}").\
\
Detail\: \
Cannot open a non-Autopsy config file (at {1}).
XMLCaseManagement.open.msgDlg.notAutCase.title=Error

View File

@ -0,0 +1,90 @@
CTL_AddImage=データソース追加...
CTL_AddImageButton=データソース追加
CTL_CaseCloseAct=ケースを閉じる
CTL_CaseNewAction=New Case...
CTL_CaseOpenActionOld=Open Case(old)...
CTL_CasePropertiesAction=Case Properties...
CTL_OpenAction=Open Case...
CTL_CaseDeleteAction=ケース削除
OpenIDE-Module-Name=Case
NewCaseVisualPanel1.jLabel1.text_1=新規ケース情報を入力:
#Nick: Does this mean info on new case or new info on existing case?
NewCaseVisualPanel1.caseNameLabel.text_1=ケース名
NewCaseVisualPanel1.caseDirLabel.text=ベースディレクトリ:
NewCaseVisualPanel1.caseDirBrowseButton.text=閲覧
NewCaseVisualPanel1.caseNameTextField.text_1=
NewCaseVisualPanel1.jLabel2.text_1=ケースデータは下記のディレクトリに保存されます:
#Nick: is "case data" and "case information" the same?
NewCaseVisualPanel1.caseParentDirTextField.text=
NewCaseVisualPanel1.caseDirTextField.text_1=
CasePropertiesForm.caseDirLabel.text=ケースディレクトリ:
CasePropertiesForm.crDateLabel.text=作成日:
CasePropertiesForm.caseNameLabel.text=ケース名:
CasePropertiesForm.crDateTextField.text=
CasePropertiesForm.caseNameTextField.text=
CasePropertiesForm.updateCaseNameButton.text=アップデート
CasePropertiesForm.casePropLabel.text=ケース情報
CasePropertiesForm.genInfoLabel.text=一般情報
CasePropertiesForm.imgInfoLabel.text=画像情報
CasePropertiesForm.OKButton.text=OK
CasePropertiesForm.deleteCaseButton.text=ケース削除
CueBannerPanel.autopsyLogo.text=
CueBannerPanel.createNewLabel.text=新規ケース作成
CueBannerPanel.openLabel.text=既存ケースを開く
##オープンは日本語にするべき?
CueBannerPanel.closeButton.text=閉じる
CueBannerPanel.openRecentLabel.text=最近開いたケースを開く
CueBannerPanel.newCaseButton.text=
CueBannerPanel.openCaseButton.text=
CueBannerPanel.openRecentButton.text=
OpenRecentCasePanel.cancelButton.text=キャンセル
OpenRecentCasePanel.jLabel1.text=最近開いたファイル
CasePropertiesForm.caseNumberLabel.text=ケース番号:
CasePropertiesForm.examinerLabel.text=Examiner:
#審査官?カタカナ?
CasePropertiesForm.caseNumberTextField.text=
CasePropertiesForm.examinerTextField.text=
NewCaseVisualPanel2.caseNumberTextField.text=
NewCaseVisualPanel2.examinerLabel.text=Examiner:
#審査官?カタカナ?
NewCaseVisualPanel2.caseNumberLabel.text=ケース番号:
NewCaseVisualPanel2.examinerTextField.text=
NewCaseVisualPanel2.optionalLabel.text=オプショナル:ケース番号及び審査官を設定
#審査官?カタカナ?
AddImageErrorsDialog.title=イメージログ追加
AddImageErrorsDialog.copyButton.toolTipText=エラーをクリップボードにコピーします
AddImageErrorsDialog.copyButton.text=コピー
AddImageErrorsDialog.closeButton.toolTipText=このウィンドウを閉じます
AddImageErrorsDialog.closeButton.text=閉じる
OpenRecentCasePanel.openButton.text=開く
ImageFilePanel.pathLabel.text=画像ファイルを閲覧:
ImageFilePanel.browseButton.text=閲覧
ImageFilePanel.pathTextField.text=
LocalDiskPanel.diskLabel.text=ローカルディスクを選択:
MissingImageDialog.selectButton.text=画像選択
MissingImageDialog.titleLabel.text=欠落した画像の検索
MissingImageDialog.cancelButton.text=キャンセル
LocalDiskPanel.errorLabel.text=エラーラベル
LocalFilesPanel.infoLabel.text=ローカルファイル及びフォルダーを追加:
LocalFilesPanel.selectButton.text=追加
LocalFilesPanel.localFileChooser.dialogTitle=ローカルファイル又はフォルダーを選択
LocalFilesPanel.selectButton.toolTipText=ローカルファイル及びフォルダーをロジカルファイルとして追加します
LocalFilesPanel.clearButton.text=クリアー
LocalFilesPanel.clearButton.toolTipText=現在選択されているローカルファイルパスがクリアされます
LocalFilesPanel.selectedPaths.toolTipText=
LocalFilesPanel.localFileChooser.approveButtonText=選択
LocalFilesPanel.localFileChooser.approveButtonToolTipText=
LocalFilesPanel.selectButton.actionCommand=追加
AddImageWizardIngestConfigVisual.subtitleLabel.text=このデータソースに対して実行したい追加モジュール群を設定します
#Nick: Does ingest module mean a module you added?
AddImageWizardIngestConfigVisual.titleLabel.text=追加モジュール設定
AddImageWizardAddingProgressVisual.statusLabel.text=ファイルシステムがローカルデータベースに追加されました。ファイルを解析中です。
AddImageWizardChooseDataSourceVisual.typeTabel.text=追加するソースタイプを選択:
AddImageWizardChooseDataSourceVisual.jLabel2.text=jLabel2
AddImageWizardChooseDataSourceVisual.nextLabel.text=<html> 「次へ」をクリックして、インプットデータを解析、ボリューム及びファイルシステムデータを抽出、ローカルデータベースにデータを投入。</html>
#Nick: Do I leave the <html> and </html> as is?
AddImageWizardChooseDataSourceVisual.imgInfoLabel.text=データソース情報を入力:
AddImageWizardAddingProgressVisual.progressLabel.text=<進捗状況>
AddImageWizardAddingProgressVisual.viewLogButton.text=ログ閲覧
AddImageWizardAddingProgressVisual.titleLabel.text=データソース追加中
AddImageWizardAddingProgressVisual.subTitle1Label.text=ローカルデータベースにファイルシステム情報を追加中です。こちらが完了次第、ファイル解析が始まります。

View File

@ -37,8 +37,9 @@ import java.util.TimeZone;
import java.util.logging.Level;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
import org.openide.util.actions.SystemAction;
import org.openide.windows.WindowManager;
@ -159,7 +160,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
if (currentCase != null) {
return currentCase;
} else {
throw new IllegalStateException("Can't get the current case; there is no case open!");
throw new IllegalStateException(NbBundle.getMessage(Case.class, "Case.getCurCase.exception.noneOpen"));
}
}
@ -192,7 +193,10 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
NbBundle.getMessage(Case.class,
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
doCaseNameChange("");
@ -201,7 +205,10 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
NbBundle.getMessage(Case.class,
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}
@ -214,7 +221,10 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
NbBundle.getMessage(Case.class,
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
doCaseChange(currentCase);
@ -224,7 +234,10 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
NbBundle.getMessage(Case.class,
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
doCaseNameChange(currentCase.name);
@ -267,7 +280,8 @@ public class Case implements SleuthkitCase.ErrorObserver {
db = SleuthkitCase.newCase(dbPath);
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error creating a case: " + caseName + " in dir " + caseDir, ex);
throw new CaseActionException("Error creating a case: " + caseName + " in dir " + caseDir, ex);
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.create.exception.msg", caseName, caseDir), ex);
}
Case newCase = new Case(caseName, caseNumber, examiner, configFilePath, xmlcm, db);
@ -296,14 +310,18 @@ public class Case implements SleuthkitCase.ErrorObserver {
String examiner = xmlcm.getCaseExaminer();
// if the caseName is "", case / config file can't be opened
if (caseName.equals("")) {
throw new CaseActionException("Case name is blank.");
throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.blankCase.msg"));
}
String caseDir = xmlcm.getCaseDirectory();
String dbPath = caseDir + File.separator + "autopsy.db";
SleuthkitCase db = SleuthkitCase.openCase(dbPath);
if (null != db.getBackupDatabasePath()) {
JOptionPane.showMessageDialog(null, "Updated case database schema.\nA backup copy of the database with the following path has been made:\n " + db.getBackupDatabasePath(), "Case Database Schema Update", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null,
NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.msg",
db.getBackupDatabasePath()),
NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.title"),
JOptionPane.INFORMATION_MESSAGE);
}
checkImagesExist(db);
@ -318,10 +336,10 @@ public class Case implements SleuthkitCase.ErrorObserver {
CaseCloseAction closeCase = SystemAction.get(CaseCloseAction.class);
closeCase.actionPerformed(null);
if (!configFilePath.endsWith(CASE_DOT_EXTENSION)) {
throw new CaseActionException("Check that you selected the correct case file (usually with "
+ CASE_DOT_EXTENSION + " extension)", ex);
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.open.exception.checkFile.msg", CASE_DOT_EXTENSION), ex);
} else {
throw new CaseActionException("Error opening the case", ex);
throw new CaseActionException(NbBundle.getMessage(Case.class, "Case.open.exception.gen.msg"), ex);
}
}
}
@ -352,11 +370,13 @@ public class Case implements SleuthkitCase.ErrorObserver {
boolean fileExists = (pathExists(path)
|| driveExists(path));
if (!fileExists) {
int ret = JOptionPane.showConfirmDialog(null, appName + " has detected that one of the images associated with \n"
+ "this case are missing. Would you like to search for them now?\n"
+ "Previously, the image was located at:\n" + path
+ "\nPlease note that you will still be able to browse directories and generate reports\n"
+ "if you choose No, but you will not be able to view file content or run the ingest process.", "Missing Image", JOptionPane.YES_NO_OPTION);
int ret = JOptionPane.showConfirmDialog(null,
NbBundle.getMessage(Case.class,
"Case.checkImgExist.confDlg.doesntExist.msg",
appName, path),
NbBundle.getMessage(Case.class,
"Case.checkImgExist.confDlg.doesntExist.title"),
JOptionPane.YES_NO_OPTION);
if (ret == JOptionPane.YES_OPTION) {
MissingImageDialog.makeDialog(obj_id, db);
@ -389,12 +409,15 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
CoreComponentControl.openCoreWindows();
return newImage;
} catch (Exception ex) {
throw new CaseActionException("Error adding image to the case", ex);
throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.addImg.exception.msg"), ex);
}
}
@ -423,7 +446,10 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
CoreComponentControl.openCoreWindows();
}
@ -456,7 +482,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
this.xmlcm.close(); // close the xmlcm
this.db.close();
} catch (Exception e) {
throw new CaseActionException("Error while trying to close the current case.", e);
throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.closeCase.exception.msg"), e);
}
}
@ -478,11 +504,13 @@ public class Case implements SleuthkitCase.ErrorObserver {
RecentCases.getInstance().removeRecentCase(this.name, this.configFilePath); // remove it from the recent case
Case.changeCase(null);
if (result == false) {
throw new CaseActionException("Error deleting the case dir: " + caseDir);
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "Case.deleteCase.exception.msg", caseDir));
}
} catch (Exception ex) {
logger.log(Level.SEVERE, "Error deleting the current case dir: " + caseDir, ex);
throw new CaseActionException("Error deleting the case dir: " + caseDir, ex);
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "Case.deleteCase.exception.msg2", caseDir), ex);
}
}
@ -504,12 +532,15 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
doCaseNameChange(newCaseName);
} catch (Exception e) {
throw new CaseActionException("Error while trying to update the case name.", e);
throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.updateCaseName.exception.msg"), e);
}
}
@ -528,10 +559,13 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
} catch (Exception e) {
throw new CaseActionException("Error while trying to update the examiner.", e);
throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.updateExaminer.exception.msg"), e);
}
}
@ -551,10 +585,13 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to Case updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
} catch (Exception e) {
throw new CaseActionException("Error while trying to update the case number.", e);
throw new CaseActionException(NbBundle.getMessage(this.getClass(), "Case.updateCaseNum.exception.msg"), e);
}
}
@ -764,7 +801,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
try {
return db.getRootObjects();
} catch (TskException ex) {
throw new RuntimeException("Error getting root objects.", ex);
throw new RuntimeException(NbBundle.getMessage(this.getClass(), "Case.exception.errGetRootObj"), ex);
}
}
@ -919,16 +956,19 @@ public class Case implements SleuthkitCase.ErrorObserver {
File caseDirF = new File(caseDir);
if (caseDirF.exists()) {
if (caseDirF.isFile()) {
throw new CaseActionException("Cannot create case dir, already exists and is not a directory: " + caseDir);
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.existNotDir", caseDir));
} else if (!caseDirF.canRead() || !caseDirF.canWrite()) {
throw new CaseActionException("Cannot create case dir, already exists and cannot read/write: " + caseDir);
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.existCantRW", caseDir));
}
}
try {
boolean result = (caseDirF).mkdirs(); // create root case Directory
if (result == false) {
throw new CaseActionException("Cannot create case dir: " + caseDir);
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreate", caseDir));
}
// create the folders inside the case directory
@ -938,17 +978,21 @@ public class Case implements SleuthkitCase.ErrorObserver {
&& (new File(caseDir + File.separator + XMLCaseManagement.CACHE_FOLDER_RELPATH)).mkdir();
if (result == false) {
throw new CaseActionException("Could not create case directory: " + caseDir);
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreateCaseDir", caseDir));
}
final String modulesOutDir = caseDir + File.separator + getModulesOutputDirRelPath();
result = new File(modulesOutDir).mkdir();
if (result == false) {
throw new CaseActionException("Could not create modules output directory: " + modulesOutDir);
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.cantCreateModDir",
modulesOutDir));
}
} catch (Exception e) {
throw new CaseActionException("Could not create case directory: " + caseDir, e);
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.createCaseDir.exception.gen", caseDir), e);
}
}

View File

@ -99,8 +99,11 @@ import org.openide.util.actions.CallableSystemAction;
}
else{
// show the confirmation first to close the current case and open the "New Case" wizard panel
String closeCurrentCase = "Are you sure want to close and delete this case? \n Case Name: " + caseName + "\n Case Directory: "+ caseFolder.getPath();
NotifyDescriptor d = new NotifyDescriptor.Confirmation(closeCurrentCase, "Warning: Closing the Current Case", NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE);
String closeCurrentCase = NbBundle.getMessage(this.getClass(), "CaseDeleteAction.closeConfMsg.text", caseName, caseFolder.getPath());
NotifyDescriptor d = new NotifyDescriptor.Confirmation(closeCurrentCase,
NbBundle.getMessage(this.getClass(),
"CaseDeleteAction.closeConfMsg.title"),
NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE);
d.setValue(NotifyDescriptor.NO_OPTION);
Object res = DialogDisplayer.getDefault().notify(d);
@ -116,11 +119,18 @@ import org.openide.util.actions.CallableSystemAction;
// show notification whether the case has been deleted or it failed to delete...
if(!success){
JOptionPane.showMessageDialog(caller, "The delete action can't be fully completed because the folder or file in it is open by another program.\n \nClose the folder and file and try again or you can delete the case manually.", "Error: Folder In Use", JOptionPane.ERROR_MESSAGE); // throw an error
JOptionPane.showMessageDialog(caller,
NbBundle.getMessage(this.getClass(),
"CaseDeleteAction.msgDlg.fileInUse.msg"),
NbBundle.getMessage(this.getClass(),
"CaseDeleteAction.msgDlg.fileInUse.title"),
JOptionPane.ERROR_MESSAGE); // throw an error
}
else{
CasePropertiesAction.closeCasePropertiesWindow(); // because the "Delete Case" button is in the "CaseProperties" window, we have to close that window when we delete the case.
JOptionPane.showMessageDialog(caller, "Case " + caseName + " has been deleted.");
JOptionPane.showMessageDialog(caller, NbBundle.getMessage(this.getClass(),
"CaseDeleteAction.msgDlg.caseDelete.msg",
caseName));
}
}
}

View File

@ -22,15 +22,17 @@ import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.Collections;
import java.util.logging.Level;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.Version;
/**
* The action to open a existing case. This class is always enabled.
@ -47,8 +49,9 @@ public final class CaseOpenAction implements ActionListener {
* The constructor
*/
public CaseOpenAction() {
autFilter = new FileNameExtensionFilter(org.sleuthkit.autopsy.coreutils.Version.getName()
+ " Case File ( " + Case.CASE_DOT_EXTENSION + ")",
autFilter = new FileNameExtensionFilter(
NbBundle.getMessage(CaseOpenAction.class, "CaseOpenAction.autFilter.title", Version.getName(),
Case.CASE_DOT_EXTENSION),
Case.CASE_EXTENSION);
fc.setDragEnabled(false);
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
@ -80,7 +83,12 @@ public final class CaseOpenAction implements ActionListener {
ModuleSettings.setConfigSetting(ModuleSettings.MAIN_SETTINGS, PROP_BASECASE, dirPath.substring(0, dirPath.lastIndexOf(File.separator)));
// check if the file exists
if (!new File(path).exists()) {
JOptionPane.showMessageDialog(null, "Error: File doesn't exist.", "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null,
NbBundle.getMessage(this.getClass(),
"CaseOpenAction.msgDlg.fileNotExist.msg"),
NbBundle.getMessage(this.getClass(),
"CaseOpenAction.msgDlg.fileNotExist.title"),
JOptionPane.ERROR_MESSAGE);
this.actionPerformed(e); // show the dialog box again
} else {
// try to close Startup window if there's one
@ -93,8 +101,13 @@ public final class CaseOpenAction implements ActionListener {
try {
Case.open(path); // open the case
} catch (CaseActionException ex) {
JOptionPane.showMessageDialog(null, "Error: could not open the case in folder " + path
+ ": " + ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null,
NbBundle.getMessage(this.getClass(),
"CaseOpenAction.msgDlg.cantOpenCase.msg", path,
ex.getMessage()),
NbBundle.getMessage(this.getClass(),
"CaseOpenAction.msgDlg.cantOpenCase.title"),
JOptionPane.ERROR_MESSAGE);
logger.log(Level.WARNING, "Error opening case in folder " + path, ex);
StartupWindowProvider.getInstance().open();

View File

@ -62,7 +62,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
try {
// create the popUp window for it
String title = "Case Properties";
String title = NbBundle.getMessage(this.getClass(), "CasePropertiesAction.window.title");
final JFrame frame = new JFrame(title);
popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal

View File

@ -27,9 +27,10 @@ package org.sleuthkit.autopsy.casemodule;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
@ -365,7 +366,12 @@ class CasePropertiesForm extends javax.swing.JPanel{
// check if the case name is empty
if(newCaseName.trim().equals("")){
JOptionPane.showMessageDialog(caller, "The caseName cannot be empty.", "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(caller,
NbBundle.getMessage(this.getClass(),
"CasePropertiesForm.updateCaseName.msgDlg.empty.msg"),
NbBundle.getMessage(this.getClass(),
"CasePropertiesForm.updateCaseName.msgDlg.empty.title"),
JOptionPane.ERROR_MESSAGE);
}
else{
// check if case Name contain one of this following symbol:
@ -373,13 +379,22 @@ class CasePropertiesForm extends javax.swing.JPanel{
if(newCaseName.contains("\\") || newCaseName.contains("/") || newCaseName.contains(":") ||
newCaseName.contains("*") || newCaseName.contains("?") || newCaseName.contains("\"") ||
newCaseName.contains("<") || newCaseName.contains(">") || newCaseName.contains("|")){
String errorMsg = "The Case Name cannot contain any of this following symbol: \\ / : * ? \" < > |";
JOptionPane.showMessageDialog(caller, errorMsg, "Error", JOptionPane.ERROR_MESSAGE);
String errorMsg = NbBundle
.getMessage(this.getClass(), "CasePropertiesForm.updateCaseName.msgDlg.invalidSymbols.msg");
JOptionPane.showMessageDialog(caller, errorMsg,
NbBundle.getMessage(this.getClass(),
"CasePropertiesForm.updateCaseName.msgDlg.invalidSymbols.title"),
JOptionPane.ERROR_MESSAGE);
}
else{
// ask for the confirmation first
String confMsg = "Are you sure want to update the case name from \"" + oldCaseName + "\" to \"" + newCaseName + "\"?";
NotifyDescriptor d = new NotifyDescriptor.Confirmation(confMsg, "Create directory", NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE);
String confMsg = NbBundle
.getMessage(this.getClass(), "CasePropertiesForm.updateCaseName.confMsg.msg", oldCaseName,
newCaseName);
NotifyDescriptor d = new NotifyDescriptor.Confirmation(confMsg,
NbBundle.getMessage(this.getClass(),
"CasePropertiesForm.updateCaseName.confMsg.title"),
NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE);
d.setValue(NotifyDescriptor.NO_OPTION);
Object res = DialogDisplayer.getDefault().notify(d);

View File

@ -29,13 +29,14 @@ import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
/**
*
*/
public class CueBannerPanel extends javax.swing.JPanel {
final private static String title = "Open Recent Case";
final private static String title = NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.title.text");
final private static JFrame frame = new JFrame(title);
final static JDialog recentCasesWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal

View File

@ -19,6 +19,8 @@
package org.sleuthkit.autopsy.casemodule;
import org.openide.util.NbBundle;
import java.io.File;
import java.util.List;
import java.util.Arrays;
@ -32,10 +34,10 @@ public class GeneralFilter extends FileFilter{
// Extensions & Descriptions for commonly used filters
public static final List<String> RAW_IMAGE_EXTS = Arrays.asList(new String[]{".img", ".dd", ".001", ".aa", ".raw", ".bin"});
public static final String RAW_IMAGE_DESC = "Raw Images (*.img, *.dd, *.001, *.aa, *.raw, *.bin)";
public static final String RAW_IMAGE_DESC = NbBundle.getMessage(GeneralFilter.class, "GeneralFilter.rawImageDesc.text");
public static final List<String> ENCASE_IMAGE_EXTS = Arrays.asList(new String[]{".e01"});
public static final String ENCASE_IMAGE_DESC = "Encase Images (*.e01)";
public static final String ENCASE_IMAGE_DESC = NbBundle.getMessage(GeneralFilter.class, "GeneralFilter.encaseImageDesc.text");

View File

@ -22,6 +22,8 @@ import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
import javax.swing.filechooser.FileFilter;
import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
@ -41,7 +43,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
static final Logger logger = Logger.getLogger(ImageDSProcessor.class.getName());
// Data source type handled by this processor
private final static String dsType = "Image File";
private final static String dsType = NbBundle.getMessage(ImageDSProcessor.class, "ImageDSProcessor.dsType.text");
// The Config UI panel that plugins into the Choose Data Source Wizard
private final ImageFilePanel imageFilePanel;
@ -70,7 +72,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
allExt.addAll(GeneralFilter.RAW_IMAGE_EXTS);
allExt.addAll(GeneralFilter.ENCASE_IMAGE_EXTS);
}
static final String allDesc = "All Supported Types";
static final String allDesc = NbBundle.getMessage(ImageDSProcessor.class, "ImageDSProcessor.allDesc.text");
static final GeneralFilter allFilter = new GeneralFilter(allExt, allDesc);
static final List<FileFilter> filtersList = new ArrayList<>();

View File

@ -21,8 +21,6 @@ package org.sleuthkit.autopsy.casemodule;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
import java.util.SimpleTimeZone;
@ -32,6 +30,8 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
@ -202,7 +202,9 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
}
catch (Exception e) {
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to ImageFilePanel updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}//GEN-LAST:event_browseButtonActionPerformed
@ -330,7 +332,9 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
}
catch (Exception ee) {
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to ImageFilePanel updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}
@ -341,7 +345,9 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
}
catch (Exception ee) {
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to ImageFilePanel updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}
@ -353,7 +359,9 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
}
catch (Exception ee) {
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to ImageFilePanel updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}

View File

@ -20,6 +20,8 @@
package org.sleuthkit.autopsy.casemodule;
import javax.swing.JPanel;
import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
@ -33,7 +35,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
static final Logger logger = Logger.getLogger(ImageDSProcessor.class.getName());
// Data source type handled by this processor
private static final String dsType = "Local Disk";
private static final String dsType = NbBundle.getMessage(LocalDiskDSProcessor.class, "LocalDiskDSProcessor.dsType.text");
// The Config UI panel that plugins into the Choose Data Source Wizard
private final LocalDiskPanel localDiskPanel;

View File

@ -41,6 +41,8 @@ import javax.swing.ListCellRenderer;
import javax.swing.SwingWorker;
import javax.swing.border.EmptyBorder;
import javax.swing.event.ListDataListener;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
@ -298,7 +300,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
List<LocalDisk> partitions = new ArrayList<LocalDisk>();
//private String SELECT = "Select a local disk:";
private String LOADING = "Loading local disks...";
private String LOADING = NbBundle.getMessage(this.getClass(), "LocalDiskPanel.localDiskModel.loading.msg");
LocalDiskThread worker = null;
@ -336,7 +338,9 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
}
catch (Exception e) {
logger.log(Level.SEVERE, "LocalDiskPanel listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to LocalDiskPanel updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "LocalDiskPanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "LocalDiskPanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}
}
@ -410,16 +414,22 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
private void displayErrors() {
if(physical.isEmpty() && partitions.isEmpty()) {
if(PlatformUtil.isWindowsOS()) {
errorLabel.setText("Disks were not detected. On some systems it requires admin privileges (or \"Run as administrator\").");
errorLabel.setToolTipText("Disks were not detected. On some systems it requires admin privileges (or \"Run as administrator\").");
errorLabel.setText(
NbBundle.getMessage(this.getClass(), "LocalDiskPanel.errLabel.disksNotDetected.text"));
errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(),
"LocalDiskPanel.errLabel.disksNotDetected.toolTipText"));
} else {
errorLabel.setText("Local drives were not detected. Auto-detection not supported on this OS or admin privileges required");
errorLabel.setToolTipText("Local drives were not detected. Auto-detection not supported on this OS or admin privileges required");
errorLabel.setText(
NbBundle.getMessage(this.getClass(), "LocalDiskPanel.errLabel.drivesNotDetected.text"));
errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(),
"LocalDiskPanel.errLabel.drivesNotDetected.toolTipText"));
}
diskComboBox.setEnabled(false);
} else if(physical.isEmpty()) {
errorLabel.setText("Some disks were not detected. On some systems it requires admin privileges (or \"Run as administrator\").");
errorLabel.setToolTipText("Some disks were not detected. On some systems it requires admin privileges (or \"Run as administrator\").");
errorLabel.setText(
NbBundle.getMessage(this.getClass(), "LocalDiskPanel.errLabel.someDisksNotDetected.text"));
errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(),
"LocalDiskPanel.errLabel.someDisksNotDetected.toolTipText"));
}
}

View File

@ -20,6 +20,8 @@
package org.sleuthkit.autopsy.casemodule;
import javax.swing.JPanel;
import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
@ -32,7 +34,7 @@ public class LocalFilesDSProcessor implements DataSourceProcessor {
static final Logger logger = Logger.getLogger(LocalFilesDSProcessor.class.getName());
// Data source type handled by this processor
private static final String dsType = "Logical Files";
private static final String dsType = NbBundle.getMessage(LocalFilesDSProcessor.class, "LocalFilesDSProcessor.dsType");
// The Config UI panel that plugins into the Choose Data Source Wizard
private final LocalFilesPanel localFilesPanel;

View File

@ -25,6 +25,8 @@ import java.util.Set;
import java.util.TreeSet;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import java.util.logging.Level;
@ -84,7 +86,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
//@Override
public String getContentType() {
return "LOCAL";
return NbBundle.getMessage(this.getClass(), "LocalFilesPanel.contentType.text");
}
//@Override
@ -127,7 +129,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
@Override
public String toString() {
return "Logical Files";
return NbBundle.getMessage(this.getClass(), "LocalFilesDSProcessor.toString.text");
}
/**
@ -242,7 +244,9 @@ import org.sleuthkit.autopsy.coreutils.Logger;
}
catch (Exception e) {
logger.log(Level.SEVERE, "LocalFilesPanel listener threw exception", e);
MessageNotifyUtil.Notify.show("Module Error", "A module caused an error listening to LocalFilesPanel updates. See log to determine which module. Some data could be incomplete.", MessageNotifyUtil.MessageType.ERROR);
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "LocalFilesPanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "LocalFilesPanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
}
}//GEN-LAST:event_selectButtonActionPerformed

View File

@ -31,6 +31,8 @@ import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.GeneralFilter;
import org.sleuthkit.autopsy.coreutils.Logger;
@ -54,7 +56,7 @@ import org.sleuthkit.datamodel.TskCoreException;
allExt.addAll(GeneralFilter.RAW_IMAGE_EXTS);
allExt.addAll(GeneralFilter.ENCASE_IMAGE_EXTS);
}
static final String allDesc = "All Supported Types";
static final String allDesc = NbBundle.getMessage(MissingImageDialog.class, "MissingImageDialog.allDesc.text");
static final GeneralFilter allFilter = new GeneralFilter(allExt, allDesc);
private JFileChooser fc = new JFileChooser();
@ -100,7 +102,7 @@ import org.sleuthkit.datamodel.TskCoreException;
}
private void display() {
this.setTitle("Search for Missing Image");
this.setTitle(NbBundle.getMessage(this.getClass(), "MissingImageDialog.display.title"));
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
// set the popUp window / JFrame
int w = this.getSize().width;
@ -316,9 +318,11 @@ import org.sleuthkit.datamodel.TskCoreException;
//
void cancel() {
int ret = JOptionPane.showConfirmDialog(null,
"No image file has been selected, are you sure you\n" +
"would like to exit without finding the image.",
"Missing Image", JOptionPane.YES_NO_OPTION);
NbBundle.getMessage(this.getClass(),
"MissingImageDialog.confDlg.noFileSel.msg"),
NbBundle.getMessage(this.getClass(),
"MissingImageDialog.confDlg.noFileSel.title"),
JOptionPane.YES_NO_OPTION);
if (ret == JOptionPane.YES_OPTION) {
this.dispose();
}

View File

@ -19,6 +19,8 @@
package org.sleuthkit.autopsy.casemodule;
import org.openide.util.NbBundle;
import java.awt.Component;
import java.io.File;
import javax.swing.JFileChooser;
@ -52,7 +54,7 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener{
*/
@Override
public String getName() {
return "Case Info";
return NbBundle.getMessage(this.getClass(), "NewCaseVisualPanel1.getName.text");
}
/**
@ -179,7 +181,8 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener{
//fc.setSelectedFile(new File("C:\\Program Files\\"));
//disableTextField(fc); // disable all the text field on the file chooser
int returnValue = fc.showDialog((Component)evt.getSource(), "Select");
int returnValue = fc.showDialog((Component)evt.getSource(), NbBundle.getMessage(this.getClass(),
"NewCaseVisualPanel1.caseDirBrowse.selectButton.text"));
if(returnValue == JFileChooser.APPROVE_OPTION){
String path = fc.getSelectedFile().getPath();
caseParentDirTextField.setText(path); // put the path to the textfield

View File

@ -24,6 +24,8 @@
*/
package org.sleuthkit.autopsy.casemodule;
import org.openide.util.NbBundle;
/**
*
* @author dfickling
@ -43,7 +45,7 @@ package org.sleuthkit.autopsy.casemodule;
*/
@Override
public String getName() {
return "Additional Information";
return NbBundle.getMessage(this.getClass(), "NewCaseVisualPanel2.getName.text");
}
/** This method is called from within the constructor to

View File

@ -31,6 +31,7 @@ import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.WizardDescriptor;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
import org.openide.util.actions.SystemAction;
import org.sleuthkit.autopsy.coreutils.Logger;
@ -52,8 +53,12 @@ import org.sleuthkit.autopsy.coreutils.Logger;
// there's a case open
if (Case.existsCurrentCase()) {
// show the confirmation first to close the current case and open the "New Case" wizard panel
String closeCurrentCase = "Do you want to save and close this case and proceed with the new case creation?";
NotifyDescriptor d = new NotifyDescriptor.Confirmation(closeCurrentCase, "Warning: Closing the Current Case", NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE);
String closeCurrentCase = NbBundle
.getMessage(this.getClass(), "NewCaseWizardAction.closeCurCase.confMsg.msg");
NotifyDescriptor d = new NotifyDescriptor.Confirmation(closeCurrentCase,
NbBundle.getMessage(this.getClass(),
"NewCaseWizardAction.closeCurCase.confMsg.title"),
NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE);
d.setValue(NotifyDescriptor.NO_OPTION);
Object res = DialogDisplayer.getDefault().notify(d);
@ -77,7 +82,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels());
// {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
wizardDescriptor.setTitle("New Case Information");
wizardDescriptor.setTitle(NbBundle.getMessage(this.getClass(), "NewCaseWizardAction.newCase.windowTitle.text"));
Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
dialog.setVisible(true);
dialog.toFront();
@ -149,7 +154,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
@Override
public String getName() {
return "New Case Wizard";
return NbBundle.getMessage(this.getClass(), "NewCaseWizardAction.getName.text");
}
@Override

View File

@ -23,6 +23,8 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.logging.Level;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -205,13 +207,15 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
// check if case Name contain one of this following symbol:
// \ / : * ? " < > |
if (!Case.isValidName(caseName)) {
String errorMsg = "The Case Name cannot contain any of the following symbols: \\ / : * ? \" < > |";
String errorMsg = NbBundle
.getMessage(this.getClass(), "NewCaseWizardPanel1.validate.errMsg.invalidSymbols");
validationError(errorMsg);
} else {
// check if the directory exist
if (new File(caseDirPath).exists()) {
// throw a warning to enter new data or delete the existing directory
String errorMsg = "Case directory '" + caseDirPath + "' already exists.";
String errorMsg = NbBundle
.getMessage(this.getClass(), "NewCaseWizardPanel1.validate.errMsg.dirExists", caseDirPath);
validationError(errorMsg);
} else {
// check if the "base" directory path is absolute
@ -220,8 +224,13 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
// when the base directory doesn't exist
if (!baseDir.exists()) {
// get confirmation to create directory
String confMsg = "The base directory \'" + caseParentDir + "\' doesn't exist. \n \n Do you want to create that directory?";
NotifyDescriptor d2 = new NotifyDescriptor.Confirmation(confMsg, "Create directory", NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE);
String confMsg = NbBundle
.getMessage(this.getClass(), "NewCaseWizardPanel1.validate.confMsg.createDir.msg",
caseParentDir);
NotifyDescriptor d2 = new NotifyDescriptor.Confirmation(confMsg,
NbBundle.getMessage(this.getClass(),
"NewCaseWizardPanel1.validate.confMsg.createDir.title"),
NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE);
d2.setValue(NotifyDescriptor.NO_OPTION);
Object res2 = DialogDisplayer.getDefault().notify(d2);
@ -230,27 +239,33 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
try {
createDirectory(caseDirPath);
} catch (Exception ex) {
String errorMsg = "Error: Couldn't create case parent directory " + caseParentDir;
String errorMsg = NbBundle.getMessage(this.getClass(),
"NewCaseWizardPanel1.validate.errMsg.cantCreateParDir.msg",
caseParentDir);
logger.log(Level.WARNING, errorMsg, ex);
validationError(errorMsg);
}
}
if (res2 != null && res2 == DialogDescriptor.NO_OPTION) {
// if user say no
validationError("Prevented from creating base directory " + caseDirPath );
validationError(NbBundle.getMessage(this.getClass(),
"NewCaseWizardPanel1.validate.errMsg.prevCreateBaseDir.msg",
caseDirPath) );
}
} else {
try {
createDirectory(caseDirPath);
} catch (Exception ex) {
String errorMsg = "Error: Couldn't create directory.";
String errorMsg = NbBundle
.getMessage(this.getClass(), "NewCaseWizardPanel1.validate.errMsg.cantCreateDir");
logger.log(Level.WARNING, errorMsg, ex);
validationError(errorMsg);
}
}
} else {
// throw a notification
String errorMsg = "ERROR: The Base Directory that you entered is not valid.\nPlease enter a valid Base Directory.";
String errorMsg = NbBundle
.getMessage(this.getClass(), "NewCaseWizardPanel1.validate.errMsg.invalidBaseDir.msg");
validationError(errorMsg);
}
}
@ -282,7 +297,8 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
Case.deleteCaseDirectory(new File(caseDirPath));
}
String errorMsg = "ERROR: Could not create the case directory. \nPlease enter a valid Case Name and Directory.";
String errorMsg = NbBundle.getMessage(this.getClass(),
"NewCaseWizardPanel1.createDir.errMsg.cantCreateDir.msg");
validationError(errorMsg);

View File

@ -29,6 +29,7 @@ import org.openide.WizardDescriptor;
import org.openide.WizardValidationException;
import org.openide.util.Exceptions;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
/**
* The "New Case" wizard panel with a component on it. This class represents
@ -190,7 +191,10 @@ class NewCaseWizardPanel2 implements WizardDescriptor.ValidatingPanel<WizardDesc
//Case.create(createdDirectory, caseName, caseNumber, examiner);
} catch(Exception ex) {
throw new WizardValidationException(this.getComponent(), "Error creating case", null);
throw new WizardValidationException(this.getComponent(),
NbBundle.getMessage(this.getClass(),
"NewCaseWizardPanel2.validate.errCreateCase.msg"),
null);
}
}
}

View File

@ -28,6 +28,8 @@ import java.util.logging.Level;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
/**
@ -198,7 +200,13 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
// Open the recent cases
try {
if (caseName.equals("") || casePath.equals("") || (!new File(casePath).exists())) {
JOptionPane.showMessageDialog(null, "Error: Case " + caseName + " doesn't exist.", "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null,
NbBundle.getMessage(this.getClass(),
"OpenRecentCasePanel.openCase.msgDlg.caseDoesntExist.msg",
caseName),
NbBundle.getMessage(this.getClass(),
"OpenRecentCasePanel.openCase.msgDlg.err"),
JOptionPane.ERROR_MESSAGE);
RecentCases.getInstance().removeRecentCase(caseName, casePath); // remove the recent case if it doesn't exist anymore
//if case is not opened, open the start window
@ -258,10 +266,10 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
switch (column) {
case 0:
colName = "Case Name";
colName = NbBundle.getMessage(this.getClass(), "OpenRecentCasePanel.colName.caseName");
break;
case 1:
colName = "Path";
colName = NbBundle.getMessage(this.getClass(), "OpenRecentCasePanel.colName.path");
break;
default:
;

View File

@ -31,6 +31,7 @@ import java.util.List;
import java.util.logging.Level;
import javax.swing.JMenuItem;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
import org.openide.util.actions.Presenter;
import org.openide.filesystems.FileUtil;
@ -96,7 +97,8 @@ import org.sleuthkit.autopsy.coreutils.Logger;
private static void validateCaseIndex(int i) {
if (i < 0 || i >= LENGTH) {
throw new IllegalArgumentException("Recent case index " + i + " is out of range.");
throw new IllegalArgumentException(
NbBundle.getMessage(RecentCases.class, "RecentCases.exception.caseIdxOutOfRange.msg", i));
}
}
@ -419,7 +421,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
@Override
public String getName() {
//return NbBundle.getMessage(RecentCases.class, "CTL_RecentCases");
return "Clear Recent Cases";
return NbBundle.getMessage(this.getClass(), "RecentCases.getName.text");
}
/**

View File

@ -26,6 +26,8 @@ import java.io.File;
import java.util.logging.Level;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
/**
@ -56,7 +58,11 @@ class RecentItems implements ActionListener {
// check if the file exists
if(caseName.equals("") || casePath.equals("") || (!new File(casePath).exists())){
// throw an error here
JOptionPane.showMessageDialog(caller, "Error: Case " + caseName + " doesn't exist.", "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(caller,
NbBundle.getMessage(this.getClass(), "RecentItems.openRecentCase.msgDlg.text",
caseName),
NbBundle.getMessage(this.getClass(), "RecentItems.openRecentCase.msgDlg.err"),
JOptionPane.ERROR_MESSAGE);
RecentCases.getInstance().removeRecentCase(caseName, casePath); // remove the recent case if it doesn't exist anymore
//if case is not opened, open the start window

View File

@ -26,6 +26,8 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JDialog;
import javax.swing.JFrame;
import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
/**
@ -35,7 +37,7 @@ import org.openide.util.lookup.ServiceProvider;
public final class StartupWindow extends JDialog implements StartupWindowInterface {
private static StartupWindow instance;
private static final String TITLE = "Welcome";
private static final String TITLE = NbBundle.getMessage(StartupWindow.class, "StartupWindow.title.text");
private static Dimension DIMENSIONS = new Dimension(750, 400);
public StartupWindow() {

View File

@ -23,6 +23,7 @@ import javax.swing.JComponent;
import javax.swing.JMenuItem;
import javax.swing.JSeparator;
import org.openide.awt.DynamicMenuContent;
import org.openide.util.NbBundle;
import org.openide.util.actions.SystemAction;
/**
@ -66,14 +67,15 @@ import org.openide.util.actions.SystemAction;
// if it has recent case, create clear menu
if(hasRecentCase){
comps[length] = new JSeparator();
JMenuItem clearMenu = new JMenuItem("Clear Recent Cases");
JMenuItem clearMenu = new JMenuItem(
NbBundle.getMessage(this.getClass(), "UpdateRecentCases.menuItem.clearRecentCases.text"));
clearMenu.addActionListener(SystemAction.get(RecentCases.class));
comps[length+1] = clearMenu;
}
// otherwise, just create a disabled empty menu
else{
comps = new JComponent[1];
JMenuItem emptyMenu = new JMenuItem("-Empty-");
JMenuItem emptyMenu = new JMenuItem(NbBundle.getMessage(this.getClass(), "UpdateRecentCases.menuItem.empty"));
emptyMenu.addActionListener(new RecentItems("", ""));
comps[0] = emptyMenu;
comps[0].setEnabled(false);

View File

@ -30,6 +30,7 @@ import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;
import org.openide.util.Exceptions;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.XMLUtil;
import org.w3c.dom.*;
@ -458,7 +459,8 @@ import org.xml.sax.SAXException;
docBuilder = docFactory.newDocumentBuilder();
} catch (ParserConfigurationException ex) {
clear();
throw new CaseActionException("Error setting up Case XML file, ", ex);
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.create.exception.msg"), ex);
}
doc = docBuilder.newDocument();
@ -531,7 +533,8 @@ import org.xml.sax.SAXException;
@Override
public void writeFile() throws CaseActionException {
if (doc == null || caseName.equals("")) {
throw new CaseActionException("No set case to write management file for.");
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.writeFile.exception.noCase.msg"));
}
// Prepare the DOM document for writing
@ -549,7 +552,8 @@ import org.xml.sax.SAXException;
xformer = tfactory.newTransformer();
} catch (TransformerConfigurationException ex) {
logger.log(Level.SEVERE, "Could not setup tranformer and write case file");
throw new CaseActionException("Error writing to case file", ex);
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.writeFile.exception.errWriteToFile.msg"), ex);
}
//Setup indenting to "pretty print"
@ -560,7 +564,8 @@ import org.xml.sax.SAXException;
xformer.transform(source, result);
} catch (TransformerException ex) {
logger.log(Level.SEVERE, "Could not run tranformer and write case file");
throw new CaseActionException("Error writing to case file", ex);
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.writeFile.exception.errWriteToFile.msg"), ex);
}
// preparing the output file
@ -597,11 +602,17 @@ import org.xml.sax.SAXException;
db = dbf.newDocumentBuilder();
doc = db.parse(file);
} catch (ParserConfigurationException ex) {
throw new CaseActionException("Error reading case XML file: " + conFilePath, ex);
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.open.exception.errReadXMLFile.msg",
conFilePath), ex);
} catch (SAXException ex) {
throw new CaseActionException("Error reading case XML file: " + conFilePath, ex);
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.open.exception.errReadXMLFile.msg",
conFilePath), ex);
} catch (IOException ex) {
throw new CaseActionException("Error reading case XML file: " + conFilePath, ex);
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.open.exception.errReadXMLFile.msg",
conFilePath), ex);
}
@ -619,7 +630,13 @@ import org.xml.sax.SAXException;
if (!rootName.equals(TOP_ROOT_NAME)) {
// throw an error ...
clear();
JOptionPane.showMessageDialog(caller, "Error: This is not an Autopsy config file (\"" + file.getName() + "\").\n \nDetail: \nCannot open a non-Autopsy config file (at " + className + ").", "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(caller,
NbBundle.getMessage(this.getClass(),
"XMLCaseManagement.open.msgDlg.notAutCase.msg",
file.getName(), className),
NbBundle.getMessage(this.getClass(),
"XMLCaseManagement.open.msgDlg.notAutCase.title"),
JOptionPane.ERROR_MESSAGE);
} else {
/* Autopsy Created Version */
String createdVersion = getCreatedVersion(); // get the created version