? ? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
4 Oct 2016

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.

screen shot 2016-10-04 at 17 51 39

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

avatar infograf768 infograf768 - open - 4 Oct 2016
avatar infograf768 infograf768 - change - 4 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Oct 2016
Category Administration Language & Strings Layout
avatar joomla-cms-bot joomla-cms-bot - change - 4 Oct 2016
Labels Added: ? ?
avatar infograf768 infograf768 - change - 4 Oct 2016
The description was changed
avatar brianteeman
brianteeman - comment - 4 Oct 2016

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:

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) 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 possible 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.

[image: screen shot 2016-10-04 at 17 51 39]
https://cloud.githubusercontent.com/assets/869724/19082098/0059b18e-8a5d-11e6-8752-0f1c5fa3b7a6.png

Note: It is normal, once associations are created, to not be able to
change the language of the edited item.

@dgt41 https://github.com/dgt41 @andrepereiradasilva
https://github.com/andrepereiradasilva @alikon
https://github.com/alikon

@brianteeman https://github.com/brianteeman for the new string

You can view, comment on, or merge this pull request online at:

#12308
Commit Summary

  • Multilingual: adding warning when changing item language.

File Changes

Patch Links:


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#12308, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8UmX0ERSFFTtuCNHCntTnSIzPwdUks5qwnnngaJpZM4KN3We
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar infograf768
infograf768 - comment - 4 Oct 2016

"reset the available associations" sounds right.
If you understood the issue, I will modify.

avatar brianteeman
brianteeman - comment - 4 Oct 2016

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/

avatar infograf768
infograf768 - comment - 4 Oct 2016

String modified. Thanks.

avatar infograf768 infograf768 - change - 4 Oct 2016
The description was changed
avatar andrepereiradasilva
andrepereiradasilva - comment - 4 Oct 2016

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:

  1. When loaded the associations edit.php layout would have all languages associations fields/buttons:

    • If item set to All languages: languages associations fields/buttons fields would be hidden and the message there
    • If item set to a language: only the current language associations fields/buttons would be hidden and no message
  2. Then, with js, when changing language :

    • from All to a language: show the other languages associations associations fields/buttons with js
    • from a language to All language: hide the associations buttons and empty the associations field values with js
    • from a language to another language (not All language): show one and hide the other and empty the old/new language associations field values with js
avatar infograf768
infograf768 - comment - 5 Oct 2016

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...

avatar andrepereiradasilva
andrepereiradasilva - comment - 5 Oct 2016

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?

avatar infograf768
infograf768 - comment - 6 Oct 2016

This branch has a booboo. Closing as Andre has anyway a much better solution

avatar infograf768 infograf768 - close - 6 Oct 2016
avatar infograf768 infograf768 - change - 6 Oct 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-10-06 15:16:43
Closed_By infograf768

Add a Comment

Login with GitHub to post a comment