[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
Wed Nov 22 22:47:03 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):
So it seems we have a few things to consider here:
1. MEJS added validation
[https://github.com/mediaelement/mediaelement/blob/4.2.7/build/mediaelement.js#L318-L320
here] that won't load translation files that don't conform to the expected
format.
2. Our formal language files don't conform to the standard, or as @ocean90
put it, "There's a reason why it's called 'WordPress locale'", which means
we can either parse WP locales into ISO locales, as @flixos90 suggests in
[attachment:42574.2.diff] or we need to work around the validation as
@blobfolio suggests in [attachment:42574.diff] and @westonruter suggests
in [https://core.trac.wordpress.org/ticket/42574#comment:22 his plugin
comment above].
If we're going to parse WP locales, we need to be careful about not
flattening formal languages into the default languages. If we're going to
work around the validation, we should do so using an external shim, like
@westonruter proposed so we're not maintaining a fork of MEJS.
In the mean time, I'd be happy to ship [attachment:42574.2.diff] for 4.9.1
if there's a +1 from someone on the Polyglots team.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42574#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list