Skip to content

Commit

Permalink
add hebrew language support & cleanup code.
Browse files Browse the repository at this point in the history
  • Loading branch information
DerCodeDev committed Aug 3, 2023
1 parent b25263a commit 200bf69
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/main/java/dev/samir/vmdconverter/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ public void start(Stage stage) throws IOException {
if (locale.getDisplayLanguage().equals("Deutsch")){
scene = new Scene(loadFXML("german"));

}else {
}else if (locale.getDisplayLanguage().equals("Englisch")) {

This comment has been minimized.

Copy link
@BJNFNE

BJNFNE Aug 4, 2023

Collaborator

wouldn't it be better to fix Englisch to English?

scene = new Scene(loadFXML("englisch"));
}else {
scene = new Scene(loadFXML("hebrew"));
}
stage.setResizable(false);
stage.setTitle("VMD Converter");
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/dev/samir/vmdconverter/AppController.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public class AppController {
private TextArea consoleLog;
@FXML
private ComboBox<String> comboBox;
private final ObservableList<String> languagesList = FXCollections.observableArrayList("Deutsch (German)", "Englisch (US)");
private final ObservableList<String> languagesList = FXCollections.observableArrayList("Deutsch (German)",
"Englisch (US)","עִברִית (Hebrew)");


@FXML
Expand Down Expand Up @@ -80,9 +81,11 @@ public void switchLanguage(final ActionEvent actionEvent) throws IOException {
actionEvent.consume();
if (comboBox.getValue().equals(languagesList.get(0))) {
App.setRoot("german");
return;
}else if (comboBox.getValue().equals(languagesList.get(1))) {
App.setRoot("englisch");
}else if (comboBox.getValue().equals(languagesList.get(2))) {
App.setRoot("hebrew");
}
App.setRoot("englisch");
}


Expand All @@ -105,7 +108,7 @@ public void startButton(final ActionEvent actionEvent) {
if (rb4.isSelected()) {
Task<Void> conversionTask = new Task<>() {
@Override
protected Void call() throws Exception {
protected Void call() {
VMDConverter.convertVideoMP4(inputField.getText(), outputField.getText());
return null;
}
Expand All @@ -123,7 +126,7 @@ protected Void call() throws Exception {
if (rb3.isSelected()) {
Task<Void> conversionTask = new Task<>() {
@Override
protected Void call() throws Exception {
protected Void call() {
VMDConverter.convertVideoMP3(inputField.getText(), outputField.getText());
return null;
}
Expand Down

0 comments on commit 200bf69

Please sign in to comment.