User tests: Successful: Unsuccessful:
Create a multingual site.
For example with 3 languages. Here I used en-GB, fr-FR and it-IT
Enable Associations in the language filter.
Create menu items, articles, contacts, newsfeeds, categories, assigning a specific Content Language to each of them. Save them without creating associations yet.
Edit one of these items (test on all kinds) tagged for example to en-GB.
Look at the Associations tab
The possible associations proposed are fr-FR and it-IT => OK
Change the language of the item, for example to fr-FR
DO NOT SAVE
Look again at the associations tab
The available associations are the same as before.
These should change to reflect the new language for the item.
I.e. we should get en-GB and it-IT
But as the original language value is set in the database, the item has to be saved BEFORE selecting/creating Associations.
Patch and test again.
This PR displays a message to let the user know the item has to be saved again before creating associations.
Note: It is normal, once associations are created, to not be able to change the language of the edited item.
@dgt41 @andrepereiradasilva @alikon
@brianteeman for the new string
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings Layout |
Labels |
Added:
?
?
|
"reset the available associations" sounds right.
If you understood the issue, I will modify.
Reading your report more closely I think I understood it correctly
On 4 October 2016 at 17:38, infograf768 notifications@github.com wrote:
"reset the available associations" sounds right.
If you understood the issue, I will modify.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#12308 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ajORA0cakRy8z8ISqJr46ybHZf2ks5qwoD8gaJpZM4KN3We
.
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
String modified. Thanks.
i see here you are getting with this, but i think that's to much warnings for the user and it maybe could be done without any warnings. Example:
When loaded the associations edit.php layout would have all languages associations fields/buttons:
Then, with js, when changing language :
Concerning 1. we get this already before patch.
Concerning 2. Well said. Out of my abilities.
If no one does it, this PR is better than nothing...
Concerning 1. we get this already before patch.
Actually we don't. If we have a language selected that langiuage associations field/buttons is not rendered in the HTML so it can't be shown on change
Concerning 2. Well said. Out of my abilities.
I can help with that. something like this would work i think (just a PoC written directly with no test at all)
jQuery(document).ready(function() {
jQuery('#jform_language').on('change' function() {
// Get the current selected language.
var selected = $(this).val();
// if the current selected is All languages hide the associations fields/buttons
if (selected == '*')
{
jQuery('#associations .control-group').hide();
}
else
{
// Show all associations fields/buttons.
jQuery('#associations .control-group').show();
// Remove the associations, ie, empty the associations fields and reset the buttons to Select/Create.
// [TODO]
// Now hide the ones not needed.
jQuery('#associations .control-group').each(function(index, element) {
var label = element.find('div.control-label label');
// Current selected language. Hide it.
if (label.attr("id") == 'jform_associations_' + selected.replace('-', '_') + '_id-lbl')
{
element.hide();
}
});
}
});
});
@jreys what do you think?
This branch has a booboo. Closing as Andre has anyway a much better solution
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-06 15:16:43 |
Closed_By | ⇒ | infograf768 |
The string is indeed wrong but I am not sure exactly what you mean.
Do you mean something like "reset the available assocications?"
On 4 October 2016 at 17:08, infograf768 notifications@github.com wrote:
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/