Hi, I've thought about this problem again:
>> Another thing I would recommend to add to the TemplateTranslationTiein >> is a developer mode for the TemplateTranslationTieIn. I'd like to see a >> development property in ezcTemplateTranslationConfiguration that makes >> the ezcTemplateTranslationProvider catch the Exceptions for missing >> translations/translation files and just return the string from the >> template. This solution makes it possible to develop with a template >> that doesn't have a valid translation file yet. > > Hmm, I see your point here; however, I don't quite think that this is an > elegant solution. I don't always want to catch the exception, and > rethrow it when the configure option is not set, nor having two bits of > code here for each case. Could you file a feature request for this > please? I agree with you that catching the exception in the TranslationProvider is not nice. I propose to extend the TranslationManager and Translation classes to a version that catches all exceptions and uses the given key from the template. This also makes sure we only have to check once if we are in dev mode or not. if ( $dev === true ) { $manager = new ezcTranslationManagerCatchy( $backend ); } else { $manager = new ezcTranslationManager( $backend ); } I quickly tried this solution and could provide a patch if you want. Somebody should also come up with a better name :) In issue #011865 (<http://issues.ez.no/IssueView.php?Id=11865&activeItem=30>) there is already a discussion about the introduction of run modes into the base component. Could this make it into the next version? It doesn't seem to be a lot of work and could be used globally for cases like the catchy translation manager. Regards, Andi -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components