From 789c5012a4aaa0c8423238e234424a0bee23d7c0 Mon Sep 17 00:00:00 2001 From: Andreas Billmann Date: Mon, 11 Jan 2016 09:03:22 +0100 Subject: [PATCH] read and edit csv preferences --- .../javafx/smartcsv/csv/CSVConfigurable.java | 45 +++++++++ .../javafx/smartcsv/csv/CSVFileReader.java | 5 +- .../javafx/smartcsv/csv/CSVFileWriter.java | 10 +- .../smartcsv/fx/SmartCSVController.java | 45 +++++++++ .../fx/preferences/PreferencesController.java | 95 +++++++++++++++++++ .../preferences/PreferencesFileReader.java | 84 ++++++++++++++++ .../smartcsv/preferences/QuoteModeHelper.java | 56 +++++++++++ .../javafx/smartcsv/fx/application.properties | 1 + .../smartcsv/fx/preferences/preferences.fxml | 35 +++++++ .../smartcsv/fx/preferences/preferences.json | 8 ++ .../ninja/javafx/smartcsv/fx/smartcsv.css | 5 +- .../ninja/javafx/smartcsv/fx/smartcsv.fxml | 6 ++ .../javafx/smartcsv/fx/smartcsv.properties | 7 ++ .../javafx/smartcsv/fx/smartcsv_de.properties | 1 + 14 files changed, 391 insertions(+), 12 deletions(-) create mode 100644 src/main/java/ninja/javafx/smartcsv/csv/CSVConfigurable.java create mode 100644 src/main/java/ninja/javafx/smartcsv/fx/preferences/PreferencesController.java create mode 100644 src/main/java/ninja/javafx/smartcsv/preferences/PreferencesFileReader.java create mode 100644 src/main/java/ninja/javafx/smartcsv/preferences/QuoteModeHelper.java create mode 100644 src/main/resources/ninja/javafx/smartcsv/fx/preferences/preferences.fxml create mode 100644 src/main/resources/ninja/javafx/smartcsv/fx/preferences/preferences.json diff --git a/src/main/java/ninja/javafx/smartcsv/csv/CSVConfigurable.java b/src/main/java/ninja/javafx/smartcsv/csv/CSVConfigurable.java new file mode 100644 index 0000000..51480cc --- /dev/null +++ b/src/main/java/ninja/javafx/smartcsv/csv/CSVConfigurable.java @@ -0,0 +1,45 @@ +/* + The MIT License (MIT) + ----------------------------------------------------------------------------- + + Copyright (c) 2015 javafx.ninja + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +package ninja.javafx.smartcsv.csv; + +import org.supercsv.prefs.CsvPreference; + +/** + * + */ +public class CSVConfigurable { + + protected CsvPreference csvPreference; + + public CSVConfigurable() { + csvPreference = CsvPreference.EXCEL_NORTH_EUROPE_PREFERENCE; + } + + public void setCsvPreference(CsvPreference csvPreference) { + this.csvPreference = csvPreference; + } +} diff --git a/src/main/java/ninja/javafx/smartcsv/csv/CSVFileReader.java b/src/main/java/ninja/javafx/smartcsv/csv/CSVFileReader.java index 94d744a..e76fd6a 100644 --- a/src/main/java/ninja/javafx/smartcsv/csv/CSVFileReader.java +++ b/src/main/java/ninja/javafx/smartcsv/csv/CSVFileReader.java @@ -32,7 +32,6 @@ import ninja.javafx.smartcsv.fx.table.model.CSVRow; import org.springframework.stereotype.Service; import org.supercsv.io.CsvMapReader; import org.supercsv.io.ICsvMapReader; -import org.supercsv.prefs.CsvPreference; import java.io.File; import java.io.IOException; @@ -42,7 +41,7 @@ import java.util.Map; * reads the csv file and stores the values in csv model */ @Service -public class CSVFileReader implements FileReader { +public class CSVFileReader extends CSVConfigurable implements FileReader { private CSVModel model; @@ -51,7 +50,7 @@ public class CSVFileReader implements FileReader { ICsvMapReader mapReader = null; try { - mapReader = new CsvMapReader(new java.io.FileReader(file.getAbsoluteFile()), CsvPreference.EXCEL_NORTH_EUROPE_PREFERENCE); + mapReader = new CsvMapReader(new java.io.FileReader(file.getAbsoluteFile()), csvPreference); model = new CSVModel(file.getAbsolutePath()); // the header columns are used as the keys to the Map diff --git a/src/main/java/ninja/javafx/smartcsv/csv/CSVFileWriter.java b/src/main/java/ninja/javafx/smartcsv/csv/CSVFileWriter.java index fc64938..414a048 100644 --- a/src/main/java/ninja/javafx/smartcsv/csv/CSVFileWriter.java +++ b/src/main/java/ninja/javafx/smartcsv/csv/CSVFileWriter.java @@ -31,8 +31,6 @@ import ninja.javafx.smartcsv.fx.table.model.CSVRow; import org.springframework.stereotype.Service; import org.supercsv.io.CsvMapWriter; import org.supercsv.io.ICsvMapWriter; -import org.supercsv.prefs.CsvPreference; -import org.supercsv.quote.AlwaysQuoteMode; import java.io.FileWriter; import java.io.IOException; @@ -44,16 +42,12 @@ import static java.util.stream.Collectors.toMap; * filewriter for the csv */ @Service -public class CSVFileWriter { +public class CSVFileWriter extends CSVConfigurable { public void saveFile(CSVModel model) throws IOException { ICsvMapWriter mapWriter = null; try { - CsvPreference preference = new CsvPreference. - Builder(CsvPreference.EXCEL_NORTH_EUROPE_PREFERENCE). - useQuoteMode(new AlwaysQuoteMode()) - .build(); - mapWriter = new CsvMapWriter(new FileWriter(model.getFilepath()), preference); + mapWriter = new CsvMapWriter(new FileWriter(model.getFilepath()), csvPreference); mapWriter.writeHeader(model.getHeader()); for(CSVRow row: model.getRows()) { diff --git a/src/main/java/ninja/javafx/smartcsv/fx/SmartCSVController.java b/src/main/java/ninja/javafx/smartcsv/fx/SmartCSVController.java index 64dbaa3..74ab133 100644 --- a/src/main/java/ninja/javafx/smartcsv/fx/SmartCSVController.java +++ b/src/main/java/ninja/javafx/smartcsv/fx/SmartCSVController.java @@ -42,18 +42,23 @@ import ninja.javafx.smartcsv.csv.CSVFileReader; import ninja.javafx.smartcsv.csv.CSVFileWriter; import ninja.javafx.smartcsv.fx.about.AboutController; import ninja.javafx.smartcsv.fx.list.ValidationErrorListCell; +import ninja.javafx.smartcsv.fx.preferences.PreferencesController; import ninja.javafx.smartcsv.fx.table.ObservableMapValueFactory; import ninja.javafx.smartcsv.fx.table.ValidationCellFactory; import ninja.javafx.smartcsv.fx.table.model.CSVModel; import ninja.javafx.smartcsv.fx.table.model.CSVRow; import ninja.javafx.smartcsv.fx.table.model.CSVValue; +import ninja.javafx.smartcsv.preferences.PreferencesFileReader; import ninja.javafx.smartcsv.validation.ValidationError; import ninja.javafx.smartcsv.validation.ValidationFileReader; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; +import org.supercsv.prefs.CsvPreference; import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; import java.net.URL; import java.util.Optional; import java.util.ResourceBundle; @@ -72,6 +77,9 @@ public class SmartCSVController extends FXMLController { // injections //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + @Autowired + private PreferencesFileReader preferencesLoader; + @Autowired private CSVFileReader csvLoader; @@ -84,6 +92,9 @@ public class SmartCSVController extends FXMLController { @Autowired private AboutController aboutController; + @Autowired + private PreferencesController preferencesController; + @FXML private BorderPane applicationPane; @@ -130,9 +141,12 @@ public class SmartCSVController extends FXMLController { errorList.getSelectionModel().selectedItemProperty().addListener(observable -> scrollToError()); fileChanged.addListener(observable -> setStateName()); setStateName(); + initCsvPreferences(); } + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // setter //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -184,6 +198,19 @@ public class SmartCSVController extends FXMLController { alert.showAndWait(); } + @FXML + public void preferences(ActionEvent actionEvent) { + Alert alert = new Alert(Alert.AlertType.CONFIRMATION); + alert.setTitle("Preferences"); + alert.setHeaderText("Preferences"); + alert.getDialogPane().setContent(preferencesController.getView()); + Optional result = alert.showAndWait(); + + if (result.get() == ButtonType.OK){ + setCsvPreference(preferencesController.getCsvPreference()); + } + } + public boolean canExit() { boolean canExit = true; if (model != null && fileChanged.get()) { @@ -205,6 +232,24 @@ public class SmartCSVController extends FXMLController { // private methods //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + private void initCsvPreferences() { + try { + File preferencesFile = new File( + getClass().getResource("/ninja/javafx/smartcsv/fx/preferences/preferences.json").toURI()); + preferencesLoader.read(preferencesFile); + CsvPreference csvPreference = preferencesLoader.getCSVpreference(); + setCsvPreference(csvPreference); + } catch (IOException | URISyntaxException e) { + e.printStackTrace(); + } + } + + private void setCsvPreference(CsvPreference csvPreference) { + csvLoader.setCsvPreference(csvPreference); + csvFileWriter.setCsvPreference(csvPreference); + preferencesController.setCsvPreference(csvPreference); + } + private void loadFile(FileReader fileReader, String filterText, String filter, String title, Label fileLabel) { final FileChooser fileChooser = new FileChooser(); diff --git a/src/main/java/ninja/javafx/smartcsv/fx/preferences/PreferencesController.java b/src/main/java/ninja/javafx/smartcsv/fx/preferences/PreferencesController.java new file mode 100644 index 0000000..e91ebed --- /dev/null +++ b/src/main/java/ninja/javafx/smartcsv/fx/preferences/PreferencesController.java @@ -0,0 +1,95 @@ +/* + The MIT License (MIT) + ----------------------------------------------------------------------------- + + Copyright (c) 2015 javafx.ninja + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +package ninja.javafx.smartcsv.fx.preferences; + +import javafx.fxml.FXML; +import javafx.scene.control.CheckBox; +import javafx.scene.control.ComboBox; +import javafx.scene.control.TextField; +import ninja.javafx.smartcsv.fx.FXMLController; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.supercsv.prefs.CsvPreference; + +import java.net.URL; +import java.util.ResourceBundle; + +import static ninja.javafx.smartcsv.preferences.QuoteModeHelper.getQuoteMode; +import static ninja.javafx.smartcsv.preferences.QuoteModeHelper.getQuoteModeName; + +/** + * controller for preferences + */ +@Component +public class PreferencesController extends FXMLController { + + @FXML + private TextField quoteChar; + + @FXML + private TextField delimiterChar; + + @FXML + private CheckBox surroundingSpacesNeedQuotes; + + @FXML + private CheckBox ignoreEmptyLines; + + @FXML + private ComboBox quoteMode; + + private String endOfLineSymbols; + + + @Value("${fxml.smartcvs.preferences.view}") + @Override + public void setFxmlFilePath(String filePath) { + this.fxmlFilePath = filePath; + } + + @Override + public void initialize(URL location, ResourceBundle resources) { + quoteMode.getItems().addAll("normal", "always", "column"); + } + + public void setCsvPreference(CsvPreference csvPreference) { + quoteChar.setText(Character.toString(csvPreference.getQuoteChar())); + delimiterChar.setText(Character.toString((char)csvPreference.getDelimiterChar())); + surroundingSpacesNeedQuotes.setSelected(csvPreference.isSurroundingSpacesNeedQuotes()); + ignoreEmptyLines.setSelected(csvPreference.isIgnoreEmptyLines()); + quoteMode.getSelectionModel().select(getQuoteModeName(csvPreference.getQuoteMode())); + endOfLineSymbols = csvPreference.getEndOfLineSymbols(); + } + + public CsvPreference getCsvPreference() { + return new CsvPreference.Builder(quoteChar.getText().charAt(0), delimiterChar.getText().charAt(0), endOfLineSymbols) + .useQuoteMode(getQuoteMode(quoteMode.getSelectionModel().getSelectedItem())) + .surroundingSpacesNeedQuotes(surroundingSpacesNeedQuotes.isSelected()) + .ignoreEmptyLines(ignoreEmptyLines.isSelected()) + .build(); + } +} diff --git a/src/main/java/ninja/javafx/smartcsv/preferences/PreferencesFileReader.java b/src/main/java/ninja/javafx/smartcsv/preferences/PreferencesFileReader.java new file mode 100644 index 0000000..8487413 --- /dev/null +++ b/src/main/java/ninja/javafx/smartcsv/preferences/PreferencesFileReader.java @@ -0,0 +1,84 @@ +/* + The MIT License (MIT) + ----------------------------------------------------------------------------- + + Copyright (c) 2015 javafx.ninja + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +package ninja.javafx.smartcsv.preferences; + +import com.typesafe.config.Config; +import com.typesafe.config.ConfigFactory; +import ninja.javafx.smartcsv.FileReader; +import org.springframework.stereotype.Service; +import org.supercsv.prefs.CsvPreference; +import org.supercsv.quote.AlwaysQuoteMode; +import org.supercsv.quote.ColumnQuoteMode; +import org.supercsv.quote.NormalQuoteMode; +import org.supercsv.quote.QuoteMode; + +import java.io.File; +import java.io.IOException; + +import static ninja.javafx.smartcsv.preferences.QuoteModeHelper.getQuoteMode; + +/** + * file reader for the preferences + */ +@Service +public class PreferencesFileReader implements FileReader { + + private Config config; + private CsvPreference csvPreference; + + public PreferencesFileReader() { + csvPreference = new CsvPreference. + Builder(CsvPreference.EXCEL_NORTH_EUROPE_PREFERENCE). + useQuoteMode(new AlwaysQuoteMode()).build(); + } + + @Override + public void read(File filename) throws IOException { + config = ConfigFactory.parseFile(filename); + + if (config != null) { + char quoteChar = config.getString("quoteChar").charAt(0); + char delimiterChar = config.getString("delimiterChar").charAt(0); + String endOfLineSymbols = config.getString("endOfLineSymbols"); + boolean surroundingSpacesNeedQuotes = config.getBoolean("surroundingSpacesNeedQuotes"); + boolean ignoreEmptyLines = config.getBoolean("ignoreEmptyLines"); + String quoteMode = config.getString("quoteMode"); + + csvPreference = new CsvPreference.Builder(quoteChar, delimiterChar, endOfLineSymbols) + .useQuoteMode(getQuoteMode(quoteMode)) + .surroundingSpacesNeedQuotes(surroundingSpacesNeedQuotes) + .ignoreEmptyLines(ignoreEmptyLines) + .build(); + } + } + + public CsvPreference getCSVpreference() { + return csvPreference; + } + + +} diff --git a/src/main/java/ninja/javafx/smartcsv/preferences/QuoteModeHelper.java b/src/main/java/ninja/javafx/smartcsv/preferences/QuoteModeHelper.java new file mode 100644 index 0000000..7c29017 --- /dev/null +++ b/src/main/java/ninja/javafx/smartcsv/preferences/QuoteModeHelper.java @@ -0,0 +1,56 @@ +/* + The MIT License (MIT) + ----------------------------------------------------------------------------- + + Copyright (c) 2015 javafx.ninja + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +*/ + +package ninja.javafx.smartcsv.preferences; + +import org.supercsv.quote.AlwaysQuoteMode; +import org.supercsv.quote.ColumnQuoteMode; +import org.supercsv.quote.NormalQuoteMode; +import org.supercsv.quote.QuoteMode; + +/** + * Helper class for mapping quote quoteModeName + */ +public class QuoteModeHelper { + + public static QuoteMode getQuoteMode(String quoteModeName) { + switch (quoteModeName) { + case "always": return new AlwaysQuoteMode(); + case "column": return new ColumnQuoteMode(); + default: return new NormalQuoteMode(); + } + } + + public static String getQuoteModeName(QuoteMode quoteMode) { + if (quoteMode instanceof AlwaysQuoteMode) { + return "always"; + } else if (quoteMode instanceof ColumnQuoteMode) { + return "column"; + } else { + return "normal"; + } + } +} diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/application.properties b/src/main/resources/ninja/javafx/smartcsv/fx/application.properties index 325de42..ab08d83 100644 --- a/src/main/resources/ninja/javafx/smartcsv/fx/application.properties +++ b/src/main/resources/ninja/javafx/smartcsv/fx/application.properties @@ -4,6 +4,7 @@ application.version = 0.2 # fxml views fxml.smartcvs.view = /ninja/javafx/smartcsv/fx/smartcsv.fxml fxml.smartcvs.about.view = /ninja/javafx/smartcsv/fx/about/about.fxml +fxml.smartcvs.preferences.view = /ninja/javafx/smartcsv/fx/preferences/preferences.fxml # resources resource.main = ninja.javafx.smartcsv.fx.smartcsv \ No newline at end of file diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/preferences/preferences.fxml b/src/main/resources/ninja/javafx/smartcsv/fx/preferences/preferences.fxml new file mode 100644 index 0000000..5a38f55 --- /dev/null +++ b/src/main/resources/ninja/javafx/smartcsv/fx/preferences/preferences.fxml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/preferences/preferences.json b/src/main/resources/ninja/javafx/smartcsv/fx/preferences/preferences.json new file mode 100644 index 0000000..89d3b32 --- /dev/null +++ b/src/main/resources/ninja/javafx/smartcsv/fx/preferences/preferences.json @@ -0,0 +1,8 @@ +{ + "quoteChar" : "\"", + "delimiterChar" : ";", + "endOfLineSymbols" : "\n", + "surroundingSpacesNeedQuotes" : true, + "ignoreEmptyLines" : true, + "quoteMode" : "always" +} \ No newline at end of file diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.css b/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.css index 34caf93..cebf71d 100644 --- a/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.css +++ b/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.css @@ -44,4 +44,7 @@ -glyph-size: 14px; } - +.preferences-icon { + -glyph-name: "COG"; + -glyph-size: 14px; +} diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.fxml b/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.fxml index 3fce601..a54c1ba 100644 --- a/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.fxml +++ b/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.fxml @@ -40,6 +40,12 @@ + + + + + + diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.properties b/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.properties index f5519f5..9356b34 100644 --- a/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.properties +++ b/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv.properties @@ -7,6 +7,7 @@ menu.about = About menu.file = File menu.edit = Edit menu.help = Help +menu.preferences = Preferences title.validation.errors = Validation Errors: stateline.csv = CSV: @@ -20,6 +21,12 @@ dialog.exit.title = Close Application dialog.exit.header.text = Do you want to close application? dialog.exit.text = There are changes made to the csv file. If you close now, the changes are lost! +preferences.quoteChar = Quote character: +preferences.delimiterChar = Delimiter character: +preferences.ignoreEmptyLines = Ignore empty lines: +preferences.surroundingSpacesNeedQuotes = Surrounding spaces need quotes: +preferences.quoteMode = Quote mode: + # validaton messages validation.message.not.empty = should not be empty validation.message.integer = should be an integer diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv_de.properties b/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv_de.properties index aa8e22a..d56f600 100644 --- a/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv_de.properties +++ b/src/main/resources/ninja/javafx/smartcsv/fx/smartcsv_de.properties @@ -15,6 +15,7 @@ menu.about = \u00dcber ... menu.file = Datei menu.edit = Bearbeiten menu.help = Hilfe +menu.preferences = Einstellungen title.validation.errors = Fehler in der Datei: stateline.csv = CSV: