Skip to content

Commit

Permalink
#1106: Add a tooltip message explaining why group selection is not av…
Browse files Browse the repository at this point in the history
…ailable
  • Loading branch information
svk31 committed Jun 24, 2018
1 parent 493ed7a commit 6bf58b5
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 24 deletions.
5 changes: 3 additions & 2 deletions app/assets/locales/locale-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@
"feed_price": "Feed Price",
"filter": "Filter...",
"flip": "Flip",
"group_order_limit": "Gruppe",
"hide": "Hide",
"highest_bid": "Höchstes Bid",
"history": "Marktverlauf",
Expand Down Expand Up @@ -577,8 +578,7 @@
"volume_24": "24h-Volumen",
"your_price": "Ihr Call-Preis",
"zoom": "Zoom",
"zoom_all": "All",
"group_order_limit": "Gruppe"
"zoom_all": "All"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1532,6 +1532,7 @@
"The owner of %(asset)s charges a market fee of %(percent)s%% for buy orders. This fee will be subtracted from the amount you receive when your order fills, it is not paid when placing an order.",
"memo_tip":
"You may include any message in the memo field. Memos are optional but generally required for transfers to exchanges.",
"no_groups_available": "No groupings available using this API server",
"no_price":
"There's no recent price available for this asset that can be used to estimate its value.",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@
"feed_price": "Feed Price",
"filter": "Filter...",
"flip": "Flip",
"group_order_limit": "Group",
"hide": "Hide",
"highest_bid": "Highest bid",
"history": "Market trades",
Expand Down Expand Up @@ -573,8 +574,7 @@
"volume_24": "24hr Volume",
"your_price": "Your Call Price",
"zoom": "Zoom",
"zoom_all": "All",
"group_order_limit": "Group"
"zoom_all": "All"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1530,6 +1530,7 @@
"The owner of %(asset)s charges a market fee of %(percent)s%% for buy orders. This fee will be subtracted from the amount you receive when your order fills, it is not paid when placing an order.",
"memo_tip":
"You may include any message in the memo field. Memos are optional but generally required for transfers to exchanges.",
"no_groups_available": "No groupings available using this API server",
"no_price":
"There's no recent price available for this asset that can be used to estimate its value.",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@
"feed_price": "Feed Price",
"filter": "Filter...",
"flip": "Flip",
"group_order_limit": "Grupo",
"hide": "Ocultar",
"highest_bid": "Puja más alta",
"history": "Trades del mercado",
Expand Down Expand Up @@ -585,8 +586,7 @@
"volume_24": "24hr volumen",
"your_price": "Your Call Price",
"zoom": "Zoom",
"zoom_all": "Todas",
"group_order_limit": "Grupo"
"zoom_all": "Todas"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1559,6 +1559,7 @@
"El proprietario de %(asset)s cobra una comisiòn de mercado de %(percent)s%% para pedidos de compra. Esta comisìòn se deducirá de la cantidad que reciba cuando su pedido se ejecuta, no se paga al hacer un pedido.",
"memo_tip":
"En el campo notas (memo) puede incluir cualquier mensaje. Las notas son opcionales pero generalmente se requieren para transferencias a intercambios.",
"no_groups_available": "No groupings available using this API server",
"no_price":
"No hay un precio reciente disponible para este activo que pueda usarse para estimar su valor.",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@
"feed_price": "Feed Price",
"filter": "Filter...",
"flip": "Flip",
"group_order_limit": "Groupe",
"hide": "Hide",
"highest_bid": "Demande le plus haut",
"history": "Market trades",
Expand Down Expand Up @@ -573,8 +574,7 @@
"volume_24": "24hr Volume",
"your_price": "Your Call Price",
"zoom": "Zoom",
"zoom_all": "All",
"group_order_limit": "Groupe"
"zoom_all": "All"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1529,6 +1529,7 @@
"The owner of %(asset)s charges a market fee of %(percent)s%% for buy orders. This fee will be subtracted from the amount you receive when your order fills, it is not paid when placing an order.",
"memo_tip":
"You may include any message in the memo field. Memos are optional but generally required for transfers to exchanges.",
"no_groups_available": "No groupings available using this API server",
"no_price":
"There's no recent price available for this asset that can be used to estimate its value.",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@
"feed_price": "Feed Price",
"filter": "Filter...",
"flip": "Flip",
"group_order_limit": "Gruppo",
"hide": "Nascondi",
"highest_bid": "Domanda (bid) più alta",
"history": "Storico del mercato",
Expand Down Expand Up @@ -583,8 +584,7 @@
"volume_24": "Volume 24h",
"your_price": "Il tuo Call Price",
"zoom": "Zoom",
"zoom_all": "Tutto",
"group_order_limit": "Gruppo"
"zoom_all": "Tutto"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1554,6 +1554,7 @@
"Il proprietario di %(asset)s addebita una commissione di mercato del %(percent)s%% per gli ordini di acquisto. Questa commissione sarà dedotta dalla quantità che ricevi quando l'ordine è eseguito, e non è pagata quando l'ordine viene creato.",
"memo_tip":
"Puoi includere qualsiasi messaggio nel campo 'memo'. Il memo è facoltativo, ma in genere richiesto per i trasferimenti verso un exchange.",
"no_groups_available": "No groupings available using this API server",
"no_price":
"Non c'è nessun prezzo disponibile per questo asset che possa essere usato per stimarne il valore.",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@
"feed_price": "フィード価格",
"filter": "フィルター",
"flip": "ひっくり返す",
"group_order_limit": "グループ",
"hide": "非表示",
"highest_bid": "最高ビッド価格",
"history": "マーケット履歴",
Expand Down Expand Up @@ -573,8 +574,7 @@
"volume_24": "24時間出来高",
"your_price": "あなたのコール価格",
"zoom": "拡大",
"zoom_all": "すべて",
"group_order_limit": "グループ"
"zoom_all": "すべて"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1530,6 +1530,7 @@
"%(asset)sのオーナーは買い注文に対して%(percent)s%%の取引手数料を課しています。この手数料は注文が約定したときに、受取額から減算されます。注文を出すときにはかかりません。",
"memo_tip":
"任意のメッセージをメモ欄に含めることができます。メモは任意ですが、一般に取引所への転送には必要です。",
"no_groups_available": "No groupings available using this API server",
"no_price":
"このアセットには推定価格を算出するために使用可能な最新の価格がありません。",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@
"feed_price": "Feed Price",
"filter": "Filter...",
"flip": "Flip",
"group_order_limit": "그룹",
"hide": "Hide",
"highest_bid": "매수 호가",
"history": "Market trades",
Expand Down Expand Up @@ -573,8 +574,7 @@
"volume_24": "24hr Volume",
"your_price": "내 콜 가격",
"zoom": "Zoom",
"zoom_all": "All",
"group_order_limit": "그룹"
"zoom_all": "All"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1524,6 +1524,7 @@
"The owner of %(asset)s charges a market fee of %(percent)s%% for buy orders. This fee will be subtracted from the amount you receive when your order fills, it is not paid when placing an order.",
"memo_tip":
"You may include any message in the memo field. Memos are optional but generally required for transfers to exchanges.",
"no_groups_available": "No groupings available using this API server",
"no_price":
"There's no recent price available for this asset that can be used to estimate its value.",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@
"feed_price": "Котировка",
"filter": "Фильтр...",
"flip": "Инвертировать",
"group_order_limit": "группа",
"hide": "Скрыть",
"highest_bid": "Наивысшая ставка",
"history": "Рыночные сделки",
Expand Down Expand Up @@ -586,8 +587,7 @@
"volume_24": "Суточный объем",
"your_price": "Ваша Цена досрочного погашения",
"zoom": "Увеличить",
"zoom_all": "Все",
"group_order_limit": "группа"
"zoom_all": "Все"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1560,6 +1560,7 @@
"Владелец %(asset)s назначил для ордеров на покупку рыночную комиссию в размере %(percent)s%%. Эта комиссия будет вычтена из суммы, полученной Вами при выполнении ордера, в момент же размещения ордера она не взимается.",
"memo_tip":
"В поле примечания Вы можете включить любое сообщение. Примечание необязательно, но обычно необходимо для перевода на биржи.",
"no_groups_available": "No groupings available using this API server",
"no_price":
"Для этого актива нет доступной недавней цены, которая может быть использована для оценки его стоимости.",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@
"feed_price": "Feed Price",
"filter": "Filter...",
"flip": "Flip",
"group_order_limit": "grup",
"hide": "Gizle",
"highest_bid": "En yüksek",
"history": "Son İşlemler",
Expand Down Expand Up @@ -579,8 +580,7 @@
"volume_24": "24 Saat",
"your_price": "Sizin Çağrı Fiyatınız",
"zoom": "Yakınlaştır",
"zoom_all": "Tümü",
"group_order_limit": "grup"
"zoom_all": "Tümü"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1542,6 +1542,7 @@
"The owner of %(asset)s charges a market fee of %(percent)s%% for buy orders. This fee will be subtracted from the amount you receive when your order fills, it is not paid when placing an order.",
"memo_tip":
"You may include any message in the memo field. Memos are optional but generally required for transfers to exchanges.",
"no_groups_available": "No groupings available using this API server",
"no_price":
"Bu dijital varlığın değerini tespit etmek için piyasada yeterli veri bulunmamaktadır.",
"over_limit":
Expand Down
5 changes: 3 additions & 2 deletions app/assets/locales/locale-zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@
"feed_price": "Feed Price",
"filter": "Filter...",
"flip": "Flip",
"group_order_limit": "分组",
"hide": "隐藏",
"highest_bid": "最高买价",
"history": "交易历史",
Expand Down Expand Up @@ -556,8 +557,7 @@
"volume_24": "日成交量",
"your_price": "你的强平触发价",
"zoom": "缩放",
"zoom_all": "显示全部",
"group_order_limit": "分组"
"zoom_all": "显示全部"
},
"explorer": {
"account": {
Expand Down Expand Up @@ -1480,6 +1480,7 @@
"资产 %(asset)s 的拥有者将对所有买入订单收取 %(percent)s%% 的市场手续费。手续费将在订单成交后从成交金额中收取,下单时不会收取任何费用。",
"memo_tip":
"您可以在备注里留下任意信息。备注不是必须的,但通常将资产转账到交易所时需要填写。",
"no_groups_available": "No groupings available using this API server",
"no_price": "未找到该资产最近的成交价来评估价值",
"over_limit": "此桥接服务没有足够的资产来完成此订单。",
"propose_scam": "该提案发起人是已知的诈骗嫌疑人,请不要批准该提案!",
Expand Down
14 changes: 10 additions & 4 deletions app/components/Exchange/OrderBook.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import TransitionWrapper from "../Utility/TransitionWrapper";
import AssetName from "../Utility/AssetName";
import {StickyTable} from "react-sticky-table";
import Icon from "../Icon/Icon";
const counterpart = require("counterpart");

class OrderBookRowVertical extends React.Component {
shouldComponentUpdate(np) {
Expand Down Expand Up @@ -277,6 +278,7 @@ class GroupOrderLimitSelector extends React.Component {
}

render() {
const noGroupsAvailable = this.props.trackedGroupsConfig.length === 0;
const trackedGroupsOptionsList = this.props.trackedGroupsConfig.map(
key => (
<option value={key} key={key}>
Expand All @@ -290,6 +292,12 @@ class GroupOrderLimitSelector extends React.Component {
dir="rtl"
value={this.state.groupLimit}
onChange={this.props.handleGroupOrderLimitChange}
data-tip={
noGroupsAvailable
? counterpart.translate("tooltip.no_groups_available")
: null
}
style={noGroupsAvailable ? {cursor: "not-allowed"} : null}
>
<Translate
content="exchange.group_order_limit"
Expand Down Expand Up @@ -760,8 +768,6 @@ class OrderBook extends React.Component {
</thead>
);

const translator = require("counterpart");

return (
<div
className={classnames(
Expand All @@ -778,7 +784,7 @@ class OrderBook extends React.Component {
<div className="exchange-bordered">
<div
className="exchange-content-header ask"
data-intro={translator.translate(
data-intro={counterpart.translate(
"walkthrough.sell_orders"
)}
>
Expand Down Expand Up @@ -909,7 +915,7 @@ class OrderBook extends React.Component {
<div className="exchange-bordered">
<div
className="exchange-content-header bid"
data-intro={translator.translate(
data-intro={counterpart.translate(
"walkthrough.buy_orders"
)}
>
Expand Down

0 comments on commit 6bf58b5

Please sign in to comment.