U4-3136 - Some language files of TinyMCE3 plugins are not correctly loaded

Created by Fish Wang 14 Oct 2013, 02:32:17 Updated by Shannon Deminick 21 Jun 2017, 07:58:15

umbraco.plugins.timymce3.tinymce3tinymceCompress only loads some of the plugins' language files. It only support files with names like "lang.js" (e.g. zh.js). However, some plugins carry language files named in "lang_dlg.js" (e.g. zh_dlg.js). Therefore those plugins cannot display translated strings. I set Chinese as the default language for Umbraco. Don't know if that happens with English as the default language.

My workaround is to modify GzipModule.cs at around Line 97: gzipCompressor.AddFile(IOHelper.MapPath(configSection["InstallPath"] + "/plugins/" + plugin + "/editor_plugin" + suffix + ".js"));

                // Add plugin languages
                foreach (string lang in languages)
                {
                    string path = IOHelper.MapPath(configSection["InstallPath"] + "/plugins/" + plugin + "/langs/" + lang + ".js");

                    if (File.Exists(path))
                        gzipCompressor.AddFile(path);
                    else
                    {
                        // Take those _dlg.js language files into consideration
                        path = IOHelper.MapPath(configSection["InstallPath"] + "/plugins/" + plugin + "/langs/" + lang + "_dlg.js");
                        if (File.Exists(path))
                            gzipCompressor.AddFile(path);
                    }
                }

Comments

Shannon Deminick 21 Jun 2017, 07:58:15

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Easy

Category: Localization

Backwards Compatible: True

Fix Submitted: Inline code

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: