[wp-meta] [Making WordPress.org] #2949: URL warnings are triggered for w.org URLs when they're within a link element on a translation string
Making WordPress.org
noreply at wordpress.org
Tue Jul 11 16:28:15 UTC 2017
#2949: URL warnings are triggered for w.org URLs when they're within a link
element on a translation string
-----------------------------+-----------------
Reporter: garrett-eclipse | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: General | Keywords:
-----------------------------+-----------------
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
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2949>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list