? ? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
14 Feb 2016

When a user logs in back-end, the administrator language loaded depends
1. or on the language chosen in the login page
2. or, if Language - Default is chosen, from the user admin language parameters

----------> 2.A. If the user has chosen Default Language as parameter, the administrator default language will be loaded
----------> 2.B. If the user has chosen a specific language as parameter (including specifically the default administrator language) that language will be loaded.

In case 2.A. the admin language is automatically switched when changing the Default admin language.

The issue is that in case 1 or case 2.B. the user may want to change the default admin language AND see the results. But this will not work because the userState is set to a specific language.

Test first these conditions, then patch and test again all cases.

This PR adds a new button in the Installed Administrator Languages view WHEN and when only the current language is different from the Default Administrator Language.
"Load Default Administrator Language"
Clicking on it will force load the Default Administrator Language, whatever the userState language.
screen shot 2016-02-14 at 09 44 16

@andrepereiradasilva
I know there will be conflicts with your #9101 PR.
If accepted, conflicts will have to be solved depending on the merging order.

avatar infograf768 infograf768 - open - 14 Feb 2016
avatar infograf768 infograf768 - change - 14 Feb 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2016
Labels Added: ? ?
630158c 14 Feb 2016 avatar infograf768 cs
avatar richard67 richard67 - test_item - 14 Feb 2016 - Tested successfully
avatar richard67
richard67 - comment - 14 Feb 2016

I have tested this item :white_check_mark: successfully on 630158c

Tested with success: All cases work same before and after applying the PR, and the new button added with this PR loads the administrator default language.

@infograf768 I would prefer a different text that "Force Administrator Language", e.g. "Load Current Administrator Language", but this might be a bit long in English, and even longer in most other languages.

But if it shall be like now with the texts, is "force" really correct? Or shouldn't it be "enforce"?

Maybe @brianteeman could check the texts?

Another idea to solve the same issue could be to have a checkbox instead of a button, which behaves like the button when being checked first time, but then as long as checked enforces loading of the administrator default language with every change of the default.


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Feb 2016

@infograf768 isn't there any way to change it without a button?
I think it can be a UX issue having so many buttons for the user to understand.

In other words, in all scenarios, when changing the default language, can't we have a way for the default language change immediatly without needing a user behaviour?

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Feb 2016

For instance, can this be solved by just adding this here (https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_languages/controllers/installed.php#L34)?

// Force administrator language.
$language = JComponentHelper::getParams('com_languages')->get('administrator', 'en-GB');
$client = $model->getClient();
if ($client->name == 'administrator')
{
    JFactory::getApplication()->setUserState('application.lang', $language);
}
avatar infograf768
infograf768 - comment - 14 Feb 2016

i explain further.
we shoul not change the loading of the default language automatically as a user may want to change it without changing the UI. this is the reason for this new button.

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Feb 2016

ok, i misunderstood. Thank you for the explanations, help me a lot to understand how joomla works.

Joomla is so flexible that sometimes is not easy to understand the inner works. :)

Now the only question i have: If the button is just for scenario 1 and 2.B, it shouldn't appear (or appear disabled) in scenario 2.A., right?

I ask this because i believe scenario 2.A. is the most used by users and not having the button in that scenario would avoid unnecessary confusion for users.

There is also scenario 3: when a user as only one language installed (en-GB) that, of course, is the default :). This, i think, behaves like scenario 2.A.

avatar infograf768
infograf768 - comment - 14 Feb 2016

I ask this because i believe scenario 2.A. is the most used by users and not having the button in that scenario would avoid unnecessary confusion for users.

yes, that would be an improvement. Will look into it.

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Feb 2016

BTW, not to do with thiis PR, but "Installed" shouldn't be "Default Languages"?

That way you will have:

  • Default Languages
  • Content Languages
  • Overrides

I think it would be more user friendly and more according to what the view really does.

avatar infograf768
infograf768 - comment - 14 Feb 2016

I would prefer a different text that "Force Administrator Language", e.g. "Load Current Administrator Language", but this might be a bit long in English, and even longer in most other languages

maybe "Load default administrator language" ?

avatar richard67
richard67 - comment - 14 Feb 2016

@infograf768 Sure, default and not current, I was wrong. "Load default administrator language" is very ok for me, with capitalization I don't know how it shall be for buttons.


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

avatar brianteeman
brianteeman - comment - 14 Feb 2016

This makes no sense to me. There is no way for anyone to know what the
default language is. If you don't know what it is why would you press it.
On 14 Feb 2016 12:46 pm, "Richard Fath" notifications@github.com wrote:

@infograf768 https://github.com/infograf768 Sure, default and not
current, I was wrong. "Load default administrator language" is very ok for

me, with capitalization I don't know how it shall be for buttons.

This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/9119
https://issues.joomla.org/tracker/joomla-cms/9119.


Reply to this email directly or view it on GitHub
#9119 (comment).

avatar joomla-cms-bot
joomla-cms-bot - comment - 14 Feb 2016

This PR has received new commits.

CC: @richard67


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

avatar infograf768
infograf768 - comment - 14 Feb 2016

This makes no sense to me. There is no way for anyone to know what the default language is. If you don't know what it is why would you press it.

Not sure what you mean: It is very easy to know what is the Default Language: it has a yellow star in the Default column and the language loaded (current language) can be seen in the UI.

