From 5835087ea5002a1d611016346c0fbc622d472990 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Sat, 17 Aug 2019 08:33:05 +0300 Subject: [PATCH] v0.6 Re-writing localization strings names --- .../Controllers/NSLMainController.java | 16 ++--- .../Controllers/NSTableViewController.java | 12 ++-- src/main/java/nsusbloader/NSLMain.java | 4 +- src/main/resources/FrontTab.fxml | 2 +- src/main/resources/NSLMain.fxml | 4 +- src/main/resources/SettingsTab.fxml | 28 ++++---- src/main/resources/locale.properties | 63 +++++++++--------- src/main/resources/locale_fra.properties | 60 +++++++++-------- src/main/resources/locale_ita.properties | 57 ++++++++--------- src/main/resources/locale_kor.properties | 61 +++++++++--------- src/main/resources/locale_por.properties | 61 +++++++++--------- src/main/resources/locale_rus.properties | 64 +++++++++---------- src/main/resources/locale_spa.properties | 63 +++++++++--------- src/main/resources/locale_ukr.properties | 63 +++++++++--------- 14 files changed, 267 insertions(+), 291 deletions(-) diff --git a/src/main/java/nsusbloader/Controllers/NSLMainController.java b/src/main/java/nsusbloader/Controllers/NSLMainController.java index 69d6c3e..7dd2655 100644 --- a/src/main/java/nsusbloader/Controllers/NSLMainController.java +++ b/src/main/java/nsusbloader/Controllers/NSLMainController.java @@ -48,12 +48,12 @@ public class NSLMainController implements Initializable { @Override public void initialize(URL url, ResourceBundle rb) { this.resourceBundle = rb; - logArea.setText(rb.getString("logsGreetingsMessage")+" "+ NSLMain.appVersion+"!\n"); + logArea.setText(rb.getString("tab3_Txt_GreetingsMessage")+" "+ NSLMain.appVersion+"!\n"); if (System.getProperty("os.name").toLowerCase().startsWith("lin")) if (!System.getProperty("user.name").equals("root")) - logArea.appendText(rb.getString("logsEnteredAsMsg1")+System.getProperty("user.name")+"\n"+rb.getString("logsEnteredAsMsg2") + "\n"); + logArea.appendText(rb.getString("tab3_Txt_EnteredAsMsg1")+System.getProperty("user.name")+"\n"+rb.getString("tab3_Txt_EnteredAsMsg2") + "\n"); - logArea.appendText(rb.getString("logsGreetingsMessage2")+"\n"); + logArea.appendText(rb.getString("tab3_Txt_GreetingsMessage2")+"\n"); MediatorControl.getInstance().setController(this); @@ -104,7 +104,7 @@ public class NSLMainController implements Initializable { private void selectFilesBtnAction(){ List filesList; FileChooser fileChooser = new FileChooser(); - fileChooser.setTitle(resourceBundle.getString("btnFileOpen")); + fileChooser.setTitle(resourceBundle.getString("btn_OpenFile")); File validator = new File(previouslyOpenedPath); if (validator.exists()) @@ -133,12 +133,12 @@ public class NSLMainController implements Initializable { // Collect files List nspToUpload; if ((nspToUpload = FrontTabController.tableFilesListController.getFilesForUpload()) == null && FrontTabController.getSelectedProtocol().equals("TinFoil")) { - logArea.setText(resourceBundle.getString("logsNoFolderFileSelected")); + logArea.setText(resourceBundle.getString("tab3_Txt_NoFolderOrFileSelected")); return; } else { if ((nspToUpload = FrontTabController.tableFilesListController.getFilesForUpload()) != null){ - logArea.setText(resourceBundle.getString("logsFilesToUploadTitle")+"\n"); + logArea.setText(resourceBundle.getString("tab3_Txt_FilesToUploadTitle")+"\n"); for (File item: nspToUpload) logArea.appendText(" "+item.getAbsolutePath()+"\n"); } @@ -199,7 +199,7 @@ public class NSLMainController implements Initializable { selectNspBtn.setDisable(true); uploadStopBtn.setOnAction(e->{ stopBtnAction(); }); - uploadStopBtn.setText(resourceBundle.getString("btnStop")); + uploadStopBtn.setText(resourceBundle.getString("btn_Stop")); btnUpStopImage.getStyleClass().remove("regionUpload"); btnUpStopImage.getStyleClass().add("regionStop"); @@ -211,7 +211,7 @@ public class NSLMainController implements Initializable { selectNspBtn.setDisable(false); uploadStopBtn.setOnAction(e->{ uploadBtnAction(); }); - uploadStopBtn.setText(resourceBundle.getString("btnUpload")); + uploadStopBtn.setText(resourceBundle.getString("btn_Upload")); btnUpStopImage.getStyleClass().remove("regionStop"); btnUpStopImage.getStyleClass().add("regionUpload"); diff --git a/src/main/java/nsusbloader/Controllers/NSTableViewController.java b/src/main/java/nsusbloader/Controllers/NSTableViewController.java index c976d3c..8917fbf 100644 --- a/src/main/java/nsusbloader/Controllers/NSTableViewController.java +++ b/src/main/java/nsusbloader/Controllers/NSTableViewController.java @@ -60,10 +60,10 @@ public class NSTableViewController implements Initializable { } }); - TableColumn statusColumn = new TableColumn<>(resourceBundle.getString("tableStatusLbl")); - TableColumn fileNameColumn = new TableColumn<>(resourceBundle.getString("tableFileNameLbl")); - TableColumn fileSizeColumn = new TableColumn<>(resourceBundle.getString("tableSizeLbl")); - TableColumn uploadColumn = new TableColumn<>(resourceBundle.getString("tableUploadLbl")); + TableColumn statusColumn = new TableColumn<>(resourceBundle.getString("tab1_table_Lbl_Status")); + TableColumn fileNameColumn = new TableColumn<>(resourceBundle.getString("tab1_table_Lbl_FileName")); + TableColumn fileSizeColumn = new TableColumn<>(resourceBundle.getString("tab1_table_Lbl_Size")); + TableColumn uploadColumn = new TableColumn<>(resourceBundle.getString("tab1_table_Lbl_Upload")); statusColumn.setEditable(false); fileNameColumn.setEditable(false); @@ -122,7 +122,7 @@ public class NSTableViewController implements Initializable { public TableRow call(TableView nslRowModelTableView) { final TableRow row = new TableRow<>(); ContextMenu contextMenu = new ContextMenu(); - MenuItem deleteMenuItem = new MenuItem(resourceBundle.getString("contextMenuBtnDelete")); + MenuItem deleteMenuItem = new MenuItem(resourceBundle.getString("tab1_table_contextMenu_Btn_BtnDelete")); deleteMenuItem.setOnAction(new EventHandler() { @Override public void handle(ActionEvent actionEvent) { @@ -132,7 +132,7 @@ public class NSTableViewController implements Initializable { table.refresh(); } }); - MenuItem deleteAllMenuItem = new MenuItem(resourceBundle.getString("contextMenuBtnDeleteAll")); + MenuItem deleteAllMenuItem = new MenuItem(resourceBundle.getString("tab1_table_contextMenu_Btn_DeleteAll")); deleteAllMenuItem.setOnAction(new EventHandler() { @Override public void handle(ActionEvent actionEvent) { diff --git a/src/main/java/nsusbloader/NSLMain.java b/src/main/java/nsusbloader/NSLMain.java index 5a0ab9d..4f10ef6 100644 --- a/src/main/java/nsusbloader/NSLMain.java +++ b/src/main/java/nsusbloader/NSLMain.java @@ -32,8 +32,8 @@ public class NSLMain extends Application { primaryStage.setTitle("NS-USBloader "+appVersion); primaryStage.setMinWidth(600); - primaryStage.setMinHeight(375); - Scene mainScene = new Scene(root, 800, 400); + primaryStage.setMinHeight(400); + Scene mainScene = new Scene(root, 800, 425); mainScene.getStylesheets().add(AppPreferences.getInstance().getTheme()); diff --git a/src/main/resources/FrontTab.fxml b/src/main/resources/FrontTab.fxml index 5e83767..458fa2f 100644 --- a/src/main/resources/FrontTab.fxml +++ b/src/main/resources/FrontTab.fxml @@ -22,7 +22,7 @@ -