? ? ? Pending

User tests: Successful: Unsuccessful:

avatar astridx
astridx
12 Mar 2020

Alternative Pull Request for Draft #27951.

Summary of Changes

Adding back the ability to set Site and Admin languages in the installer.

Testing Instructions

  1. Apply this patch. You do not need to run npm ci or composer i.
  2. Start a new installation.
  3. Install an extra language
  4. Make sure, that can set default frontend language and default administrator language, after you had installed the extra language.
    Joomla Installer
  5. Change the default language for the backend and frontend and make sure that the languages are used correctly.

Expected result

People who don't speak English as a native language are able to set the admin default language before they start to configure things.

Actual result

It is not possible to set a default language during installation.

Documentation Changes Required

Not sure.

240c311 12 Mar 2020 avatar astridx view
633e096 12 Mar 2020 avatar astridx ups
914003d 12 Mar 2020 avatar astridx js
c2866a2 12 Mar 2020 avatar astridx wip
avatar astridx astridx - open - 12 Mar 2020
avatar astridx astridx - change - 12 Mar 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Mar 2020
Category Installation Language & Strings JavaScript
7811620 12 Mar 2020 avatar astridx cs
avatar astridx astridx - change - 12 Mar 2020
Labels Added: ? ?
1ffd82f 12 Mar 2020 avatar astridx wip
avatar infograf768
infograf768 - comment - 13 Mar 2020

Good job! ?

TODO

  1. Delete from LanguagesModel the now useless code to create a basic multilingual site as we now do it only via the sampledata plugin.
    This means deleting all from line 565 to 1487

  2. Delete from InstallationController
    lines 195 to 204 as we do not use anymore the publishContentLanguages() method

NOTE:
If we want to keep such a method, it should only check for the correct creation of the content language and NOT for its published state. Thus would have to be renamed and string re-added.

  1. Delete the ini strings in en-GB and en-US
    INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE="Activate the multilingual feature"
    INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE_DESC="If active, your Joomla site will have the multilingual feature active with localised menus for each installed language."
    INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN="Enable the language code plugin"
    INSTL_DEFAULTLANGUAGE_ACTIVATE_LANGUAGE_CODE_PLUGIN_DESC="If enabled, the language code plugin will add the ability to change the language code in the generated HTML document to improve SEO."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_ADD_ASSOCIATIONS="Joomla was unable to automatically create the language associations."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_CONTENT_LANGUAGE="Joomla was unable to automatically create the %s content language."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU="Joomla was unable to automatically create the %s menu."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU_ITEM="Joomla was unable to automatically create the %s home menu item."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU_MODULE="Joomla was unable to automatically create the %s menu module."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_CATEGORY="Joomla was unable to automatically create the %s content category."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_ARTICLE="Joomla was unable to automatically create the %s localised article."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_MODULESWHITCHER_LANGUAGECODE="Joomla was unable to automatically publish the language switcher module."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGECODE="Joomla was unable to automatically enable the Language Code Plugin."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGEFILTER="Joomla was unable to automatically enable the Language Filter Plugin."
    INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_TITLE="Multilingual"
    INSTL_DEFAULTLANGUAGE_MULTILANGUAGE_DESC="This section allows you to automatically activate the Joomla multilingual feature."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_MULTILANG="Joomla was unable to install the multilingual sample data as only one language is installed. To activate the multilingual feature, you need to install more languages, press the 'Previous' button and choose the desired languages from the list."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_PUBLISH_MOD_MULTILANGSTATUS="Joomla was unable to automatically publish the language status module."
    INSTL_DEFAULTLANGUAGE_COULD_NOT_UNPUBLISH_MOD_DEFAULTMENU="Joomla was unable to automatically unpublish the default menu module."
    INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT="Install localised content"
    INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT_DESC="If active, Joomla will automatically create one content category per each installed language. Also, one featured article with dummy content will be created in each category."

  2. Normalize en-US for the strings modified

  3. Important! Make sure that for a distro which is including already another language than en-GB and therefore that language not needing to be installed, that the list of languages to install does not contain it and that it is presented as possible choice for admin and site default.

avatar astridx
astridx - comment - 14 Mar 2020

@infograf768
1. Delete from LanguagesModel the now useless code to create a basic multilingual site as we now do it only via the sampledata plugin.
This means deleting all from line 565 to 1487