BTW, not to do with thiis PR, but "Installed" shouldn't be "Default Languages"?

Not really, the page displays all installed languages, including the default one for the selected client.

Here is an example: the button displays when the Default Language (it-IT) is not the language loaded (current language, en-GB), BEFORE clicking on the button:

screen shot 2016-02-14 at 17 45 59

After clicking on the button:

screen shot 2016-02-14 at 17 50 21

26d192f 14 Feb 2016 avatar infograf768 cs
avatar joomla-cms-bot
joomla-cms-bot - comment - 14 Feb 2016

This PR has received new commits.

CC: @richard67


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

avatar richard67 richard67 - test_item - 14 Feb 2016 - Tested successfully
avatar richard67
richard67 - comment - 14 Feb 2016

I have tested this item :white_check_mark: successfully on 26d192f

Success. Still works as described, plus the button is only shown if necessary, i.e. in cases 1 and 2B and language is not default yet.

@infograf768 Maybe you could update the test description at the top so other testers know about this change, too, without having to go through the consversation?


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

avatar infograf768 infograf768 - change - 14 Feb 2016
The description was changed
avatar infograf768
infograf768 - comment - 14 Feb 2016

Modified description.


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

avatar andrepereiradasilva andrepereiradasilva - test_item - 14 Feb 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Feb 2016

I have tested this item :white_check_mark: successfully on 26d192f


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

avatar infograf768
infograf768 - comment - 15 Feb 2016

@richard67 @andrepereiradasilva

As anyway I would have to redo this PR as it has conflicts since last night commits, let me propose another idea, as simple to implement and with more possibilities.

Instead of forcing the Default admin language, we can use a switcher which would be even be more useful as the admin could switch between any backend language.

One would need to select a language among the available ones and click the button which would be permanent.
It would give this:

screen shot 2016-02-15 at 09 14 16

We could also add a parameter in the component Options to display or not the button, but imho it is simpler to display the button permanently as a switcher looks clearer to me than the former proposal.

I prepared the new branch:
https://github.com/infograf768/joomla-cms/compare/admin_switcher.diff

What do you think?

avatar brianteeman
brianteeman - comment - 15 Feb 2016

This looks better. Thanks

avatar richard67
richard67 - comment - 15 Feb 2016

@infograf768 You mean a button switching to the language previously selected with the check box? To be honest, I am not a fan of it. It needs a special message when no language is selected, same or another one when more than 1 language is selected, and it requires 2 steps (select a language + push the button), and "switch language" is not absolutely clear ("switch to selected language" would be more clear but too long).

I know it is far away from what you started to implement, but in my opinion the best solution regarding usability (1 step only, not 1. check and 2. push button) would be a dropdown like on the backend login, where the backend user can simply switch to another backend language, either a single dropdown, or a backend language switcher module.

This is maybe not practicable in an easy way, so I could also live with what you have proposed. Would be ok and better than nothing, only not the perfect way in my opinion.

But maybe others have a different opinion.


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

avatar infograf768
infograf768 - comment - 15 Feb 2016

@richard67

It needs a special message when no language is selected, same or another one when more than 1 language is selected

The new PR has a special message when no language is selected. The string already exists in core:
COM_LANGUAGES_ERR_NO_LANGUAGE_SELECTED="No language selected."

screen shot 2016-02-15 at 11 01 01

same or another one when more than 1 language is selected

Nope. One can't select multiple languages in this page. Same as Set Default. We have radio buttons, not checkboxes.

it requires 2 steps (select a language + push the button)

Yes, same as when setting a Default language, with the advantage over the present PR that the user can select ANY language and that he can switch back to any language.

I would not know how to add a dropdown in the toolbar and a module would be overkill imho.

avatar richard67
richard67 - comment - 15 Feb 2016

@infograf768 Ahhh, I need more coffee!!! How could I assume that I can select more than 1 language with the check boxes in this display? Silly (or sleepy?) me!!!

You convinced me with all you said, so I finally like your proposal as it is :smile: .

Regarding the button text: I really like the word "backend" because it cannot be mixed up with the admin user's default language, but I cannot remember having it seen often.

In most cases something like "default administrator language" is used, which is less clear.

I pretty much could like to have another PR exchanging this by "default backend language" or so wherever it appears.

But at the moment using "backend language" for the new button could appear inconsistent with other places where "default admin language" is used, so maybe some testers may complain about this.

A I said, I like "backend language", hope it will not be changed.

avatar Kubik-Rubik
Kubik-Rubik - comment - 15 Feb 2016

@infograf768 Thank you for the improvement. I really like the approach that you've proposed here: #9119 (comment)
It would be great if you could make a new PR for this approach. Thank you in advance!

avatar dgt41
dgt41 - comment - 15 Feb 2016

@infograf768 :+1: for the lang switcher in the backend!!

avatar infograf768 infograf768 - change - 15 Feb 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-02-15 11:20:40
Closed_By infograf768
avatar infograf768
infograf768 - comment - 15 Feb 2016

Closing in favor of the new PR #9126

Thanks for feedback!


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

avatar infograf768 infograf768 - close - 15 Feb 2016
avatar infograf768 infograf768 - head_ref_deleted - 15 Feb 2016

Add a Comment

Login with GitHub to post a comment