JDK-4707118 : Plug-in messages with single quote - Bad display
  • Type: Bug
  • Status: Resolved
  • Resolution: Fixed
  • Component: deploy
  • Sub-Component: plugin
  • Priority: P3
  • Affected Version: 1.4.0,1.4.2
  • OS: generic,solaris_8,windows_nt
  • CPU: generic,x86
  • Submit Date: 2002-06-24
  • Updated Date: 2003-01-23
  • Resolved Date: 2003-01-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.2 betaResolved
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description

Name: gm110360			Date: 06/24/2002


FULL PRODUCT VERSION :
Plug-in Java(TM): Version 1.4.0
Utilisation de la version JRE 1.4.0 Java HotSpot(TM) Client VM

FULL OPERATING SYSTEM VERSION :
NT 4.0 SP6

ADDITIONAL OPERATING SYSTEMS :
IExplorer V6



A DESCRIPTION OF THE PROBLEM :
Many french messages content sentences with single quote.

These messages are displayed without single quote ('), and
often with unsubstituted "{0}" or "{1}" patterns.

Plugin uses java.text.MessageFormat.format() mecanism to
display messages.

And these ressource messages do'nt respected the documented
MessageFormat rules:
  Within a String, "''" represents a single quote.
  A QuotedString can contain arbitrary characters except
single quotes; the surrounding single quotes are removed.

Occurs in folowing versions: 1.4.0, 1.4.0_01, 1.4.1_beta

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Use "-Duser.language=fr" parameter in Java plugin
configuration panel.

2.Display message with single quote (inconsistent
Certificate, new installation or update of extension, ...)


EXPECTED VERSUS ACTUAL BEHAVIOR :
1) Display single quote (') in messages.

2) Substitute "{0}", "{1}" variables in these "single quote
messages".

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Bad message without {0} substitution,
No error

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
*** No Source code ***

Several messages content single quote and {0} variables in
sun.plugin.resources.Activator_fr.class resource file.

Example with "https_dialog.text" entry:

 French text entry is:
   ......
   Nom d'h��te de l'URL : {0}
   Nom d'h��te du certificat : {1}

 This message is displayed like this:
   ......
   Nom dh��te de lURL : ybs.myCompany.fr
   Nom dh��te du certificat : {1}

3 Remarks:
-  Quotes are removed
-  "{0}" is substituted (->Two single quote exist in the sentence)
-  "{1}" is displayed (->Only one single quote)


 For information, english message would be:
   ....
   Host name of the URL: ybs.myCompany.fr
   Host name from the certificate: john.myCompany.fr

---------- END SOURCE ----------

CUSTOMER WORKAROUND :
Use english version ( "-Duser.language=fr" parameter )
(Review ID: 158350) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis-beta FIXED IN: mantis-beta INTEGRATED IN: mantis-beta
2004-06-14

