Problem/Motivation
1. Install Drupal in German.
2. Add French.
3. Go to the German language, create a View. View is created in German. Yay.
4. Go to the French language, create a View. View is still created in German. Nay.
Proposed resolution
Use the negotiated language when defaulting config entity languages.
Remaining tasks
Discuss. Review.
User interface changes
None.
API changes
Default assumptions about config entity language changes. Will only be an actual change on multilingual sites and there the new behavior makes sense, the old one does not.
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff.txt | 2.12 KB | Gábor Hojtsy |
#11 | 2447139-11.patch | 2.95 KB | Gábor Hojtsy |
#8 | interdiff.txt | 1.62 KB | Gábor Hojtsy |
#8 | 2447139-8.patch | 2.5 KB | Gábor Hojtsy |
#5 | interdiff.txt | 781 bytes | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyComment #2
Gábor HojtsyComment #4
Gábor HojtsyIt is not clear to me how to tell from the results which test fails exactly. I tried the tests listed around that fatal locally but neither failed. I don't think the code needs fixing, the test needs fixing to define what is missing.
Comment #5
Gábor HojtsyDiscussed clever ways to figure out which test was that with Wim Leers and vijaycs85 and we found \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest. That of course now needs to return English for the current language then.
Comment #6
dawehnerAh there is the issue!
Comment #7
alexpottLooks like we should have a test for this - I'm not sure that the test change actually covers the bug being fixed by the patch.
Comment #8
Gábor HojtsyUpdated tests to ensure that the language default is applied based on current language.
Comment #9
Gábor HojtsyComment #10
dawehnerLooks great, but some integration test would be great.
Just a comment: For future uses, you can use
->willReturn(new Language(...
Comment #11
Gábor HojtsyUsing willReturn() and more coverage for when you did provide a language. The change is in config entity storage, so I think it makes sense to test it there, that applies the default. This should be more complete coverage now.
Comment #12
dawehnerLooks alright for me!
Comment #13
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed be30a52 and pushed to 8.0.x. Thanks!
Comment #15
Gábor HojtsyYay, thanks!