Bug 5603

Summary: TVT: Jar file export error message constructed incorrectly for NL (JarFileExportOperation.exportedWithCompile)
Product: [Eclipse Project] JDT Reporter: Dan Kehn <kehn>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P1    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Malformed error message none

Description Dan Kehn CLA 2001-11-06 19:23:31 EST
The message displayed when errors were found while exporting a class that 
doesn't compile to a JAR file are incorrect.

The spanish text:

 Exportado con compilación errores: ...

corresponds to the following properties file:

eclipse\plugins\org.eclipse.jdt.ui\jdt_jar\org\eclipse\jdt\internal\ui\jarpackag
er\JarPackagerMessages.properties

JarFileExportOperation.exportedWithCompile=Exportado con compilaci¢n
JarFileExportOperation.notExportedDueToCompile=No exportado debido a la 
compilaci¢n
JarFileExportOperation.errors=\ errores: {0}
JarFileExportOperation.warnings=\ avisos: {0}

The english file is as following:

JarFileExportOperation.exportedWithCompile=Exported with compile
JarFileExportOperation.notExportedDueToCompile=Not exported due to compile
JarFileExportOperation.errors=\ errors: {0}
JarFileExportOperation.warnings=\ warnings: {0}

These 4 strings combine to form the following sentences:

Exported wth compile errors: {0}
Exported with compile warnings: {0}
Not exported due to compile errors: {0}
Not exporte due to compile warnings: {0}

This string structure makes it impossible to obtain a good translation in 
spanish because the translation of the word compile must be placed at the very 
end of the sentence. I can make a workaround to this problem, but the strings 
should be rewritten, either as the actual 4 sentences that appear or as only 
two sentences replacing errors and warnings with a variable, i.e.:

Exported with compile {1}: {0}
Not exported due to compile {1}: {0}

In general, it is poor NL enablement practice to "construct" sentences.  If you 
must use such techniques, allow for substitution as described above.
Comment 1 Dan Kehn CLA 2001-11-06 19:24:31 EST
Created attachment 83 [details]
Malformed error message
Comment 2 Rodrigo Peretti CLA 2001-11-07 09:21:44 EST
Moving to JDT UI.
Comment 3 Dani Megert CLA 2001-11-07 11:09:50 EST
Changed to use the 4 different keys/strings.
Fixed > Build 20011106