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
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | update_the_misleading-2662078-6.patch | 979 bytes | lluvigne |
Comments
Comment #2
vijaycs85Comment #3
chi commentedComment #4
lluvigneHi,
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!
Comment #6
lluvigneComment #7
vijaycs85Looks good. +1 to RTBC.
Comment #8
gábor hojtsyFine with me.
Comment #9
jhodgdonUm. 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?
Comment #10
gábor hojtsythat 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.
Comment #11
jhodgdonOK, 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.
Comment #12
vijaycs85Comment #13
alexpottCommitted dd0beee and pushed to 8.1.x. Thanks!
Comment #16
gábor hojtsySuperb, thanks.