Thank you for your improvements. This is done.

@infograf768
2. Delete from InstallationController
lines 195 to 204 as we do not use anymore the publishContentLanguages() method
NOTE:
If we want to keep such a method, it should only check for the correct creation of the content language and NOT for its published state. Thus would have to be renamed and string re-added.

I deleted these lines because you suggested that. The languages are now unpublished as content languages installed. Is that how it should be?

@infograf768
1. Delete the ini strings in en-GB and en-US
INSTL_DEFAULTLANGUAGE_ACTIVATE_MULTILANGUAGE="Activate the multilingual feature"

Done.

@infograf768
2. Normalize en-US for the strings modified

Done.

@infograf768
Important! Make sure that for a distro which is including already another language
than en-GB and therefore that language not needing to be installed, that the list of languages
to install does not contain it and that it is presented as possible choice for admin and site default.

Since the languages are installed at this point in the installation, that fits. I honestly admit that I haven't tested it.
@tecpromotion Is it possible to test this with the German version?

avatar infograf768
infograf768 - comment - 14 Mar 2020

I deleted these lines because you suggested that. The languages are now unpublished as content languages installed. Is that how it should be?

Yes, it should behave as when we install languages in backend, i.e. the content languages should be created but not be published.
I was not sure ( @Bakual ?) if we should still make sure the Content languages are created, thus my note above.

avatar Bakual
Bakual - comment - 14 Mar 2020

I would certainly create the content language. I don't mind if they are published or not.

avatar astridx
astridx - comment - 14 Mar 2020

@infograf768 Yes, it should behave as when we install languages in backend, i.e. the content languages should be created but not be published.

This is how it is in this issue at the moment. Then that fits.

avatar infograf768
infograf768 - comment - 14 Mar 2020

If I do not mistake, this PR contains an extraneous file which is a copy of your config.php

avatar astridx
astridx - comment - 14 Mar 2020

@infograf768 If I do not mistake, this PR contains an extraneous file which is a copy of your config.php

Thanks. I deleted this wrong file.

avatar richard67
richard67 - comment - 14 Mar 2020

I have tested this item successfully on cd44169

Works like a charm.


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

avatar richard67 richard67 - test_item - 14 Mar 2020 - Tested successfully
avatar richard67
richard67 - comment - 14 Mar 2020

I have not tested this item.

I just saw now the review comment from @infograf768 ?
https://github.com/joomla/joomla-cms/pull/28328/files#r392090741.
@astridx Could you check?


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

avatar richard67 richard67 - test_item - 14 Mar 2020 - Not tested
avatar astridx
astridx - comment - 15 Mar 2020

@richard67 @astridx Could you check?

Thanks Richard. I answered it.

avatar infograf768
infograf768 - comment - 15 Mar 2020

@astridx
see my further comment
#28328 (comment)

both work here...

avatar infograf768
infograf768 - comment - 15 Mar 2020

@astridx
Please modify to use InstalledlangsFrontend

The reason is that we do not see an error because the packs we test contain both admin and site parts, but we may have lang packs which contain only the site part, thus why the method/property should correspond precisely.

avatar astridx
astridx - comment - 15 Mar 2020

@infograf768
Sorry, you are right. Done

avatar infograf768
infograf768 - comment - 15 Mar 2020

I have tested this item successfully on b216ae2


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

avatar infograf768 infograf768 - test_item - 15 Mar 2020 - Tested successfully
avatar richard67
richard67 - comment - 15 Mar 2020

I have tested this item successfully on b216ae2

I've played around a bit, using skip button, installing a language and setting defaults and then again installing another one and changing default ... all works as one would expect it to work.

Well done.


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

avatar richard67 richard67 - test_item - 15 Mar 2020 - Tested successfully
avatar richard67 richard67 - change - 15 Mar 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 15 Mar 2020

RTC


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

avatar wilsonge wilsonge - close - 15 Mar 2020
avatar wilsonge wilsonge - merge - 15 Mar 2020
avatar wilsonge wilsonge - change - 15 Mar 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-03-15 15:06:24
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 15 Mar 2020

Thankyou very much for picking this up @astridx ! Super appreciated and nice work!

Add a Comment

Login with GitHub to post a comment