User tests: Successful: Unsuccessful:
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.
@andrepereiradasilva
I know there will be conflicts with your #9101 PR.
If accepted, conflicts will have to be solved depending on the merging order.
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
@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?
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);
}
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.
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.
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.
BTW, not to do with thiis PR, but "Installed" shouldn't be "Default Languages"?
That way you will have:
I think it would be more user friendly and more according to what the view really does.
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" ?
@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 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 forme, 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).
This PR has received new commits.
CC: @richard67
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:
After clicking on the button:
This PR has received new commits.
CC: @richard67
I have tested this item 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?
Modified description.
I have tested this item successfully on 26d192f
@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:
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?
This looks better. Thanks
@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.
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."
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.
@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 .
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.
@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!
@infograf768 for the lang switcher in the backend!!
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-02-15 11:20:40 |
Closed_By | ⇒ | infograf768 |
Closing in favor of the new PR #9126
Thanks for feedback!
I have tested this item 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.