Part of meta issue #1802750: [Meta] Convert configurable data to ConfigEntity system
Problem/Motivation
The Language module itself uses a custom database table to store languages. This should be converted to CMI Configurable so site maintainers can push new language information to staging/live. Also, we removed native language name specification support earlier in anticipation of the CMI conversion of the language list and translation of language names with CMI.
Proposed resolution
Convert to CMI Configurables.
API changes
Stop using {language}
table
Related Issues
#2026227: Separate language_list() usage for maintenance mode
Comment | File | Size | Author |
---|---|---|---|
#143 | 1754246-language-configurables-143.patch | 232.07 KB | webflo |
#143 | 1754246-language-configurables-140-143.interdiff.txt | 2.06 KB | webflo |
#140 | 1754246-language-configurables-140.patch | 231.65 KB | webflo |
#140 | 1754246-language-configurables-139-140.interdiff.txt | 8.05 KB | webflo |
#139 | 1754246-language-configurables-139.patch | 238.97 KB | webflo |
Comments
Comment #1
andypostAlso we have different language-related contexts and language types
Comment #2
Gábor HojtsyThis is not in language module?!
Comment #3
cweagansRe-tagging
Comment #4
sunI'm sorry, but I don't see anything else in Language module or Locale module that could be converted into config aside from the stuff we are currently converting into config already.
Comment #5
Gábor Hojtsy@sun: do you think the configured list of languages themselves should not be in CMI (and therefore should not have translation support, such as the possibility to show a language name it its native form)? Or is that already covered in another issue? That is a key feature we removed temporarily with the explicit intention of getting it back by converting the list to CMI and having CMI language support take care of the rest.
Comment #6
sunoh, sorry. I thought there was an issue for converting languages already. Yeah, that makes sense.
Clarifying issue title.
Comment #7
mgiffordAdding related issue #1164682: links with a known language need language identifier to return to after this issue has been fixed.
Comment #8
Gábor HojtsyBring on sprint. This is important to get back the feature we lost with the removal of native language names (via config translation).
Comment #9
Gábor HojtsyUpdated issue summary as well. Who wants to take this on? :)
Comment #10
Gábor HojtsyComment #11
dagmarI'm going to work on this during this week.
Comment #12
Gábor Hojtsy@dagmar: how is it going?
Comment #13
dagmarI'm on it :)
I have some questions, mostly related to #1216094: We call too many things 'language', clean that up
I'm using the code that @sun wrote here #1588422-84: Convert contact categories to configuration system to convert Languages into Configurables. So basically I have to create a new class called Language that extends ConfigEntityBase.
But it seems that this class already exists in core core/lib/Drupal/Core/Language/Language.php introduced in #1497230: Use Dependency Injection to handle object definitions and it has almost the same properties that the one I'm creating for this issue.
So, the main issue here is, should be provide two different clases for language? One for the configuration handling and other for the language object? If yes, what name should I use for the config class?
Or we just could make the class mentioned above extends the ConfigEntityBase class. What would be the performance implications of doing this?
Also, we have to define a pattern to save the config files. What should I use, the name of the language, for example
language.spanish.yml
language.french.yml
Or the langcode, language.es.yml, language.fr.yml
And finally, again, because we have a lot of things called language, we should define a name to group the languages avialable for the site.
This is because we already have config files that start with 'language', for example, language.mappings.yml, so maybe we could use the name 'site_language' to have something like this:
Comment #14
Gábor HojtsyI think language.$langcode.yml is fine, mappings, etc. are not valid language codes. I think the substructure proposed looks a bit ugly. We definitely should not use the lowercase English names of the languages, that is derived data (and might change). As for reusing the Language object, if we are not doing that, sounds like when we load or need to save languages, we'd need to convert back and forth, which does not sound good. Loading of languages we do on most if not all page loads already.
Comment #15
dagmarHere are some updates. Sorry I cannot provide a patch yet because there are some important decisions to take.
First: We cannot, or better, it wouldn't be nice to have Language as entities, for several reasons:
But, even if we decide to go for the entity path, I still have problems with thinks like $language->default. If this is a property of the entity... Does this means that we will have a columns for that propery in the language table? or maybe there is a way to define properties for entities that are not saved in the db. How can I do that?
Related to the file names, sun suggested via IRC to use language.something.[langcode] to make easier to load all the languages using the prefix language.something.
Comment #16
dagmarAttaching a patch with the work in progress to ilustrate some new issues.
This is not even testeable due ConfigurationEntity is not avilable at install level.
To fix this issue we need the following problem solved.
Alternative 1:
Make ConfigEntityBase as Core component with also implies make Entity a core component.
Alternative 2:
Provide a more generical class to handle objects that are not entities as configurations. And basically replicate a lot of code.
Is there another option to fix this?
Comment #18
tim.plunkette.g. needs a comma after it
Is this really needed now? Seems like it's being dealt with in #1760786: Move entity system "back" into a Drupal\Core component
Also, that's a lot of public properties. Couldn't some of them serve better as protected?
Comment #19
alexpottGonna see if this patch passes... it does what #1760786: Move entity system "back" into a Drupal\Core component wants to do... but we have the use-case :)
So all the Entity, ContentEntity and ConfigEntity classes have move to Drupal\Core\Entity - cause they are all entities.
re: #18
Language code, e.g. 'de' or 'en-US'
is repeated three times in the code so this should be dealt with in a follow up (imho)re: #18 requirement to enable config has gone!
One interesting question has the requirement to have the entity module enabled also gone?
Comment #21
sunThere are two issues there:
1) Whether the existing Drupal\Core\Language should be the config entity class itself.
2) Every ConfigEntity gets a 'langcode' property injected by default, which clashes with the actual langcode here.
However, 1) cannot work without #1760786: Move entity system "back" into a Drupal\Core component + additionally moving ConfigEntity into Core, AND additionally #1763974: Convert entity type info into plugins... that's a huge dependency chain - let's not block us on that. ;)
For now, I'd recommend to
- Introduce a separate Drupal\language\Language ConfigEntity class that is being used by the admin interface to manage the configured languages.
- Try to use 'langcode' as the id-key of the Language config entity. If that works, good. Otherwise, resort to using 'id' as id-key.
Comment #22
alexpottAfter further investigations with the patch in #19 I would definitely echo the recommendation to introduce a separate Drupal\language\Language ConfigEntity class. There are some really difficult issues with making the current Language object a confgEntity because every entity can create a Language object in the
entity->language()
method. This leads to a dependency headache and lots of Fatal error: Maximum function nesting level of '100' reached, aborting! messages.The patch in #19 should not be followed up. I'm not working on this issue anymore unless @dagmar unassigns himself...
Comment #23
dagmar@alexpott go ahead. I prefer that more experienced people in CMI work on this issue due it was more complicated that I expected in first place. I will be helping in other CMI issues in the meanwhile.
Comment #24
alexpottPatch attached is a work-in-progress and will have test failures :( around language negotiation for some reasons that, at the moment, are not 100% apparent to me.
What the patch achieves:
Things discovered:
ConfigEntityBase::sort()
instead of the newlanguage_entity_sort()
function. This is becauselanguage_list()
gets called at a very low level of bootstrap and for some reasonentity->label()
calls thelanguage()
function which will catch aDependencyInjectionRuntimeException
because thelanguage_manager
is not available yet!No interdiff attached as this is a complete re-roll based on the limited scope discussed in #21
Comment #26
alexpottSome of the tests fixed :)
Comment #27
alexpottComment #29
alexpottthe problem seems to be in entity_get_info using the language() function. So we need to have an exception for language entities.
Additionally since language_list() is statically cached there is no reason to use the entity static cache here either... in fact it might result in unexpected results if we do - although I'm not 100% on this. Since if we do all the language config entity manipulation through the entity sub system - then we should be able to rely on the cache?
Comment #31
Jose Reyero CreditAttribution: Jose Reyero commentedI think this is not a case of adding php code to handle edge cases but one where the current config system (or at least the config entities) are failing for our purposes.
Since Entities depend on language, we cannot pretend to store languages as an entity. This is a conceptual issue and any code we add to handle it will be ugly. Also the dependencies schema this creates doesn't make sense at all since basically we need to load the full entity system for bootstrapping.
So IMHO either the config system should provide a way to handle storage of simple objects like languages without depending on heavyweight objects/systems like Entity, or we should handle 'manually' language storage, just like image styles are done atm (though I guess that will be converted to config entities too, right?)
Comment #32
catchWe should not be using entity_get_info() for both ConfigEntity and ContentEntity. As soon as any content Entity bundle is converted to config, then it's going to explode there too (or look at taxonomy_vocabulary_get_names() and taxonomy_entity_info() for the Drupal 7 version of that problem). This is also a good reason to keep them as separate thingies instead of merging them later, unless we somehow find a way to replace the current info hook for entities with something else that doesn't have this infinite recursion issue.
Comment #33
dagmarfrom #31
Is this possible without have to duplicate a lot of the entity system code?
from #32
What do should we use then?
Comment #34
catchWe can have hook_content_entity_info() and hook_config_entity_info(), something like that?
Comment #35
Jose Reyero CreditAttribution: Jose Reyero commentedWell, we can have Entities that are not Entities, and we can add a big warning comment in the code like 'These are not real entities, don't use them as such'....
Just joking... (But really, Config_Entity extends Entity)
1. Instead of making it worse and more complicated why don't we assume we've placed some functionaliaty in the wrong place, and fix that (Entity extends ExportableThing) ?
2. I guess we should be creating another thread to discuss these issues that are CMI specific (for which I don't have the time today, sorry about raising the issue in the wrong place...)
Comment #36
catchYes the idea is that the lowest common denominator functionality lives in Entity, and ConfigEntity and ContentEntity then extend that if they need separate stuff, how much of that there is we don't know yet. Regardless, there needs to be different info hook for these - for a start ConfigEntity has hard-coded storage controller to CMI, whereas ContentEntity you can swap it around.
Comment #37
dagmarOk I have created this issue #1782424: Provide a way to handle simple objects in Configuration System
Comment #38
sun#1760786: Move entity system "back" into a Drupal\Core component resolved the primary blocker, essentially making the entity system available very early. (Not fully done yet, but the goal is clear.)
#1763974: Convert entity type info into plugins will remove the module/hook system dependency from entity types.
And lastly, but I don't think it's relevant here, #1782460: Allow to reference another entity type to define an entity type's bundles intends to allow to use one entity type as the 'bundles' definition for another entity type.
There is no issue for removing the hard-coded enforcement of language support from entities yet, but given this issue here, I think that should (or has to) happen. Thus, I've created one:
#1782472: Hard-coded and enforced language support for entities conflicts with Language as a ConfigEntity
Comment #39
fagoYep, it would be nice if this would get us out of recursion problems.
Comment #40
andypostAlso this depends on #1785974: Move ConfigEntity into a Core component
because there's no way to load config module without language init
Comment #41
catchJust committed that.
Comment #42
Gábor HojtsyI think this technically could be done after December 1st, its not a new feature. It does help us restore the feature to translate language names (which we need to avoid a regression given we removed native language names in anticipation of this feature). Removing from sprint to focus on real new features and tagging with regression and revisit before release to keep track of the problem (hope these are the right tags).
Comment #43
xjmDemoting in favor of #1802750: [Meta] Convert configurable data to ConfigEntity system.
Comment #43.0
xjmUpdate according to current plans.
Comment #44
xjmSee also: #1828528: Add language module integration for views
Comment #45
plachI'd be tempted to mark #1512424: Add a LanguageInterface, and property setters/getters to Language class as a duplicate of this one.
Comment #46
andypost@plach is not duplicate, #1512424-29: Add a LanguageInterface, and property setters/getters to Language class states difference
Comment #47
plachYes, saw that, thanks :)
Comment #48
andypostSuppose there should be line when config entity gets "translatability" - when there's more then 1 active language and translation sub-system available\accessible
Pure config entity load (it seems) should not use language entity/system, probably it depends on some config metadata...
Comment #49
swentel CreditAttribution: swentel commentedNew patch, just to see how far we can get currently.
Comment #51
swentel CreditAttribution: swentel commenteduntested, last minute changes are never a good idea
Comment #53
Gábor HojtsyYay, thanks for continuing with this :) My only question is why does it need to implement ArrayAccess? Languages are objects prior to this patch universally, so wherever there is array access attempted, that would be in itself a problem.
Comment #54
swentel CreditAttribution: swentel commented@gabor That was for this snippet in bootstrap.inc , $info apparently is an array in HEAD, so when I started I was just adding that as a BC layer because I thought it would become an enormous patch, turns out, it probably isn't, so I'll remove that and fix failtures tonight :)
- edit - removed extra dreditor paste
Comment #55
swentel CreditAttribution: swentel commentedSome obvious fixes, let's see now. ArrayAccess layer removed also.
Comment #57
swentel CreditAttribution: swentel commentedWill fix a lot, effectively using 'language.entity' as prefix
Comment #59
swentel CreditAttribution: swentel commentedShould be down to 2 failures - biggest change is the removal of views integration of {language}
Comment #61
swentel CreditAttribution: swentel commentedShould be green.
Short version: Stupid langcode property.
Long version: don't use properties on config entities in case it's already used by the config entity system. I was using 'langcode' as the main id, but of course, during upgrade, there's two set() calls doing 'langcode' ...
Comment #62
swentel CreditAttribution: swentel commentedComment #64
YesCT CreditAttribution: YesCT commentedI know there are a few tests failing to fix yet, but I took a look standards wise in the mean time. Patch attached for these things.
this might wrap closer to 80 chars.
extra blank line.
missing @param and @return
that's probably blocking as it's a core gate minimum for documentation:
http://drupal.org/core-gates#documentation-block-requirements
Also, the one line summary is longer than 80 chars.
http://drupal.org/node/1354#drupal
Isn't callback a menu or router thing? I think this is just a helper.
Actually, figuring out the type (besides just language entity in words) is kind of tricky, and the other sort helper I found (function _system_sort_requirements($a, $b) {
) doesn't have @param or @return either, so I didn't add them.
this can get wrapped closer to 80 chars.
(adding type to the @param and type hinting is probably out of scope).
Comment #65
YesCT CreditAttribution: YesCT commentedok, a bit more thought, and a google for "callback" (http://en.wikipedia.org/wiki/Callback_(computer_programming)
and I think callback is exactly this thing, a function name passed as an arg.
I looked around for more ($a, $b) kind of functions
grep -R "(\$a, \$b)" * | grep " function "
and one of them is almost identical to this:
sort() in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
tim.plunkett had a good idea in irc. This solves the @param dilema also.
Comment #67
tim.plunkettOh, my apologies, I made this recommendation out of context on IRC. This should just use
Language::sort($language_entities);
Why not
new Language((array) $info);
orentity_create('language', (array) $info)
?This should be divided into LanguageStorageController::preSave() and LanguageStorageController::postSave().
s/field/language
This needs an @todo to rename from name to label.
This needs a Drupal\language\LanguageInterface.
$this->container
Oh, my apologies, I made this recommendation out of context on IRC. This should just use
Language::sort($language_entities);
Comment #68
swentel CreditAttribution: swentel commentedThat's not the language config entity, but Drupal\Core\Language\Language - Confusing as hell for now, this definitely needs to be made clearer :)
Comment #69
swentel CreditAttribution: swentel commentedFixed the last remaining tests. Renamed the entity id to 'language_entity', because, although unconfirmed (but most likely), probably raises some conflicts in that sense that it triggers some hooks (like locale_language_insert etc) it shouldn't. This makes sure it doesn't conflict at all.
Most stuff from #67 addressed , besides the sort, preSave() and postSave() and #68, which is not a big issue afaics - note the 'langcode' is important here, so passing on $info would not work at all.
Let's first see if the bot really like this one and then see if we can do more (list, moving calls, tests).
Comment #70
jibran#69: 1754246-69.patch queued for re-testing.
Comment #72
Gábor HojtsyThis is an amazing patch! What else needs to be done to make this happen. It should happen before the API freeze :) @swentel, can you work on rerolling?
Comment #73
swentel CreditAttribution: swentel commentedWill reroll this weekend and address the remaining points.
We miss an upgrade path too I guess ..
- edit - upgrade path test I mean
Comment #74
swentel CreditAttribution: swentel commentedSuprised this was easy to reroll. Nothing address so far, going to bed now. I will look more tomorrow and/or sunday.
Also regarding my comment in #73, there are a lot of language upgrade tests already, so I guess I could just add a couple of lines in testLanguageUpgrade() to test whether the config files contain the content that we expect.
Comment #76
swentel CreditAttribution: swentel commentedBot crashed on disk space + fix in EntityQueryTest
Comment #78
swentel CreditAttribution: swentel commentedSo yeah, calling entity_load_multiple() in language_list() can't happen anymore, because that doesn't work during upgrades.
Added a test for comparing the config after an upgrade. Sorry for the lack of interdiff, I completely messed up my local install.
Gabor: can't take this further this weekend though, so someone else should bring it home, it's close if you tell me.
Missing things:
- move usort to Language
- move bits in language_save() to LanguageStorageController::preSave() and LanguageStorageController::postSave(), see #67 - although there's much to say to todo that in a follow imho.
Comment #80
Gábor HojtsyI don't think we should even call API functions like language_list() in update functions? Instead have the update-safe replacement in the update only? :)
Comment #81
andypostMostly the troubles caused by not loading actual config and namespace collisions
There's no config loaded, just names
Comment #82
andypostSo let's see
Comment #84
andypostClean-up check, have no time to continue (leaving for 2 days)
Comment #86
Gábor HojtsyChanges look good to me, keep this up :)
Comment #87
andypostAnother try to fix tests:
1)
language_save()
could not be used in install time, so added default language config files2) test
LocalePluralFormatTest
fixed to use correct language (filter was reseted to "fr")3) some cleanups
Comment #89
andypostShould be green
Comment #91
tim.plunkett#89: language-1754246-89.patch queued for re-testing.
Comment #92
Gábor HojtsyLooks great. I don't think I have major things, here are my notes:
Should we just not use language_list() at all in upgrades and use entity_load_multiple() here?
I assume we should have a followup for renaming this in calling code?
Is there generic views config entity support that could replicate this, or this is just a feature removed?
Sounds like we also need followups to convert list/form controller as well, right?
This has constants in Language::, let's document those!
Add: "Locked languages cannot be edited." to explain what this means IMHO :)
Comment #93
catchWhile it'd be great to get this in before code freeze, I'd consider it a release blocker via #1802750: [Meta] Convert configurable data to ConfigEntity system.
Yes!
There's a variable_get() in here for the language count, that needs to move to state at some point, doesn't have to be here but I'm not sure which issue is dealing with that if not this one.
Comment #94
Gábor HojtsyI don't think this issue should necessarily cover the count variable. I think I've seen an issue for it already, but cannot find right now. Maybe there is none...
Comment #95
andypostIf
language_list()
is api that is not available in update/[un]install so we needs someupdate_language_list()
for consistencySo
$language_entity->label = isset($language->name)
could be moved to helper without follow-uphook_views_data()
is not needed because there's no language table, but there's some plugins.About variables #1827038: Remove stale references to language_content_type variable and state #1856976: Convert language_count to the state system.
Conversions for UI: #2005778: Convert language_admin_overview_form to a Controller & #2003592: Convert language_admin_add_form and language_admin_edit_form to a Controllers & #1946426: Convert all of confirm_form() in language.admin.inc to the new form interface
Comment #96
andypostMinor changes for #92
Filed follow-up #2026227: Separate language_list() usage for maintenance mode because there's a 93 usages of
language_list()
in coreComment #96.0
andypostUpdated issue summary.
Comment #97
andypostI'd like to postpone this on #1862202: Objectify the language system - this brings much cleaner approach, and I'll try top swap storage to config on top of the #1862202-102: Objectify the language system
Comment #98
Gábor HojtsyIt would be great not to postpone patches anymore on each other. We have 6 days to get patches like this committed in Drupal core.
Comment #99
andypostActually this is a separate task so no matter which patch goes in first
Comment #100
Gábor HojtsyAll right, lets get the remaining pieces done then here and get this in! #1862202: Objectify the language system is being worked on heavily still.
Comment #101
Gábor HojtsyI don't think we should defer this todo to a follow, it should be done here. Other followups look good.
Comment #102
penyaskitoPlain reroll of #96.
Comment #103
penyaskitoTestbot, please test #102.
Comment #104
tim.plunkettNeeds follow-ups for ListController and FormController.
The language_admin_add_form conversion blocks removal of MENU_LOCAL_ACTION.
Comment #105
penyaskitoWe hit a big issue here: langcode is the property in language, but also the language that the configuration is in, so we have a collision here. We agree about renaming langcode of language to id before we expected (#1512424: Add a LanguageInterface, and property setters/getters to Language class).
Comment #106
penyaskitoComment #107
penyaskitoThis is still WIP, but we can see the progress here.
Comment #109
webflo CreditAttribution: webflo commentedFixed the exception in DatabaseStorageControllerNG. Still WIP.
Comment #111
andypostthis breaks testing
so now ->id needs to be changed to ->id() this will helps mane this property like we wanna to store
Comment #112
penyaskitoTwo tests failing locally, lets see what the testbot thinks. #111 not taken into account (yet).
Sorry, no interdiff.
Comment #114
penyaskitoRerolled.
Comment #115
penyaskitoComment #116
penyaskitoComment #117
andypostAwesome!!! just minor troubles
now this needs uuids!
foreach (entity_load_multiple() as $language)
any reason to load all languages twice?
maybe $language_entity->set('weight', $max_weight)->save();
probably $language->label() will help here
Comment #119
penyaskito1. For generating the uuids, I used: drush php-eval '$x = new \Drupal\Component\Uuid\Uuid(); print_r($x->generate() . PHP_EOL)'
2. OK.
3.
Not really, I changed both to language_list($flag) because IMHO makes the code more legible. There shouldnt be any performance problem because of drupal_static there, but we can change that in a follow-up if needed.
4. Done.
Comment #120
andypostI think this RTBC, only
$language->id
to$language_entity->id()
questionableAlso here's a nice follow-up to clean-up usage of Language as $language and LanguageEntity $language_entity to make code more readable, this out of scope for conversion
Comment #122
penyaskitoReverted the way of setting the weight.
Comment #123
webflo CreditAttribution: webflo commentedFound one issue in language_update_locked_weights().
Comment #124
Gábor HojtsyI think this whole langcode => id change proposal turned out to be way bigger a change than anticipated... So we can just do what the patch always attempted to. Make the config language entity different from the runtime Language object representation. We can at least temporarily make the Drupal\language\Language::langcode be the Drupal\language\Plugin\Core\Entity\Language::id. It looks confusing but its a massive change that we need to not make all at once IMHO.
Comment #125
penyaskitoRerolled #102 and starting again from there.
Comment #126
webflo CreditAttribution: webflo commentedGo!
Comment #127
webflo CreditAttribution: webflo commentedHere is the interdiff for comment 126. Rerolled and removed the langcode property from Language Class and language_default().
Comment #129
webflo CreditAttribution: webflo commentedFixed failed tests in locale module by replacing langcode with id.
Comment #130
webflo CreditAttribution: webflo commentedFixed failed tests in locale module by replacing langcode with id.
Comment #132
webflo CreditAttribution: webflo commentedRerolled and move the language update to update_prepare_d8_language().
Comment #133
webflo CreditAttribution: webflo commented#102: language-1754246-102.patch queued for re-testing.
Comment #135
webflo CreditAttribution: webflo commentedFixed LanguageUpgradePathTest. All tests should pass.
Comment #136
webflo CreditAttribution: webflo commentedOoops. The last patch was outdated. This is the latest ...
Comment #137
webflo CreditAttribution: webflo commentedIts important for d8mi progress.
Comment #138
Gábor HojtsyI think important for D8MI would not be enough for it to be critical :)
1. First of all this is a CMI conversion that we are expected to complete either way.
2. Second, it needs to change the API for language, so it uses the 'id' property as config entity like everybody else does for the machine name (in this case language code).
3. And then it is a regression that we cannot translate the language name, it is only available in English. We will use config translation to get back the native name of language translation feature that was there in Drupal 7 but is currently not available.
Comment #139
webflo CreditAttribution: webflo commentedRerolled and just another cleanup. We can remove the type cast language_default(). (We added it as an intermediate step ...)
Comment #140
webflo CreditAttribution: webflo commentedThe re-roll in comment 114 was bad and introduced a lot of outdated code. This patch removes it again.
Comment #142
kfritscheOkay I got through the whole patch, line by line. Was a long and hard journey.
Only thing I found is:
Otherwise fine for me. Great job!
Did a fresh install, added a new language and tested a translation.
One follow-up which should be discussed. My default language was German and so the added language file looked like:
langcode should be en. But this definitely doesn't concern this patch in any way.
Comment #143
webflo CreditAttribution: webflo commentedFixed the installer tests by injecting the selected language with drupal_static and restored the missing found by kfritsche. Thanks!
Comment #144
andypostThis needs test and
preSave()
implementation on Language entity to make sure that language label always English only for languages that in standard list.Suppose this is a separate issue out of scope
Comment #145
Gábor HojtsyI believe we worked out the remaining pieces in this conversion. It is not a nice one in terms of the parallels of how the language entity and language runtime classes are doubled and how the installer needs to be tricked into the static language list. However the former is needed to make config language work with language entities (avoid circular dependency) and the later is needed since #1862202: Objectify the language system is not there yet. This also overlaps with several changes in that issue, so they need to get in succession. That will clean up the language system further.
Comment #146
alexpottI've manually tested this, looked at the config files generated and everything is working as expected.
This is a key step in making Drupal 8's language system work in the same way as the rest of the system and #1862202: Objectify the language system needs this to proceed.
git commit -m "Issue #1754246 by webflo, swentel, penyaskito, andypost, alexpott, YesCT, dagmar: Languages should be configuration entities."
Comment #147
Gábor HojtsySo now we can go write the config schema, yay :) #2031185: Create configuration schema for language config entity
Comment #148
Gábor HojtsyAlso opened #2031197: Language configuration entities should be created in English at all times for the followup that @andypost and @kfritsche identified.
Comment #149
Gábor HojtsyAdded a change notice for this too since this may make some patches dealing with these lines of code fail as well. https://drupal.org/node/2031267
Comment #150
andypostUpdated change notice https://drupal.org/node/1818734
Comment #151
andypostNow thats ready
Comment #152
BerdirFun follow-up #2032033: Upgrade path tests broken when language module is enabled.
Comment #154
Gábor HojtsyYay, removing from sprint.
Comment #154.0
Gábor Hojtsyup
Comment #155
catchDoesn't need revisiting.