Problem/Motivation

Ok, just had a great call with Gábor, plach, and Bojhan where we walked through the current UI, proposed UI, and the D7 UI of Entity Translation module. Here were our findings:
Follow-ups we encountered while testing:
- (normal task) "Translation is not supported if language is always one of: Not specified, Not applicable, Multiple" reword to: "....

Proposed resolution

(current) proposed rewording in #23

Remaining tasks

Original report by webchick

This is a follow-up coming from the meta issue #1188388: Entity translation UI in core

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Component: entity system » translation_entity.module
Issue tags: -entity translation
YesCT’s picture

Lukas, Thank you for opening this issues, it's a help.

For anyone:
Next steps:
To figure out what to do about this issue, get the issue summary template from http://drupal.org/node/1155816

Find the relevant comment from the epic et-ui issue that asked for this follow-up and bring over the quotes so we have background context for what to think about (use blockquote html tag for them).

YesCT’s picture

I did a:
grep -R "language is always one of" *
And found

/**
 * Checks if translation can be enabled.
 *
 * If language is set to one of the special languages
 * and language selector is not hidden, translation cannot be enabled.
 */
function translation_node_type_language_translation_enabled_validate($element, &$form_state, $form) {
  if (language_is_locked($form_state['values']['language_configuration']['langcode']) && $form_state['values']['language_configuration']['language_hidden'] && $form_state['values']['node_type_language_translation_enabled']) {
    foreach (language_list(LANGUAGE_LOCKED) as $language) {
      $locked_languages[] = $language->name;
    }
    form_set_error('node_type_language_translation_enabled', t('Translation is not supported if language is always one of: @locked_languages', array('@locked_languages' => implode(", ", $locked_languages))));
  }
}

More next steps:
get a screen shot
write steps to reproduce (steps to arrive at the screen)

YesCT’s picture

More next steps:
Edit the issue summary at the (new) main issue #1831530: Entity translation UI in core (part 2) to link to this issue using [ # 999999 ] pattern (no spaces in the pattern)

make a comment on #1831530: Entity translation UI in core (part 2) saying this followup was created and link to this issue

plach’s picture

Issue tags: +Usability
Lukas von Blarer’s picture

Issue summary: View changes

Updated issue summary.

moe4715’s picture

I found a way to reproduce the problem (s. attachment).

1. Enable the "Language" and "Content Translation" module
2. Go to the page http://hostname/admin/structure/types/manage/article
3. Click the "Language settings" tab on the right hand side
4. Choose " - Not specified - " as the "Defalult language" and check all checkboxes below
5. Click "Save content type" and the message will appear at the page top

moe4715’s picture

We would change the sentence "Translation is not supported if language is always one of: Not specified, Not applicable, Multiple" to "Translation is not supported if the default language is "Not specified", "Not applicable" or "Multiple" and the "Hide language selection" option is checked".

moe4715’s picture

Status: Active » Needs review
FileSize
927 bytes

I created a patch with the aforementioned text message that replaces the current error message.

Status: Needs review » Needs work
Issue tags: -Usability

The last submitted patch, 1831636-selection-errormessage-corrected.patch, failed testing.

Lukas von Blarer’s picture

Status: Needs work » Needs review
Issue tags: +Usability
plach’s picture

This should be fixed in the Entity Translation module, the Content Translation module is deprecated and will be removed.

plach’s picture

Status: Needs review » Needs work
ancamp’s picture

Status: Needs work » Needs review
FileSize
977 bytes

I created a patch where i changed the error message in the Entity Translation module.

YesCT’s picture

Status: Needs review » Needs work
FileSize
139.86 KB

