Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 137794

Summary: Mock 3.2 : Extension Point Description in the New Extension dialog not translated
Product: [Eclipse Project] PDE Reporter: Kit Lo <kitlo>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: baumanbr, camle, caniszczyk, cdeadmin, curtis.windatt.public, Karice_McIntyre, platform-releng-inbox, steven.wasleski, Tod_Creasey, wassim.melhem
Version: 3.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
ExtensionPointDescriptionFromPDE.doc.user
none
ExtensionPointDescription in New Extension dialog
none
tooltip none

Description Kit Lo CLA 2006-04-20 13:46:58 EDT
Not sure where does the Extension Point Description in the New Extension dialog is pulled from. Even though the extension point description is translated in the reference section of pde.doc.user (http://127.0.0.1:51951/help/topic/org.eclipse.pde.doc.user/reference/extension-points/org_eclipse_pde_ui_newExtension.html) (see first attachment below), the description in the dialog is not translated (see second attachment below). And I couldn't find a key with this description in any .properties file.
Comment 1 Kit Lo CLA 2006-04-20 13:48:49 EDT
Created attachment 39074 [details]
ExtensionPointDescriptionFromPDE.doc.user
Comment 2 Kit Lo CLA 2006-04-20 13:49:28 EDT
Created attachment 39075 [details]
ExtensionPointDescription in New Extension dialog
Comment 3 Wassim Melhem CLA 2006-04-20 13:55:08 EDT
the content of pde.doc.user or any doc plugins is not relevant to how schemas are located.

The description you see in the wizard is retrieved from the extension point schema.

The schemas are located in the source plug-ins that we ship (e.g. org.eclipse.rcp.source, org.eclipse.pde.source).

are we shipping translated schemas?  If so, how and where?
Comment 4 Kit Lo CLA 2006-04-20 14:13:25 EDT
No, we don't translate the schemas.
Comment 5 Wassim Melhem CLA 2006-04-20 14:16:40 EDT
well, there you go.  We can't do anything about this then.
Comment 6 Wassim Melhem CLA 2006-04-20 14:20:51 EDT
I find it surprising that the extension point html docs themselves are being translated, not the schemas.

After all, the html docs are generated via an ant task by reading and transforming the schemas.

Note that even if we translate the schemas, where would they go, and would we need to start putting $nl$ in the schema attribute of <extension-point> elements?
Comment 7 Kit Lo CLA 2006-04-20 14:50:25 EDT
>Note that even if we translate the schemas, where would they go, and would we
need to start putting $nl$ in the schema attribute of <extension-point>
elements?
You gave me the answer why we don't translate the schemas :-)
Comment 8 Wassim Melhem CLA 2006-04-23 22:24:37 EDT
what's the plan here?  
Comment 9 Wassim Melhem CLA 2006-04-27 21:00:11 EDT
I am going to close as nothing can be done unless schemas are translated.
Comment 10 Steven Wasleski CLA 2006-04-28 10:27:40 EDT
Could we leave this bug open but defer it for consideration to 3.3?

The field that shows the description from the schema is new for 3.2.  This is the first time we have had interesting fields (from a translation point of view) extracted from the schema for use in the UI.  We have historically not translated content from the source plugins (the schemas come from the source plugins) because they are considered ISV only plugins that are not generally seen by end users.  PDE is a bit different than most other features in that all of its end users are ISVs.  I don't believe we have the time to completely think through all the ramifications of starting to translate this stuff for 3.2.
Comment 11 Wassim Melhem CLA 2006-04-28 10:30:44 EDT
sure.  We actually had this functionality in 3.1.x but via a context menu item in that same wizard.

In 3.2, we made it more visible for a better workflow.
Comment 12 Wassim Melhem CLA 2006-04-28 16:44:51 EDT
Also note that another use of schema-related information directly in the UI is in tooltips as you hover over attribute names in the manifest editor.

This function has existed since 3.0

Screenshot to follow.
Comment 13 Wassim Melhem CLA 2006-04-28 16:45:59 EDT
Created attachment 39837 [details]
tooltip

Tooltip content is extracted from schema
Comment 14 Wassim Melhem CLA 2006-05-23 15:05:10 EDT
*** Bug 143294 has been marked as a duplicate of this bug. ***
Comment 15 Kit Lo CLA 2007-02-28 15:41:11 EST
After taking a look at the source code, I think the problem is in org.eclipse.pde.internal.core.SourceLocationManager.

In my 3.3 M5 environment, the following list is returned by getExtensionLocations():

eclipse\plugins\com.ibm.icu.source_3.6.0.20061215\src
eclipse\plugins\org.eclipse.cvs.source_1.0.0\src
eclipse\plugins\org.eclipse.jdt.source_3.3.0.v20070205-180-GKeyrSg2mvoVKQM\src
eclipse\plugins\org.eclipse.pde.source_3.3.0.v20061114-080-87cMNDNcOD-KLPM\src
eclipse\plugins\org.eclipse.platform.source.win32.win32.x86_3.3.0.v2007020-6BKMZVNUaZs1qhM\src
eclipse\plugins\org.eclipse.platform.source_3.3.0.v2007020-6BKMZVNUaZs1qhM\src
eclipse\plugins\org.eclipse.rcp.source.win32.win32.x86_3.3.0.v20070116-fFIEHGCmfQISbVP\src
eclipse\plugins\org.eclipse.rcp.source_3.3.0.v20070116-fFIEHGCmfQISbVP\src

If it could find all the src folders in the NL fragments too, then the translated schemas could be loaded. For example, I expect the extension locations list to be something like this:

eclipse\plugins\com.ibm.icu.source.nl1_3.6.0.v20070228\nl\zh\HK\src
eclipse\plugins\com.ibm.icu.source_3.6.0.20061215\src
eclipse\plugins\org.eclipse.cvs.source.nl1_1.0.0.v20070228\nl\zh\HK\src
eclipse\plugins\org.eclipse.cvs.source_1.0.0\src
eclipse\plugins\org.eclipse.jdt.source.nl1_3.3.0.v20070228\nl\zh\HK\src
eclipse\plugins\org.eclipse.jdt.source_3.3.0.v20070205-180-GKeyrSg2mvoVKQM\src
eclipse\plugins\org.eclipse.pde.source.nl1_3.3.0.v20070228\nl\zh\HK\src
eclipse\plugins\org.eclipse.pde.source_3.3.0.v20061114-080-87cMNDNcOD-KLPM\src
eclipse\plugins\org.eclipse.platform.source.win32.win32.x86.nl1_3.3.0.v20070228\nl\zh\HK\src
eclipse\plugins\org.eclipse.platform.source.win32.win32.x86_3.3.0.v2007020-6BKMZVNUaZs1qhM\src
eclipse\plugins\org.eclipse.platform.source.nl1_3.3.0.v20070228\nl\zh\HK\src
eclipse\plugins\org.eclipse.platform.source_3.3.0.v2007020-6BKMZVNUaZs1qhM\src
eclipse\plugins\org.eclipse.rcp.source.win32.win32.x86.nl1_3.3.0.v20070228\nl\zh\HK\src
eclipse\plugins\org.eclipse.rcp.source.win32.win32.x86_3.3.0.v20070116-fFIEHGCmfQISbVP\src
eclipse\plugins\org.eclipse.rcp.source.nl1_3.3.0.v20070228\nl\zh\HK\src
eclipse\plugins\org.eclipse.rcp.source_3.3.0.v20070116-fFIEHGCmfQISbVP\src
Comment 16 Kit Lo CLA 2007-03-20 12:44:38 EDT
Can we fix this in 3.3?
Comment 17 Wassim Melhem CLA 2007-03-20 13:16:18 EDT
yes, now that the schemas are being translated, this problem can be fixed.

where can we download the translations from?
Comment 18 Brian Bauman CLA 2007-03-20 13:20:42 EDT
I can go ahead and look at this one for 3.3M7
Comment 19 Kit Lo CLA 2007-03-20 13:29:49 EDT
We don't have the schemas translated yet. I just want to confirm if PDE is planning to fix that in 3.3, then we will send them for translation.
Comment 20 Wassim Melhem CLA 2007-03-20 13:38:07 EDT
the layout in comment 15 would work.

Each NL fragment must declare an org.eclipse.pde.core.source extension though like the following:

  <extension point = "org.eclipse.pde.core.source">
     <location path="$nl$/src" />
  </extension>
Comment 21 Kit Lo CLA 2007-03-22 17:09:34 EDT
Wassim, NL fragment does not have a plugin.xml that we can specify the "org.eclipse.pde.core.source" extension point. I tried changing the extension point for org.eclipse.rcp.source to:

  <extension point = "org.eclipse.pde.core.source">
     <location path="$nl$/src" />
  </extension>

but org.eclipse.pde.internal.core.SourceLocationManager#getExtensionLocations() is still not picking up the translated schemas in org.eclipse.rcp.source.nl1/nl/<locale>/src .

Do we need to add some more code in getExtensionLocations() to do that?
Comment 22 Steven Wasleski CLA 2007-03-23 08:59:33 EDT
Kit, I believe you can put this in the fragment's fragment.xml file.
Comment 23 Kit Lo CLA 2007-03-23 16:14:01 EDT
I created the fragment.xml file and added the "org.eclipse.pde.core.source" extension point. SourceLocationManager#getExtensionLocations() still didn't find the translated schema files until I did the following 2 things:
1) use "org.eclipse.core.contenttype_3.2.100.v20070319" folder name instead of just "org.eclipse.core.contenttype" in the src folder
2) change <location path="$nl$/src" /> to <location path="nl/zh/HK/src" />

