Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#30614 closed defect (bug) (fixed)

Remove <code> tags from few more translatable string

Reported by: ramiy's profile ramiy Owned by: ocean90's profile ocean90
Milestone: 4.2 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch 4.2-early commit
Focuses: Cc:

Description

See ticket #30612.

I found few more strings that use <code> tags inside of translatable string. This patch fixes the string.

Remove <code> tags from translatable string

Attachments (3)

30614.patch (3.5 KB) - added by ramiy 10 years ago.
30614.2.patch (3.6 KB) - added by DrewAPicture 10 years ago.
translator comments
30614.3.patch (3.7 KB) - added by ramiy 10 years ago.
more elegant solution

Download all attachments as: .zip

Change History (17)

@ramiy
10 years ago

#1 @ramiy
10 years ago

  • Keywords has-patch added

#2 @ocean90
10 years ago

  • Keywords 4.2-early added

#3 @boonebgorges
10 years ago

  • Version trunk deleted

#4 @iseulde
10 years ago

  • Milestone changed from Awaiting Review to 4.2

has-patch 4.2-early so moving to 4.2.

#5 @DrewAPicture
10 years ago

Patch still applies. Looks like the second change in general-template.php modifies a commented-out line. Maybe we should just remove the line in that case:

//_deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The %s option is deprecated for the family of <code>bloginfo()</code> functions.' ), '<code>' . $show . '</code>' ) . ' ' . sprintf( __( 'Use the %s function instead.' ), '<code>is_rtl()</code>'  ) );

#6 follow-up: @SergeyBiryukov
10 years ago

I think <code>%s</code> actually provides some context in the first two strings. If we're removing it, we should probably add a translator's comment for %s there as well.

@nacin: Looking at [14360], the intention was to deprecate get_bloginfo( 'text_direction' ) in favor of is_rtl(). Not sure why it was commented out in that commit. Should we uncomment it now?

#7 @nacin
10 years ago

I have no idea. Probably? :-)

@DrewAPicture
10 years ago

translator comments

#8 in reply to: ↑ 6 @DrewAPicture
10 years ago

  • Keywords commit added

Replying to SergeyBiryukov:

I think <code>%s</code> actually provides some context in the first two strings. If we're removing it, we should probably add a translator's comment for %s there as well.

In 30614.2.patch, added translator comments for both in general-template.php.

@nacin: Looking at [14360], the intention was to deprecate get_bloginfo( 'text_direction' ) in favor of is_rtl(). Not sure why it was commented out in that commit. Should we uncomment it now?

Un-commented, fixed translator comment syntax for the second one.

#9 follow-up: @SergeyBiryukov
10 years ago

I don't think a single translator comment can refer to multiple strings. We should probably merge "Use the %s option instead" with the preceding string (and use numbered placeholders there), as it's not used separately anywhere else.

#10 @ocean90
10 years ago

  • Keywords commit removed

What Sergey says.

#11 @ocean90
10 years ago

  • Owner set to ocean90
  • Status changed from new to reviewing

#12 in reply to: ↑ 9 @ramiy
10 years ago

Replying to SergeyBiryukov:

I don't think a single translator comment can refer to multiple strings. We should probably merge "Use the %s option instead" with the preceding string (and use numbered placeholders there), as it's not used separately anywhere else.

I agree. This should be one string.

@ramiy
10 years ago

more elegant solution

#13 @SergeyBiryukov
10 years ago

  • Keywords commit added

#14 @ocean90
10 years ago

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

In 31899:

Remove <code> tags from translatable strings.

Uncomment deprecation notice for get_bloginfo( 'text_direction' ), see [14360].

props ramiy, DrewAPicture.
fixes #30614.

Note: See TracTickets for help on using tickets.