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

Bug 329106

Summary: [Webapp] French tooltip for "Search Scope:" link in Help viewer does not render correctly
Product: [Eclipse Project] Platform Reporter: David Cagle <david.cagle>
Component: User AssistanceAssignee: Chris Goldthorpe <cgold>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cgold, kitlo
Version: 3.4.2   
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Picture of French tooltip problem
none
Patch which allows a single quote to be used in resources none

Description David Cagle CLA 2010-10-29 16:22:55 EDT
Build Identifier: 3.4.2

The tooltip for the "Search Scope:" link does not render properly for French.  It is cut-off after a certain character.

It is part of the "org.eclipse.help.webapp.nl_fr" plugin and the "WebappResources_fr.properties" file.

SelectWorkingSetTitle=S\u00e9lectionner l'\u00e9tendue de la recherche

Reproducible: Always

Steps to Reproduce:
1. Bring up French version
2. Hover over "Search scope:" link
3. Tooltip is cut-off and doesn't render properly.  It displays "Selectionner l"
Comment 1 David Cagle CLA 2010-10-29 16:23:44 EDT
Created attachment 182084 [details]
Picture of French tooltip problem
Comment 2 Kit Lo CLA 2010-11-17 12:02:56 EST
During the process of encoding the string from the resource file into a JSP file, the single quote caused the string to terminate earlier. Assigning to the Eclipse UA team to fix.

In the meantime, I changed the French translation of the following strings to avoid the problem.

SelectWorkingSetTitle=Sélectionner la portée de la recherche
ScopeTooltip=Sélectionner la portée de la recherche
Comment 3 Chris Goldthorpe CLA 2010-11-17 15:34:36 EST
The reason why the apostrophe ends up cutting the string short is that the resource string gets copied into the html page as an attribute in single quotes,

i.e. 

<a id="scopeLabel" title='ScopeTooltip' 

where ScopeTooltip is replaced by the translation. If the translation contains a single quote it will terminate the title string ( which is used as the tooltip ).

Almost everywhere in the help system where a resource is used in an attribute it is enclosed in double quotes as in

<a id="scopeLabel" title="ScopeTooltip" 

There are a few places where a single quote is used. This is inconsistent and I think we should always use double quotes when using a resource in an HTML attribute so that the translators can have consistent rules to follow and know that they can safely use a ' character in a resource, which is important when translating to French.
Comment 4 Chris Goldthorpe CLA 2010-11-18 18:15:28 EST
Created attachment 183438 [details]
Patch which allows a single quote to be used in resources

Currently the help Webapp is inconsistent about whether a single quote can be used in a resource string, it works fine for some resource ids but not for others. This will consistently allow all resources to include a single quote.
Comment 5 Chris Goldthorpe CLA 2010-11-18 18:16:35 EST
Patch applied to HEAD
Comment 6 Chris Goldthorpe CLA 2010-12-02 14:00:22 EST
This was a regression caused by the fix to Bug 329106.

Patch applied to HEAD, Fixed