Skip to content

Commit

Permalink
Merge pull request #1360 from ripcurlx/shorten-call-to-action-buttons
Browse files Browse the repository at this point in the history
Shorten labels in call-to-action buttons in offer book
  • Loading branch information
ManfredKarrer authored Feb 19, 2018
2 parents e1fffeb + 04e5cef commit 649c14d
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 71 deletions.
12 changes: 6 additions & 6 deletions common/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ shared.sell=sell
shared.buying=buying
shared.selling=selling
shared.P2P=P2P
shared.offer=offer
shared.offers=offers
shared.oneOffer=offer
shared.multipleOffers=offers
shared.Offer=Offer
shared.openOffers=open offers
shared.trade=trade
Expand Down Expand Up @@ -262,10 +262,10 @@ market.tabs.trades=Trades

# OfferBookChartView
market.offerBook.chart.title=Offer book for {0}
market.offerBook.leftButtonAltcoin=I want to buy {0} (sell {1})
market.offerBook.rightButtonAltcoin=I want to sell {0} (buy {1})
market.offerBook.leftButtonFiat=I want to buy {0} with {1}
market.offerBook.rightButtonFiat=I want to sell {0} for {1}
market.offerBook.buyAltcoin=Buy {0} (sell {1})
market.offerBook.sellAltcoin=Sell {0} (buy {1})
market.offerBook.buyWithFiat=Buy {0}
market.offerBook.sellWithFiat=Sell {0}
market.offerBook.sellOffersHeaderLabel=Sell {0} to
market.offerBook.buyOffersHeaderLabel=Buy {0} from
market.offerBook.buy=I want to buy bitcoin
Expand Down
11 changes: 6 additions & 5 deletions common/src/main/resources/i18n/displayStrings_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ shared.sell=verkaufen
shared.buying=kaufe
shared.selling=verkaufe
shared.P2P=P2P
shared.offers=Angebote
shared.oneOffer=Angebot
shared.multipleOffers=Angebote
shared.Offer=Angebot
shared.openOffers=offene Angebote
shared.trades=Händel
Expand Down Expand Up @@ -255,10 +256,10 @@ market.tabs.trades=Händel

# OfferBookChartView
market.offerBook.chart.title=Angebotsbuch für {0}
market.offerBook.leftButtonAltcoin=Ich möchte {0} kaufen ({1} verkaufen)
market.offerBook.rightButtonAltcoin=Ich möchte {0} verkaufen ({1} kaufen)
market.offerBook.leftButtonFiat=Ich möchte {0} mit {1} kaufen
market.offerBook.rightButtonFiat=Ich möchte {0} für {1} verkaufen
market.offerBook.buyAltcoin={0} kaufen ({1} verkaufen)
market.offerBook.sellAltcoin={0} verkaufen ({1} kaufen)
market.offerBook.buyWithFiat={0} kaufen
market.offerBook.sellWithFiat={0} verkaufen
market.offerBook.sellOffersHeaderLabel=Verkaufe {0} an
market.offerBook.buyOffersHeaderLabel=Kaufe {0} von
market.offerBook.buy=Ich möchte Bitcoins kaufen
Expand Down
11 changes: 6 additions & 5 deletions common/src/main/resources/i18n/displayStrings_el.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ shared.sell=πώληση
shared.buying=αγοράζοντας
shared.selling=πουλώντας
shared.P2P=P2P
shared.offers=προσφορές
shared.oneOffer=προσφορά
shared.multipleOffers=προσφορές
shared.Offer=Προσφορά
shared.openOffers=ανοιχτές προσφορές
shared.trades=συναλλαγές
Expand Down Expand Up @@ -254,10 +255,10 @@ market.tabs.trades=Συναλλαγές

