Problem/Motivation

Follow-up to #2342015: Content Translation module still implements hook_enable

After installing Content Translation module, it shows the warning that you have to add at least two language to create translation.

Proposed resolution

In Drupal 8 you just need to add one more language to do translation (you already have one).

@catch comment from #2342015: Content Translation module still implements hook_enable

+++ b/core/modules/content_translation/content_translation.install
@@ -12,20 +14,16 @@ function content_translation_install() {
     $message = t('Be sure to <a href=":language_url">add at least two languages</a> to translate content.', $t_args);

I know this isn't touched by the patch, but the string looks wrong to me. Sites will have one language installed, so they only need to add at least one language, not two.

Since this message isn't showing at all at the moment, seems like something we could change here. Or if not, let's open a follow-up.

For the string something like:
This site has only a single language enabled. Add at least one more language in order to translate content.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

vijaycs85 created an issue. See original summary.

vijaycs85’s picture

Issue summary: View changes
chi’s picture

Issue tags: +Novice
lluvigne’s picture

Status: Active » Needs review
StatusFileSize
new979 bytes

Hi,
i've only changed the message, i was trying reproduce this but i couldn't. Was are the steps to reproduce? Is my first contribution :)

Thx!

Status: Needs review » Needs work

The last submitted patch, update_the_misleading-2662078-4.patch, failed testing.

lluvigne’s picture

Status: Needs work » Needs review
StatusFileSize
new979 bytes
vijaycs85’s picture

Looks good. +1 to RTBC.

gábor hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Fine with me.

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs review

Um. This conflicts with the issue summary, which says that you can do translations with only one language enabled. Please either fix the patch or the issue summary. I think that if you install Drupal in Spanish, for instance, you can do translation without having a second language (English) enabled. But maybe that is not right... I don't know?

gábor hojtsy’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

that you have to have at least two language to create translation modified in issue summary to that you have to add at least two language to create translation. And you just need one language to do translation to you just need to add one language to do translation.

jhodgdon’s picture

OK, let me try again.

I just went to simplytest.me and chose to install in Spanish.

After the install, I went to the admin/config/regional/language page, and there is only a single language there: Spanish.

Ohhhhh... yeah, this is Content Translation. I can do Interface Translation with only 1 language, but yeah, you'd need two to do Content Translation (write content in 1 language, translate it into the other). Doh! Sorry, missed that.

Sorry about the noise. Agreed with RTBC - this is a much clearer message.

vijaycs85’s picture

Component: content_translation.module » documentation
alexpott’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +String change in 8.1.0

Committed dd0beee and pushed to 8.1.x. Thanks!

  • alexpott committed dd0beee on 8.1.x
    Issue #2662078 by lluvigne: Update the misleading warning message in...

Status: Fixed » Closed (fixed)

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

gábor hojtsy’s picture

Issue tags: -sprint

Superb, thanks.