More i18n fixes for compatibility with WordPress #940

Merged
merged 1 commit into from Jul 14, 2013

Conversation

Projects
None yet
2 participants
@SergeyBiryukov
Contributor

SergeyBiryukov commented Jul 13, 2013

68ce179 broke the l10n technique we used in WordPress (see #849).

When MediaElement.js tries to use mejs.i18n.locale.strings, the mejs.i18n object is already overwritten with the one that doesn't contain the strings we're trying to add. It also doesn't detect the language we're trying to pass. See http://core.trac.wordpress.org/ticket/24183#comment:8 for reference. I've also tried to set mejs.i18n.locale after ME.js is loaded, but that didn't work either, it appears to be too late.

SergeyBiryukov/mediaelement@adb4c7c offers two fixes to address the issue:

  • Use a separate mejsL10n object to pass a translation as an array of
    strings, to avoid conflicts with mejs.i18n.
  • Make getLanguage() return just the language instead of the full locale
    object.
More i18n fixes
* Use a separate mejsL10n object to pass a translation as an array of
strings.
* Make getLanguage() return just the language instead of the full locale
object.

johndyer added a commit that referenced this pull request Jul 14, 2013

Merge pull request #940 from SergeyBiryukov/master
More i18n fixes for compatibility with WordPress

@johndyer johndyer merged commit 3f7d265 into mediaelement:master Jul 14, 2013

phuongdh pushed a commit to avalonmediasystem/mediaelement that referenced this pull request Oct 18, 2013

Merge pull request #940 from SergeyBiryukov/master
More i18n fixes for compatibility with WordPress

@timtox timtox referenced this pull request Oct 28, 2013

Merged

i18n improvements #1025

rexblack pushed a commit to rexblack/mediaelement that referenced this pull request May 22, 2014

Merge pull request #940 from SergeyBiryukov/master
More i18n fixes for compatibility with WordPress

marmite22 pushed a commit to elucidat/mediaelement that referenced this pull request Dec 16, 2016

Merge pull request #940 from SergeyBiryukov/master
More i18n fixes for compatibility with WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment