Skip to content

handling email addresses in translate tagger#35

Open
ashish-066 wants to merge 2 commits into
indictechcom:mainfrom
ashish-066:fix-email
Open

handling email addresses in translate tagger#35
ashish-066 wants to merge 2 commits into
indictechcom:mainfrom
ashish-066:fix-email

Conversation

@ashish-066

@ashish-066 ashish-066 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

bug:T430397
If an email comes on a page as:
Lorem ipsum, xyz@xyz.com, contact person
Let the result be somewhat like:

<translate>Lorem ipsum, <tvar name="email">{{nospam|xyz|xyz.com}}</tvar>, contact person</translate>
However, if it is outside the scope of a translate wrapper:

Contact: xyz@xyz.com
It should be returned as:
<translate>Contact:</translate> {{nospam|xyz|xyz.com}}

This is because tvars function only within a workable translate wrapper, and emails are static in nature. Otherwise, return emails to include nospam template. If the email is already typed within the nospam template, keep as is.

@ashish-066 ashish-066 changed the title Fix email handling email addresses in translate tagger Jun 28, 2026
@gopavasanth

Copy link
Copy Markdown
Member

Can you please add tests for the same? in the tests.py file?

@ftosoni

ftosoni commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Tests added. LGTM

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.

3 participants