Problem/Motivation
Drupal 7 had configurable languages which could be either enabled or disabled or removed. Drupal 8 has no feature to disable/enable languages so languages are either added or not added at all. Disabled languages had so narrow and confusing use cases that it was pointless to attempt to support them.
The user interface however is still referring to enabled languages at various places.
Proposed resolution
Do not refer to enabled/disabled languages anymore on the user interface. This is a non-existent feature. Languages are now added/removed, we should use that terminology.
Remaining tasks
- (done/ongoing) git instructions for creating patch | Contributor task documentation for creating a patch
- (novice) Review patch to check it fixes the issue, the change is properly documented and for coding standards. Make sure patch stays within scope of just this issue. | Contributor task documentaiton for reviewing patch
User interface changes
Interface text will be correct and up to date with the Drupal 8 behaviour.
API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | interdiff-2240463-23-26.txt | 7.35 KB | robertdbailey |
| #26 | 2240463-enabled-26.patch | 19.37 KB | robertdbailey |
| #23 | 2240463-enabled-23.patch | 12.02 KB | balagan |
| #21 | 2240463-enabled-21.patch | 10.68 KB | balagan |
| #12 | 2240463-enabled-12.patch | 12.06 KB | balagan |
Comments
Comment #1
balagan commentedAdded a patch that changes "languages enabled" to "languages added".
Comment #2
balagan commentedComment #3
penyaskitoComment #4
gábor hojtsyIt would be great to look for where if we talk about enabled languages elsewhere. I think we probably are. Did you look?
Comment #5
balagan commentedYes, I was working in another issue: https://drupal.org/node/1870746, and there I was convinced by YesCT that I should use the word enabled.Ah, I thought you mean "added". I am getting confused myself :)
Comment #6
gábor hojtsyThe question is if "enabled languages" is used elsewhere, let's not have an issue for each instance to fix :) Can we fix more in this issue or is this the only left?
Comment #7
balagan commentedI did some search and came up with the following:
"enabled language":
\core\modules\language\config\tour.tour.language-add.yml
\core\modules\language\config\tour.tour.language-edit.yml
\core\modules\content_translation\lib\Drupal\content_translation\Tests\ContentTranslationTestBase.php
\core\modules\views\lib\Drupal\views\Tests\Entity\RowEntityRenderersTest.php
in comments:
\core\lib\Drupal\Component\Utility\UserAgent.php
\sites\default\default.settings.php
\core\modules\language\lib\Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl.php
"languages enabled":
\core\modules\search\lib\Drupal\search\Tests\SearchLanguageTest.php
"language enable":
\core\lib\Drupal\Core\Language\LanguageManagerInterface.php
in comments:
\core\modules\system\lib\Drupal\system\Tests\Module\DependencyTest.php\core\modules\language\lib\Drupal\language\Tests\LanguageUILanguageNegotiationTest.php
\core\modules\user\lib\Drupal\user\AccountFormController.php
"enable language":
in comments:
\core\modules\node\lib\Drupal\node\NodeListBuilder.php (maybe "enable language column" is correct, but "multiple languages are enabled" is definitely not.
"languages are enabled":
in comments:
\core\modules\content_translation\content_translation.install
"enable a language":
no occurance
Any other idea to search for?
Comment #8
gábor hojtsySounds like a good comprehensive list to fix. Also look for disabled IMHO. :)
Comment #9
balagan commented"enabling a language": I think it is a false positive:
\core\modules\language\lib\Drupal\language\Tests\LanguageListModuleInstallTest.php
"disabled language":
\core\modules\language\lib\Drupal\language\Tests\LanguageListTest.php
"languages disabl", "languages are disabl", "disable a language", "disabling a language":
no occurance
Comment #10
gábor hojtsyComment #11
balagan commentedComment #12
balagan commentedI have changed the "enabled" and "disabled" etc. to "added" and "removed" respectively.
Comment #13
balagan commentedComment #14
balagan commentedThe following two files mentoned above are not yet committed, so I have introduced these changes in the its corresponding issue:
\core\modules\language\config\tour.tour.language-add.yml
\core\modules\language\config\tour.tour.language-edit.yml
Comment #15
yesct commentedthis could be a novice review.
Comment #16
yesct commentedusing [#NNNNN] to link to the related issue in the issue summary, and adding related issue.
Comment #17
gábor hojtsyUpdated issue summary.
Comment #18
gábor hojtsyComment #19
gábor hojtsy12: 2240463-enabled-12.patch queued for re-testing.
Comment #21
balagan commentedPatch rerolled.
Comment #22
balagan commentedComment #23
balagan commentedOf course I have forgot to save some files I have changed. Uploaded the file again.
Comment #24
holly.ross.drupal commentedComment #25
holly.ross.drupal commentedReviewed patch in comment #23. All instances of "enable" look to have been updated to "add" appropriately. However, I was thrown by this change:
I could not see why the updated language should reflect French specifically.
Checked coding standard for indents, spaces around operators, and line length. All looked good. The other standards are still hard for me to see.
Comment #26
robertdbailey commentedGood post, @holly.ross.drupal, and the hard-coded French reference seemed out of place to me at first, too. It appears that this is a test case, which references French as the language being tested. So, I think it makes sense that the assertion mentions the language.
Hi @balagan, I double checked the code for additional references to enable/disable languages. There were a few more references to "enable" that could be changed to "add", so I added them to the patch (along with an interdiff for reference).
Comment #27
balagan commentedThanks @robertdbailey for the updates, it seems I have still missed some.
And yes, I have included "French" in the text, because that is a test, and this is what precedes that string:
$t_args = array('%language' => 'French', '%langcode' => 'fr');So I thought I might just say exactly what is happening.
I took a look at the patch in comment #26, and all seems fine. I am not sure if I myself can change the status to RTBC, since I wrote the first half of the patch, but since it concerns a lot of files it would make sense to get it reviewed quickly, before another reroll will be needed :).
Comment #28
gábor hojtsyYay, thanks! Looks good to me too.
Comment #29
webchickOops. Thought I committed this on Friday. Doing so now. :)
Committed and pushed to 8.x. Thanks!
Comment #31
gábor hojtsyYay, thanks!