Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#291 closed defect (fixed)

recomposition of english sentence doesnt necessarily acurate to translation

Reported by: mokhet Owned by: niko
Priority: lowest Milestone: Version 1.0
Component: Plugin_ContextMenu Version:
Severity: trivial Keywords: i18n
Cc:

Description

if (!/html|body/i.test(currentTarget.tagName))
  menu.push(null,
    [ HTMLArea._lc("Remove the", "ContextMenu") + " <" + currentTarget.tagName + "> " + HTMLArea._lc("Element...", "ContextMenu"),
			    function() {

line 214 to 216 (release 186), the code suppose we are in english. It works perfect for english grammar, but it is plain wrong in french.

  • english : Remove the <P> element...
  • french : Supprimer l'élément <P> ...
  • but we actually get : Supprimer <P> Élément...

We cant get this text write correctly in french (and i suppose same issue occurs for others languages) unless we cheat with the key and the real content

"Remove the": "Supprimer",
"Element...": "Elément..."

to

"Remove the": "Supprimer l'élément",
"Element...": " ..."

If nobody got an objection to this kind of manipulation to get the text we want, i'll commit the change to the language file.

Change History (7)

comment:1 Changed 14 years ago by niko

  • Keywords i18n added
  • Milestone set to Version 1.0
  • Owner changed from gogo to niko

imho we would be much more flexible with such a translation:

HTMLArea._lc("Remove the %elem% Element...", "ContextMenu").replace("%elem%", "&lt;" + currentTarget.tagName + "&gt;")

your fix would cause problems when we would use "Remove the" for something else like Remove the table or wahtever....

comment:2 Changed 14 years ago by mokhet

yes, that what i though and the reason why i asked for a confirmation cause the quick cheat i though about in very first place was really bad.

comment:3 Changed 14 years ago by gogo

niko, could you develop a way to have such functionality built into _lc so we could do perhaps something like

HTMLArea._lc("Blah $foo blah $bar", 'Some Context', { foo: 'Hello', blah: 'World'})

should be easy no?

comment:4 Changed 14 years ago by niko

would a nice idea...

but we have to think about #39 too (we might use a 3rd argument there too(?))

comment:5 Changed 14 years ago by niko

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

added in changeset:203 (as 3rd argument)

please use this feature now :D

comment:6 Changed 14 years ago by mokhet

HTMLArea._lc("Remove the $elem Element...

just one word : wonderfull

comment:7 Changed 14 years ago by niko

changed the behavior of this a bit in changeset:290
the syntax is now

var complexity = 'very';
HTMLArea._lc({string: 'this is a $complexity complex sentence', replace:{'complexity': complexity}});

....the other one (3rd argument) still works

Note: See TracTickets for help on using tickets.