To make the class Translation extensible without introducing bugs, the Translations class was now adapted to accept a class name of a Translation object to use.
This makes sure that when you extend Translation, you can enforce use of that extension even when Translations needs to create new instances of it.
Translation also has a create() method now so that when you have an instance of a translation you can easily create a new one without needing to know the exact class name.
To make the class
Translation
extensible without introducing bugs, theTranslations
class was now adapted to accept a class name of a Translation object to use.This makes sure that when you extend
Translation
, you can enforce use of that extension even whenTranslations
needs to create new instances of it.Translation
also has acreate()
method now so that when you have an instance of a translation you can easily create a new one without needing to know the exact class name.Related issue: #231