EVALUATION This is not a plug-in bug. This is MessageFormat syntax that needs to be used correctly in the translated versions of the strings. Take a look at the MessageFormat API: http://java.sun.com/j2se/1.4/docs/api/java/text/MessageFormat.html There are several examples on the page above. They acknowledge that the syntax for using single quotes in combination with parameters ({0}) is not straight forward. I've tried the following example: In order to display this string in Java Console Connectin' http://pcne.east/~mfisher/Test_progress/broken_image.jar with proxy'=webcache2:8080 I had to use the following syntax in the Activator.java file: "net.connect.proxy_is", "Connectin'' {0} with proxy''={1}" (you have to have extra "'" in front of a "'". If you have only one "'" it will not be displayed and {1} will be used as part of the string instead of being replaced with a parameter.) I am transfering this but to l10n team, since they need to update the translated strings with correct syntax. If you have any particular questions about using syntax - please feel free to contact me. ###@###.### 2002-07-10 see bug #4774227, 4651958 also. ###@###.### 2002-12-13 have revised ' symbol issue for all resource files under deploy dir, here lists the revised contents for Activator_fr.java, for obtaining the whole information, pls. refer to webrev: FILE: src/plugin/src/share/classes/sun/plugin/resources/Activator_fr.java [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "<html><b>Discordance du nom d'h\u00f4te</b></html>Le nom d'h\u00f4te figurant dans le certificat de s\u00e9curit\u00e9 du serveur ne correspond pas au nom du serveur." + "\n\nNom d'h\u00f4te de l'URL : {0}" + "\nNom d'h\u00f4te du certificat : {1}" + "\n\nVoulez-vous continuer ?" <<< "<html><b>Discordance du nom d''h\u00f4te</b></html>Le nom d''h\u00f4te figurant dans le certificat de s\u00e9curit\u00e9 du serveur ne correspond pas au nom du serveur." + "\n\nNom d''h\u00f4te de l''URL : {0}" + "\nNom d''h\u00f4te du certificat : {1}" + "\n\nVoulez-vous continuer ?" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "Voulez-vous accepter l'applet sign\u00e9 distribu\u00e9 par \"{0}\"?" + "\n\nAuthenticit\u00e9 de l'\u00e9diteur v\u00e9rifi\u00e9e par \"{1}\"" <<< "Voulez-vous accepter l''applet sign\u00e9 distribu\u00e9 par \"{0}\"?" + "\n\nAuthenticit\u00e9 de l''\u00e9diteur v\u00e9rifi\u00e9e par \"{1}\"" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "Acceptez-vous le certificat du site Web \"{0}\" en vue d'un \u00e9change d'informations crypt\u00e9es ?" + "\n\nAuthenticit\u00e9 de l'\u00e9diteur v\u00e9rifi\u00e9e par \"{1}\"" <<< "Acceptez-vous le certificat du site Web \"{0}\" en vue d''un \u00e9change d''informations crypt\u00e9es ?" + "\n\nAuthenticit\u00e9 de l''\u00e9diteur v\u00e9rifi\u00e9e par \"{1}\"" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "<html><b>Demande de t\u00e9l\u00e9chargement</b></html>L'applet requiert une version plus r\u00e9cente (sp\u00e9cification {0}) du package facultatif \"{1}\" \u00e0 partir de {2}\n\nVoulez-vous continuer ?" <<< "<html><b>Demande de t\u00e9l\u00e9chargement</b></html>L''applet requiert une version plus r\u00e9cente (sp\u00e9cification {0}) du package facultatif \"{1}\" \u00e0 partir de {2}\n\nVoulez-vous continuer ?" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "<html><b>Demande de t\u00e9l\u00e9chargement</b></html>L'applet requiert une version plus r\u00e9cente (impl\u00e9mentation {0}) du package facultatif \"{1}\" \u00e0 partir de {2}\n\nVoulez-vous continuer ?" <<< "<html><b>Demande de t\u00e9l\u00e9chargement</b></html>L''applet requiert une version plus r\u00e9cente (impl\u00e9mentation {0}) du package facultatif \"{1}\" \u00e0 partir de {2}\n\nVoulez-vous continuer ?" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "<html><b>Demande de t\u00e9l\u00e9chargement</b></html>L'applet requiert ({0})du package facultatif \"{1}\" {2} \u00e0 partir de {3}\n\nVoulez-vous continuer ?" <<< "<html><b>Demande de t\u00e9l\u00e9chargement</b></html>L''applet requiert ({0})du package facultatif \"{1}\" {2} \u00e0 partir de {3}\n\nVoulez-vous continuer ?" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "<html><b>Demande de t\u00e9l\u00e9chargement</b></html>L'applet requiert l'installation du package facultatif \"{0}\" \u00e0 partir de {1}\n\nVoulez-vous continuer ?" <<< "<html><b>Demande de t\u00e9l\u00e9chargement</b></html>L''applet requiert l''installation du package facultatif \"{0}\" \u00e0 partir de {1}\n\nVoulez-vous continuer ?" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "{0} n'a pas le format xxxx.xxxx.xxxx.xxxx, o\u00f9 x est un nombre hexad\u00e9cimal" <<< "{0} n''a pas le format xxxx.xxxx.xxxx.xxxx, o\u00f9 x est un nombre hexad\u00e9cimal" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "T\u00e9l\u00e9chargement du module optionnel autoris\u00e9 par l'utilisateur, t\u00e9l\u00e9charger \u00e0 partir de {0}" <<< "T\u00e9l\u00e9chargement du module optionnel autoris\u00e9 par l''utilisateur, t\u00e9l\u00e9charger \u00e0 partir de {0}" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "D\u00e9marrage du programme d'installation Java par {0}" <<< "D\u00e9marrage du programme d''installation Java par {0}" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "Impossible d'ex\u00e9cuter {0}" <<< "Impossible d''ex\u00e9cuter {0}" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "L'acc\u00e8s \u00e0 {0} a \u00e9chou\u00e9" <<< "L''acc\u00e8s \u00e0 {0} a \u00e9chou\u00e9" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "La taille du cache est : {0} octets. Vous devez lib\u00e9rer de l'espace" <<< "La taille du cache est : {0} octets. Vous devez lib\u00e9rer de l''espace" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "Impossible de supprimer le fichier {0} parce qu'il est utilis\u00e9 par cette application" <<< "Impossible de supprimer le fichier {0} parce qu''il est utilis\u00e9 par cette application" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "Impossible de supprimer le fichier {0} car il peut \u00eatre en cours d'utilisation par cette et/ou une autre application" <<< "Impossible de supprimer le fichier {0} car il peut \u00eatre en cours d''utilisation par cette et/ou une autre application" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "La copie du cache de {0} n'est pas actualis\u00e9e\n Copie du cache : {1}\n Copie Serveur : {2}" <<< "La copie du cache de {0} n''est pas actualis\u00e9e\n Copie du cache : {1}\n Copie Serveur : {2}" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "ATTENTION : {0} n'est pas un r\u00e9pertoire. La fonction de cache sera d\u00e9sactiv\u00e9e." <<< "ATTENTION : {0} n''est pas un r\u00e9pertoire. La fonction de cache sera d\u00e9sactiv\u00e9e." [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "ATTENTION : Impossible d'\u00e9crire dans le r\u00e9pertoire du cache {0}. La mise en cache sera d\u00e9sactiv\u00e9e." <<< "ATTENTION : Impossible d''\u00e9crire dans le r\u00e9pertoire du cache {0}. La mise en cache sera d\u00e9sactiv\u00e9e." [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "<html><b>Fichier non supprim\u00e9</b></html>{0} est peut-\u00eatre en cours d'utilisation.\n" <<< "<html><b>Fichier non supprim\u00e9</b></html>{0} est peut-\u00eatre en cours d''utilisation.\n" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "{0} : cette m\u00e9thode n'existe pas" <<< "{0} : cette m\u00e9thode n''existe pas" [FOUND ' IN WORDS] ------------------------------------------------------------------------------- >>> "{0} : cette m\u00e9thode/propri\u00e9t\u00e9 n'existe pas" <<< "{0} : cette m\u00e9thode/propri\u00e9t\u00e9 n''existe pas"
2004-06-11

SUGGESTED FIX See evaluation for an example of correct syntax. ###@###.### 2002-07-10
2002-07-10