Opened 15 years ago

Closed 12 years ago

#310 closed defect (fixed)

incomplete translation (TD text and ALT/TITLE of images)

Reported by: mokhet Owned by: yermol
Priority: normal Milestone:
Component: Plugin_ImageManager Version:
Severity: normal Keywords: i18n
Cc:

Description

some texts are not translated even when the correct words are present in the translation file.

there is 2 in images.php that are never translated, in a structure <table><tr><td>TEXT</td></tr></table>

  • No Images Found
  • Invalid base directory:

none of the alt/title of the buttons are translated

  • Directory Up
  • New Folder
  • Trash
  • Edit

Attachments (2)

manager.php (6.9 KB) - added by anonymous 14 years ago.
manager.php with more strings passed to i18n
pl.js (2.4 KB) - added by anonymous 14 years ago.
Polish translation

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by mokhet

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

fixed in changeset [252]

comment:2 Changed 14 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

there are a few more strings in the Insert Image dialog that do not get translated:

"Description:", "Height:", "Align:", "Margin:", "Padding:", "Border:", "Color:", "Upload:".

I don't know the translation mechanism but I think that surrounding this strings in manager.php with <label> tags would be enough. Some of this strings are howewer missing in translation files shipped with trunk version and need to be entered.

I attach a modified version of the manager.php file and completed Polish translation file - I dod not, however, succeded to translate the Upload button text - it may need to be changed from <input> to <button> to allow it, but I don't want to break things up with this.

Changed 14 years ago by anonymous

manager.php with more strings passed to i18n

Changed 14 years ago by anonymous

Polish translation

comment:3 Changed 14 years ago by gocher

I think it is better to take the "th" tag to the types for translation!

See popups\popup.js function dlg_translate(context)
change

var types = ["input", "select", "legend", "span", "option", "td", "button", "div", "label"];

to

var types = ["input", "select", "legend", "span", "option", "th", "td", "button", "div", "label"];

comment:4 Changed 14 years ago by gocher

Checked in the Polish translation and changed the German!

in Changeset 294 + 295

comment:5 Changed 14 years ago by mokhet

I am actually playing with the ImageManager? and have fixed a few of thoses bugs in changeset:302, but i am wondering if, instead of creating a new popup.js with a new dlg_translate(), if it would not be better to send the types to translate as an argument (array) to the original dlg_translate() function.

Index: popup.js
===================================================================
--- popup.js	(revision 303)
+++ popup.js	(working copy)
@@ -84,8 +84,9 @@
 	HTMLArea.addDom0Event(document.body, 'keypress', __dlg_close_on_esc);
 };
 
-function __dlg_translate(context) {
-	var types = ["input", "select", "legend", "span", "option", "td", "button", "div", "label"];
+function __dlg_translate(context, types) {
+  if (typeof types == 'undefined')
+    types = ["input", "select", "legend", "span", "option", "td", "button", "div", "label"];
 	for (var type = 0; type < types.length; ++type) {
 		var spans = document.getElementsByTagName(types[type]);
 		for (var i = spans.length; --i >= 0;) {
@@ -118,4 +119,4 @@
 		return false;
 	}
 	return true;
-};
+};
\ No newline at end of file

This way, every plugins would be able to update the elements they use in their HTML layout without creating a new dlg_translate() version.

I think i should commit this patch, am I right or totally wrong ?

comment:6 Changed 14 years ago by niko

what is the problem with always using _all_ types that could be translated?
which ones are missing?

i don't see a problem if you add th for example.

(and yes, ImageManager? should use the popups/popup.js file instead of its own popup.js)

comment:7 Changed 12 years ago by gogo

  • Resolution set to fixed
  • Status changed from reopened to closed

This is 2 years old with no replies, I'm going to assume it's no longer an issue.

Note: See TracTickets for help on using tickets.