Skip to content

Commit 5562fac

Browse files
author
GraxCode
committed
extract attach to process strings
1 parent d81e16e commit 5562fac

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/main/java/me/grax/jbytemod/ui/MyMenuBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ protected void openProcessSelection() {
281281
VirtualMachine vm = null;
282282
try {
283283
if (list.isEmpty()) {
284-
String pid = JOptionPane.showInputDialog("Couldn't find any VM's! Enter your process id.");
284+
String pid = JOptionPane.showInputDialog(JByteMod.res.getResource("no_vm_found"));
285285
if (pid != null && !pid.isEmpty()) {
286286
vm = AttachUtils.getVirtualMachine(Integer.parseInt(pid));
287287
}

src/main/java/me/grax/jbytemod/utils/task/AttachTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected Void doInBackground() throws Exception {
4545

4646
File self = new File(JByteMod.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
4747
if (self.getAbsolutePath().endsWith(".jar")) {
48-
JOptionPane.showMessageDialog(null, "Injecting... this could take a while.");
48+
JOptionPane.showMessageDialog(null, JByteMod.res.getResource("injecting_msg"));
4949
JarFile jbytemod = new JarFile(self);
5050
double size = countFiles(jbytemod);
5151
ZipOutputStream output = new ZipOutputStream(new FileOutputStream(temp));
@@ -75,7 +75,7 @@ protected Void doInBackground() throws Exception {
7575
vm.loadAgent(temp.getAbsolutePath(), self.getParent());
7676
temp.deleteOnExit();
7777
} else {
78-
JOptionPane.showMessageDialog(null, "Couldn't find itself as jar!");
78+
JOptionPane.showMessageDialog(null, JByteMod.res.getResource("no_jar_found"));
7979
}
8080
publish(100);
8181
return null;

src/main/resources/locale/en.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,8 @@
9292
<string name="max_redundant_input">Max inputs for redundant blocks</string>
9393
<string name="set_py_path">Please try setting the python path</string>
9494
<string name="python_path">Python path</string>
95+
<string name="injecting_msg">Injecting... this could take a while.</string>
96+
<string name="no_jar_found">Couldn't find itself as jar!</string>
97+
<string name="no_vm_found">Couldn't find any VM's! Enter your process id.</string>
9598
</resources>
9699

0 commit comments

Comments
 (0)