Skip to content

[MKT-1165]feat/change language of drive-web when arrives from website - #2280

Merged
internxt-yu merged 8 commits into
mainfrom
feat/change-lang-going-to-drive-web
Nov 12, 2026
Merged

internxt-yu merged 8 commits into
mainfrom
feat/change-lang-going-to-drive-web

Conversation

@internxt-yu

@internxt-yu internxt-yu commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Added the parameter lng in the links to redirect to drive-web with the language of user, obtaining the locale from the cookie i18next set from the pageProps locale or the router path locale or changing in languageBox selector. Changed in checkout method and those links that redirect to the drive-web to include the locale set in the cookie.

PS: the cookie can't be set correctly in the preview with domain .internxt.com, we can added it via console of the browser by using command to insert the cookie without domain:
document.cookie = 'i18next=es; Path=/';
Or insert it mannually in the application tab of dev tool page.

@internxt-yu internxt-yu self-assigned this Nov 6, 2026
@internxt-yu internxt-yu added the enhancement New feature or request label Nov 6, 2026
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website Ready Ready Preview Nov 12, 2026 11:59am UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
website e53252e Commit Preview URL

Branch Preview URL
Nov 12 2026, 11:55 AM

Comment thread src/lib/auth.ts Fixed
@internxt-yu internxt-yu closed this Nov 9, 2026
@internxt-yu
internxt-yu deleted the feat/change-lang-going-to-drive-web branch November 9, 2026 13:37
@internxt-yu
internxt-yu restored the feat/change-lang-going-to-drive-web branch November 9, 2026 14:02
@internxt-yu internxt-yu reopened this Nov 9, 2026
@internxt-yu
internxt-yu marked this pull request as ready for review November 9, 2026 14:32
@internxt-yu
internxt-yu marked this pull request as draft November 9, 2026 14:35
@internxt-yu
internxt-yu marked this pull request as ready for review November 9, 2026 14:52

@jaaaaavier jaaaaavier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to change something on Drive-web??

@internxt-yu

Copy link
Copy Markdown
Contributor Author

Do we need to change something on Drive-web??

No, in drive-web is already accepting the lng parameter to change the language.

@jaaaaavier jaaaaavier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How about we use a constant that defines the supported languages, and have getCurrentLang return the value only if it's in that constant? That way, we can protect ourselves against injection attacks, MITM attacks, and things like that.

@internxt-yu

internxt-yu commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

How about we use a constant that defines the supported languages, and have getCurrentLang return the value only if it's in that constant? That way, we can protect ourselves against injection attacks, MITM attacks, and things like that.

You are right, added the SUPPORTED_LANGUAGE list and added check if parameter lng has the valid value.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
4.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@internxt-yu
internxt-yu merged commit 8431ed7 into main Nov 12, 2026
10 of 11 checks passed
@internxt-yu
internxt-yu deleted the feat/change-lang-going-to-drive-web branch November 12, 2026 12:10

This branch was successfully deployed

1 active deployment
Preview — e53252ef Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants