web icon indicating copy to clipboard operation
web copied to clipboard

Words not translating in app.shapeshift when selecting a different language

Open MBMaria opened this issue 2 years ago • 7 comments

Overview

When changing the language on app.shapeshift there are a few words that are still not converting.

References and additional details

  1. Log into app.shapeshift.com
  2. Select the settings cog in the bottom left hand corner
  3. Choose a different language
  4. Navigate through the pages to find some words not translated from English image image image image image image image image image

Acceptance Criteria

All words should translate to the selected language

Need By Date

No response

Screenshots/Mockups

No response

Ownership

  • [X] If my bounty needs engineering or needs product I have added the respective labels on the right
  • [X] As the sponsor of this bounty I will review the changes in a preview environment (ops/product) or review the PR (engineering)

Estimated effort

No response

Sponsor / Stakeholder

No response

Bounty Hunters

  • Join our discord
  • Include an expected timeline for you to complete work in the work plan when you apply for this bounty!
  • Please refer to this link for some basic info
  • Please do not start work on this issue until you are approved in Gitcoin.

MBMaria avatar Jul 16 '22 00:07 MBMaria

@NeOMakinG here is the new ticket. not sure if you will be working on it or not . Cheers.

MBMaria avatar Jul 16 '22 00:07 MBMaria

@NeOMakinG here is the new ticket. not sure if you will be working on it or not . Cheers.

Alright, I need to finish my current WIP before anyway 🚀

NeOMakinG avatar Jul 18 '22 07:07 NeOMakinG

4. image

Also noticing wrong DeFi capitalization as Defi here, could we get this updated as well if it's possible as low effort? 🙏🏽 It is deserialized from queryparams so that might be too much effort for such a small change, but worth the look

gomesalexandre avatar Jul 18 '22 16:07 gomesalexandre

@firebomb1 plz accept shapeshift github org invite so i can assign this ticket to you

0xdef1cafe avatar Aug 12 '22 19:08 0xdef1cafe

@thesmithdao similarly plz accept github org invite

0xdef1cafe avatar Aug 12 '22 20:08 0xdef1cafe

Breadcrumb (e.g. "Home / Defi") is indeed untranslatable, needs Engineering work.

Most of the element (besides "Home") should already have a translated string as they are part of the navigation, so it would be nice if we could re-use these maybe?


"Select an asset" is indeed untranslatable currently, needs Engineering work:

https://github.com/shapeshift/web/blob/1f775bb0226e2dc0a22bce33634844a0ce4c0e00/src/components/SelectAssets/SelectAssets.tsx#L16

We can catch few more by doing a Regex search of against the codebase for: <[^.>]+>[^{]+</[^.>]+> (not everything that comes up should be translatable but it's a good starting point to further investigate).


The "Search" placeholder in the search field is also untranslatable, needs Engineering work:

https://github.com/shapeshift/web/blob/1f775bb0226e2dc0a22bce33634844a0ce4c0e00/src/components/Layout/Header/AutoCompleteSearch/AutoCompleteSearch.tsx#L67

Found a few more similar placeholders for example: https://github.com/shapeshift/web/blob/1f775bb0226e2dc0a22bce33634844a0ce4c0e00/src/components/DeFi/components/AssetInput.tsx#L35 Search the codebase for placeholder=' to see more of them.


The "Max" button is already translatable at least here:

https://github.com/shapeshift/web/blob/1f775bb0226e2dc0a22bce33634844a0ce4c0e00/src/components/Modals/Send/SendMaxButton/SendMaxButton.tsx#L18

But it seems that it might not be in some places where this component is used: https://github.com/shapeshift/web/blob/1f775bb0226e2dc0a22bce33634844a0ce4c0e00/src/components/DeFi/components/MaxButtonGroup.tsx#L27

Hope this helps :)

firebomb1 avatar Aug 12 '22 21:08 firebomb1

Also found:

https://github.com/shapeshift/web/blob/1f775bb0226e2dc0a22bce33634/src/components/SelectAssets/SelectAccount.tsx#L43

NeOMakinG avatar Aug 15 '22 17:08 NeOMakinG

Adding two more untranstable strings I've discovered today. Hopefully they'll get fixed with in one PR when the backlog gets cleared eventually... including the ones in the linked issues above and the summary above for this issue.

The fiatRamps.titleMessage string in /src/assets/translations/en/main.json contains a paramter %{action} and is used here: https://github.com/shapeshift/web/blob/43bca120913dd83445e0d1c1b58cd12e1478d753/src/components/Modals/FiatRamps/views/Overview.tsx#L250-L254

fiatRampAction is a variable using this enum:

https://github.com/shapeshift/web/blob/43bca120913dd83445e0d1c1b58cd12e1478d753/src/components/Modals/FiatRamps/FiatRampsCommon.ts#L1-L4

Hopefully it is possible to make the "buy" and "sell" strings in this translatable, without breaking the rest of the logic in the UI, otherwise specific strings should be used instead of fiatRampAction for these two actions.

firebomb1 avatar Oct 24 '22 19:10 firebomb1