From d2e98ff93a06274c24571a911a42f450705bbaa1 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 4 Sep 2014 12:06:51 +0200 Subject: [PATCH] Use localized strings for create offer screen and validators --- src/main/java/io/bitsquare/BitSquare.java | 31 +++-- .../java/io/bitsquare/di/GuiceFXMLLoader.java | 1 + .../gui/components/InputTextField.java | 25 ++--- .../gui/trade/createoffer/CreateOfferCB.java | 102 ++++++++++------- .../trade/createoffer/CreateOfferModel.java | 8 +- .../gui/trade/createoffer/CreateOfferPM.java | 22 ++-- .../trade/createoffer/CreateOfferView.fxml | 106 +++++++++--------- .../gui/util/validation/BtcValidator.java | 10 +- .../gui/util/validation/FiatValidator.java | 10 +- .../gui/util/validation/InputValidator.java | 4 +- .../gui/util/validation/NumberValidator.java | 8 +- .../java/io/bitsquare/settings/Settings.java | 17 +++ src/main/resources/bitsquare.properties | 4 +- .../resources/i18n/displayStrings.properties | 74 +++++++++++- .../gui/trade/createoffer/UITestRunner.java | 6 +- 15 files changed, 279 insertions(+), 149 deletions(-) diff --git a/src/main/java/io/bitsquare/BitSquare.java b/src/main/java/io/bitsquare/BitSquare.java index 48afa01d6b..718e5b7eb2 100644 --- a/src/main/java/io/bitsquare/BitSquare.java +++ b/src/main/java/io/bitsquare/BitSquare.java @@ -75,14 +75,18 @@ public class BitSquare extends Application { } @Override - public void start(Stage primaryStage) throws IOException { + public void start(Stage primaryStage) { Profiler.printMsgWithTime("BitSquare.start called"); BitSquare.primaryStage = primaryStage; Thread.currentThread().setUncaughtExceptionHandler((thread, throwable) -> Popups.handleUncaughtExceptions (Throwables.getRootCause(throwable))); - AppDirectory.initAppDir(APP_NAME); + try { + AppDirectory.initAppDir(APP_NAME); + } catch (IOException e) { + log.error(e.getMessage()); + } // currently there is not SystemTray support for java fx (planned for version 3) so we use the old AWT AWTSystemTray.createSystemTray(primaryStage); @@ -111,19 +115,24 @@ public class BitSquare extends Application { final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(NavigationItem.MAIN.getFxmlUrl()), false); - final Parent view = loader.load(); - final Scene scene = new Scene(view, 1000, 750); - scene.getStylesheets().setAll(getClass().getResource("/io/bitsquare/gui/bitsquare.css").toExternalForm()); + try { + final Parent view = loader.load(); - setupCloseHandlers(primaryStage, scene); + final Scene scene = new Scene(view, 1000, 750); + scene.getStylesheets().setAll(getClass().getResource("/io/bitsquare/gui/bitsquare.css").toExternalForm()); - primaryStage.setScene(scene); - primaryStage.setMinWidth(750); - primaryStage.setMinHeight(500); + setupCloseHandlers(primaryStage, scene); - primaryStage.show(); + primaryStage.setScene(scene); + primaryStage.setMinWidth(750); + primaryStage.setMinHeight(500); - Profiler.printMsgWithTime("BitSquare: start finished"); + primaryStage.show(); + + Profiler.printMsgWithTime("BitSquare: start finished"); + } catch (IOException e) { + log.error(e.getMessage()); + } } private void setupCloseHandlers(Stage primaryStage, Scene scene) { diff --git a/src/main/java/io/bitsquare/di/GuiceFXMLLoader.java b/src/main/java/io/bitsquare/di/GuiceFXMLLoader.java index 3a50aa2d5a..d65baa5cc0 100644 --- a/src/main/java/io/bitsquare/di/GuiceFXMLLoader.java +++ b/src/main/java/io/bitsquare/di/GuiceFXMLLoader.java @@ -61,6 +61,7 @@ public class GuiceFXMLLoader { isCached = useCaching && cachedGUIItems.containsKey(url); if (!isCached) { loader = new FXMLLoader(url, Localisation.getResourceBundle()); + if (GuiceFXMLLoader.injector != null) loader.setControllerFactory(new GuiceControllerFactory(GuiceFXMLLoader.injector)); } diff --git a/src/main/java/io/bitsquare/gui/components/InputTextField.java b/src/main/java/io/bitsquare/gui/components/InputTextField.java index 54e7be00c6..bb2dd80652 100644 --- a/src/main/java/io/bitsquare/gui/components/InputTextField.java +++ b/src/main/java/io/bitsquare/gui/components/InputTextField.java @@ -125,22 +125,17 @@ public class InputTextField extends TextField { /////////////////////////////////////////////////////////////////////////////////////////// private void applyErrorMessage(InputValidator.ValidationResult validationResult) { - if (validationResult.isValid) { - if (errorMessageDisplay != null) - errorMessageDisplay.hide(); - } - else { - - if (errorMessageDisplay == null) - createErrorPopOver(validationResult.errorMessage); - else - ((Label) errorMessageDisplay.getContentNode()).setText(validationResult.errorMessage); + if (errorMessageDisplay != null) + errorMessageDisplay.hide(); + if (!validationResult.isValid) { + createErrorPopOver(validationResult.errorMessage); if (getScene() != null) errorMessageDisplay.show(getScene().getWindow(), getErrorPopupPosition().getX(), getErrorPopupPosition().getY()); - InputTextField.errorMessageDisplay.setDetached(false); + if (errorMessageDisplay != null) + errorMessageDisplay.setDetached(false); } } @@ -162,10 +157,10 @@ public class InputTextField extends TextField { errorLabel.setPadding(new Insets(0, 10, 0, 10)); errorLabel.setOnMouseClicked(e -> hideErrorMessageDisplay()); - InputTextField.errorMessageDisplay = new PopOver(errorLabel); - InputTextField.errorMessageDisplay.setDetachable(true); - InputTextField.errorMessageDisplay.setDetachedTitle("Close"); - InputTextField.errorMessageDisplay.setArrowIndent(5); + errorMessageDisplay = new PopOver(errorLabel); + errorMessageDisplay.setDetachable(true); + errorMessageDisplay.setDetachedTitle("Close"); + errorMessageDisplay.setArrowIndent(5); } } \ No newline at end of file diff --git a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferCB.java b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferCB.java index e7b286775b..561a6a055e 100644 --- a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferCB.java +++ b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferCB.java @@ -28,6 +28,7 @@ import io.bitsquare.gui.help.Help; import io.bitsquare.gui.help.HelpId; import io.bitsquare.gui.trade.TradeController; import io.bitsquare.gui.util.ImageUtil; +import io.bitsquare.locale.Localisation; import io.bitsquare.trade.orderbook.OrderBookFilter; import java.net.URL; @@ -63,6 +64,8 @@ import org.controlsfx.dialog.Dialog; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static javafx.beans.binding.Bindings.createStringBinding; + // TODO Implement other positioning method in InoutTextField to display it over the field instead of right side // priceAmountHBox is too large after redesign as to be used as layoutReference. @@ -84,7 +87,8 @@ public class CreateOfferCB extends CachedCodeBehind { balanceLabel, payFundsTitleLabel, totalToPayLabel, totalToPayInfoIconLabel, showDetailsTitleLabel, bankAccountTypeLabel, bankAccountCurrencyLabel, bankAccountCountyLabel, acceptedCountriesLabel, acceptedCountriesLabelIcon, acceptedLanguagesLabel, acceptedLanguagesLabelIcon, - acceptedArbitratorsLabel, acceptedArbitratorsLabelIcon; + acceptedArbitratorsLabel, acceptedArbitratorsLabelIcon, amountBtcLabel, + priceFiatLabel, volumeFiatLabel, minAmountBtcLabel, priceDescriptionLabel, volumeDescriptionLabel; @FXML private Button showPaymentInfoScreenButton, showAdvancedSettingsButton, placeOfferButton; @FXML private InputTextField amountTextField, minAmountTextField, priceTextField, volumeTextField; @@ -113,8 +117,8 @@ public class CreateOfferCB extends CachedCodeBehind { public void initialize(URL url, ResourceBundle rb) { super.initialize(url, rb); - setupBindings(); setupListeners(); + setupBindings(); balanceTextField.setup(presentationModel.getWalletFacade(), presentationModel.address.get()); } @@ -189,12 +193,12 @@ public class CreateOfferCB extends CachedCodeBehind { private void onToggleShowAdvancedSettings() { detailsVisible = !detailsVisible; if (detailsVisible) { - showAdvancedSettingsButton.setText("Hide advanced settings"); + showAdvancedSettingsButton.setText(Localisation.get("createOffer.fundsBox.hideAdvanced")); showAdvancedSettingsButton.setGraphic(collapse); showDetailsScreen(); } else { - showAdvancedSettingsButton.setText("Show advanced settings"); + showAdvancedSettingsButton.setText(Localisation.get("createOffer.fundsBox.showAdvanced")); showAdvancedSettingsButton.setGraphic(expand); hideDetailsScreen(); } @@ -260,24 +264,24 @@ public class CreateOfferCB extends CachedCodeBehind { // warnings presentationModel.showWarningInvalidBtcDecimalPlaces.addListener((o, oldValue, newValue) -> { if (newValue) { - Popups.openWarningPopup("Warning", "The amount you have entered exceeds the number of allowed decimal" + - " places.\nThe amount has been adjusted to 4 decimal places."); + Popups.openWarningPopup(Localisation.get("shared.warning"), + Localisation.get("createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces")); presentationModel.showWarningInvalidBtcDecimalPlaces.set(false); } }); presentationModel.showWarningInvalidFiatDecimalPlaces.addListener((o, oldValue, newValue) -> { if (newValue) { - Popups.openWarningPopup("Warning", "The amount you have entered exceeds the number of allowed decimal" + - " places.\nThe amount has been adjusted to 2 decimal places."); + Popups.openWarningPopup(Localisation.get("shared.warning"), + Localisation.get("createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces")); presentationModel.showWarningInvalidFiatDecimalPlaces.set(false); } }); presentationModel.showWarningAdjustedVolume.addListener((o, oldValue, newValue) -> { if (newValue) { - Popups.openWarningPopup("Warning", "The total volume you have entered leads to invalid fractional " + - "Bitcoin amounts.\nThe amount has been adjusted and a new total volume be calculated from it."); + Popups.openWarningPopup(Localisation.get("shared.warning"), + Localisation.get("createOffer.amountPriceBox.warning.adjustedVolume")); presentationModel.showWarningAdjustedVolume.set(false); volumeTextField.setText(presentationModel.volume.get()); } @@ -285,8 +289,9 @@ public class CreateOfferCB extends CachedCodeBehind { presentationModel.requestPlaceOfferErrorMessage.addListener((o, oldValue, newValue) -> { if (newValue != null) { - Popups.openErrorPopup("Error", "An error occurred when placing the offer.\n" + - presentationModel.requestPlaceOfferErrorMessage.get()); + Popups.openErrorPopup(Localisation.get("shared.error"), + Localisation.get("createOffer.amountPriceBox.error.requestPlaceOfferErrorMessage", + presentationModel.requestPlaceOfferErrorMessage.get())); } }); @@ -295,7 +300,7 @@ public class CreateOfferCB extends CachedCodeBehind { // Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added // our own actions. List actions = new ArrayList<>(); - actions.add(new AbstractAction("Copy transaction ID") { + actions.add(new AbstractAction(Localisation.get("createOffer.success.copyTxId")) { @Override public void handle(ActionEvent actionEvent) { Clipboard clipboard = Clipboard.getSystemClipboard(); @@ -304,7 +309,7 @@ public class CreateOfferCB extends CachedCodeBehind { clipboard.setContent(content); } }); - actions.add(new AbstractAction("Close") { + actions.add(new AbstractAction(Localisation.get("shared.close")) { @Override public void handle(ActionEvent actionEvent) { try { @@ -316,16 +321,27 @@ public class CreateOfferCB extends CachedCodeBehind { } }); - Popups.openInformationPopup("Offer published", - "The Bitcoin network transaction ID for the offer payment is: " + - presentationModel.transactionId.get(), - "Your offer has been successfully published to the distributed orderbook.", + Popups.openInformationPopup(Localisation.get("createOffer.success.title"), + Localisation.get("createOffer.success.info", presentationModel.transactionId.get()), + Localisation.get("createOffer.success.headline"), actions); } }); } private void setupBindings() { + amountBtcLabel.textProperty().bind(presentationModel.btcCode); + priceFiatLabel.textProperty().bind(presentationModel.fiatCode); + volumeFiatLabel.textProperty().bind(presentationModel.fiatCode); + minAmountBtcLabel.textProperty().bind(presentationModel.btcCode); + priceDescriptionLabel.textProperty().bind(presentationModel.fiatCode); + volumeDescriptionLabel.textProperty().bind(presentationModel.fiatCode);//Price per Bitcoin in EUR + + priceDescriptionLabel.textProperty().bind(createStringBinding(() -> + Localisation.get("createOffer.amountPriceBox.priceDescr", presentationModel.fiatCode.get()))); + volumeDescriptionLabel.textProperty().bind(createStringBinding(() -> + Localisation.get("createOffer.amountPriceBox.volumeDescr", presentationModel.fiatCode.get()))); + buyLabel.textProperty().bind(presentationModel.directionLabel); amountTextField.textProperty().bindBidirectional(presentationModel.amount); @@ -377,17 +393,17 @@ public class CreateOfferCB extends CachedCodeBehind { advancedScreenInited = true; acceptedCountriesLabelIcon.setId("clickable-icon"); AwesomeDude.setIcon(acceptedCountriesLabelIcon, AwesomeIcon.EDIT_SIGN); - Tooltip.install(acceptedCountriesLabelIcon, new Tooltip("Open settings for editing")); + Tooltip.install(acceptedCountriesLabelIcon, new Tooltip(Localisation.get("shared.openSettings"))); acceptedCountriesLabelIcon.setOnMouseClicked(e -> openSettings()); acceptedLanguagesLabelIcon.setId("clickable-icon"); AwesomeDude.setIcon(acceptedLanguagesLabelIcon, AwesomeIcon.EDIT_SIGN); - Tooltip.install(acceptedLanguagesLabelIcon, new Tooltip("Open settings for editing")); + Tooltip.install(acceptedLanguagesLabelIcon, new Tooltip(Localisation.get("shared.openSettings"))); acceptedLanguagesLabelIcon.setOnMouseClicked(e -> openSettings()); acceptedArbitratorsLabelIcon.setId("clickable-icon"); AwesomeDude.setIcon(acceptedArbitratorsLabelIcon, AwesomeIcon.EDIT_SIGN); - Tooltip.install(acceptedArbitratorsLabelIcon, new Tooltip("Open settings for editing")); + Tooltip.install(acceptedArbitratorsLabelIcon, new Tooltip(Localisation.get("shared.openSettings"))); acceptedArbitratorsLabelIcon.setOnMouseClicked(e -> openSettings()); } @@ -429,36 +445,42 @@ public class CreateOfferCB extends CachedCodeBehind { totalToPayInfoIconLabel.setId("clickable-icon"); AwesomeDude.setIcon(totalToPayInfoIconLabel, AwesomeIcon.QUESTION_SIGN); + totalToPayInfoIconLabel.setOnMouseEntered(e -> createInfoPopover()); + totalToPayInfoIconLabel.setOnMouseExited(e -> { + if (totalToPayInfoPopover != null) + totalToPayInfoPopover.hide(); + }); + } + + // As we don't use binding here we need to recreate it on mouse over to reflect the current state + private void createInfoPopover() { GridPane infoGridPane = new GridPane(); infoGridPane.setHgap(5); infoGridPane.setVgap(5); infoGridPane.setPadding(new Insets(10, 10, 10, 10)); - addPayInfoEntry(infoGridPane, 0, "Collateral (" + presentationModel.collateralLabel.get() + ")", + addPayInfoEntry(infoGridPane, 0, + presentationModel.collateralLabel.get(), presentationModel.collateral.get()); - addPayInfoEntry(infoGridPane, 1, "Offer fee:", presentationModel.offerFee.get()); - addPayInfoEntry(infoGridPane, 2, "Bitcoin network fee:", presentationModel.networkFee.get()); + addPayInfoEntry(infoGridPane, 1, Localisation.get("createOffer.fundsBox.offerFee"), + presentationModel.offerFee.get()); + addPayInfoEntry(infoGridPane, 2, Localisation.get("createOffer.fundsBox.networkFee"), + presentationModel.networkFee.get()); Separator separator = new Separator(); separator.setOrientation(Orientation.HORIZONTAL); separator.setStyle("-fx-background: #666;"); GridPane.setConstraints(separator, 1, 3); infoGridPane.getChildren().add(separator); - addPayInfoEntry(infoGridPane, 4, "Total:", presentationModel.totalToPay.get()); - - totalToPayInfoIconLabel.setOnMouseEntered(e -> { - if (totalToPayInfoIconLabel.getScene() != null) { - totalToPayInfoPopover = new PopOver(infoGridPane); - totalToPayInfoPopover.setDetachable(false); - totalToPayInfoPopover.setArrowIndent(5); - totalToPayInfoPopover.show(totalToPayInfoIconLabel.getScene().getWindow(), - getPopupPosition().getX(), - getPopupPosition().getY()); - } - }); - totalToPayInfoIconLabel.setOnMouseExited(e -> { - if (totalToPayInfoPopover != null) - totalToPayInfoPopover.hide(); - }); + addPayInfoEntry(infoGridPane, 4, Localisation.get("createOffer.fundsBox.total"), + presentationModel.totalToPay.get()); + totalToPayInfoPopover = new PopOver(infoGridPane); + if (totalToPayInfoIconLabel.getScene() != null) { + totalToPayInfoPopover.setDetachable(false); + totalToPayInfoPopover.setArrowIndent(5); + totalToPayInfoPopover.show(totalToPayInfoIconLabel.getScene().getWindow(), + getPopupPosition().getX(), + getPopupPosition().getY()); + } } private void addPayInfoEntry(GridPane infoGridPane, int row, String labelText, String value) { diff --git a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferModel.java b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferModel.java index 24929fd939..05589f7f46 100644 --- a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferModel.java +++ b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferModel.java @@ -82,11 +82,14 @@ class CreateOfferModel extends UIModel { final StringProperty bankAccountCurrency = new SimpleStringProperty(); final StringProperty bankAccountCounty = new SimpleStringProperty(); final StringProperty bankAccountType = new SimpleStringProperty(); - + final StringProperty fiatCode = new SimpleStringProperty(); + final StringProperty btcCode = new SimpleStringProperty(); + final LongProperty collateralAsLong = new SimpleLongProperty(); final BooleanProperty requestPlaceOfferSuccess = new SimpleBooleanProperty(); final BooleanProperty isWalletFunded = new SimpleBooleanProperty(); + final BooleanProperty useMBTC = new SimpleBooleanProperty(); final ObjectProperty amountAsCoin = new SimpleObjectProperty<>(); final ObjectProperty minAmountAsCoin = new SimpleObjectProperty<>(); @@ -154,6 +157,7 @@ class CreateOfferModel extends UIModel { acceptedCountries.setAll(settings.getAcceptedCountries()); acceptedLanguages.setAll(settings.getAcceptedLanguageLocales()); acceptedArbitrators.setAll(settings.getAcceptedArbitrators()); + btcCode.bind(settings.btcDenominationProperty()); } if (user != null) { @@ -162,6 +166,8 @@ class CreateOfferModel extends UIModel { bankAccountType.set(bankAccount.getBankAccountType().toString()); bankAccountCurrency.set(bankAccount.getCurrency().getCurrencyCode()); bankAccountCounty.set(bankAccount.getCountry().getName()); + + fiatCode.set(bankAccount.getCurrency().getCurrencyCode()); } } } diff --git a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferPM.java b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferPM.java index a1a271d6a1..4f5b8c5302 100644 --- a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferPM.java +++ b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferPM.java @@ -75,6 +75,8 @@ class CreateOfferPM extends PresentationModel { final StringProperty paymentLabel = new SimpleStringProperty(); final StringProperty transactionId = new SimpleStringProperty(); final StringProperty requestPlaceOfferErrorMessage = new SimpleStringProperty(); + final StringProperty btcCode = new SimpleStringProperty(); + final StringProperty fiatCode = new SimpleStringProperty(); final BooleanProperty isPlaceOfferButtonVisible = new SimpleBooleanProperty(false); final BooleanProperty isPlaceOfferButtonDisabled = new SimpleBooleanProperty(true); @@ -114,7 +116,7 @@ class CreateOfferPM extends PresentationModel { super.initialized(); // static - paymentLabel.set("Bitsquare trade (" + model.getOfferId() + ")"); + paymentLabel.set(Localisation.get("createOffer.fundsBox.paymentLabel", model.getOfferId())); if (model.addressEntry != null) { addressAsString.set(model.addressEntry.getAddress().toString()); @@ -151,7 +153,8 @@ class CreateOfferPM extends PresentationModel { // setOrderBookFilter is a one time call void setOrderBookFilter(@NotNull OrderBookFilter orderBookFilter) { model.setDirection(orderBookFilter.getDirection()); - directionLabel.set(model.getDirection() == Direction.BUY ? "Buy Bitcoin" : "Sell Bitcoin"); + directionLabel.set(model.getDirection() == Direction.BUY ? Localisation.get("shared.buy") : Localisation.get + ("shared.sell")); // apply only if valid if (orderBookFilter.getAmount() != null && isBtcInputValid(orderBookFilter.getAmount().toPlainString()) @@ -206,7 +209,7 @@ class CreateOfferPM extends PresentationModel { // handle minAmount/amount relationship if (!model.isMinAmountLessOrEqualAmount()) { amountValidationResult.set(new InputValidator.ValidationResult(false, - "Amount cannot be smaller than minimum amount.")); + Localisation.get("createOffer.validation.amountSmallerThanAmount"))); } else { amountValidationResult.set(result); @@ -228,7 +231,7 @@ class CreateOfferPM extends PresentationModel { if (!model.isMinAmountLessOrEqualAmount()) { minAmountValidationResult.set(new InputValidator.ValidationResult(false, - "Minimum amount cannot be larger than amount.")); + Localisation.get("createOffer.validation.minAmountLargerThanAmount"))); } else { minAmountValidationResult.set(result); @@ -359,8 +362,10 @@ class CreateOfferPM extends PresentationModel { collateral.bind(createStringBinding(() -> formatCoinWithCode(model.collateralAsCoin.get()), model.collateralAsCoin)); - collateralLabel.bind(Bindings.createStringBinding(() -> "Collateral (" + BSFormatter.formatCollateralPercent - (model.collateralAsLong.get()) + "):", model.collateralAsLong)); + collateralLabel.bind(Bindings.createStringBinding(() -> + Localisation.get("createOffer.fundsBox.collateral", + BSFormatter.formatCollateralPercent(model.collateralAsLong.get())), + model.collateralAsLong)); totalToPayAsCoin.bind(model.totalToPayAsCoin); offerFee.bind(createStringBinding(() -> formatCoinWithCode(model.offerFeeAsCoin.get()), @@ -376,6 +381,9 @@ class CreateOfferPM extends PresentationModel { requestPlaceOfferErrorMessage.bind(model.requestPlaceOfferErrorMessage); showTransactionPublishedScreen.bind(model.requestPlaceOfferSuccess); transactionId.bind(model.transactionId); + + btcCode.bind(model.btcCode); + fiatCode.bind(model.fiatCode); } private void calculateVolume() { @@ -392,7 +400,7 @@ class CreateOfferPM extends PresentationModel { // Amount calculation could lead to amount/minAmount invalidation if (!model.isMinAmountLessOrEqualAmount()) { amountValidationResult.set(new InputValidator.ValidationResult(false, - "Amount cannot be smaller than minimum amount.")); + Localisation.get("createOffer.validation.amountSmallerThanAmount"))); } else { if (amount.get() != null) diff --git a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferView.fxml b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferView.fxml index 8974a96137..f1e1d9b23d 100644 --- a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferView.fxml +++ b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferView.fxml @@ -50,8 +50,8 @@ @@ -66,8 +66,9 @@ -