# OfferBookChartView
market.offerBook.chart.title=Καθολικό προσφορών για {0}
market.offerBook.leftButtonAltcoin=Θέλω να αγοράσω {0} (πώληση {1})
market.offerBook.rightButtonAltcoin=Θέλω να πουλήσω {0} (αγορά {1})
market.offerBook.leftButtonFiat=Θέλω να αγοράσω {0} με {1}
market.offerBook.rightButtonFiat=Θέλω να πουλήσω {0} με {1}
market.offerBook.buyAltcoin=Θέλω να αγοράσω {0} (πώληση {1})
market.offerBook.sellAltcoin=Θέλω να πουλήσω {0} (αγορά {1})
market.offerBook.buyWithFiat=Αγορά {0}
market.offerBook.sellWithFiat=Πώληση {0}
market.offerBook.sellOffersHeaderLabel=Πουλήστε το {0} στο
market.offerBook.buyOffersHeaderLabel=Αγοράστε {0} από
market.offerBook.buy=Θέλω να αγοράσω bitcoin
Expand Down
11 changes: 6 additions & 5 deletions common/src/main/resources/i18n/displayStrings_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ shared.sell=vender
shared.buying=Comprando
shared.selling=Vendiendo
shared.P2P=P2P
shared.offers=ofertas
shared.oneOffer=oferta
shared.multipleOffers=ofertas
shared.Offer=Oferta
shared.openOffers=ofertas abiertas
shared.trades=Intercambios
Expand Down Expand Up @@ -254,10 +255,10 @@ market.tabs.trades=Intercambios

# OfferBookChartView
market.offerBook.chart.title=Libro de ofertas para {0}
market.offerBook.leftButtonAltcoin=Quiero comprar {0} (vender {1})
market.offerBook.rightButtonAltcoin=Quiero vender {0} (comprar {1})
market.offerBook.leftButtonFiat=Quiero comprar {0} con {1}
market.offerBook.rightButtonFiat=Quiero vender {0} por {1}
market.offerBook.buyAltcoin=Quiero comprar {0} (vender {1})
market.offerBook.sellAltcoin=Quiero vender {0} (comprar {1})
market.offerBook.buyWithFiat=Comprar {0}
market.offerBook.sellWithFiat=Vender {0}
market.offerBook.sellOffersHeaderLabel=Vender {0} a
market.offerBook.buyOffersHeaderLabel=Compre {0} desde
market.offerBook.buy=Quiero comprar bitcoin
Expand Down
11 changes: 6 additions & 5 deletions common/src/main/resources/i18n/displayStrings_hu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ shared.sell=árulj
shared.buying=vásárlás
shared.selling=eladás
shared.P2P=P2P
shared.offers=ajánlatok
shared.oneOffer=ajánlat
shared.multipleOffers=ajánlatok
shared.Offer=Ajánlat
shared.openOffers=nyitott ajánlatok
shared.trades=tranzakciók
Expand Down Expand Up @@ -254,10 +255,10 @@ market.tabs.trades=Tranzakciók

# OfferBookChartView
market.offerBook.chart.title=Ajánlati könyv {0}-nak:
market.offerBook.leftButtonAltcoin=Vásárolni szeretnék {0} (eladni való {1})
market.offerBook.rightButtonAltcoin=Eladni szeretnék {0} ({1} vétel)
market.offerBook.leftButtonFiat=Vásárolni szeretnék {0}-ot {1}-ért
market.offerBook.rightButtonFiat=Eladni szeretnék {0} cserébe {1}-ért
market.offerBook.buyAltcoin=Vásárolni szeretnék {0} (eladni való {1})
market.offerBook.sellAltcoin=Eladni szeretnék {0} ({1} vétel)
market.offerBook.buyWithFiat=Vásárlás {0}
market.offerBook.sellWithFiat=Eladás {0}
market.offerBook.sellOffersHeaderLabel={0} eladni
market.offerBook.buyOffersHeaderLabel=Vásároljon {0} -tól
market.offerBook.buy=Vásárolni szeretnék bitcoinot
Expand Down
11 changes: 6 additions & 5 deletions common/src/main/resources/i18n/displayStrings_pt.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ shared.sell=vender
shared.buying=comprando
shared.selling=vendendo
shared.P2P=P2P
shared.offers=ofertas
shared.oneOffer=oferta
shared.multipleOffers=ofertas
shared.Offer=Oferta
shared.openOffers=abrir ofertas
shared.trades=negociações
Expand Down Expand Up @@ -254,10 +255,10 @@ market.tabs.trades=Negociações

