WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#38823 closed defect (bug) (fixed)

Cant translate link text including the link to Codex

Reported by: odysseygate Owned by: westonruter
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: has-patch needs-refresh
Focuses: administration Cc:

Description

The link to Codex:Know_Your_Sources#CSS on class-wp-customize-manager.php L3827 can't be translated, so we can't change Codex into each local codex, on the link "Learn more about CSS".

Attachments (5)

class-wp-customize-manager.php (127.6 KB) - added by odysseygate 11 months ago.
38823.0.diff (1.2 KB) - added by westonruter 11 months ago.
Convert to actual patch
38823.1.diff (1013 bytes) - added by westonruter 11 months ago.
38823.examples.txt (6.3 KB) - added by westonruter 11 months ago.
38823.2.diff (972 bytes) - added by westonruter 11 months ago.
Remove erroneous context usage.

Download all attachments as: .zip

Change History (12)

#1 @odysseygate
11 months ago

  • Keywords has-patch added

@westonruter
11 months ago

Convert to actual patch

#2 @westonruter
11 months ago

  • Milestone changed from Awaiting Review to 4.7
  • Owner set to westonruter
  • Status changed from new to accepted

#3 @westonruter
11 months ago

  • Keywords reporter-feedback added

@odysseygate I think in that case we can just let the URL itself be a translation string as in 38823.1.diff. There are 44 instances of this being done in core already. See 38823.examples.txt for ack --php "__\( 'http" src/wp-admin/ src/wp-includes/. Agreed?

#4 follow-up: @swissspidy
11 months ago

  • Keywords commit added; reporter-feedback removed

@odysseygate Thanks for your contribution! For next time, this handbook page will help you create an actual patch file like 38823.1.diff so one can easily see & apply the changes you made.

@westonruter 38823.1.diff looks good.

#5 @ocean90
11 months ago

  • Focuses accessibility removed
  • Keywords needs-refresh added; commit removed

38823.1.diff doesn't look good because it's adding a text domain which I think was supposed to be a context. _x() would be the right function for that. But there is no need for a context since it's the only instance of that link.

@westonruter
11 months ago

Remove erroneous context usage.

#6 @westonruter
11 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 39268:

Customize: Allow URL for Codex link in Additional CSS section to be translated.

Props odysseygate, ocean90, westonruter.
See #35395.
Fixes #38823.

#7 in reply to: ↑ 4 @odysseygate
11 months ago

Replying to swissspidy:
Oops, sorry. i mistook diff for whole to attach...

Note: See TracTickets for help on using tickets.