1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 23:34:53 +02:00

Added missing history properties to LabelsBundle

This commit is contained in:
Isaaku
2019-08-14 17:16:21 -05:00
parent c11d34e397
commit a3bbf8198b
4 changed files with 56 additions and 29 deletions

View File

@@ -10,13 +10,15 @@ import javax.swing.Action;
import javax.swing.JPopupMenu; import javax.swing.JPopupMenu;
import javax.swing.JTable; import javax.swing.JTable;
import com.rarchives.ripme.utils.Utils;
class HistoryMenuMouseListener extends MouseAdapter { class HistoryMenuMouseListener extends MouseAdapter {
private JPopupMenu popup = new JPopupMenu(); private JPopupMenu popup = new JPopupMenu();
private JTable tableComponent; private JTable tableComponent;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public HistoryMenuMouseListener() { public HistoryMenuMouseListener() {
Action checkAllAction = new AbstractAction("Check All") { Action checkAllAction = new AbstractAction(Utils.getLocalizedString("history.check.all")) {
@Override @Override
public void actionPerformed(ActionEvent ae) { public void actionPerformed(ActionEvent ae) {
for (int row = 0; row < tableComponent.getRowCount(); row++) { for (int row = 0; row < tableComponent.getRowCount(); row++) {
@@ -26,7 +28,7 @@ class HistoryMenuMouseListener extends MouseAdapter {
}; };
popup.add(checkAllAction); popup.add(checkAllAction);
Action uncheckAllAction = new AbstractAction("Check None") { Action uncheckAllAction = new AbstractAction(Utils.getLocalizedString("history.check.none")) {
@Override @Override
public void actionPerformed(ActionEvent ae) { public void actionPerformed(ActionEvent ae) {
for (int row = 0; row < tableComponent.getRowCount(); row++) { for (int row = 0; row < tableComponent.getRowCount(); row++) {
@@ -38,7 +40,7 @@ class HistoryMenuMouseListener extends MouseAdapter {
popup.addSeparator(); popup.addSeparator();
Action checkSelected = new AbstractAction("Check Selected") { Action checkSelected = new AbstractAction(Utils.getLocalizedString("history.check.selected")) {
@Override @Override
public void actionPerformed(ActionEvent ae) { public void actionPerformed(ActionEvent ae) {
for (int row : tableComponent.getSelectedRows()) { for (int row : tableComponent.getSelectedRows()) {
@@ -48,7 +50,7 @@ class HistoryMenuMouseListener extends MouseAdapter {
}; };
popup.add(checkSelected); popup.add(checkSelected);
Action uncheckSelected = new AbstractAction("Uncheck Selected") { Action uncheckSelected = new AbstractAction(Utils.getLocalizedString("history.uncheck.selected")) {
@Override @Override
public void actionPerformed(ActionEvent ae) { public void actionPerformed(ActionEvent ae) {
for (int row : tableComponent.getSelectedRows()) { for (int row : tableComponent.getSelectedRows()) {

View File

@@ -849,8 +849,8 @@ public final class MainWindow implements Runnable, RipStatusHandler {
// Re-rip all history // Re-rip all history
historyButtonRerip.addActionListener(event -> { historyButtonRerip.addActionListener(event -> {
if (HISTORY.isEmpty()) { if (HISTORY.isEmpty()) {
JOptionPane.showMessageDialog(null, "There are no history entries to re-rip. Rip some albums first", JOptionPane.showMessageDialog(null, Utils.getLocalizedString("history.load.none"), "RipMe Error",
"RipMe Error", JOptionPane.ERROR_MESSAGE); JOptionPane.ERROR_MESSAGE);
return; return;
} }
int added = 0; int added = 0;
@@ -861,8 +861,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
} }
} }
if (added == 0) { if (added == 0) {
JOptionPane.showMessageDialog(null, "No history entries have been 'Checked'\n" JOptionPane.showMessageDialog(null, Utils.getLocalizedString("history.load.none.checked"),
+ "Check an entry by clicking the checkbox to the right of the URL or Right-click a URL to check/uncheck all items",
"RipMe Error", JOptionPane.ERROR_MESSAGE); "RipMe Error", JOptionPane.ERROR_MESSAGE);
} }
}); });
@@ -1009,26 +1008,26 @@ public final class MainWindow implements Runnable, RipStatusHandler {
mainFrame.addWindowListener(new WindowAdapter() { mainFrame.addWindowListener(new WindowAdapter() {
@Override @Override
public void windowActivated(WindowEvent e) { public void windowActivated(WindowEvent e) {
trayMenuMain.setLabel("Hide"); trayMenuMain.setLabel(Utils.getLocalizedString("tray.hide"));
} }
@Override @Override
public void windowDeactivated(WindowEvent e) { public void windowDeactivated(WindowEvent e) {
trayMenuMain.setLabel("Show"); trayMenuMain.setLabel(Utils.getLocalizedString("tray.show"));
} }
@Override @Override
public void windowDeiconified(WindowEvent e) { public void windowDeiconified(WindowEvent e) {
trayMenuMain.setLabel("Hide"); trayMenuMain.setLabel(Utils.getLocalizedString("tray.hide"));
} }
@Override @Override
public void windowIconified(WindowEvent e) { public void windowIconified(WindowEvent e) {
trayMenuMain.setLabel("Show"); trayMenuMain.setLabel(Utils.getLocalizedString("tray.show"));
} }
}); });
PopupMenu trayMenu = new PopupMenu(); PopupMenu trayMenu = new PopupMenu();
trayMenuMain = new MenuItem("Hide"); trayMenuMain = new MenuItem(Utils.getLocalizedString("tray.hide"));
trayMenuMain.addActionListener(arg0 -> toggleTrayClick()); trayMenuMain.addActionListener(arg0 -> toggleTrayClick());
MenuItem trayMenuAbout = new MenuItem("About " + mainFrame.getTitle()); MenuItem trayMenuAbout = new MenuItem("About " + mainFrame.getTitle());
trayMenuAbout.addActionListener(arg0 -> { trayMenuAbout.addActionListener(arg0 -> {
@@ -1079,9 +1078,9 @@ public final class MainWindow implements Runnable, RipStatusHandler {
} }
} }
}); });
MenuItem trayMenuExit = new MenuItem("Exit"); MenuItem trayMenuExit = new MenuItem(Utils.getLocalizedString("tray.exit"));
trayMenuExit.addActionListener(arg0 -> System.exit(0)); trayMenuExit.addActionListener(arg0 -> System.exit(0));
trayMenuAutorip = new CheckboxMenuItem("Clipboard Autorip"); trayMenuAutorip = new CheckboxMenuItem(Utils.getLocalizedString("tray.autorip"));
trayMenuAutorip.addItemListener(arg0 -> { trayMenuAutorip.addItemListener(arg0 -> {
ClipboardUtils.setClipboardAutoRip(trayMenuAutorip.getState()); ClipboardUtils.setClipboardAutoRip(trayMenuAutorip.getState());
configClipboardAutorip.setSelected(trayMenuAutorip.getState()); configClipboardAutorip.setSelected(trayMenuAutorip.getState());
@@ -1122,10 +1121,10 @@ public final class MainWindow implements Runnable, RipStatusHandler {
mainFrame.setVisible(true); mainFrame.setVisible(true);
mainFrame.setAlwaysOnTop(true); mainFrame.setAlwaysOnTop(true);
mainFrame.setAlwaysOnTop(false); mainFrame.setAlwaysOnTop(false);
trayMenuMain.setLabel("Hide"); trayMenuMain.setLabel(Utils.getLocalizedString("tray.hide"));
} else { } else {
mainFrame.setVisible(false); mainFrame.setVisible(false);
trayMenuMain.setLabel("Show"); trayMenuMain.setLabel(Utils.getLocalizedString("tray.show"));
} }
} }
@@ -1170,10 +1169,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
} catch (IOException e) { } catch (IOException e) {
LOGGER.error("Failed to load history from file " + historyFile, e); LOGGER.error("Failed to load history from file " + historyFile, e);
JOptionPane.showMessageDialog(null, JOptionPane.showMessageDialog(null,
"RipMe failed to load the history file at " + historyFile.getAbsolutePath() + "\n\n" + "Error: " String.format(Utils.getLocalizedString("history.load.failed.warning"), e.getMessage()),
+ e.getMessage() + "\n\n"
+ "Closing RipMe will automatically overwrite the contents of this file,\n"
+ "so you may want to back the file up before closing RipMe!",
"RipMe - history load failure", JOptionPane.ERROR_MESSAGE); "RipMe - history load failure", JOptionPane.ERROR_MESSAGE);
} }
} else { } else {
@@ -1446,7 +1442,7 @@ public final class MainWindow implements Runnable, RipStatusHandler {
openButton.setVisible(true); openButton.setVisible(true);
File f = rsc.dir; File f = rsc.dir;
String prettyFile = Utils.shortenPath(f); String prettyFile = Utils.shortenPath(f);
openButton.setText("Open " + prettyFile); openButton.setText(Utils.getLocalizedString("open") + prettyFile);
mainFrame.setTitle("RipMe v" + UpdateUtils.getThisJarVersion()); mainFrame.setTitle("RipMe v" + UpdateUtils.getThisJarVersion());
try { try {
Image folderIcon = ImageIO.read(getClass().getClassLoader().getResource("folder.png")); Image folderIcon = ImageIO.read(getClass().getClassLoader().getResource("folder.png"));

View File

@@ -4,9 +4,9 @@ created = created
modified = modified modified = modified
queue = Queue queue = Queue
Configuration = Configuration Configuration = Configuration
open = Open
# Keys for the Configuration menu # Keys for the Configuration menu
current.version = Current version current.version = Current version
check.for.updates = Check for updates check.for.updates = Check for updates
auto.update = Auto-update? auto.update = Auto-update?
@@ -32,19 +32,32 @@ queue.remove.all = Remove All
queue.validation = Are you sure you want to remove all elements from the queue? queue.validation = Are you sure you want to remove all elements from the queue?
queue.remove.selected = Remove Selected queue.remove.selected = Remove Selected
# Misc UI keys # History
loading.history.from.configuration = Loading history from configuration
interrupted.while.waiting.to.rip.next.album = Interrupted while waiting to rip next album
inactive = Inactive
re-rip.checked = Re-rip Checked re-rip.checked = Re-rip Checked
remove = Remove remove = Remove
clear = Clear clear = Clear
history.check.all = Check All
history.check.none = Check None
history.check.selected = Check Selected
history.uncheck.selected = Uncheck Selected
history.load.failed.warning = RipMe failed to load the history file at historyFile.getAbsolutePath() \n\nError: %s\n\nClosing RipMe will automatically overwrite the contents of this file,\nso you may want to back the file up before closing RipMe!
history.load.none = There are no history entries to re-rip. Rip some albums first
history.load.none.checked = No history entries have been 'Checked' Check an entry by clicking the checkbox to the right of the URL or Right-click a URL to check/uncheck all items
# TrayIcon
tray.show = Show
tray.hide = Hide
tray.autorip = Clipboard Autorip
tray.exit = Exit
# Misc UI keys
loading.history.from.configuration = Loading history from configuration
interrupted.while.waiting.to.rip.next.album = Interrupted while waiting to rip next album
inactive = Inactive
download.url.list = Download url list download.url.list = Download url list
select.save.dir = Select Save Directory select.save.dir = Select Save Directory
# Keys for the logs generated by DownloadFileThread # Keys for the logs generated by DownloadFileThread
nonretriable.status.code = Non-retriable status code nonretriable.status.code = Non-retriable status code
retriable.status.code = Retriable status code retriable.status.code = Retriable status code
server.doesnt.support.resuming.downloads = Server doesn't support resuming downloads server.doesnt.support.resuming.downloads = Server doesn't support resuming downloads

16
workspace.code-workspace Normal file
View File

@@ -0,0 +1,16 @@
{
"folders": [
{
"path": "E:\\Downloads\\_Isaaku\\dev"
}
],
"settings": {
"files.exclude": {
"**/.classpath": false,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"java.configuration.updateBuildConfiguration": "automatic"
}
}