From 1cd928425178893815cfa028364560cc453fb86a Mon Sep 17 00:00:00 2001 From: Admir Obralija Date: Sun, 17 Jul 2016 23:52:18 +0200 Subject: [PATCH] Set default command for Windows. Fix localization entries. --- src/main/java/net/sf/jabref/JabRefPreferences.java | 6 +++++- src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java | 6 +++--- src/main/java/net/sf/jabref/gui/preftabs/ExternalTab.java | 2 +- src/main/resources/l10n/JabRef_da.properties | 4 ++-- src/main/resources/l10n/JabRef_de.properties | 4 ++-- src/main/resources/l10n/JabRef_en.properties | 4 ++-- src/main/resources/l10n/JabRef_es.properties | 4 ++-- src/main/resources/l10n/JabRef_fa.properties | 4 ++-- src/main/resources/l10n/JabRef_fr.properties | 4 ++-- src/main/resources/l10n/JabRef_in.properties | 4 ++-- src/main/resources/l10n/JabRef_it.properties | 4 ++-- src/main/resources/l10n/JabRef_ja.properties | 4 ++-- src/main/resources/l10n/JabRef_nl.properties | 4 ++-- src/main/resources/l10n/JabRef_no.properties | 4 ++-- src/main/resources/l10n/JabRef_pt_BR.properties | 4 ++-- src/main/resources/l10n/JabRef_ru.properties | 4 ++-- src/main/resources/l10n/JabRef_sv.properties | 4 ++-- src/main/resources/l10n/JabRef_tr.properties | 4 ++-- src/main/resources/l10n/JabRef_vi.properties | 4 ++-- src/main/resources/l10n/JabRef_zh.properties | 4 ++-- 20 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/main/java/net/sf/jabref/JabRefPreferences.java b/src/main/java/net/sf/jabref/JabRefPreferences.java index a2848e171e6..648b81f5ab6 100644 --- a/src/main/java/net/sf/jabref/JabRefPreferences.java +++ b/src/main/java/net/sf/jabref/JabRefPreferences.java @@ -868,7 +868,11 @@ private JabRefPreferences() { defaults.put(INDENT, 4); defaults.put(USE_DEFAULT_CONSOLE_APPLICATION, Boolean.TRUE); - defaults.put(CONSOLE_COMMAND, ""); + if (OS.WINDOWS) { + defaults.put(CONSOLE_COMMAND, "C:\\Program Files\\ConEmu\\ConEmu64.exe /single /dir \"%DIR\""); + } else { + defaults.put(CONSOLE_COMMAND, ""); + } //versioncheck defaults defaults.put(VersionPreferences.VERSION_IGNORED_UPDATE, ""); diff --git a/src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java b/src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java index d0d00c2b514..f85695149a2 100644 --- a/src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java +++ b/src/main/java/net/sf/jabref/gui/desktop/JabRefDesktop.java @@ -339,13 +339,13 @@ public static void openConsole(File file) throws IOException { } } - JabRefGUI.getMainFrame().output(Localization.lang("Executing the command \"%0\"...", commandLoggingText.toString())); - LOGGER.info(Localization.lang("Executing the command \"%0\"...", commandLoggingText.toString())); + JabRefGUI.getMainFrame().output(Localization.lang("Executing command \"%0\"...", commandLoggingText.toString())); + LOGGER.info("Executing command \"" + commandLoggingText.toString() + "\"..."); try { new ProcessBuilder(subcommands).start(); } catch (IOException exception) { - LOGGER.error(Localization.lang("Open console"), exception); + LOGGER.error("Open console", exception); JOptionPane.showMessageDialog(JabRefGUI.getMainFrame(), Localization.lang("Error_occured_while_executing_the_command_\"%0\".", commandLoggingText.toString()), diff --git a/src/main/java/net/sf/jabref/gui/preftabs/ExternalTab.java b/src/main/java/net/sf/jabref/gui/preftabs/ExternalTab.java index bff40a470c2..5cb4ccd3fca 100644 --- a/src/main/java/net/sf/jabref/gui/preftabs/ExternalTab.java +++ b/src/main/java/net/sf/jabref/gui/preftabs/ExternalTab.java @@ -72,7 +72,7 @@ public ExternalTab(JabRefFrame frame, PreferencesDialog prefsDiag, JabRefPrefere defaultConsole = new JRadioButton(Localization.lang("Use default terminal emulator")); - executeConsole = new JRadioButton(Localization.lang("Execute") + ":"); + executeConsole = new JRadioButton(Localization.lang("Execute command") + ":"); consoleCommand = new JTextField(); consoleChooser = new JFileChooser(); browseButton = new JButton(Localization.lang("Browse")); diff --git a/src/main/resources/l10n/JabRef_da.properties b/src/main/resources/l10n/JabRef_da.properties index 67366efbaf7..3d2460fd794 100644 --- a/src/main/resources/l10n/JabRef_da.properties +++ b/src/main/resources/l10n/JabRef_da.properties @@ -1710,10 +1710,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_de.properties b/src/main/resources/l10n/JabRef_de.properties index d26a5c90286..21a506bf960 100644 --- a/src/main/resources/l10n/JabRef_de.properties +++ b/src/main/resources/l10n/JabRef_de.properties @@ -2428,11 +2428,11 @@ Custom= Open_console=Terminal_öffnen Use_default_terminal_emulator=Standard_Terminal-Emulator_verwenden -Execute=Ausführen +Execute_command=Befehl_ausführen Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.=Hinweis\:_%0_als_Platzhalter_für_den_Speicherort_der_Datenbank_benutzen. -Executing_the_command_\"%0\"...=Ausführung_des_Kommandos_\"%0\"... +Executing_command_\"%0\"...=Ausführung_des_Kommandos_\"%0\"... Error_occured_while_executing_the_command_\"%0\".=Während_der_Ausführung_des_Befehls_\"%0\"_ist_ein_Fehler_aufgetreten. diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index a9aaca08fc1..2e2d6dff0b8 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2276,7 +2276,7 @@ Custom=Custom Open_console=Open_console Use_default_terminal_emulator=Use_default_terminal_emulator -Execute=Execute +Execute_command=Execute_command Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.=Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file. -Executing_the_command_\"%0\"...=Executing_the_command_\"%0\"... +Executing_command_\"%0\"...=Executing_command_\"%0\"... Error_occured_while_executing_the_command_\"%0\".=Error_occured_while_executing_the_command_\"%0\". diff --git a/src/main/resources/l10n/JabRef_es.properties b/src/main/resources/l10n/JabRef_es.properties index fd4c1d6d709..a2875f64dc7 100644 --- a/src/main/resources/l10n/JabRef_es.properties +++ b/src/main/resources/l10n/JabRef_es.properties @@ -1612,10 +1612,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_fa.properties b/src/main/resources/l10n/JabRef_fa.properties index 954dfac4538..90335e2e69b 100644 --- a/src/main/resources/l10n/JabRef_fa.properties +++ b/src/main/resources/l10n/JabRef_fa.properties @@ -2398,10 +2398,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_fr.properties b/src/main/resources/l10n/JabRef_fr.properties index 0cf31406726..329643d32a4 100644 --- a/src/main/resources/l10n/JabRef_fr.properties +++ b/src/main/resources/l10n/JabRef_fr.properties @@ -1656,10 +1656,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_in.properties b/src/main/resources/l10n/JabRef_in.properties index 9e31ead7624..e7021671f74 100644 --- a/src/main/resources/l10n/JabRef_in.properties +++ b/src/main/resources/l10n/JabRef_in.properties @@ -1631,10 +1631,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_it.properties b/src/main/resources/l10n/JabRef_it.properties index c2019f63da9..03a35ead0b3 100644 --- a/src/main/resources/l10n/JabRef_it.properties +++ b/src/main/resources/l10n/JabRef_it.properties @@ -1731,10 +1731,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_ja.properties b/src/main/resources/l10n/JabRef_ja.properties index 77cca35055b..4b42135b64d 100644 --- a/src/main/resources/l10n/JabRef_ja.properties +++ b/src/main/resources/l10n/JabRef_ja.properties @@ -2376,10 +2376,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_nl.properties b/src/main/resources/l10n/JabRef_nl.properties index 3216c648dce..1c7b0d47822 100644 --- a/src/main/resources/l10n/JabRef_nl.properties +++ b/src/main/resources/l10n/JabRef_nl.properties @@ -2407,10 +2407,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_no.properties b/src/main/resources/l10n/JabRef_no.properties index 2ca82852feb..34a8866a010 100644 --- a/src/main/resources/l10n/JabRef_no.properties +++ b/src/main/resources/l10n/JabRef_no.properties @@ -2803,10 +2803,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_pt_BR.properties b/src/main/resources/l10n/JabRef_pt_BR.properties index 26ceb177a83..88b9e90e15f 100644 --- a/src/main/resources/l10n/JabRef_pt_BR.properties +++ b/src/main/resources/l10n/JabRef_pt_BR.properties @@ -1625,10 +1625,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_ru.properties b/src/main/resources/l10n/JabRef_ru.properties index e5045caeaf3..c6af74845eb 100644 --- a/src/main/resources/l10n/JabRef_ru.properties +++ b/src/main/resources/l10n/JabRef_ru.properties @@ -2375,10 +2375,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_sv.properties b/src/main/resources/l10n/JabRef_sv.properties index f22aaa25011..aac1ae56310 100644 --- a/src/main/resources/l10n/JabRef_sv.properties +++ b/src/main/resources/l10n/JabRef_sv.properties @@ -1568,10 +1568,10 @@ Custom=Egna Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_tr.properties b/src/main/resources/l10n/JabRef_tr.properties index 9fdd9a4fbe4..28351289968 100644 --- a/src/main/resources/l10n/JabRef_tr.properties +++ b/src/main/resources/l10n/JabRef_tr.properties @@ -1644,10 +1644,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_vi.properties b/src/main/resources/l10n/JabRef_vi.properties index b2c1a1656e0..54ca40ba238 100644 --- a/src/main/resources/l10n/JabRef_vi.properties +++ b/src/main/resources/l10n/JabRef_vi.properties @@ -2399,10 +2399,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".= diff --git a/src/main/resources/l10n/JabRef_zh.properties b/src/main/resources/l10n/JabRef_zh.properties index 57fa421cf7a..cd22cf270cf 100644 --- a/src/main/resources/l10n/JabRef_zh.properties +++ b/src/main/resources/l10n/JabRef_zh.properties @@ -1638,10 +1638,10 @@ Converts_HTML_code_to_Unicode.= Open_console= Use_default_terminal_emulator= -Execute= +Execute_command= Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.= -Executing_the_command_\"%0\"...= +Executing_command_\"%0\"...= Error_occured_while_executing_the_command_\"%0\".=