Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27610 closed defect (bug) (fixed)

JS Translations being looked for in the wrong place

Reported by: ipstenu's profile Ipstenu Owned by: azaozz's profile azaozz
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords:
Focuses: Cc:


In both cases, the plugin is failing because it's looking for JS files that don't exist.

Failed to load: http://domain.tld/wp-content/plugins/cforms/js/langs/ro_RO.js

The actual file is ro.js

NetworkError: 404 Not Found - http://domain.tld/wp-content/plugins/slideshow-gallery/js/tinymce/langs/nl_NL.js

There is no such file.

The errors don't happen in English. While TinyMCE changed their standards to the normal two-named (ro_RO vs ro), this shouldn't error out, but fallback to (I guess) the plain-jane named version if the file isn't there.

Attachments (1)

27610.patch (2.6 KB) - added by azaozz 10 years ago.

Download all attachments as: .zip

Change History (8)

This ticket was mentioned in IRC in #wordpress-dev by ipstenu. View the logs.

10 years ago

#2 @SergeyBiryukov
10 years ago

  • Component changed from I18N to TinyMCE
  • Milestone changed from Awaiting Review to 3.9

#3 @SergeyBiryukov
10 years ago

Similar report:

NetworkError: 404 Not Found - [domain]/wp-content/plugins/google-document-embedder/js/langs/en.js

Caused by tinymce.PluginManager.requireLangPack('gde') (which doesn't seem necessary):

#4 @SergeyBiryukov
10 years ago

Same reason in Slideshow Gallery plugin:

tinymce.PluginManager.requireLangPack() doesn't cause any issues in 3.8, but leads to a 404 error in 3.9.

#5 @Ipstenu
10 years ago

Slideshow Gallery actually has (kinda) translations:

So is this due to TinyMCE 4, WP 3.9, or an unholy combo?

10 years ago

#6 @azaozz
10 years ago

In 27610.patch:

  • Bring back loading of /langs/[locale].js and /langs/[locale]_dlg.js from PHP.
  • Back to using ISO 639-1 (two letter) locales.

#7 @azaozz
10 years ago

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

In 27922:


  • Bring back loading of /langs/[locale].js and /langs/[locale]_dlg.js from PHP. Prevents errors with missing translation files when custom plugins use requireLangPack() without second argument.
  • Back to using ISO 639-1 (two letter) locales as the locale is used as part of the translation file name.

See #24067, fixes #27610

Note: See TracTickets for help on using tickets.