Skip to content

Commit

Permalink
Flexsurfer's approach
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil committed Mar 25, 2024
1 parent 289ea4f commit 8da3e2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(ns status-im.contexts.communities.actions.accounts-selection.view
(:require
[clojure.string :as string]
[quo.core :as quo]
[react-native.core :as rn]
[react-native.gesture :as gesture]
Expand All @@ -23,14 +22,11 @@
revealed-accounts (rf/sub [:communities/accounts-to-reveal id])
revealed-accounts-count (count revealed-accounts)
wallet-accounts-count (count (rf/sub [:wallet/accounts-without-watched-accounts]))
addresses-shared-text (condp = revealed-accounts-count
1 (str "1 "
(string/lower-case (i18n/label :t/address)))
wallet-accounts-count (i18n/label :t/all-addresses)
(str revealed-accounts-count
" "
(string/lower-case (i18n/label
:t/addresses))))
addresses-shared-text (if (= revealed-accounts-count wallet-accounts-count)
(i18n/label :t/all-addresses)
(i18n/label-pluralize
revealed-accounts-count
:t/address-count))
{:keys [highest-permission-role]} (rf/sub [:community/token-gated-overview id])
highest-role-text (i18n/label (communities.utils/role->translation-key
highest-permission-role
Expand Down
7 changes: 5 additions & 2 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"add-to-contacts": "Add to contacts",
"add-to-contacts-text": "By adding a user to your contact list, you share your wallet address",
"address": "Address",
"addresses": "addresses",
"address-received": "Address received",
"address-requested": "Address requested",
"address-request-accepted": "Address request accepted",
Expand Down Expand Up @@ -2559,5 +2558,9 @@
"ledger-live": "Ledger live",
"keep-key": "KeepKey",
"type-your-path": "Type your own derivation path",
"default-format": "Default format"
"default-format": "Default format",
"address-count": {
"one": "1 address",
"other": "{{count}} addresses"
}
}

0 comments on commit 8da3e2c

Please sign in to comment.