Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
language.module
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
14 Apr 2014 at 14:31 UTC
Updated:
29 Jul 2014 at 23:32 UTC
Jump to comment: Most recent, Most recent file
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!