Opened 7 years ago
Closed 7 years ago
#42160 closed enhancement (duplicate)
i18n: Avoid using URLs in translation strings (wp-admin/options-writing.php)
Reported by: | ramiy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
Description
The attached patch removes the URLs from the translation strings replacing them with %s
placeholders. It also adds translators comments.
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.
7 years ago
#4
follow-up:
↓ 5
@
7 years ago
- Keywords needs-refresh removed
- Milestone changed from Awaiting Review to 5.0
- Type changed from defect (bug) to enhancement
Codex pages can also be translated therefore the link needs to be translatable as well.
#5
in reply to:
↑ 4
@
7 years ago
- Keywords close added
Replying to ocean90:
Codex pages can also be translated therefore the link needs to be translatable as well.
In that case, the original code is fine as it is. Splitting one translation string into two is unnecessary if the URL should be localised as well. That can be done when part of the original string.
#6
@
7 years ago
- Keywords close removed
In case of a URL change it's better to invalidate only one string.
Note: See
TracTickets for help on using
tickets.
The patch in 42160.patch creates another translation string of the actual link to WordPress.org that should ideally be avoided. If the you remove the
__()
from the URL then it'd be fine.