Skip to content

Commit

Permalink
Merge pull request #573 from Adamant-im/fix/bug-i18n-issue-on-transac…
Browse files Browse the repository at this point in the history
…tion-page

Fix/bug i18n issue on transaction page
  • Loading branch information
bludnic authored Jan 10, 2024
2 parents d72268b + b66b815 commit b886c78
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
},
"title": "English",
"transaction": {
"addresses": "no address | {n} address | {n} addresses",
"addresses": " no address | and {n} more address | and {n} more addresses",
"amount": "Amount",
"currentVal": "Current value",
"valueTimeTxn": "Value at Time of Txn",
Expand Down
4 changes: 2 additions & 2 deletions src/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
},
"title": "Русский",
"transaction": {
"addresses": "| {n} адрес | {n} адреса | {n} адресов",
"addresses": " и еще {n} адресов | и еще {n} адрес | и еще {n} адреса | и еще {n} адресов",
"amount": "Количество",
"currentVal": "Текущая стоимость",
"valueTimeTxn": "Cтоимость во время Txn",
Expand All @@ -256,7 +256,7 @@
"date": "Дата",
"explorer": "Посмотреть в Explorer'е",
"me": "Я",
"me_and_addresses": "| Я и еще {n} адрес | Я и еще {n} адреса | Я и еще {n} адресов",
"me_and_addresses": "Я и еще {n} адресов | Я и еще {n} адрес | Я и еще {n} адреса | Я и еще {n} адресов",
"no_transactions": "Транзакций еще не было",
"recipient": "Получатель",
"sender": "Отправитель",
Expand Down
10 changes: 8 additions & 2 deletions src/views/Transactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,14 @@ export default {
formatAddresses(addresses) {
const count = addresses.length
return addresses.includes(this.$store.state[this.crypto.toLowerCase()].address)
? `${this.$tc('transaction.me_and_addresses', count - 1)}`
: this.$tc('transaction.addresses', count)
? `${
this.$tc('transaction.me') +
' (' +
this.$store.state[this.cryptoModule].address +
') ' +
this.$tc('transaction.addresses', count - 1)
}`
: addresses[0] + ' ' + this.$tc('transaction.addresses', count - 1)
},
goToTransaction(transactionId) {
this.$router.push({
Expand Down

0 comments on commit b886c78

Please sign in to comment.