Hi all,
Laurent Blume wrote:
Alan Burlison a écrit :
As a generalisation it is error and warning messages that get the
double-quotes stripped as they pass through Java's MessageFormat class,
but some others do as well. It's a pain, I'll see if I can think of a
solution. It might also help a little if the CTI tool gave the
labels as well as the text. You can see the current versions of the
master and translated files in the Auth repo - see
http://src.opensolaris.org/source/xref/website/oso/auth/AuthWebapp/src/configuration/
Is it normal that all non-ASCII chars are escaped? The Greek and
Chinese texts, for example, are not legible at all, full of \u03CC\u03C2.
In my memories of working with them, .properties are UTF-8 ancoded,
wouldn't it be easier to keep then as such?
Java properties files are considered to be in ISO8859-1 encoding.
Therefore all non-ASCII characters must be escaped by Unicode escapes
(\uXXXX).
Regarding to quotes, there are several rules that help here and will
work in 99% of cases:
Java properties file is the source file for the text. The rule is that
if a segment contains a placeholder (number inside brackets, e.g. {1})
all single quotes must be doubled. In your case it means that string
"S'enregistrer {1}" must be escaped, so it will look like
"S''enregistrer {1}". However if {X} is not present, single quote is
required.
Since this is a typical problem (together with many others), I'm going
to highlight them in a guideline about 'best practices and common
mistakes'.
For reference you can use:
http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html
http://blogs.sun.com/byuan/entry/best_practices_of_handling_apostrophes
Regarding to using different characters than single quotes, please try
to avoid it. It may be misinterpreted by different programs, etc.
BTW, quotes do break OpenGrok syntax colouring, but I gather that's an
OpenGrok bug:
http://src.opensolaris.org/source/xref/website/oso/auth/AuthWebapp/src/configuration/StripesResources_fr.properties
We've only done so where there is a link that forms part of a
sentence - different languages will put it in different positions, so
it has to be part of the text.
I see, but in some cases, it's enveloping tag, like the
stripes.errors.* properties at the beginning of the document. Those
seems awkward in a .properties.
We need to give an updated 'master' file to the CTI folks, so the new
strings haven't yet appeared in the CTI tool yet.
Ok, I hope they'll be easy to spot.
Once I get an updated file, I'll upload it to CTI immediately.
Ales
_______________________________________________
website-discuss mailing list
[email protected]