# OfferBookChartView
market.offerBook.chart.title=Livro de ofertas para {0}
market.offerBook.leftButtonAltcoin=Eu quero comprar {0} (vender {1})
market.offerBook.rightButtonAltcoin=Eu quero vender {0} (comprar {1})
market.offerBook.leftButtonFiat=Eu quero comprar {0} com {1}
market.offerBook.rightButtonFiat=Eu quero vender {0} por {1}
market.offerBook.buyAltcoin=Eu quero comprar {0} (vender {1})
market.offerBook.sellAltcoin=Eu quero vender {0} (comprar {1})
market.offerBook.buyWithFiat=Compre {0}
market.offerBook.sellWithFiat=Vender {0}
market.offerBook.sellOffersHeaderLabel=Vender {0} para
market.offerBook.buyOffersHeaderLabel=Compre {0} de
market.offerBook.buy=Eu quero comprar bitcoin
Expand Down
12 changes: 6 additions & 6 deletions common/src/main/resources/i18n/displayStrings_ro.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ shared.sell=vinde
shared.buying=cumpărând
shared.selling=vânzând
shared.P2P=P2P
shared.offer=oferă
shared.offers=oferte
shared.oneOffer=ofertă
shared.multipleOffers=oferte
shared.Offer=Ofertă
shared.openOffers=oferte deschise
shared.trade=tranzacționează
Expand Down Expand Up @@ -260,10 +260,10 @@ market.tabs.trades=Tranzacții

# OfferBookChartView
market.offerBook.chart.title=Cartea de oferte pentru {0}
market.offerBook.leftButtonAltcoin=Doresc să cumpăr {0} (vând {1})
market.offerBook.rightButtonAltcoin=Doresc să vând {0} (cumpăr {1})
market.offerBook.leftButtonFiat=Doresc să cumpăr {0} cu {1}
market.offerBook.rightButtonFiat=Doresc să vând {0} contra {1}
market.offerBook.buyAltcoin=Doresc să cumpăr {0} (vând {1})
market.offerBook.sellAltcoin=Doresc să vând {0} (cumpăr {1})
market.offerBook.buyWithFiat=Cumpără {0}
market.offerBook.sellWithFiat=Vindem {0}
market.offerBook.sellOffersHeaderLabel=Vindem {0} la
market.offerBook.buyOffersHeaderLabel=Cumpărați {0} de la
market.offerBook.buy=Doresc să cumpăr bitcoin
Expand Down
11 changes: 6 additions & 5 deletions common/src/main/resources/i18n/displayStrings_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ shared.sell=продать
shared.buying=покупка
shared.selling=продажа
shared.P2P=P2P
shared.offers=предложения
shared.oneOffer=предложение
shared.multipleOffers=предложения
shared.Offer=Предложение
shared.openOffers=открыть предложения
shared.trades=сделок
Expand Down Expand Up @@ -254,10 +255,10 @@ market.tabs.trades=Сделки

# OfferBookChartView
market.offerBook.chart.title=Книга предложений на {0}
market.offerBook.leftButtonAltcoin=Я хочу купить {0} (продать {1})
market.offerBook.rightButtonAltcoin=Я хочу продать {0} (купить {1})
market.offerBook.leftButtonFiat=Я хочу купить {0} за {1}
market.offerBook.rightButtonFiat=Я хочу продать {0} за {1}
market.offerBook.buyAltcoin=Я хочу купить {0} (продать {1})
market.offerBook.sellAltcoin=Я хочу продать {0} (купить {1})
market.offerBook.buyWithFiat=Купить {0}
market.offerBook.sellWithFiat=Продать {0}
market.offerBook.sellOffersHeaderLabel=Продать {0} до
market.offerBook.buyOffersHeaderLabel=Купите {0} из
market.offerBook.buy=Я хочу купить Биткоин
Expand Down
11 changes: 6 additions & 5 deletions common/src/main/resources/i18n/displayStrings_sr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ shared.sell=prodaj
shared.buying=kupujem
shared.selling=prodajem
shared.P2P=P2P
shared.offers=ponude
shared.oneOffer=ponuda
shared.multipleOffers=ponude
shared.Offer=Ponuda
shared.openOffers=otvorene ponude
shared.trades=trgovine
Expand Down Expand Up @@ -254,10 +255,10 @@ market.tabs.trades=Trgovine

