Pulled strings into Bundle.

This commit is contained in:
Nick Davis 2014-04-15 17:52:42 -04:00
parent b3c9b23feb
commit 937abb24c4
2 changed files with 11 additions and 4 deletions

View File

@ -7,3 +7,7 @@ OpenIDE-Module-Short-Description=Carves files from unallocated space
ScalpelCarverIngestModule.moduleName=Scalpel Carver ScalpelCarverIngestModule.moduleName=Scalpel Carver
ScalpelCarverIngestModule.moduleDesc.text=Carves files from unallocated space at ingest time.\ ScalpelCarverIngestModule.moduleDesc.text=Carves files from unallocated space at ingest time.\
Carved files are reanalyzed and displayed in the directory tree. Carved files are reanalyzed and displayed in the directory tree.
ScalpelCarverIngestModule.startUp.exception.msg1=Scalpel carving module is not compatible with non-Windows OS's at this time.
ScalpelCarverIngestModule.startUp.exception.msg2=Error initializing scalpel carver.
ScalpelCarverIngestModule.startUp.exception.msg3=Could not create the output directory for the Scalpel module.
ScalpelCarverIngestModule.startUp.exception.msg4=Could not obtain the path to the Scalpel configuration file.

View File

@ -23,6 +23,8 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.PlatformUtil; import org.sleuthkit.autopsy.coreutils.PlatformUtil;
@ -69,14 +71,14 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
// make sure this is Windows // make sure this is Windows
String os = System.getProperty("os.name"); String os = System.getProperty("os.name");
if (!os.startsWith("Windows")) { if (!os.startsWith("Windows")) {
String message = "Scalpel carving module is not compatible with non-Windows OS's at this time."; String message = NbBundle.getMessage(this.getClass(), "ScalpelCarverIngestModule.startUp.exception.msg1");
logger.log(Level.SEVERE, message); logger.log(Level.SEVERE, message);
throw new IngestModuleException(message); throw new IngestModuleException(message);
} }
carver = new ScalpelCarver(); carver = new ScalpelCarver();
if (!carver.isInitialized()) { if (!carver.isInitialized()) {
String message = "Error initializing scalpel carver."; String message = NbBundle.getMessage(this.getClass(), "ScalpelCarverIngestModule.startUp.exception.msg2");
logger.log(Level.SEVERE, message); logger.log(Level.SEVERE, message);
throw new IngestModuleException(message); throw new IngestModuleException(message);
} }
@ -87,7 +89,8 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
File moduleOutputDir = new File(moduleOutputDirPath); File moduleOutputDir = new File(moduleOutputDirPath);
if (!moduleOutputDir.exists()) { if (!moduleOutputDir.exists()) {
if (!moduleOutputDir.mkdir()) { if (!moduleOutputDir.mkdir()) {
String message = "Could not create the output directory for the Scalpel module."; String message = NbBundle
.getMessage(this.getClass(), "ScalpelCarverIngestModule.startUp.exception.msg3");
logger.log(Level.SEVERE, message); logger.log(Level.SEVERE, message);
throw new IngestModuleException(message); throw new IngestModuleException(message);
} }
@ -102,7 +105,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges
try { try {
PlatformUtil.extractResourceToUserConfigDir(this.getClass(), configFileName, false); PlatformUtil.extractResourceToUserConfigDir(this.getClass(), configFileName, false);
} catch (IOException ex) { } catch (IOException ex) {
String message = "Could not obtain the path to the Scalpel configuration file."; String message = NbBundle.getMessage(this.getClass(), "ScalpelCarverIngestModule.startUp.exception.msg4");
logger.log(Level.SEVERE, message, ex); logger.log(Level.SEVERE, message, ex);
throw new IngestModuleException(message); throw new IngestModuleException(message);
} }