Files and folders sent for translation do not have version numbers (or else the files will be considered new every time). Can PDE look for folders without the version number too?

For 2), PDE probably needs to add code to support $nl$ location path name.
Comment 24 Kit Lo CLA 2007-03-24 17:31:26 EDT
There are hundreds of schema files in Eclipse SDK and other Eclipse projects. The volume is quite high. We need to resolve the schema source searching problems ASAP if we want the schema files translated in 3.3. I'm raising the severity to major.

Problem #1 in comment #23 would affect the way we package and build the schema files.

For the schema source location path extension point problem, I'm wondering why we can't add $nl$ to the English schema source extension point, for example in eclipse\plugins\org.eclipse.rcp.source. If there is a reason for that, a change has to be added to the NL build tool to add this extension point.
Comment 25 Wassim Melhem CLA 2007-03-28 22:32:48 EDT
Hi Kit, 

Just to be clear, no matter what route we take, PDE will have to do some work to support it.  $nl$ is not supported yet.

Now, as for what we should do:

I think the easiest thing would be for the plug-in, not the fragment, to change its source location from 'src' to '$nl$/src'.  PDE would expand the nl variable and look for the schemas in the plug-in and its NL fragment and locates the best match.

Incidentally, why not 'src/$nl$'?

cc the releng team to comment on how easy it would be to change this in the build.

