? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
20 Aug 2018

Pull Request for Issue comment #21289 (comment).

Summary of Changes

Introduces a language factory.

Question which comes up here is if the factory needs to do some caching? Because every createLanguage call in the factory actually loads the languages from scratch.

Testing Instructions

Browse around in the back end.

Expected result

All is working.

Actual result

All is working.

Documentation Changes Required

Similar as the rest of the factory and service provider classes.

avatar laoneo laoneo - open - 20 Aug 2018
avatar laoneo laoneo - change - 20 Aug 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Aug 2018
Category Libraries
f61f94c 20 Aug 2018 avatar laoneo CS
avatar laoneo laoneo - change - 20 Aug 2018
Labels Added: ?
avatar mbabker
mbabker - comment - 20 Aug 2018

Question which comes up here is if the factory needs to do some caching? Because every createLanguage call in the factory actually loads the languages from scratch.

You're going to need some kind of caching support, probably will need a factory that supports singleton storage.

This is a case of the getInstance method having more business logic than just creating a singleton of a class instance. In this case, it creates singletons for each language. And because the Language class is environmentally aware (i.e. each instance has its own record of loaded translations), this isn't something that is just easily phased out.

The Language class absolutely should not be aware of or care about this singleton storage. But, as an overall application, the CMS absolutely does care about it.

avatar laoneo
laoneo - comment - 20 Aug 2018

probably will need a factory that supports singleton storage

You mean basically the logic which is now in Language::getInstance?

avatar mbabker
mbabker - comment - 20 Aug 2018

Right.

avatar ceus1984
ceus1984 - comment - 8 Sep 2018

I have tested this item successfully on 556f015


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21768.

avatar ceus1984 ceus1984 - test_item - 8 Sep 2018 - Tested successfully
avatar ThomasFried
ThomasFried - comment - 8 Sep 2018

I have tested this item successfully on 556f015


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21768.

avatar ThomasFried ThomasFried - test_item - 8 Sep 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Sep 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Sep 2018

Ready to Commit after two successful tests.

avatar gorgonz
gorgonz - comment - 8 Sep 2018

I have tested this item successfully on 556f015

I played around for some time, but this is not "covering" all possibilities ;-)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21768.

avatar gorgonz gorgonz - test_item - 8 Sep 2018 - Tested successfully
avatar laoneo laoneo - change - 13 Sep 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-09-13 13:58:33
Closed_By laoneo
Labels Added: ?
avatar laoneo laoneo - close - 13 Sep 2018
avatar laoneo laoneo - merge - 13 Sep 2018

Add a Comment

Login with GitHub to post a comment