Posted by
Gerrie Myburg [ MTN - Innovation Centre ] on
URL: http://ofbiz.116.s1.nabble.com/Externalizing-strings-need-some-feedback-please-PEASE-READ-tp173024p173027.html
Jacques, David
Not all strings are been externalized. Only strings that contain a " "
are considered for externalization. These are the ones that are
typically that is meant to be read by a person. There are other strings
that are also meant be read like: value + "::" value, but to take these
strings out will just make the developers job a lot harder in the long
run (complexity).
To be able to do better than this implies that I will have to make the
program understand what is a message. This can be done by looking at the
context in which the string is used. It does not guarantee that the
string is a message; it only gives a high probability that the string is
a message.
I will transform all the string keys to Name1Name2Name3... I will also
use a spell checker to make sure that the names are at least spelled
correctly. In the case where I don't know if the name is spelled ok then
I will flag the key and check it.
I will split the property files into 2 groups per module. Firstly the
strings that goes into the logs. These have a low priority for been
translated. Then all the other strings that need translation are placed
in the other group.
Jacques you are correct that these changes can stuff everything up. This
is why I do not want to do the work piecemeal, but all in one go. This
is why I am building programs to do the changes. Modifying these
programs is not hard and a change to the way the externalization is done
is relatively inexpensive.
Jacques to answer your question as to why:
I want to make the externalization changes as I want to localize ofbiz
for Afrikaans. I have noticed some other problems in ofbiz that I think
needs cleaning up, but I will get to this later. From looking at the
changes that are committed it seems that most relate to business
functionality been fixed or added. This is nice, but it does not address
the issue of overall code quality decreasing with time due to entropy.
It is the old thing, the older a system becomes the more messy things
become unless you do some house cleaning now and then.
Gerrie
NOTE: This e-mail message is subject to the MTN Group disclaimer see
http://www.mtn.co.za/default.aspx?pid=34411