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

Bug 102366

Summary: [Cheatsheet] PII: "param3" attribute in cheatsheet action tag
Product: [Eclipse Project] Platform Reporter: Kit Lo <kitlo>
Component: User AssistanceAssignee: platform-ua-inbox <platform-ua-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: camle, cgold, dejan, dwhare, Mike_Wilson, steven.wasleski
Version: 3.1   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kit Lo CLA 2005-06-30 13:44:41 EDT
By reading the child "description" tag in 
ECLIPSE\PLUGINS\ORG.ECLIPSE.PDE\CHEATSHEETS\UPDATES.XML, it appears that the 
author wants "param3" attribute in "action" tag to be translated. But, 
translation tools have no way to tell if the "param3" attribute should be 
translated or not. A suggested solution is to move the "param3" attribute into 
another child tag.

<item
  href="/org.eclipse.pde.doc.user/guide/pde_feature_setup.htm"
  title="Creating the feature project"
  skip="true">
  <action
      pluginId="org.eclipse.pde.ui"
      param1="com.example.xyz-feature"
      param2="com.example.xyz"
      param3="XYZ Feature"
      
class="org.eclipse.pde.internal.ui.wizards.feature.OpenProjectWizardAction"/>
   <description>
      Select <b>File-&gt;New-&gt;Feature Project</b> to bring up the
      feature project creation wizard. Choose 'com.example.xyz-feature'
      for the project name. Choose 'com.example.xyz' for the feature id
      and 'XYZ Feature' for the feature name.
      Check 'com.example.xyz' plug-in in the list of plug-ins and
      press <b>Finish</b>. The wizard
      is automatically launched when you click the
      &quot;Click to Perform&quot; button.
    </description>
</item>
Comment 1 Cam-Thu Le CLA 2005-07-01 10:40:37 EDT
Dejan, please comment on the fix suggestion. Until this problem is fixed, it 
will always present as a bottle neck for translation. 
Comment 2 Kit Lo CLA 2007-02-13 16:28:55 EST
As more and more Eclipse projects are starting to use cheat sheets to guide their users, we are seeing more of this problem. There is no automatic and reliable way to determine which attribute values for this <action> element contain translatable text. Similar problem is happening to the <command> element as reported in bug 156832.

This problem is hindering the proper translation of potentially many cheat sheets for all Eclipse projects. I'm increasing the severity to "major".
Comment 3 Chris Goldthorpe CLA 2007-02-13 16:55:45 EST
I agree that this is a problem that needs to be resolved if we want to
encourage the wider use of cheat sheets. BTW I think you meant to reference Bug 156382.

I think that the correct solution would be to add a translation hint to the
<action> element in the cheat sheet schema, this would have no semantic effect
on the cheat sheet but would let the translators know which parameters need
translation, and CHKPII could presumably adapt to use this new piece of
information.

Dejan, what do you think about this idea? We would need PMC approval but since
it would be backward compatible and serve only to make life easier for the
translators it seems non-controversial.
Comment 4 Kit Lo CLA 2007-02-13 18:45:56 EST
Chris, when you design this new hint, please make sure we'll be able to specify an "untranslatable" hint for strings that look translatable (e.g. "International Business Machines") but we want to force it not to be translated. Thanks!
Comment 5 Chris Goldthorpe CLA 2007-02-13 19:04:18 EST
I was thinking of making the hint work as follows:

The hint will apply to an action or command.

If a hint exists it will specify which parameters must be translated. Any parameters of that action/command not listed in the hint should not be translated.

If there is no hint the translators have to guess (i.e. it is the same as before)

Obviously we would like all cheat sheets to have translation hints, however the absence of a hint just means that the translators have to rely on the same heuristics they used prior to Eclipse 3.3.
Comment 6 Chris Goldthorpe CLA 2007-02-16 13:20:57 EST
Hi Kit, 

Can you take a look over the proposal below and if it looks good to you I will request approval to make this change.

For both the <action> and <command> elements in a cheatsheet add a new optional attribute "translate". This will contain translation hints but has no semantic effect. The value of the attribute will be a comma separated list of those parameters which need translation. Any parameters not in the list should not be translated.

Examples

translate = "param2, param3"     means translate param2 and param3 only.
translate = ""   means do not translate any parameters.

If the translate attribute is not specified the translators will have to guess at which strings require translation, for this reason we recommend that the translate attribute should always be specified in any cheatsheet which may end up being translated to other languages.
Comment 7 Kit Lo CLA 2007-02-16 16:07:07 EST
Yes, this new hint will definitely improve the translatability of Eclipse cheat sheets. I vote yes!
Comment 8 Chris Goldthorpe CLA 2007-02-19 12:48:35 EST
Copying Mike Wilson and requesting PMC approval for the API change described in comment #6. The change is API because the "translate" attribute will be added to the cheat sheet content file schema as an optional attribute. It is 100% backward compatible and non-breaking.
Comment 9 Mike Wilson CLA 2007-02-19 12:59:22 EST
Of course, "the translators have to guess" is less than ideal, so it's unfortunate that that is the default when the new translation hint is not specified. I guess that's no worse than the situation we were in before.

+1.

(Is there a plan in place to update the SDK cheatsheets?)
Comment 10 Chris Goldthorpe CLA 2007-02-19 13:17:44 EST
Yes, we do plan to update existing cheat sheets, I just opened 

Bug 174663 - [CheatSheet] Update SDK cheat sheets to add translation hints
Comment 11 Chris Goldthorpe CLA 2007-02-19 17:17:19 EST
Fixed in HEAD, will be in M6. The documentation for this new attribute is in the help page titled, "Cheat sheet content file XML Format".
Comment 12 Chris Goldthorpe CLA 2007-02-19 17:20:35 EST
*** Bug 82749 has been marked as a duplicate of this bug. ***
Comment 13 Chris Goldthorpe CLA 2007-02-19 17:23:54 EST
*** Bug 156382 has been marked as a duplicate of this bug. ***
Comment 14 Kit Lo CLA 2008-02-11 09:44:23 EST
closing old bug