source: trunk/plugins/ImageManager/assets/popup.js @ 856

Last change on this file since 856 was 856, checked in by wymsy, 12 years ago

Change namespace from HTMLArea to Xinha in all the plugins - ref ticket #916

  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 1.4 KB
Line 
1// htmlArea v3.0 - Copyright (c) 2002, 2003 interactivetools.com, inc.
2// This copyright notice MUST stay intact for use (see license.txt).
3//
4// Portions (c) dynarch.com, 2003
5//
6// A free WYSIWYG editor replacement for <textarea> fields.
7// For full source code and docs, visit http://www.interactivetools.com/
8//
9// Version 3.0 developed by Mihai Bazon.
10//   http://dynarch.com/mishoo
11//
12// $Id$
13
14// Override the ordinary popup.js translation to add translation for a few other HTML elements.
15
16function __dlg_translate(context) {
17    var types = ["span", "option", "td", "th", "button", "div", "label", "a","img", "legend"];
18    for (var type = 0; type < types.length; ++type) {
19        var spans = document.getElementsByTagName(types[type]);
20        for (var i = spans.length; --i >= 0;) {
21            var span = spans[i];
22            if (span.firstChild && span.firstChild.data) {
23                var txt = Xinha._lc(span.firstChild.data, context);
24                if (txt)
25                    span.firstChild.data = txt;
26            }
27            if (span.title) {
28                var txt = Xinha._lc(span.title, context);
29                if (txt)
30                    span.title = txt;
31            }
32            if (span.alt) {
33                var txt = Xinha._lc(span.alt, context);
34                if (txt)
35                    span.alt = txt;
36            }
37        }
38    }
39    document.title = Xinha._lc(document.title, context);
40}
Note: See TracBrowser for help on using the repository browser.