From 6d1ccd6b34bdc3d6629e9a2bae02d9d046a86faf Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Fri, 21 Feb 2014 16:03:39 -0500 Subject: [PATCH 1/2] Pulled static strings into Bundle.properties. Added empty ja properties file. --- .../corecomponentinterfaces/Bundle.properties | 2 ++ .../Bundle_ja.properties | 0 .../CoreComponentControl.java | 24 +++++++++++-------- 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle_ja.properties diff --git a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle.properties b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle.properties index 1468238a77..a1c78ba931 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle.properties @@ -1 +1,3 @@ OpenIDE-Module-Name=CoreComponentInterfaces +CoreComponentControl.CTL_DirectoryTreeTopComponent=Directory Tree +CoreComponentControl.CTL_FavoritesTopComponent=Favorites diff --git a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle_ja.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/CoreComponentControl.java b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/CoreComponentControl.java index 2ada97d001..43b3c63629 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/CoreComponentControl.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/CoreComponentControl.java @@ -22,6 +22,8 @@ import java.util.Collection; 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 org.openide.util.Lookup; import org.openide.windows.Mode; @@ -37,6 +39,10 @@ import org.sleuthkit.autopsy.corecomponents.DataContentTopComponent; public class CoreComponentControl { private static final Logger logger = Logger.getLogger(CoreComponentControl.class.getName()); + private static final String DIRECTORY_TREE = NbBundle.getMessage(CoreComponentControl.class, + "CoreComponentControl.CTL_DirectoryTreeTopComponent"); + private static final String FAVORITES = NbBundle.getMessage(CoreComponentControl.class, + "CoreComponentControl.CTL_FavoritesTopComponent"); /** * Opens all TopComponent windows that are needed ({@link DataExplorer}, {@link DataResult}, and @@ -83,6 +89,7 @@ public class CoreComponentControl { Set modes = wm.getModes(); Iterator iter = wm.getModes().iterator(); + TopComponent directoryTree = null; TopComponent favorites = null; String tcName = ""; @@ -94,16 +101,13 @@ public class CoreComponentControl { logger.log(Level.INFO, "tcName was null"); tcName = ""; } - switch (tcName) { - case "Directory Tree": - directoryTree = tc; - break; - case "Favorites": - favorites = tc; - break; - default: - tc.close(); - break; + // switch requires constant strings, so converted to if/else. + if (DIRECTORY_TREE.equals(tcName)) { + directoryTree = tc; + } else if (FAVORITES.equals(tcName)) { + favorites = tc; + } else { + tc.close(); } } } From 6eeee4aef68da96a17521416d507bd752e142fd5 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Mon, 24 Feb 2014 15:30:30 -0800 Subject: [PATCH 2/2] Completed translation of core-corecompoenentinterface --- .../autopsy/corecomponentinterfaces/Bundle_ja.properties | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle_ja.properties index e69de29bb2..8e2fd233f8 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/Bundle_ja.properties @@ -0,0 +1,3 @@ +OpenIDE-Module-Name=\u4E3B\u8981\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30A4\u30B9 +CoreComponentControl.CTL_DirectoryTreeTopComponent=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30C4\u30EA\u30FC +CoreComponentControl.CTL_FavoritesTopComponent=\u304A\u6C17\u306B\u5165\u308A \ No newline at end of file