Steps to reproduce (based of of @moe4715 in #6. Thanks!):

  1. enable Entity Translation module (which also enables the Language module as a dependency)
  2. edit article content type in Admin > Structure > Content types > Article
  3. click on Language settings vertical tab
  4. enable translation (by checking the box) and choose "- Not Specified -"
  5. Click "Save content type" and the message will appear at the page top

Message with the patch:

 Translation is not supported if the default language is Not specified, Not applicable, Multiple and the "Hide language selection" option is checked

Here it is in context

notspecified-s01-errormsg-2012-11-06_2014.png

Here is what it said before the patch

Translation is not supported if language is always one of: Not specified, Not applicable, Multiple

Review

The new message is clearer and more accurate with the mention that this happens when the language selector is hidden too.
It needs a period at the end of the message.

YesCT’s picture

After a second look, I think "is one of" makes it grammatically correct (because we cannot put an or in the list of languages).
I added that and the period.

Here is the new message:

 Translation is not supported if the default language is one of: Not specified, Not applicable, Multiple and the "Hide language selection" option is checked.
Gábor Hojtsy’s picture

Status: Needs work » Reviewed & tested by the community

Looks like a great improvement!

webchick’s picture

Status: Reviewed & tested by the community » Needs work

We (Gábor, YesCT, and I) showed this error message to a few different people, and they found it a bit confusing. We discussed it and think it would be better, rather than displaying all of the possible wrong choices someone could make, that instead it just said some language to the effect of "Invalid choice selected. Can't use %choice with translation." We are working on better wording right now. :)

YesCT’s picture

%choice is a system language. Translation is only compatible with real languages, when "Hide language selection" option is checked. 

Either pick a real language or do not hide the language selection.

This is better because it explains why and what the next step is.
Needs to pick a word better word for real that means the opposite of the system languages.
What about "specific"?

YesCT’s picture

With the "Hide language selection" setting, translation is only compatible with specific languages. 

Either pick a specific language or do not hide the language selection.

Might still be too long.

Translation is not compatible with content with %choice. 

Either pick a specific language or do not hide the language selection.
Lukas von Blarer’s picture

Wouldn't this be better:

"Hide language selection" is not compatible with content with %choice. Either pick a specific language or do not hide the language selection.

YesCT’s picture

Issue tags: +D8MI, +language-content
YesCT’s picture

YesCT’s picture

"Hide language selection" is not compatible with translating content that has language: %choice. 

Either do not hide the language selection or pick a specific language.

This message merges @Lukas's suggestion from #20 with #19 and takes the approach of specifically saying what was wrong (but not all the wrong choices) and then separately saying how to fix it. So it might address the concern @webchick and others had from #17

@Lukas want to update the patch? :)

YesCT’s picture

Issue summary: View changes

Providing summary

Lukas von Blarer’s picture

Why do you write the message in two lines? Should it be presented like that in one message?

YesCT’s picture

I wrote it in two lines because I assumed no one would read all the way to the end of a long line.
And the second line tells the person the action they can take.
I wonder if there is another pattern in core we can look at.

Lukas von Blarer’s picture

Yes, this would be interesting to know. I agree with you that this is more understandable like this. But I have never seen messages like this in Drupal. What should we do?

YesCT’s picture

@Lukas make a new patch for the idea in #23.
Post an interdiff too.
Do manual testing and get a screenshot of the error.
Then we can get a review. :)

kbasarab’s picture

Status: Needs work » Needs review
FileSize
1.39 KB
1.33 KB

Updated patch based on #23.

Interdiff with #15.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Thanks! I think except the two line breaks, this looks good. We don't do multi-component error messages like this elsewhere.

claudinec’s picture

Status: Needs work » Needs review
FileSize
1.32 KB

Updated patch in #28 with line-breaks removed.

jlscott’s picture

Thanks for the revised patch @claudinec. I have tested and confirm that it does remove the unnecessary breaks.

Is there another patch that needs to be applied to change the wording used in the error message so that it uses the same terminology as the fields in the form, i.e. refering to "Default lanaguage" rather than "language" and "Show language selector" rather then "Hide language selection".

See attached screenshot.

chrischinchilla’s picture

Hi, tried the steps in #14 to reproduce this error and I don't get the message. Not sure if that's a problem, but just saying.

claudinec’s picture

New patch with fixes suggested by @jlscott in #31.

Status: Needs review » Needs work

The last submitted patch, drush-selection_errormsg_translation_entity-1831636-33.patch, failed testing.

claudinec’s picture

This one should pass.

claudinec’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
Issue tags: -Usability, -D8MI, -language-content

