Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Issue with new NLS format

The problem is not with NLS reading the message property files, it is with
the NLS#bind convenience methods.

>From https://bugs.eclipse.org/bugs/show_bug.cgi?id=90803:

OSGi implements its own MessageFormat class because it needs to run on a
set of
class libraries which doesn't include java.text.MessageFormat. This class
is
internal and spec'd to only perform the simple substitution of int
arguments and
not the full spec of java.text.MessageFormat.

The fact that it doesn't handle the escaping of double quotes (which is
used
quite commonly) is a bug and will be fixed. We do not plan on implementing
the
full spec of java.text.MessageFormat in the internal MessageFormat class.

That being said, here is what we are going to do:

1). Fix osgi.MessageFormat to handle double-quoted strings.
2). Update the spec of NLS#bind to better define the cases we handle.
3). We recommend if clients use the full capabilities of the MessageFormat
class
then they call it directly rather than calling NLS#bind. (which is really
just a
convenience method and not essential...you can use NLS for your message
bundles
and not use NLS#bind)



                                                                           
             Olivier                                                       
             Thomann/Ottawa/IB                                             
             M@IBMCA                                                    To 
             Sent by:                  eclipse-dev@xxxxxxxxxxx             
             eclipse-dev-bounc                                          cc 
             es@xxxxxxxxxxx                                                
                                                                   Subject 
                                       [eclipse-dev] Issue with new NLS    
             08/04/2005 10:58          format                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
                 "General                                                  
                development                                                
              mailing list of                                              
                the Eclipse                                                
                 project."                                                 
                                                                           
                                                                           





Hi,

The new NLS format seems to have problems with the format of the properties
files. The quote escaping doesn't work anymore. If you have messages using
double quotes, you should not convert immediately.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=90803.

JDT/Core has more than 300 test failures once the conversion was applied to
the NLS messages in org.eclipse.jdt.internal.core.util.messages.properties.


Olivier_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev




Back to the top