Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Removed duplicated text in Token Popup #14428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Seitseman
Copy link
Contributor

fixes #14366

What does the PR do

Made sure Token List title is only appended if sourceName does not already ends with such string

Screenshot of functionality (including design for comparison)

image

Made sure Token List title is only appended if sourceName does not already ends with such string
@Seitseman Seitseman linked an issue Apr 15, 2024 that may be closed by this pull request
@status-im-auto
Copy link
Member

status-im-auto commented Apr 15, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5aa9b4a #1 2024-04-15 13:04:29 ~6 min tests/nim 📄log
✔️ 5aa9b4a #1 2024-04-15 13:04:42 ~6 min macos/aarch64 🍎dmg
✔️ 5aa9b4a #1 2024-04-15 13:09:07 ~11 min tests/ui 📄log
✔️ 5aa9b4a #1 2024-04-15 13:10:34 ~12 min macos/x86_64 🍎dmg
✔️ 5aa9b4a #1 2024-04-15 13:15:21 ~17 min linux/x86_64 📦tgz
✔️ 5aa9b4a #1 2024-04-15 13:22:25 ~24 min windows/x86_64 💿exe

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't (or may not) work due to the translations; better just display the token list name verbatim

@alexjba
Copy link
Contributor

alexjba commented Apr 18, 2024

This won't (or may not) work due to the translations; better just display the token list name verbatim

Yup. I think it's better, but still not something we can translate.

@alaibe Would it be a good idea to change the name to contain only the provider name (E.g. Status or Uniswap) so that we can append Token List and also to translate this?

https://github.com/status-im/status-go/blob/12deb2336028639ff11b6a3e08043e2961bed5c4/services/wallet/token/uniswap_tokenstore.go#L19

@alaibe
Copy link
Contributor

alaibe commented Apr 18, 2024

@alexjba yes indeed, backend should not provide any text to render, we could even potentially simply returns a "key"

@alexjba
Copy link
Contributor

alexjba commented Apr 18, 2024

@alexjba yes indeed, backend should not provide any text to render, we could even potentially simply returns a "key"

Good point! A "key" is even better. Do you want me to add a task for this?

@Seitseman
Copy link
Contributor Author

In this case current PR becomes irrelevant. Should it be discarded now?

@Seitseman Seitseman self-assigned this Apr 18, 2024
@alexjba
Copy link
Contributor

alexjba commented Apr 18, 2024

In this case current PR becomes irrelevant. Should it be discarded now?

Not sure.
It's true, we'll need a status-go update to do a proper fix in status-desktop. But if the status-go update will not happen soon, we can have an intermediary version where we consider the name as key and set the title as a full qsTr. The name is hardcoded in status-go and it should be safe for now.

I guess you have a few options:

  1. Get your hands dirty and go for an e2e fix. But it's not going to be a nice first task 😄 Lots of logistics and code to go through.
  2. Do an intermediary fix and wait for a status-go update. But we'll need a new task so that we don't forget about this.
  3. Drop it and wait for status-go and nim integration. We should add the blocked task and link it with the new backend tasks.

@Seitseman
Copy link
Contributor Author

I would leave on the backend side only names, I doubt anyone would like to see 'Uniswap' or 'Status' words translated, and then UI part appends translated 'Token List'

@caybro
Copy link
Member

caybro commented Apr 18, 2024

I would leave on the backend side only names, I doubt anyone would like to see 'Uniswap' or 'Status' words translated, and then UI part appends translated 'Token List'

That's how it should look like actually, e.g.:

  text: qsTr("%1 Token List").arg(backendTokenListName)

@alexjba
Copy link
Contributor

alexjba commented Apr 18, 2024

In this case current PR becomes irrelevant. Should it be discarded now?

Not sure. It's true, we'll need a status-go update to do a proper fix in status-desktop. But if the status-go update will not happen soon, we can have an intermediary version where we consider the name as key and set the title as a full qsTr. The name is hardcoded in status-go and it should be safe for now.

I guess you have a few options:

  1. Get your hands dirty and go for an e2e fix. But it's not going to be a nice first task 😄 Lots of logistics and code to go through.
  2. Do an intermediary fix and wait for a status-go update. But we'll need a new task so that we don't forget about this.
  3. Drop it and wait for status-go and nim integration. We should add the blocked task and link it with the new backend tasks.

NVM, looks like we have a key in the nim model. So could be just a string mapping:

https://github.com/status-im/status-desktop/blob/master/src/app/modules/main/wallet_section/all_tokens/sources_of_tokens_model.nim#L41

@caybro
Copy link
Member

caybro commented Apr 18, 2024

We also have this in Constants.qml:

readonly property QtObject supportedTokenSources: QtObject {
        readonly property string uniswap: "Uniswap Labs Default Token List"
        readonly property string status: "Status Token List"
        readonly property string custom: "custom"
    }

@caybro
Copy link
Member

caybro commented May 10, 2024

@Seitseman ping, any progress here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Token Management] Wrong token list popup title
5 participants