WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 2 years ago

#2949 closed defect (duplicate)

URL warnings are triggered for w.org URLs when they're within a link element on a translation string

Reported by: garrett-eclipse Owned by:
Milestone: Priority: normal
Component: Translate Site & Plugins Keywords:
Cc:

Description

Hello,

This issue stems from a GlotPress ticket that was flagged as being part of translate.w.org and not GlotPress.
Original Ticket - https://github.com/GlotPress/GlotPress-WP/issues/785#issuecomment-314417674

Although the ticket title is about a warning not being triggered we found that was intentional but that there was cases where a warning was throw when it shouldn't be.

To me it seems there's something in the regex where a standalone URL and one wrapped in parentheses are treated properly and allow the localization change, but when the URL is within an HTML link element's href it does throw the warning and shouldn't.

Instance of URL in HTML element that throws warning when localized;
https://translate.wordpress.org/projects/wp-plugins/debug-bar-constants/dev-readme/en-ca/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=1668546&filters%5Btranslation_id%5D=50545119

Instance of URL in parentheses that doesn't throw warning;
https://translate.wordpress.org/projects/wp-plugins/debug-bar-constants/dev-readme/en-ca/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=1668549&filters%5Btranslation_id%5D=50545113

Instance of URL by itself;
https://translate.wordpress.org/projects/wp-plugins/debug-bar-constants/dev/en-ca/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=1668532&filters%5Btranslation_id%5D=50545029

So if you localized the first example you get a warning which isn't desired, while the other two instance get by without a warning.

All the best,
Cheers

Attachments (1)

Screen Shot 2017-07-11 at 9.19.57 AM.png (105.8 KB) - added by garrett-eclipse 2 years ago.
Undesired Warning

Download all attachments as: .zip

Change History (2)

#1 @ocean90
2 years ago

  • Component changed from General to Translate Site & Plugins
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #1401.

Note: See TracTickets for help on using tickets.