[wp-trac] [WordPress Trac] #42574: MediaElement upgrade causing JS errors when certain languages are in use e.g de_DE-formal

WordPress Trac noreply at wordpress.org
Mon Nov 27 05:26:08 UTC 2017


#42574: MediaElement upgrade causing JS errors when certain languages are in use
e.g de_DE-formal
-------------------------------------+-------------------------------------
 Reporter:  erich_k4wp               |       Owner:
     Type:  defect (bug)             |      Status:  reopened
 Priority:  high                     |   Milestone:  4.9.1
Component:  Media                    |     Version:  4.9
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch 2nd-opinion    |     Focuses:  javascript,
  needs-testing                      |  administration
-------------------------------------+-------------------------------------

Comment (by joemcgill):

 [attachment:42574.4.diff] is a different approach that adds a modified
 version of `mejs.i18n.language()` (without the validation) to the
 `mediaelement-migrate` script so our language strings will get loaded
 during the migration step, rather than when MEJS is first loaded on the
 page.

 This keeps TypeErrors from being thrown when we try to load a locale with
 a name that doesn't conform to the expected format and avoids forking MEJS
 itself in order to remove the validation.

 However, after working on this, I'm not convinced we need to go to these
 lengths to maintain a similar locale name to what we're using in WP, since
 I believe the locale name is simply being used as an identifier in MEJS,
 and we are passing a single set of translated strings. In other words,
 something like [attachment:42574.2.diff] may in fact be all we need here.

 @flixos90 and/or @ocean90 – I'd appreciate your feedback since you're more
 familiar with the particularities of this particular translation issue.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42574#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list