Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#28366 closed defect (bug) (fixed)

Audio Player Controls are Not Translated

Reported by: namibia's profile Namibia Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: Media Keywords: has-patch commit fixed-major
Focuses: ui, javascript Cc:

Description

Hello,

I use the "audio" shortcode to insert an audio player on a French blog. However, I notice that the audio player controls are not translated. For instance, when hovering the "Play/Pause" button, the hint says "Play/Pause" in English. This is strange, because looking at the .PO file (in wp-content/languages), the appropriate strings exist:

msgid "Play/Pause"
msgstr "Lecture/Pause"
...

For some reason, these strings are not being loaded by the audio player script. All other parts of the blog are correctly translated, so this leads me to think it's a script bug.

Attachments (1)

28366.patch (629 bytes) - added by eherman24 11 years ago.
added tooltip translations to play/pause button

Download all attachments as: .zip

Change History (11)

#1 @Namibia
11 years ago

Hello again,

I managed to solve the problem by editing "script-loader.php" and replacing:

		'language' => get_bloginfo( 'language' ),

with:

		'language' => substr( get_bloginfo( 'language' ) , 0, 2 ),

#2 @ericlewis
11 years ago

  • Component changed from Script Loader to Media
  • Keywords needs-patch added; player translation removed

@eherman24
11 years ago

added tooltip translations to play/pause button

#3 @eherman24
11 years ago

  • Keywords has-patch needs-testing needs-unit-tests added; needs-patch removed

Here are a few screenshots illustrating the bug, before and after the patch.

Note: This also affects the pause and mute toggle button tooltips as well.

Screenshot of bug before patch - on French site
http://i60.tinypic.com/dvk7k4.jpg


Screenshot of bug after patch - French Translation
http://i57.tinypic.com/20ru3bm.jpg


Screenshot of bug after patch - Italian Translation
http://i62.tinypic.com/34xoo0h.jpg

Last edited 11 years ago by eherman24 (previous) (diff)

#4 @eherman24
11 years ago

  • Focuses ui accessibility javascript added

#5 @eherman24
11 years ago

  • Keywords needs-testing needs-unit-tests removed

#6 @eherman24
11 years ago

  • Keywords dev-feedback added

#7 @SergeyBiryukov
11 years ago

  • Focuses accessibility removed
  • Keywords commit added; dev-feedback removed
  • Milestone changed from Awaiting Review to 3.9.2
  • Version changed from 3.9.1 to 3.9

Broken in MediaElement 2.13.2 (see this commit, note the language.substr(0, 2).toLowerCase() change. See [27059] for core.

#8 @SergeyBiryukov
11 years ago

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

In 28801:

Fix MediaElement i18n.

props Namibia, eherman24.
fixes #28366 for trunk.

#9 @SergeyBiryukov
11 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 3.9.2 consideration.

Last edited 11 years ago by SergeyBiryukov (previous) (diff)

#10 @helen
11 years ago

  • Milestone changed from 3.9.2 to 4.0
  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.