Also, folders must have a version number.  Otherwise, if the product ships with multiple versions of a plug-in, which is common, it can be a mess.

Comment 26 Wassim Melhem CLA 2007-03-28 22:41:26 EDT
also a reminder about comment 6:

Schema files are used to generate the HTML files for the sdk.  You would no longer need to translate the html files directly once the schemas get translated.
Comment 27 Kit Lo CLA 2007-03-29 22:58:36 EDT
Technically there should not be new UI strings in maintenance releases. Therefore, the NL packs should work for all maintenance releases of a major Eclipse release (like 3.3.*). If we add the version number to the translated schema folder names, the NL packs will not work on maintenance releases. We need to think of a solution to that.

According to the "Locale specific files" description at http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/product_def_nl.htm , "Each file should have exactly the same file name, but be located in subdirectories underneath the nl sub-directory in the fragment's root." Therefore, I think the plug-in should change its source location from 'src' to '$nl$/src'.

>Schema files are used to generate the HTML files for the sdk. You would no longer need to translate the html files directly once the schemas get translated.
Are you referring to the "Extension Points Reference" section of the on-line doc? But, those HTML files are not generated dynamically during runtime. How can we load the translated schemas and generate the HTML files during runtime?
Comment 28 Wassim Melhem CLA 2007-03-31 20:46:08 EDT
>Are you referring to the "Extension Points Reference" section of the on-line
>doc? But, those HTML files are not generated dynamically during runtime. How
>can we load the translated schemas and generate the HTML files during runtime?

the HTML files are generated at build time from the schemas via an ant task.  The ant task is called pde.convertSchemaToHTML and is found in the org.eclipse.pde.core plug-in.

So once the schemas get translated, you can use this ant task to generate the HTML files and put them in the doc plug-ins.
Comment 29 Kit Lo CLA 2007-03-31 23:48:49 EDT
>the HTML files are generated at build time from the schemas via an ant task.
>The ant task is called pde.convertSchemaToHTML and is found in the
>org.eclipse.pde.core plug-in.