The last submitted patch, drush-selection_errormsg_translation_entity-1831636-35.patch, failed testing.

webchick’s picture

Status: Needs work » Needs review
Issue tags: +Usability, +D8MI, +language-content
xjm’s picture

Assigned: Lukas von Blarer » Unassigned
Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -842,12 +842,12 @@ function translation_entity_language_configuration_element_validate($element, ar
-      $locked_languages[] = $language->name;
+      $locked_languages[$language->langcode] = $language->name;

It looks like this hunk was introduced accidentally, and is also the reason the patch wasn't applying. The patch in #35 removes it.

The text change looks correct to me!

I verified that the patch applies and does not introduce any syntax errors.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Live from the code sprint at DrupalCon Sydney! Committed and pushed to 8.x. :D YAY!

Gábor Hojtsy’s picture

Status: Fixed » Needs work

Uhm, maybe the updating of the text for the current chechbox name was done in a hurry in #33. Now it says the show language selector feature is not compatible with some of the language choices, but the truth is the contrary. *Unchecking* that checkbox creates the incompatible state.

YesCT’s picture

FileSize
125.67 KB

here is what core looks like right now:

2013-02-09_0129.png

Gábor Hojtsy’s picture

Category: task » bug

Right, so we need the hunk that @xjm identified as accidental too, or we don't get the language name either :) Recategorizing as bug.

YesCT’s picture

Category: bug » task
FileSize
111.89 KB

before the commit, with no patch, it looked like:

before-2013-02-09_0133.png

YesCT’s picture

since #1853720: Hide language selection option is backwards got in
The second phrase should probably say: Either pick a specific language or show the language selector.

the first part is trickier... if we want to talk hiding the language selector not being compatible (instead of translation not being compatible)...
"Show language selector" disabled is not compatibile with translating content that...
or
Not showing the language selector is not compatible with translating content that...
(ack. lots of negating statements)

How about:
Hiding language selection is incompatible with translating content that ...

It needs to say ... with translating content that has default language: Not specified.
[edited to include the default language wording]

YesCT’s picture

I really like the improvement of using "default language" instead of "is always". :)

Consolidating previous comment, I suggest:
Hiding the language selection is incompatible with translating content that has default language: Not specified. Either pick a specific language or show the language selector.

YesCT’s picture

Category: task » bug

cross-posted, restoring category

Gábor Hojtsy’s picture

Component: translation_entity.module » content_translation.module
jair’s picture

Issue tags: +Needs reroll
jair’s picture

Issue summary: View changes

Updated issue summary remaining tasks to reflect background done, re-wording done and next step is making a patch.

alansaviolobo’s picture

Issue summary: View changes
FileSize
1.05 KB

based on the patch in #35

alansaviolobo’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 50: translation_is_not-1831636-1.patch, failed testing.

The last submitted patch, 50: translation_is_not-1831636-1.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • webchick committed 4bbff16 on 8.3.x
    Issue #1831636 by claudinec, jlscott, thsutton, chrischinchilla, moe4715...

  • webchick committed 4bbff16 on 8.3.x
    Issue #1831636 by claudinec, jlscott, thsutton, chrischinchilla, moe4715...

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Manuel Garcia’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
1.07 KB

Rerolled and keeping the $name variable passed in to FormState::setErrorByName().

Status: Needs review » Needs work

The last submitted patch, 58: translation_is_not-1831636-58.patch, failed testing.

  • webchick committed 4bbff16 on 8.4.x
    Issue #1831636 by claudinec, jlscott, thsutton, chrischinchilla, moe4715...

  • webchick committed 4bbff16 on 8.4.x
    Issue #1831636 by claudinec, jlscott, thsutton, chrischinchilla, moe4715...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pameeela’s picture

Status: Needs work » Fixed
Issue tags: +Bug Smash Initiative

This was committed (live at DrupalCon Sydney!) in #40 and then re-opened for further changes that were never made.

I can't really figure out what exactly should have been done, but it's been 8 years, so I think we are best off setting this back to Fixed and opening a new issue if there is anything that needs to be addressed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.