Description Fixed a stupid bug which caused projects containing more than one type of
translation file to experience strange bugs.
One can indeed be too smart for oneself. pootlefile.pootlefile was a class
which extended the functionality an existing file store. When the old code
was asked to load a translation file, it found the translation store class
corresponding to the file and set pootlefile.pootlefile's base class to
that
class. Thus, if you loaded a PO file, then pootlefile.pootlefile's class's
__bases__ member was set to (pofile,). This would cause
pootlefile.pootlefile
to behave as a class derived from pofile.
This worked great in projects with only a single file type. But if you also
happened to use something like XLIFF, then the base class of
pootlefile.pootlefile would flip between pofile and xlifffile depending on
the last loaded file type.
This is obviously not a good thing. So, we need to create pootlefile
classes
for each type of translation store that gets used. We do this at runtime
by seeing whether such a class already exists; if not, it is created.
Patch Set 1
Created: 1 year, 3 months ago
|
|||||||||||