Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 270456 - Unable to use Babel PTT to verify PDE in the eclipse SDK
Summary: Unable to use Babel PTT to verify PDE in the eclipse SDK
Status: RESOLVED FIXED
Alias: None
Product: Babel
Classification: Technology
Component: EnglishStrings (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Kit Lo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 254317 270455
  Show dependency tree
 
Reported: 2009-03-30 10:18 EDT by Paul Webster CLA
Modified: 2009-04-03 22:06 EDT (History)
2 users (show)

See Also:


Attachments
pseudo translation problems in PDE (90.96 KB, image/x-png)
2009-04-01 22:38 EDT, Kit Lo CLA
no flags Details
PDE editor (35.04 KB, image/x-png)
2009-04-02 10:46 EDT, Kit Lo CLA
no flags Details
patch (2.03 KB, patch)
2009-04-02 11:06 EDT, Kit Lo CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2009-03-30 10:18:57 EDT
The Babel PTT NL packs prevent the PDE editor from opening with an exception.

They cause a SAXException.

PW
Comment 1 Denis Roy CLA 2009-03-30 10:34:48 EDT
I don't think this is a problem with the Babel PTT -- it is doing its job.  See bug 270445.

Reopen if I assessed this wrong, but I believe the PTT found (and pseudo-translated) strings that are not meant to be externalized or translated.
Comment 2 Kit Lo CLA 2009-04-01 22:38:55 EDT
Created attachment 130644 [details]
pseudo translation problems in PDE

I've identified the problem. Some of the descriptions in PDE editor are in HTML snipets. See attachment for example. HTML parser throws an exception when we insert the "eclipse123456:" prefix to the string.

Human translator knows not to translate the HTML tags. But, Babel's simple pseudo translation generator just inserts the prefix and breaks the HTML snipet.

I cannot think of a simple solution. One workaround may work, but not fool proof. When we see string begining with the HTML tag pattern "<tag>", we insert "<div>eclipse123456:</div>" instead. This seems to solve the PDE editor problem. But, I've seen strings like "<none>" (for some pulldown choices). The string is in HTML tag pattern "<tag>". Inserting "<div>eclipse123456:</div>" instead does not hurt in this case, but not very pretty.

Can anyone think of a better solution?
Comment 3 Kit Lo CLA 2009-04-01 22:39:18 EDT
reopen
Comment 5 Paul Webster CLA 2009-04-02 07:35:41 EDT
(In reply to comment #2)
> I cannot think of a simple solution. One workaround may work, but not fool
> proof. When we see string begining with the HTML tag pattern "<tag>", we insert
> "<div>eclipse123456:</div>" instead. This seems to solve the PDE editor
> problem. But, I've seen strings like "<none>" (for some pulldown choices). The
> string is in HTML tag pattern "<tag>". Inserting "<div>eclipse123456:</div>"
> instead does not hurt in this case, but not very pretty.
> 
> Can anyone think of a better solution?

I think that this would be acceptable ... the <none> pulldown choice is not the common case, and I think it is important that we can verify Forms (which PDE uses).

PW
Comment 6 Kit Lo CLA 2009-04-02 10:46:17 EDT
Created attachment 130701 [details]
PDE editor

I think this form text problem is very specific to PDE. I don't recall seeing something similar to this elsewhere. Therefore, instead of matching any HTML tag and perform this workaround, I'm thinking to look specifically for the "form" tag. (We will deal with other HTML tag cases if the problems come up later.)

A few more twists needed for the fix:
- placing "<div>prefix</div>" at the beginning of the string, before form tag, resulted in a message from a FormText class saying the text is non-well-form; I have to move the prefix as the first child of the form tag
- the prefix does not show up if it's enclosed by the div tag; I changed that to a p tag, then it shows up

Comments on the fix, Denis, Antoine?
Comment 7 Chris Aniszczyk CLA 2009-04-02 11:01:45 EDT
That seems OK.

Note that those strings in the PDE editor have been like that forever. 
Comment 8 Kit Lo CLA 2009-04-02 11:06:24 EDT
Created attachment 130704 [details]
patch
Comment 9 Denis Roy CLA 2009-04-02 11:26:16 EDT
+1
Comment 10 Kit Lo CLA 2009-04-03 22:06:16 EDT
I've released the fix to CSV. Coming Sunday's weekly build probably will not include the fix yet (until we deploy the fix to the live server). Please test with the following test update sites:

http://build.eclipse.org/technology/babel/test-updates/galileo/
http://build.eclipse.org/technology/babel/test-updates/ganymede/