# OfferBookChartView
market.offerBook.chart.title=Knjiga ponuda za {0}
market.offerBook.leftButtonAltcoin=Želim da kupim {0} (prodaja {1})
market.offerBook.rightButtonAltcoin=Želim da prodam {0} (kupovina {1})
market.offerBook.leftButtonFiat=Želim da kupim {0} sa {1}
market.offerBook.rightButtonFiat=Želim da prodam {0} za {1}
market.offerBook.buyAltcoin=Želim da kupim {0} (prodaja {1})
market.offerBook.sellAltcoin=Želim da prodam {0} (kupovina {1})
market.offerBook.buyWithFiat=Kupi {0}
market.offerBook.sellWithFiat=Prodaj {0}
market.offerBook.sellOffersHeaderLabel=Prodaj {0} u
market.offerBook.buyOffersHeaderLabel=Kupite {0} iz
market.offerBook.buy=Želim da kupim bitkoin
Expand Down
11 changes: 6 additions & 5 deletions common/src/main/resources/i18n/displayStrings_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ shared.sell=卖
shared.buying=买入
shared.selling=卖出
shared.P2P=P2P
shared.offers=委托
shared.oneOffer=委托
shared.multipleOffers=委托
shared.Offer=委托
shared.openOffers=发布中委托
shared.trades=交易
Expand Down Expand Up @@ -254,10 +255,10 @@ market.tabs.trades=行情图

