diff --git a/core/src/main/java/io/bitsquare/locale/Res.java b/core/src/main/java/io/bitsquare/locale/Res.java index bf578af07a..6624fd2c0b 100644 --- a/core/src/main/java/io/bitsquare/locale/Res.java +++ b/core/src/main/java/io/bitsquare/locale/Res.java @@ -39,6 +39,14 @@ public class Res { return ResourceBundle.getBundle("i18n.displayStrings", new UTF8Control()); } + public static String getWithCol(String key) { + return get(key) + ":"; + } + + public static String getWithCol(String key, Object... arguments) { + return get(key, arguments) + ":"; + } + public static String get(String key) { // TODO remove once translation done // for testing missing translation strings diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/AliPayForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/AliPayForm.java index 5c0dd00caf..cc27bcb6d0 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/AliPayForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/AliPayForm.java @@ -64,7 +64,7 @@ public class AliPayForm extends PaymentMethodForm { updateFromInputs(); }); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), aliPayAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), aliPayAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); addAccountNameTextFieldWithAutoFillCheckBox(); } @@ -86,7 +86,7 @@ public class AliPayForm extends PaymentMethodForm { addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(aliPayAccount.getPaymentMethod().getId())); TextField field = addLabelTextField(gridPane, ++gridRow, "Account no.:", aliPayAccount.getAccountNr()).second; field.setMouseTransparent(false); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), aliPayAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), aliPayAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); } diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/BankForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/BankForm.java index c43d7ac3f9..a54d9dd526 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/BankForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/BankForm.java @@ -205,7 +205,7 @@ abstract class BankForm extends PaymentMethodForm { addLabelTextField(gridPane, gridRow, "Account name:", paymentAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE); addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(paymentAccount.getPaymentMethod().getId())); addLabelTextField(gridPane, ++gridRow, "Country:", getCountryBasedPaymentAccount().getCountry() != null ? getCountryBasedPaymentAccount().getCountry().name : ""); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), paymentAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), paymentAccount.getSingleTradeCurrency().getNameAndCode()); addAcceptedBanksForDisplayAccount(); addHolderNameAndIdForDisplayAccount(); @@ -382,7 +382,7 @@ abstract class BankForm extends PaymentMethodForm { } }); - currencyComboBox = addLabelComboBox(gridPane, ++gridRow, Res.get("label.currency")).second; + currencyComboBox = addLabelComboBox(gridPane, ++gridRow, Res.getWithCol("shared.currency")).second; currencyComboBox.setPromptText(Res.get("list.currency.select")); currencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllSortedFiatCurrencies())); currencyComboBox.setOnAction(e -> { diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/CashDepositForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/CashDepositForm.java index 083962c615..0c475f1c19 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/CashDepositForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/CashDepositForm.java @@ -217,7 +217,7 @@ public class CashDepositForm extends PaymentMethodForm { addLabelTextField(gridPane, gridRow, "Account name:", paymentAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE); addLabelTextField(gridPane, ++gridRow, "Payment method:", Res.get(paymentAccount.getPaymentMethod().getId())); addLabelTextField(gridPane, ++gridRow, "Country:", getCountryBasedPaymentAccount().getCountry() != null ? getCountryBasedPaymentAccount().getCountry().name : ""); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), paymentAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), paymentAccount.getSingleTradeCurrency().getNameAndCode()); addAcceptedBanksForDisplayAccount(); addHolderNameAndIdForDisplayAccount(); addLabelTextField(gridPane, ++gridRow, "Account holder email:", cashDepositAccountContractData.getHolderEmail()); @@ -399,7 +399,7 @@ public class CashDepositForm extends PaymentMethodForm { } }); - currencyComboBox = addLabelComboBox(gridPane, ++gridRow, Res.get("label.currency")).second; + currencyComboBox = addLabelComboBox(gridPane, ++gridRow, Res.getWithCol("shared.currency")).second; currencyComboBox.setPromptText(Res.get("list.currency.select")); currencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllSortedFiatCurrencies())); currencyComboBox.setOnAction(e -> { diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/ChaseQuickPayForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/ChaseQuickPayForm.java index 568cb4e483..32151dedf2 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/ChaseQuickPayForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/ChaseQuickPayForm.java @@ -73,7 +73,7 @@ public class ChaseQuickPayForm extends PaymentMethodForm { updateFromInputs(); }); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), chaseQuickPayAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), chaseQuickPayAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); addAccountNameTextFieldWithAutoFillCheckBox(); } @@ -96,7 +96,7 @@ public class ChaseQuickPayForm extends PaymentMethodForm { addLabelTextField(gridPane, ++gridRow, "Account holder name:", chaseQuickPayAccount.getHolderName()); TextField field = addLabelTextField(gridPane, ++gridRow, "Email:", chaseQuickPayAccount.getEmail()).second; field.setMouseTransparent(false); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), chaseQuickPayAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), chaseQuickPayAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); } diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/ClearXchangeForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/ClearXchangeForm.java index 5537456d55..eacf6568c3 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/ClearXchangeForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/ClearXchangeForm.java @@ -72,7 +72,7 @@ public class ClearXchangeForm extends PaymentMethodForm { updateFromInputs(); }); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), clearXchangeAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), clearXchangeAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); addAccountNameTextFieldWithAutoFillCheckBox(); } @@ -95,7 +95,7 @@ public class ClearXchangeForm extends PaymentMethodForm { addLabelTextField(gridPane, ++gridRow, "Account holder name:", clearXchangeAccount.getHolderName()); TextField field = addLabelTextField(gridPane, ++gridRow, "Email or mobile no.:", clearXchangeAccount.getEmailOrMobileNr()).second; field.setMouseTransparent(false); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), clearXchangeAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), clearXchangeAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); } diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/FasterPaymentsForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/FasterPaymentsForm.java index 0ebe94019f..8e773f6040 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/FasterPaymentsForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/FasterPaymentsForm.java @@ -75,7 +75,7 @@ public class FasterPaymentsForm extends PaymentMethodForm { updateFromInputs(); }); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), fasterPaymentsAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), fasterPaymentsAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); addAccountNameTextFieldWithAutoFillCheckBox(); } @@ -98,7 +98,7 @@ public class FasterPaymentsForm extends PaymentMethodForm { addLabelTextField(gridPane, ++gridRow, "UK Sort code:", fasterPaymentsAccount.getSortCode()); TextField field = addLabelTextField(gridPane, ++gridRow, "Account number:", fasterPaymentsAccount.getAccountNr()).second; field.setMouseTransparent(false); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), fasterPaymentsAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), fasterPaymentsAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); } diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/InteracETransferForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/InteracETransferForm.java index 97d7145b2c..fb12425b03 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/InteracETransferForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/InteracETransferForm.java @@ -90,7 +90,7 @@ public class InteracETransferForm extends PaymentMethodForm { updateFromInputs(); }); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), interacETransferAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), interacETransferAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); addAccountNameTextFieldWithAutoFillCheckBox(); } @@ -114,7 +114,7 @@ public class InteracETransferForm extends PaymentMethodForm { addLabelTextField(gridPane, ++gridRow, "Email:", interacETransferAccount.getEmail()).second.setMouseTransparent(false); addLabelTextField(gridPane, ++gridRow, "Secret question:", interacETransferAccount.getQuestion()).second.setMouseTransparent(false); addLabelTextField(gridPane, ++gridRow, "Answer:", interacETransferAccount.getAnswer()).second.setMouseTransparent(false); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), interacETransferAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), interacETransferAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); } diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/PaymentMethodForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/PaymentMethodForm.java index 005057b635..2a10f1cfe9 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/PaymentMethodForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/PaymentMethodForm.java @@ -65,7 +65,7 @@ public abstract class PaymentMethodForm { } protected void addTradeCurrencyComboBox() { - currencyComboBox = addLabelComboBox(gridPane, ++gridRow, Res.get("label.currency")).second; + currencyComboBox = addLabelComboBox(gridPane, ++gridRow, Res.getWithCol("shared.currency")).second; currencyComboBox.setPromptText(Res.get("list.currency.select")); currencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllMainFiatCurrencies())); currencyComboBox.setConverter(new StringConverter() { diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/PerfectMoneyForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/PerfectMoneyForm.java index bf78335c93..5bd64040c4 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/PerfectMoneyForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/PerfectMoneyForm.java @@ -93,7 +93,7 @@ public class PerfectMoneyForm extends PaymentMethodForm { TextField field = addLabelTextField(gridPane, ++gridRow, "Account no.:", perfectMoneyAccount.getAccountNr()).second; field.setMouseTransparent(false); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), perfectMoneyAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), perfectMoneyAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); } diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/SepaForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/SepaForm.java index 9c9c3ae93d..9e756f24f9 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/SepaForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/SepaForm.java @@ -315,7 +315,7 @@ public class SepaForm extends PaymentMethodForm { addLabelTextField(gridPane, ++gridRow, "BIC:", sepaAccount.getBic()).second.setMouseTransparent(false); addLabelTextField(gridPane, ++gridRow, "Country of Bank:", sepaAccount.getCountry() != null ? sepaAccount.getCountry().name : ""); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), sepaAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), sepaAccount.getSingleTradeCurrency().getNameAndCode()); String countries; Tooltip tooltip = null; if (CountryUtil.containsAllSepaEuroCountries(sepaAccount.getAcceptedCountryCodes())) { diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/SwishForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/SwishForm.java index fa4f54bb00..30fa7e90cd 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/SwishForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/SwishForm.java @@ -73,7 +73,7 @@ public class SwishForm extends PaymentMethodForm { updateFromInputs(); }); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), swishAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), swishAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); addAccountNameTextFieldWithAutoFillCheckBox(); } @@ -96,7 +96,7 @@ public class SwishForm extends PaymentMethodForm { addLabelTextField(gridPane, ++gridRow, "Account holder name:", swishAccount.getHolderName()); TextField field = addLabelTextField(gridPane, ++gridRow, "Mobile no.:", swishAccount.getMobileNr()).second; field.setMouseTransparent(false); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), swishAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), swishAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); } diff --git a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/USPostalMoneyOrderForm.java b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/USPostalMoneyOrderForm.java index 0ecbe0ede2..1d2a69762c 100644 --- a/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/USPostalMoneyOrderForm.java +++ b/gui/src/main/java/io/bitsquare/gui/components/paymentmethods/USPostalMoneyOrderForm.java @@ -78,7 +78,7 @@ public class USPostalMoneyOrderForm extends PaymentMethodForm { }); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), usPostalMoneyOrderAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), usPostalMoneyOrderAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); addAccountNameTextFieldWithAutoFillCheckBox(); } @@ -103,7 +103,7 @@ public class USPostalMoneyOrderForm extends PaymentMethodForm { textArea.setText(usPostalMoneyOrderAccount.getPostalAddress()); textArea.setPrefHeight(60); textArea.setEditable(false); - addLabelTextField(gridPane, ++gridRow, Res.get("label.currency"), usPostalMoneyOrderAccount.getSingleTradeCurrency().getNameAndCode()); + addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), usPostalMoneyOrderAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); } diff --git a/gui/src/main/java/io/bitsquare/gui/main/dao/DaoView.fxml b/gui/src/main/java/io/bitsquare/gui/main/dao/DaoView.fxml index 927a663c73..7b5c65216d 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/dao/DaoView.fxml +++ b/gui/src/main/java/io/bitsquare/gui/main/dao/DaoView.fxml @@ -25,7 +25,7 @@ AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0" xmlns:fx="http://javafx.com/fxml"> - - - + + + diff --git a/gui/src/main/java/io/bitsquare/gui/main/dao/DaoView.java b/gui/src/main/java/io/bitsquare/gui/main/dao/DaoView.java index 94ad060acf..5d966b3294 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/dao/DaoView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/dao/DaoView.java @@ -26,6 +26,7 @@ import io.bitsquare.gui.main.dao.compensation.CompensationView; import io.bitsquare.gui.main.dao.voting.VotingView; import io.bitsquare.gui.main.dao.wallet.BsqWalletView; import io.bitsquare.gui.main.dao.wallet.dashboard.BsqDashboardView; +import io.bitsquare.locale.Res; import io.bitsquare.user.Preferences; import javafx.beans.value.ChangeListener; import javafx.fxml.FXML; @@ -38,7 +39,7 @@ import javax.inject.Inject; public class DaoView extends ActivatableViewAndModel { @FXML - Tab bsqWalletTab, CompensationTab, votingTab; + Tab bsqWalletTab, compensationTab, votingTab; private Navigation.Listener navigationListener; private ChangeListener tabChangeListener; @@ -61,9 +62,13 @@ public class DaoView extends ActivatableViewAndModel { @Override public void initialize() { + bsqWalletTab.setText(Res.get("daoView.tab.bsqWallet")); + compensationTab.setText(Res.get("daoView.tab.compensation")); + votingTab.setText(Res.get("daoView.tab.voting")); + navigationListener = viewPath -> { if (viewPath.size() == 3 && viewPath.indexOf(DaoView.class) == 1) { - if (CompensationTab == null && viewPath.get(2).equals(CompensationView.class)) + if (compensationTab == null && viewPath.get(2).equals(CompensationView.class)) navigation.navigateTo(MainView.class, DaoView.class, BsqWalletView.class, BsqDashboardView.class); else loadView(viewPath.tip()); @@ -77,7 +82,7 @@ public class DaoView extends ActivatableViewAndModel { navigation.navigateTo(MainView.class, DaoView.class, BsqWalletView.class, BsqDashboardView.class); else navigation.navigateTo(MainView.class, DaoView.class, BsqWalletView.class, selectedViewClass); - } else if (newValue == CompensationTab) { + } else if (newValue == compensationTab) { navigation.navigateTo(MainView.class, DaoView.class, CompensationView.class); } else if (newValue == votingTab) { navigation.navigateTo(MainView.class, DaoView.class, VotingView.class); @@ -94,7 +99,7 @@ public class DaoView extends ActivatableViewAndModel { Tab selectedItem = root.getSelectionModel().getSelectedItem(); if (selectedItem == bsqWalletTab) navigation.navigateTo(MainView.class, DaoView.class, BsqWalletView.class); - else if (selectedItem == CompensationTab) + else if (selectedItem == compensationTab) navigation.navigateTo(MainView.class, DaoView.class, CompensationView.class); else if (selectedItem == votingTab) navigation.navigateTo(MainView.class, DaoView.class, VotingView.class); @@ -113,7 +118,7 @@ public class DaoView extends ActivatableViewAndModel { selectedTab = bsqWalletTab; bsqWalletView = (BsqWalletView) view; } else if (view instanceof CompensationView) { - selectedTab = CompensationTab; + selectedTab = compensationTab; } else if (view instanceof VotingView) { selectedTab = votingTab; } diff --git a/gui/src/main/java/io/bitsquare/gui/main/dao/compensation/active/ActiveCompensationRequestView.java b/gui/src/main/java/io/bitsquare/gui/main/dao/compensation/active/ActiveCompensationRequestView.java index 6fd0852bcc..708ce5640b 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/dao/compensation/active/ActiveCompensationRequestView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/dao/compensation/active/ActiveCompensationRequestView.java @@ -219,7 +219,7 @@ public class ActiveCompensationRequestView extends ActivatableView dateColumn = new TableColumn(Res.get("table.column.dateTime.header")) { + TableColumn dateColumn = new TableColumn(Res.get("shared.dateTime")) { { setMinWidth(190); setMaxWidth(190); diff --git a/gui/src/main/java/io/bitsquare/gui/main/disputes/DisputesView.fxml b/gui/src/main/java/io/bitsquare/gui/main/disputes/DisputesView.fxml index 56f85ca61b..8e94ca9fd7 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/disputes/DisputesView.fxml +++ b/gui/src/main/java/io/bitsquare/gui/main/disputes/DisputesView.fxml @@ -26,6 +26,6 @@ AnchorPane.topAnchor="0.0" xmlns:fx="http://javafx.com/fxml"> - + diff --git a/gui/src/main/java/io/bitsquare/gui/main/disputes/DisputesView.java b/gui/src/main/java/io/bitsquare/gui/main/disputes/DisputesView.java index 6df259b90a..c8e2580541 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/disputes/DisputesView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/disputes/DisputesView.java @@ -31,6 +31,7 @@ import io.bitsquare.gui.main.disputes.trader.TraderDisputeView; import io.bitsquare.gui.main.overlays.popups.Popup; import io.bitsquare.gui.main.portfolio.PortfolioView; import io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesView; +import io.bitsquare.locale.Res; import io.bitsquare.p2p.NodeAddress; import io.bitsquare.user.Preferences; import javafx.beans.value.ChangeListener; @@ -71,14 +72,13 @@ public class DisputesView extends ActivatableViewAndModel this.arbitratorManager = arbitratorManager; this.disputeManager = disputeManager; this.keyRing = keyRing; - - this.preferences = preferences; } @Override public void initialize() { log.debug("initialize "); + tradersDisputesTab.setText(Res.get("disputesView.tab.support")); navigationListener = viewPath -> { if (viewPath.size() == 3 && viewPath.indexOf(DisputesView.class) == 1) loadView(viewPath.tip()); diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.fxml b/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.fxml index 83ffe78b9a..b0917e728c 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.fxml +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.fxml @@ -23,10 +23,10 @@ AnchorPane.topAnchor="0.0" xmlns:fx="http://javafx.com/fxml"> - - - - - + + + + + \ No newline at end of file diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.java index 688230669f..d138df5096 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.java @@ -26,6 +26,7 @@ import io.bitsquare.gui.main.funds.locked.LockedView; import io.bitsquare.gui.main.funds.reserved.ReservedView; import io.bitsquare.gui.main.funds.transactions.TransactionsView; import io.bitsquare.gui.main.funds.withdrawal.WithdrawalView; +import io.bitsquare.locale.Res; import javafx.beans.value.ChangeListener; import javafx.fxml.FXML; import javafx.scene.control.Tab; @@ -54,6 +55,12 @@ public class FundsView extends ActivatableViewAndModel { @Override public void initialize() { + depositTab.setText(Res.get("funds.tab.deposit")); + withdrawalTab.setText(Res.get("funds.tab.withdrawal")); + reservedTab.setText(Res.get("funds.tab.reserved")); + lockedTab.setText(Res.get("funds.tab.locked")); + transactionsTab.setText(Res.get("funds.tab.transactions")); + navigationListener = viewPath -> { if (viewPath.size() == 3 && viewPath.indexOf(FundsView.class) == 1) loadView(viewPath.tip()); diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.fxml b/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.fxml index c766cc9cfe..fca26192ff 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.fxml +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.fxml @@ -28,11 +28,11 @@ - - - - - + + + + + diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.java index bf5a7db43b..0d844b1879 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.java @@ -36,6 +36,7 @@ import io.bitsquare.gui.main.overlays.windows.QRCodeWindow; import io.bitsquare.gui.util.BSFormatter; import io.bitsquare.gui.util.GUIUtil; import io.bitsquare.gui.util.Layout; +import io.bitsquare.locale.Res; import io.bitsquare.user.Preferences; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; @@ -74,7 +75,7 @@ public class DepositView extends ActivatableView { @FXML TableView tableView; @FXML - TableColumn selectColumn, addressColumn, balanceColumn, confidenceColumn, usageColumn; + TableColumn selectColumn, addressColumn, balanceColumn, confirmationsColumn, usageColumn; private ImageView qrCodeImageView; private AddressTextField addressTextField; private Button generateNewAddressButton; @@ -113,6 +114,12 @@ public class DepositView extends ActivatableView { @Override public void initialize() { + selectColumn.setText(Res.get("shared.select")); + addressColumn.setText(Res.get("shared.address")); + balanceColumn.setText(Res.get("shared.balanceWithCur")); + confirmationsColumn.setText(Res.get("shared.confirmations")); + usageColumn.setText(Res.get("shared.usage")); + // trigger creation of at least 1 savings address walletService.getOrCreateAddressEntry(AddressEntry.Context.AVAILABLE); @@ -131,7 +138,7 @@ public class DepositView extends ActivatableView { addressColumn.setComparator((o1, o2) -> o1.getAddressString().compareTo(o2.getAddressString())); balanceColumn.setComparator((o1, o2) -> o1.getBalanceAsCoin().compareTo(o2.getBalanceAsCoin())); - confidenceColumn.setComparator((o1, o2) -> Double.valueOf(o1.getTxConfidenceIndicator().getProgress()) + confirmationsColumn.setComparator((o1, o2) -> Double.valueOf(o1.getTxConfidenceIndicator().getProgress()) .compareTo(o2.getTxConfidenceIndicator().getProgress())); usageColumn.setComparator((a, b) -> (a.getNumTxOutputs() < b.getNumTxOutputs()) ? -1 : ((a.getNumTxOutputs() == b.getNumTxOutputs()) ? 0 : 1)); tableView.getSortOrder().add(usageColumn); @@ -431,9 +438,9 @@ public class DepositView extends ActivatableView { private void setConfidenceColumnCellFactory() { - confidenceColumn.setCellValueFactory((addressListItem) -> + confirmationsColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue())); - confidenceColumn.setCellFactory( + confirmationsColumn.setCellFactory( new Callback, TableCell>() { diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/locked/LockedView.fxml b/gui/src/main/java/io/bitsquare/gui/main/funds/locked/LockedView.fxml index cd5c41dce4..19f9b9c1c7 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/locked/LockedView.fxml +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/locked/LockedView.fxml @@ -28,10 +28,10 @@ - - - - + + + + diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/locked/LockedView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/locked/LockedView.java index 7627b87078..d82a941fc2 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/locked/LockedView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/locked/LockedView.java @@ -29,6 +29,7 @@ import io.bitsquare.gui.main.overlays.windows.OfferDetailsWindow; import io.bitsquare.gui.main.overlays.windows.TradeDetailsWindow; import io.bitsquare.gui.util.BSFormatter; import io.bitsquare.gui.util.GUIUtil; +import io.bitsquare.locale.Res; import io.bitsquare.trade.Tradable; import io.bitsquare.trade.Trade; import io.bitsquare.trade.TradeManager; @@ -56,7 +57,7 @@ public class LockedView extends ActivatableView { @FXML TableView tableView; @FXML - TableColumn dateColumn, detailsColumn, addressColumn, balanceColumn, confidenceColumn; + TableColumn dateColumn, detailsColumn, addressColumn, balanceColumn; private final BtcWalletService walletService; private final TradeManager tradeManager; @@ -90,6 +91,11 @@ public class LockedView extends ActivatableView { @Override public void initialize() { + dateColumn.setText(Res.get("shared.dateTime")); + detailsColumn.setText(Res.get("shared.details")); + addressColumn.setText(Res.get("shared.address")); + balanceColumn.setText(Res.get("shared.balanceWithCur", "BTC")); + tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY); tableView.setPlaceholder(new Label("No funds are locked in trades")); diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/reserved/ReservedView.fxml b/gui/src/main/java/io/bitsquare/gui/main/funds/reserved/ReservedView.fxml index 9856d3c075..60098e4f61 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/reserved/ReservedView.fxml +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/reserved/ReservedView.fxml @@ -28,10 +28,10 @@ - - - - + + + + diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/reserved/ReservedView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/reserved/ReservedView.java index 4c0a4ea02e..47583e4dbb 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/reserved/ReservedView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/reserved/ReservedView.java @@ -29,6 +29,7 @@ import io.bitsquare.gui.main.overlays.windows.OfferDetailsWindow; import io.bitsquare.gui.main.overlays.windows.TradeDetailsWindow; import io.bitsquare.gui.util.BSFormatter; import io.bitsquare.gui.util.GUIUtil; +import io.bitsquare.locale.Res; import io.bitsquare.trade.Tradable; import io.bitsquare.trade.Trade; import io.bitsquare.trade.TradeManager; @@ -56,7 +57,7 @@ public class ReservedView extends ActivatableView { @FXML TableView tableView; @FXML - TableColumn dateColumn, detailsColumn, addressColumn, balanceColumn, confidenceColumn; + TableColumn dateColumn, detailsColumn, addressColumn, balanceColumn; private final BtcWalletService walletService; private final TradeManager tradeManager; @@ -90,6 +91,11 @@ public class ReservedView extends ActivatableView { @Override public void initialize() { + dateColumn.setText(Res.get("shared.dateTime")); + detailsColumn.setText(Res.get("shared.details")); + addressColumn.setText(Res.get("shared.address")); + balanceColumn.setText(Res.get("shared.balanceWithCur", "BTC")); + tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY); tableView.setPlaceholder(new Label("No funds are reserved in open offers")); diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsView.fxml b/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsView.fxml index 4fd7256fa4..01383c5a6d 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsView.fxml +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsView.fxml @@ -27,14 +27,13 @@ - - - - - - - + + + + + + +