? ? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
17 Dec 2016

Currently, the "Install Languages" view of the Extension Installer shows only non-installed languages to choose from. This makes sense to a degree since there seems to be no need to install already installed languages.
However in some cases you may want to do exactly that. Eg if you installed languages using discover you miss the package manifest and want to reinstall the language properly to get that as well. Or you may have accidentally deleted some files and want to reinstall the language to fix that.

Summary of Changes

This changes the view from using the #__updates table to directly read from the XML manifest file. Currently it reads that file (https://update.joomla.org/language/translationlist_3.xml), parses it for available updates (not installed languages count as update as well!) and stores that into the #__updates table, then afterwards reads that table and compiles the list of installable languages.
With this PR we skip the part with the #__updates table and directly use the content of the file so we have also the already installed languages.

Testing Instructions

  • Make sure you can install any languages as expected.
  • Already installed languages will show a "Reinstall" button instead of the "Install" button.

Sidenote

Due to the missing underlying database table, we can't use the IDs anymore to install multiple languages at once and thus the button "Install" has been removed. The other button "Find Languages" also isn't needed anymore as the list is taken directly from the XML file now.

Documentation Changes Required

This may need adjustments in user documentation (docs pages, tutorials?) due to the changed view layout.

avatar Bakual Bakual - open - 17 Dec 2016
avatar Bakual Bakual - change - 17 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Dec 2016
Category Administration com_installer Language & Strings
avatar Bakual
Bakual - comment - 17 Dec 2016

Some visual comparision.
Current view:
old
Proposed view:
new

avatar Bakual Bakual - change - 17 Dec 2016
Labels Added: ? ?
avatar dgt41
dgt41 - comment - 17 Dec 2016

@Bakual maybe the install button on the toolbar together with the checkboxes should stay, as they do provide a way to install multiple languages in one go (this functionality is now removed).

avatar Bakual
Bakual - comment - 17 Dec 2016

As I wrote in the PR that isn't possible anymore with the current code. Since we don't have IDs anymore.
The install button now goes directly to the regular install package code and is handled by the "install" controller, not a specific language install anymore.
If it is deemed as an important feature, we could try passing the install URLs to a language specific controller task which then calls the installer one-by-one.
Or we could do it a bit more sexy and open a modal with a progress bar where the languages are installed using AJAX calls to the regular installer. But here I likely hit my JS knowledge boundaries ?

avatar dgt41
dgt41 - comment - 17 Dec 2016

I'll give it a go tomorrow, it seems doable...

avatar joomla-cms-bot joomla-cms-bot - change - 17 Dec 2016
Category Administration com_installer Language & Strings Administration com_installer Language & Strings Templates (admin)
avatar zero-24
zero-24 - comment - 18 Dec 2016

Hmm it looks like travis is complaning on cs?

avatar ot2sen
ot2sen - comment - 18 Dec 2016

Good idea of having an option to reinstall.

Q: Does the change from updates table to xml influence how creating a multilingual site on install would work? Dunno if it use another method, asking to make sure you still would be able to install several languages in one go, when this is removed when adding languages later here.

avatar Bakual
Bakual - comment - 18 Dec 2016

For now the Find Languages button is missing in your screenshot.

From PR description:

The other button "Find Languages" also isn't needed anymore as the list is taken directly from the XML file now.

avatar Bakual
Bakual - comment - 18 Dec 2016

Q: Does the change from updates table to xml influence how creating a multilingual site on install would work? Dunno if it use another method, asking to make sure you still would be able to install several languages in one go, when this is removed when adding languages later here.

The installation code is all contained in the /installation folder, so it should have no effect at all. To be sure I have tested it now and it passes through without any errors.
I saw that the native title isn't populated during CMS installation and also the content languages aren't created. However that also seems to be the case for staging. That would be an unrelated issue then. Can someone verify that? Not that I have a borked installation myself.

avatar infograf768
infograf768 - comment - 18 Dec 2016

No impact on clean multingual install. One can install multiple language in one go as before. Good.

avatar infograf768
infograf768 - comment - 18 Dec 2016

Native title (in the Installed Languages Manager) would not show until our packs site and admin xx-XX.xml do contain the new tag. This is a guess as I can't test really until we do have a pack with such native title is presented in the Install Languages manager.

Content Languages are created when installing a clean joomla with multilang.
Content languages are created when using the Install button with your PR.

But, if you delete a content language for a said language and then Reinstall the language, the Content Language is not created.

avatar Bakual
Bakual - comment - 18 Dec 2016

Native title (in the Installed Languages Manager) would not show until our packs site and admin xx-XX.xml do contain the new tag.

Makes sense, yes.

But, if you delete a content language for a said language and then Reinstall the language, the Content Language is not created.

That's actually expected since technically a reinstall is the same as an update (to the same version). And I think we're not creating content languages during update of a language pack.

avatar infograf768
infograf768 - comment - 18 Dec 2016

During update, we do not need to create a content language.
When reinstalling, it is another situation: it may mean the specific language folders have been deleted (site and/or admin).

avatar Bakual
Bakual - comment - 18 Dec 2016

A reinstall and an update is the exact same thing for the installer. Both install a package over an existing installation. You don't have a way to distinguish it there.
So it's either also done during an update, or it's not done.
It would be an unrelated change anyway as the same behavior currently exists when you manually download the language pack and install it. It's the exact same code that is triggered then.

avatar infograf768
infograf768 - comment - 28 Dec 2016

I have tested this item successfully on 3f6c84e


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

avatar infograf768 infograf768 - test_item - 28 Dec 2016 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 1 Jan 2017

I have tested this item successfully on 3f6c84e

Test OK


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

avatar anibalsanchez anibalsanchez - test_item - 1 Jan 2017 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 2 Jan 2017
Status Pending Ready to Commit
Labels
avatar jeckodevelopment
jeckodevelopment - comment - 2 Jan 2017

RTC


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

avatar rdeutz rdeutz - change - 2 Jan 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-01-02 18:31:40
Closed_By rdeutz
avatar rdeutz rdeutz - close - 2 Jan 2017
avatar rdeutz rdeutz - merge - 2 Jan 2017

Add a Comment

Login with GitHub to post a comment