Page MenuHomePhabricator

[e.cash] Glitch text updates
ClosedPublic

Authored by johnkuney on Jul 18 2023, 18:01.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC4ffe73925ec9: [e.cash] Glitch text updates
Summary

I've been working on the weglot translation integration and one of the biggest headaches is getting the data-text attribute
to update when the language changes. Weglot cant access attributes like that afaik, so it would require some jankish
js to iterate over all of the glitch text elements and update the data-text element (like we did on the webflow site). The problem is you quickly run into some
react/next lifecycle issues where it doesnt update on the first render but only sometimes and changing pages is whole other
problem.

Long way of saying I propose we move the "glitch" text into the DOM. Gets rid of any headaches with updating the data-text
and should be indistinguishable to the end user. Open to any reasons this is a bad idea though

Also in this glitch text update is a theme value so we can adjust the animation timing between themes

Test Plan

preview the site and check the glitch text behaves as before

Diff Detail

Repository
rABC Bitcoin ABC
Branch
ecash-glitch-text-update
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24554
Build 48705: Build Diff
Build 48704: arc lint + arc unit

Event Timeline

There isn't a reason we need to use data-text now that we are working with our own codebase. That decision was related to limitations of custom code on the old site.

preview looks good -- please rebase to latest master. (this build is still showing stealth mode, toggle switch). Now that these land into prod, need to confirm everything is ready to roll.

This revision now requires changes to proceed.Jul 19 2023, 18:43
This revision is now accepted and ready to land.Jul 19 2023, 21:37
This revision was automatically updated to reflect the committed changes.

Hello,

I'm Guillaume from Weglot and I'd be glad to help you

I can see that you are facing some trouble while using Weglot here
If I understand correctly, you are trying to translate some content generated through an attribute named "data-text", but it's not working by default, is it correct?

If this is the case, we may have some workaround that could be helpful and save you some time but it depends on which kind of integration you are currently managing on Weglot
Can you contact us at support@weglot.com providing us the email address linked to your Weglot account and the Weglot API key you are using so we can take a further look and help you? :)

Don't hesitate to ask for Guillaume, the message will be automatically assigned to me

Have a nice day!
Regards,

Thanks for reaching out Guillaume! I've contacted support for some clarification