Actually, we may need something in reverse. The "Extension Points Reference" HTML files have been translated for many releases. But, the schema files have never been translated before. Could the PDE team provide an ant task to convert the HTML files back to schema files? If that could be done, we could save a lot of translation work of the schema files.
Comment 30 Wassim Melhem CLA 2007-04-01 17:30:55 EDT
An HTML -> .exsd conversion is not possible.
Comment 31 Wassim Melhem CLA 2007-04-26 22:32:12 EDT
Kit, what's the plan here?  We need to wrap up by M7.

Two things to note:

1. It's not very likely that all plug-ins in Europa will start pre-pending $nl$ to their source location paths at this point in the cycle.

PDE will need to assume an implicit "$nl$/" as a prefix for all schema paths.
This will be more costly of course, since we will be searching in more places than we need to.

2. We need to come up with a reasonable solution for the version in the paths.
Comment 32 Tod Creasey CLA 2007-04-27 07:49:26 EDT
I don't think anyone will doing the $nl$ prepending on a schema file - it is just something that is generally used by the implementation a file lookup (like images).

Wassim I think you would need to do it in your support immplicitly should we decide to support it.

The question is if schemas schould be translated at all or are they like javadoc that is only in English? This is a hard call because if we think this is like javadoc we should leave it - I am not convinced that there is a lot of utlility in the translation of it.
Comment 33 Kit Lo CLA 2007-04-27 08:12:35 EDT
>The question is if schemas schould be translated at all or are they like
javadoc that is only in English?

Tod, not sure if you are aware, the problem is a PDE dialog is pulling info from the schema files. See
https://bugs.eclipse.org/bugs/attachment.cgi?id=39075&action=view

If we don't translate the schemas, mixed languages will be displayed in the PDE dialog. That looks really bad.
Comment 34 Wassim Melhem CLA 2007-04-27 11:08:26 EDT
re comment 32:
To me, schema descriptions are like Javadoc.  

re comment 4:
These descriptions also appear when you hover in tooltips/infopops as you hover over certain elements in the editor form pages and source pages.
Similarly, English javadoc appears in the java editor when you hover over Java elements.

Why is it ok for the tooltip to show English?

Also, if it's that one small area in the New Extension wizard that is solely causing this crisis, as useful as it may be, perhaps we should contemplate removing it.
Comment 35 Kit Lo CLA 2007-04-27 11:33:02 EDT
>Why is it ok for the tooltip to show English?
Actually, that's another reason why we have to translate the schemas. I didn't mention that only to give Tod a simplified answer.

>Also, if it's that one small area in the New Extension wizard that is solely
causing this crisis, as useful as it may be, perhaps we should contemplate
removing it.
Personally, that solution is okay with me. But, we need other people's opinions. However, if we go with this, we also have to think how to solve the English tooltips for elements in the editor form pages and source pages.
Comment 36 Wassim Melhem CLA 2007-04-27 11:41:38 EDT
>we also have to think how to solve the English tooltips for elements in the >editor form pages and source pages.

Kit, I still don't understand why the English Javadoc everywhere you look/hover in the Java editor is not a problem...  Isn't that the same thing?
Comment 37 Kit Lo CLA 2007-05-01 13:53:48 EDT
The main problem reported in the report is the intermixing of English extension point description with translated UI. End-users do not know the implementation. They do not know the paragraph of extension point description is being pulled from the schema file. If we think the extension point description will provide values to the end-users, we should think of a way to extract the info, and also have the mechanism to load the translations ready. That should be the main goal of this bug.

I agree that schemas are similar to Javadocs. "Ideally", Javadocs should be translated too. (Once again, "ideally".) But, because of resource constraints and the fact that a lot of the info in Javadocs are very technical and hence may not be easy to translate. We chose not to translate them. I think I can apply the same argument to the tooltips for elements in the editor form pages and source pages.
Comment 38 Brian Bauman CLA 2008-02-06 00:06:32 EST
Chris, this might be something that is nice to have if we can figure out the details.
Comment 39 Curtis Windatt CLA 2008-04-23 16:08:25 EDT
Looks like an interesting problem, but there is not enough time/resources for 3.4.
Comment 40 Eclipse Genie CLA 2019-04-28 13:49:55 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 41 Lars Vogel CLA 2019-10-29 05:33:21 EDT
This bug is marked as stale for some time. If it is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.