At 02:35 PM 7/19/2005 -1000, Brian Kirsch wrote:
The schema.Text type will raise an error if assigned either a Python unicode or str object. It only accepts LocalizableString's and UString's.
FYI, I *proposed* this, but I don't know what it would take to actually implement; I seem to recall that the repository doesn't have any type enforcement that would allow this to produce an immediate error. Perhaps Andi can comment?
A con to this approach is this flexibility will make enforcement of i18n difficult. Developers can assign UString's to schema.Text attributes that in reality do require translation and should be LocalizableString's.
Hopefully, the error message for assigning a non-UString/message ID will be informative in this regard. However, for any items defined in parcel.xml, the plan is to always make those strings into LocalizableString objects, so at least all UI and other items defined in the parcel.xml should be fine, with no special action needed on the developer's part.
Also a side note from the meeting, John Anderson asked if Phillip Eby would take a look at the current Chandler content model and suggest ways reduce its complexity.
John and I will first be looking at a plan to flatten the existing package hierarchy, which should help make it easier to see where things might need changing.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "Dev" mailing list http://lists.osafoundation.org/mailman/listinfo/dev