# OfferBookChartView
market.offerBook.chart.title={0} 的委托列表
market.offerBook.leftButtonAltcoin=我想要买入 {0} (卖出 {1})
market.offerBook.rightButtonAltcoin=我想要卖出 {0} (买入 {1})
market.offerBook.leftButtonFiat=我想要用 {1} 买入 {0}
market.offerBook.rightButtonFiat=我想要用 {1} 卖出 {0}
market.offerBook.buyAltcoin=我想要买入 {0} (卖出 {1})
market.offerBook.sellAltcoin=我想要卖出 {0} (买入 {1})
market.offerBook.buyWithFiat=购买{0}
market.offerBook.sellWithFiat=出售 {0}
market.offerBook.sellOffersHeaderLabel=出售 {0} 到
market.offerBook.buyOffersHeaderLabel=从中购买 {0}
market.offerBook.buy=我想要买入比特币
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ shared.sellingCurrency=Vendre {0} (Acheter des bitcoins)
shared.buying=acheter
shared.selling=vendre
shared.P2P=De pair à pair
shared.offers=Offres
shared.oneOffer=offre
shared.multipleOffers=offres
shared.Offer=Offre
shared.openOffers=Ouvrir les offres
shared.openTrades=Opérations ouvertes
Expand Down Expand Up @@ -430,10 +431,10 @@ market.tabs.offerBook=Livre d'offre
market.tabs.spread=Distribution
market.tabs.trades=Échanges
market.offerBook.chart.title=Livre d'offre pour {0}
market.offerBook.leftButtonAltcoin=Je veux acheter {0} (vendre {1})
market.offerBook.rightButtonAltcoin=Je veux vendre {0} (buy {1})
market.offerBook.leftButtonFiat=Je veux acheter {0} avec {1}
market.offerBook.rightButtonFiat=Je veux vendre {0} pour {1}
market.offerBook.buyAltcoin=Je veux acheter {0} (vendre {1})
market.offerBook.sellAltcoin=Je veux vendre {0} (buy {1})
market.offerBook.buyWithFiat=Acheter {0}
market.offerBook.sellWithFiat=Vendre {0}
market.offerBook.sellOffersHeaderLabel=Vendre {0} à
market.offerBook.buyOffersHeaderLabel=Acheter {0} à partir de
market.offerBook.buy=Je veux acheter du bitcoin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public void initialize() {

currencyComboBox = new ComboBox<>();
currencyComboBox.setPromptText(Res.get("list.currency.select"));
currencyComboBox.setConverter(GUIUtil.getCurrencyListItemConverter(Res.get("shared.offer"),
Res.get("shared.offers"),
currencyComboBox.setConverter(GUIUtil.getCurrencyListItemConverter(Res.get("shared.oneOffer"),
Res.get("shared.multipleOffers"),
model.preferences));

Label currencyLabel = new AutoTooltipLabel(Res.getWithCol("shared.currency"));
Expand Down Expand Up @@ -208,10 +208,10 @@ public Number fromString(String string) {
}

leftHeaderLabel.setText(Res.get("market.offerBook.buyOffersHeaderLabel", code));
leftButton.setText(Res.get("market.offerBook.leftButtonAltcoin", code, Res.getBaseCurrencyCode()));
leftButton.setText(Res.get("market.offerBook.buyAltcoin", code, Res.getBaseCurrencyCode()));

rightHeaderLabel.setText(Res.get("market.offerBook.sellOffersHeaderLabel", code));
rightButton.setText(Res.get("market.offerBook.rightButtonAltcoin", code, Res.getBaseCurrencyCode()));
rightButton.setText(Res.get("market.offerBook.sellAltcoin", code, Res.getBaseCurrencyCode()));

priceColumnLabel.set(Res.get("shared.priceWithCur", Res.getBaseCurrencyCode()));
} else {
Expand All @@ -221,10 +221,10 @@ public Number fromString(String string) {
}

leftHeaderLabel.setText(Res.get("market.offerBook.sellOffersHeaderLabel", Res.getBaseCurrencyCode()));
leftButton.setText(Res.get("market.offerBook.rightButtonFiat", Res.getBaseCurrencyCode(), code));
leftButton.setText(Res.get("market.offerBook.sellWithFiat", Res.getBaseCurrencyCode(), code));

rightHeaderLabel.setText(Res.get("market.offerBook.buyOffersHeaderLabel", Res.getBaseCurrencyCode()));
rightButton.setText(Res.get("market.offerBook.leftButtonFiat", Res.getBaseCurrencyCode(), code));
rightButton.setText(Res.get("market.offerBook.buyWithFiat", Res.getBaseCurrencyCode(), code));

priceColumnLabel.set(Res.get("shared.priceWithCur", code));
}
Expand Down Expand Up @@ -443,7 +443,7 @@ public void updateItem(final OfferListItem offerListItem, boolean empty) {
tableView.getColumns().add(priceColumn);

tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
Label placeholder = new AutoTooltipLabel(Res.get("table.placeholder.noItems", Res.get("shared.offers")));
Label placeholder = new AutoTooltipLabel(Res.get("table.placeholder.noItems", Res.get("shared.multipleOffers")));
placeholder.setWrapText(true);
tableView.setPlaceholder(placeholder);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public PaymentMethod fromString(String s) {

tableView.getSortOrder().add(priceColumn);
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
Label placeholder = new AutoTooltipLabel(Res.get("table.placeholder.noItems", Res.get("shared.offers")));
Label placeholder = new AutoTooltipLabel(Res.get("table.placeholder.noItems", Res.get("shared.multipleOffers")));
placeholder.setWrapText(true);
tableView.setPlaceholder(placeholder);

Expand Down Expand Up @@ -222,8 +222,8 @@ public PaymentMethod fromString(String s) {
protected void activate() {
currencyComboBox.setItems(model.getTradeCurrencies());
currencyComboBox.setConverter(GUIUtil.getTradeCurrencyConverter(
Res.get("shared.offer"),
Res.get("shared.offers"),
Res.get("shared.oneOffer"),
Res.get("shared.multipleOffers"),
(model.getDirection() == OfferPayload.Direction.BUY ? model.getSellOfferCounts() : model.getBuyOfferCounts())));
currencyComboBox.setVisibleRowCount(Math.min(currencyComboBox.getItems().size(), 25));
currencyComboBox.setOnAction(e -> model.onSetTradeCurrency(currencyComboBox.getSelectionModel().getSelectedItem()));
Expand Down
8 changes: 4 additions & 4 deletions gui/src/test/java/io/bisq/gui/util/GUIUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public void testTradeCurrencyConverter() {
put("EUR", 10);
}};
StringConverter<TradeCurrency> tradeCurrencyConverter = GUIUtil.getTradeCurrencyConverter(
Res.get("shared.offer"),
Res.get("shared.offers"),
Res.get("shared.oneOffer"),
Res.get("shared.multipleOffers"),
offerCounts
);

Expand All @@ -45,8 +45,8 @@ public void testTradeCurrencyConverter() {
public void testCurrencyListWithOffersConverter() {
Res.setBaseCurrencyCode("BTC");
Res.setBaseCurrencyName("Bitcoin");
StringConverter<CurrencyListItem> currencyListItemConverter = GUIUtil.getCurrencyListItemConverter(Res.get("shared.offer"),
Res.get("shared.offers"),
StringConverter<CurrencyListItem> currencyListItemConverter = GUIUtil.getCurrencyListItemConverter(Res.get("shared.oneOffer"),
Res.get("shared.multipleOffers"),
empty);

assertEquals("✦ BTC (BTC) - 10 offers", currencyListItemConverter.toString(make(bitcoinItem.but(with(numberOfTrades,10)))));
Expand Down

0 comments on commit 649c14d

Please sign in to comment.