Skip to content

Commit

Permalink
Merge pull request jcryptool#180 from grthor/Algorithms_Fix
Browse files Browse the repository at this point in the history
Fix #2 for jcryptool#178 (Any crypto operation fails ...)
  • Loading branch information
Thorben Groos authored Mar 20, 2020
2 parents 26ae8c5 + ffbdc91 commit 09bfa0c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions org.jcryptool.core/src/org/jcryptool/core/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.jcryptool.core.logging.utils.LogUtil;

/**
* This class controls all aspects of the application's execution.
Expand All @@ -32,12 +33,16 @@ public class Application implements IApplication {
@Override
public Object start(IApplicationContext context) throws Exception {
try {
if (!Locale.GERMAN.equals(Locale.getDefault()) && !Locale.ENGLISH.equals(Locale.getDefault())) {
System.setProperty("osgi.nl", "en"); // fixes Platform.getNL()
Locale.setDefault(Locale.ENGLISH);
}
// Set English as default language if the operating system language is neither
// German, English or French.
if (!Locale.getDefault().getLanguage().equals("de") &&
!Locale.getDefault().getLanguage().equals("en") &&
!Locale.getDefault().getLanguage().equals("fr")) {
System.setProperty("osgi.nl", "en"); // fixes Platform.getNL()
Locale.setDefault(Locale.ENGLISH);
}
} catch (Exception e) {
e.printStackTrace();
LogUtil.logError(CorePlugin.PLUGIN_ID, e);
}

Display display = PlatformUI.createDisplay();
Expand Down

0 comments on commit 09bfa0c

Please sign in to comment.