Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#36496 closed defect (bug) (fixed)

Replace function name in translatable strings with a placeholder

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: I18N Keywords:
Focuses: Cc:

Description

In these two strings, the function name does not need to be translated and should be replaced with a placeholder and a translator comment:

  • Do not pass script tags to wp_add_inline_script().
  • Do not pass style tags to wp_add_inline_style().

Attachments (1)

36496.diff (1.5 KB) - added by andg 8 years ago.
"Script" and "style" should probably be wrapped in a code tag themselves, and a comment in the string should remind translators not to translate them.

Download all attachments as: .zip

Change History (7)

#1 @jdgrimes
8 years ago

Do "script" and "style" need to be translated either? If not, perhaps these strings could be combined.

@andg
8 years ago

"Script" and "style" should probably be wrapped in a code tag themselves, and a comment in the string should remind translators not to translate them.

#2 @SergeyBiryukov
8 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 37188:

I18N: Remove tag and function names from two translatable strings.

Add translator comments.

Props andg for initial patch.
Fixes #36496.

#3 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 4.6

#4 @dd32
8 years ago

Should script and style be written as tags instead? <script> <style>?

It results in a weirder english: Do not pass <script> tags but makes it far more concise.

#5 @SergeyBiryukov
8 years ago

In 37190:

I18N: After [37188], display script and style tags in the message as <script> and <style>.

Props dd32.
See #36496.

#6 @SergeyBiryukov
8 years ago

In 37191:

I18N: Update translator comments after [37190].

See #36496.

Note: See TracTickets for help on using tickets.