Page MenuHomePhabricator

[e.cash] Add Weglot
ClosedPublic

Authored by johnkuney on Jul 19 2023, 23:13.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC5cea92efdb22: [e.cash] Add Weglot
Summary

Adding the weglot transaltions
Added the needed scripts and weglot api key (this needs to be client side I believe and was exposed before fyi)
And added some styles to override defualt styles

I went ahead and just used the weglot instance that was setup for the webflow site. It had all of the subdmains setup etc,
so hopefully will just work when deployed ha but really not a great way to test this afaik as its reliant on the e.cash domain...
It only kind of works rn locally, but I believe its because of the subdomain settings, but the language selector does appear
and look how it should
And the subdomains are still working on the live site. Kind of interesting actually, if you go to subdomains rn it flashes
translations, and if you go to the blog they're translated o___o So weglot is tied in there somehow even though the code
isnt on the site...90% sure its coming from the subdomains that are configured in weglot. So all of the blogs got translated
which smoked through our word count in weglot...but I added a rule to ignore /blog going forward so hopefully reverts? unclear
how that works

Test Plan

preview the site and see if the language selector looks right and possibly functions
Afraid we may have to test live to see whats going on though

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman added a subscriber: bytesofman.

May require some iterating after this lands to configure weglot with our implementation. At the moment I'm not aware of how to test this without landing it at the domain.

This diff does not appear to introduce any staging risks so ok to land --- after confirmation about adding the domain to the same nextjs config file as the strapi one.

web/e.cash/pages/_app.js
31 ↗(On Diff #41534)

does this need to be added to next js api domains, like strapi?

This revision is now accepted and ready to land.Jul 20 2023, 11:31
web/e.cash/pages/_app.js
31 ↗(On Diff #41534)

I would say no since it is only used here and is specific to weglot

This revision was automatically updated to reflect the committed changes.