Skip to content

Commit

Permalink
Fix #1707 - "Settle Backing Asset" Translation Issue (#1716)
Browse files Browse the repository at this point in the history
* Settle Backing Asset properly displayed
- Removes hardcoded value 'BTS'

* Prepend bit to bitAssets on Settling Tooltip

* Fix bitAsset prepend on settle tooltip

* Dynamic settle delay on settle tooltip
  • Loading branch information
startailcoon authored and svk31 committed Aug 21, 2018
1 parent 03843a8 commit 008cd33
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/assets/locales/locale-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "Propose another user to initiate a transaction",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "Settling will let you convert your holdings of %(asset)s to BTS after a delay of 24 hours, at a price equal to the feed price at that time.",
"settle": "Settling will let you convert your holdings of %(asset)s to %(backingAsset)s after a delay of %(settleDelay)s hours, at a price equal to the feed price at that time.",
"settle_price": "This is the price at which settle orders will execute.",
"show_asset": "Click here to show this asset in the main list.",
"show_block": "Click here to show block #%(block)s where this transaction occured.",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "Propose another user to initiate a transaction",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "Settling will let you convert your holdings of %(asset)s to BTS after a delay of 24 hours, at a price equal to the feed price at that time.",
"settle": "Settling will let you convert your holdings of %(asset)s to %(backingAsset)s after a delay of %(settleDelay)s hours, at a price equal to the feed price at that time.",
"settle_price": "This is the price at which settle orders will execute.",
"show_asset": "Click here to show this asset in the main list.",
"show_block": "Click here to show block #%(block)s where this transaction occurred.",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "Proponer otro usuario para iniciar una transacción",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "El settling te permitirá de convertir tus propriedades de %(asset)s en BTS después de un retraso de 24 horas, a un precio igual al precio dado en ese momento.",
"settle": "El settling te permitirá de convertir tus propriedades de %(asset)s en %(backingAsset)s después de un retraso de %(settleDelay)s horas, a un precio igual al precio dado en ese momento.",
"settle_price": "Este es el precio al que se ejecutarán los pedidos colocados.",
"show_asset": "Haga clic aquí para mostrar este activo en la lista principal.",
"show_block": "Haga clic aquí para mostrar el bloque #%(block)s donde ocurrió esta transacción.",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "Propose another user to initiate a transaction",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "Settling will let you convert your holdings of %(asset)s to BTS after a delay of 24 hours, at a price equal to the feed price at that time.",
"settle": "Settling will let you convert your holdings of %(asset)s to %(backingAsset)s after a delay of %(settleDelay)s hours, at a price equal to the feed price at that time.",
"settle_price": "This is the price at which settle orders will execute.",
"show_asset": "Click here to show this asset in the main list.",
"show_block": "Click here to show block #%(block)s where this transaction occured.",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "Propose another user to initiate a transaction",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "Il settling ti permetterà di convertire le tue disponibilità di %(asset)s in BTS dopo un'attesa di 24 ore, ad un prezzo uguale al prezzo di mercato in quel momento.",
"settle": "Il settling ti permetterà di convertire le tue disponibilità di %(asset)s in %(backingAsset)s dopo un'attesa di %(settleDelay)s ore, ad un prezzo uguale al prezzo di mercato in quel momento.",
"settle_price": "Questo è il prezzo a cui i settle order saranno eseguiti.",
"show_asset": "Clicca qui per mostrare quest'asset nella lista principale.",
"show_block": "Clicca qui per mostrare il blocco #%(block)s in cui questa transazione è avvenuta.",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "別のユーザーからトランザクションを提案する",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "精算により、保有する%(asset)sを24時間の遅延後にBTSにその時点のフィード価格で変換できます",
"settle": "精算により、保有する%(asset)sを%(settleDelay)s時間の遅延後に%(backingAsset)sにその時点のフィード価格で変換できます",
"settle_price": "これは決済注文を実行する価格です。",
"show_asset": "メインリストにこのアセットを表示するにはここをクリックしてください。",
"show_block": "この取引が発生したブロック#%(block)sを見るにはここをクリックしてください。",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "Propose another user to initiate a transaction",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "Settling will let you convert your holdings of %(asset)s to BTS after a delay of 24 hours, at a price equal to the feed price at that time.",
"settle": "Settling will let you convert your holdings of %(asset)s to %(backingAsset)s after a delay of %(settleDelay)s hours, at a price equal to the feed price at that time.",
"settle_price": "This is the price at which settle orders will execute.",
"show_asset": "Click here to show this asset in the main list.",
"show_block": "Click here to show block #%(block)s where this transaction occured.",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "Предложить другому пользователю инициировать транзакцию",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "Погашение позволит Вам обменять Ваши %(asset)s на BTS с задержкой в 24 часа по цене, равной цене котировки на момент погашения.",
"settle": "Погашение позволит Вам обменять Ваши %(asset)s на %(backingAsset)s с задержкой в %(settleDelay)s часа по цене, равной цене котировки на момент погашения.",
"settle_price": "Это цена, при которой будут исполнятся ордера на погашение.",
"show_asset": "Нажмите здесь, чтобы отобразить этот актив в основном списке.",
"show_block": "Нажмите здесь, чтобы увидеть блок #%(block)s, в котором произведена транзакция.",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "Propose another user to initiate a transaction",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "Sona erdirme işlemi dijital varlıklarınızı 24 saatlik bir gecikme ile o anki fiyat üzerinden BTS'ye dönüştürmenizi sağlar",
"settle": "Sona erdirme işlemi dijital varlıklarınızı %(settleDelay)s saatlik bir gecikme ile o anki fiyat üzerinden %(backingAsset)s'ye dönüştürmenizi sağlar",
"settle_price": "Sona erdirilen emirlerin gerçekleşeceği fiyat",
"show_asset": "Bu dijital varlığı ana listede göstermek için tıklayın.",
"show_block": "İşlemin gerçekleşmiş olduğu #%(block)s numaralı bloğa bakmak için buraya tıklayın.",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/locales/locale-zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@
"propose_tip": "提议另一个用户发起交易",
"proxy_remove": "You have a proxy set, to remove it simply clear this input field",
"proxy_search": "Search for an account to be used as your proxy for voting",
"settle": "使用清算功能,你可以在24小时后以当时的清算价将你的 %(asset)s 资产转换为对应抵押资产",
"settle": "Settling will let you convert your holdings of %(asset)s to %(backingAsset)s after a delay of %(settleDelay)s hours, at a price equal to the feed price at that time.",
"settle_price": "清算单执行时将使用的价格",
"show_asset": "在主列表中显示资产",
"show_block": "显示收录交易的区块 #%(block)s 的信息",
Expand Down
12 changes: 11 additions & 1 deletion app/components/Account/AccountPortfolioList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@ class AccountPortfolioList extends React.Component {
asset
);

{/* Asset and Backing Asset Prefixes */}
let options = asset && asset.has("bitasset") ? asset.getIn(["bitasset", "options"]).toJS() : null;
let backingAsset = options && options.short_backing_asset ? ChainStore.getAsset(options.short_backing_asset) : null;
let {isBitAsset: isAssetBitAsset} = utils.replaceName(asset);
let {isBitAsset: isBackingBitAsset} = utils.replaceName(backingAsset);

let preferredAsset = ChainStore.getAsset(preferredUnit);
this.valueRefs[asset.get("symbol")] =
hasBalance && !!preferredAsset
Expand Down Expand Up @@ -577,7 +583,11 @@ class AccountPortfolioList extends React.Component {
data-place="bottom"
data-tip={counterpart.translate(
"tooltip.settle",
{asset: symbol}
{
asset: isAssetBitAsset ? "bit" + symbol : symbol,
backingAsset: isBackingBitAsset ? "bit" + backingAsset.get("symbol") : backingAsset.get("symbol"),
settleDelay: options.force_settlement_delay_sec / 3600
}
)}
>
{settleLink}
Expand Down

0 comments on commit 008cd33

Please sign in to comment.