handling email addresses in translate tagger#35
Open
ashish-066 wants to merge 2 commits into
Open
Conversation
Member
|
Can you please add tests for the same? in the tests.py file? |
Collaborator
|
Tests added. LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bug:T430397
If an email comes on a page as:
Lorem ipsum, xyz@xyz.com, contact personLet 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.comIt 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.