confusion log: Note: I asked Gabor for permission to save/post, and also I edited out some traffic not relating specifically to looking at the config meta stuff. YesCT: GaborHojtsy: reyero: I'm following the steps to test drive, and looking at core/modules/image/meta/image.style.effects.%.yml [05:37am] YesCT: why is there sometimes a label without a type? [05:41am] YesCT: http://paste2.org/p/2485656 [05:52am] YesCT: in for example meta/image.style.effects.image_scale.yml http://paste2.org/p/2485684 [05:52am] YesCT: there is no type for definition label, because [05:56am] GaborHojtsy: YesCT: looks like http://drupal.org/node/1804688 is also ready for a thorough review [05:56am] Druplicon: http://drupal.org/node/1804688 => Download and import interface translations => Drupal core, locale.module, major, needs work, 43 comments, 17 IRC mentions [05:56am] YesCT: in meta/image.style.%.yml , http://paste2.org/p/2485697 , effects: .definition: label: 'Style effects' does not have a matching type ? [05:57am] YesCT: GaborHojtsy: that is super. lots to do. [05:57am] GaborHojtsy: YesCT: [05:57am] GaborHojtsy: YesCT: trying to understand your meta question, but not getting it [05:58am] YesCT: GaborHojtsy: it's because I'm looking at the details for the first time, so I'm taking in a lot of new info for me [05:58am] YesCT: GaborHojtsy: and the first thing that happens for me, is I'm looking at these yml files, and my pattern matching brain says: [05:59am] YesCT: hey, there is almost symmetry [05:59am] YesCT: why are there sometimes not a "type"? [06:00am] YesCT: restated: http://paste2.org/p/2485697 the effects definition label does not have a type paired with it. [06:01am] YesCT: maybe because that is a… nested something and the "type" is kind of that it's type is a list? [06:03am] YesCT: .. like in meta/image.style.effects.image_scale.yml http://paste2.org/p/2485684 the data definition has a label and no type… [06:04am] YesCT: because it's type is made up of the width height and upscale "list" which each have a label and type of their own... [06:05am] YesCT: I'm kind of picturing this as a tree, and the leaves on the tree will have label and type, the .. .uh nodes that are not leaves will just have label. [06:07am] YesCT: > that's just me looking at what comes with the patch at step 4, so I can try and recognize the effect of actually searching in the ui for a string like "Medium" and translating something there. [06:07am] YesCT: (step 4 in the test drive the patch) [06:08am] YesCT: because I wanted to be able to do step 7: Observe change applied by .yml files in active storage appearing with the translation overrides and similar data structures appearing in the database as config overrides [06:09am] YesCT: so I figured I needed to look around first so I could see a before and after. [06:11am] GaborHojtsy: YesCT: yeah list: '1' says type: list [06:11am] GaborHojtsy: YesCT: in concept [06:11am] GaborHojtsy: YesCT: but the change will be with the data .yml files not the meta ymls [06:11am] YesCT: [06:13am] YesCT: GaborHojtsy: meta/image.style.%.yml http://paste2.org/p/2485697 has list: '1' [06:14am] GaborHojtsy: YesCT: yup, so list: 1 means its a list thing [06:14am] YesCT: GaborHojtsy: is there a reason it doesn't say litterally: type: list: '1' ? [06:15am] YesCT: I thought 1 meant there was one thing in the list... [06:15am] YesCT: like that it was only a list of settings [06:15am] YesCT: and not settings and something else. [06:16am] GaborHojtsy: YesCT: yeah, these just reflect the TypedData values I think [06:16am] GaborHojtsy: YesCT: I agree it would be better as type: list [06:25am] YesCT: so, meta/image.style.%.yml http://paste2.org/p/2485697 [06:25am] YesCT: says image sytles will have (for example in config/image.style.medium.yml http://paste2.org/p/2485789 ) [06:25am] YesCT: a name, label and list of effects [06:26am] YesCT: or in other words: a name, label and effects [06:27am] YesCT: name has a label that is a string [06:27am] YesCT: label has a label that is text [06:27am] YesCT: and effects has a label… ack that is a list [06:28am] GaborHojtsy: YesCT: and effects is a list which is further defined in the given file generally or the file with the % placeholder replaced with the value of name for specific effects [06:28am] YesCT: so I'm misunderstanding. [06:28am] YesCT: it's that name is a label of type string [06:28am] YesCT: sorry hang in there. [06:29am] YesCT: name has a label, the label is machine name, and the data for the name is type string [06:30am] YesCT: effects has a label, the label is Style effects and the data for effects is a list [06:39am] YesCT: distracted… by the ordering [06:39am] YesCT: config/image.style.medium.yml http://paste2.org/p/2485789 [06:40am] YesCT: has order name, data, weight, ied [06:41am] YesCT: meta/image.style.effects.%.yml http://paste2.org/p/2485656 [06:41am] YesCT: has order name, data, weight, ied [06:41am] YesCT: ok…. [06:42am] YesCT: meta/image.style.effects.image_scale.yml http://paste2.org/p/2485684 [06:42am] YesCT: has order name, weight, ied, data [06:43am] YesCT: since some of these terms like name mean one thing in one place and another in another place, if it doesn't break things, having the order consistant might help [06:46am] YesCT: (btw, I'm taking notes.) [06:50am] YesCT: by the time I get down to the specifics: meta/image.style.effects.image_scale.yml http://paste2.org/p/2485684 [06:51am] YesCT: everything has a type, except ieid [06:51am] YesCT: it's a bit weird the types for the data have single quotes on them. [06:52am] YesCT: ok. so. I think I can wrap my head around most of that. [06:52am] YesCT: now I'm going to try and look for "Medium" in the translation ui. [06:53am] GaborHojtsy: YesCT: yeah, so the order does not matter as long as the keys are on the same level, they are associative keys [06:54am] YesCT: GaborHojtsy: yeah, the computer doesn't care about the order. just confused … the human. [06:55am] YesCT: how does the file meta/image.style.effects.image_scale.yml get written/generated? by a human developer? who makes that when they are also making config/image.style.medium.yml ? [06:57am] YesCT: I suppose it's uh, both? a change to config in the ui gets written as a cmi file, and a cmi file gets read/loaded also YesCT: GaborHojtsy: when I search for Medium in Configuration » Regional and languages » User interface translation I dont find anything [07:06am] YesCT: image module is enabled... [07:07am] YesCT: i got to trigger it to load the strings... [07:11am] YesCT: hmm. went to admin/config/media/image-styles/edit/medium, ran cron, cleared cache. but: http://screencast.com/t/EjuP1BM8vsZ [07:11am] YesCT: GaborHojtsy: what am I missing todo? ^ [07:12am] GaborHojtsy: YesCT: you should have a foreign language added [07:13am] GaborHojtsy: oh [07:13am] GaborHojtsy: YesCT: well, look at the test, that is what it does, adds a language, looks for source string, etc. [07:13am] GaborHojtsy: YesCT: you should find the missing step there [07:13am] YesCT: ok. [07:15am] GaborHojtsy: YesCT: onwards from + /** [07:15am] GaborHojtsy: + * Tests basic configuration translation. [07:15am] GaborHojtsy: + */ [07:15am] GaborHojtsy: + function testConfigTranslation() { [07:15am] GaborHojtsy: 1. add language [07:15am] GaborHojtsy: 2. site name should already be a source string present in the backend [07:16am] GaborHojtsy: 3. the saved site name should be displayed [07:17am] GaborHojtsy: YesCT: it also adds a path prefix but that is for easier testing, should not be required [07:18am] YesCT: I didn't add a custom langauge. [07:18am] YesCT: I just added a language... [07:18am] YesCT: k. [07:20am] YesCT: I got it now. [07:21am] YesCT: did it really need to be a custom language? [07:24am] YesCT: I'll double check by runing through the steps from scratch again later. [07:28am] GaborHojtsy: YesCT: well, any language should do it [07:28am] GaborHojtsy: YesCT: running those steps with effulgentsia it worked for us in Berkeley [07:28am] YesCT: k. [07:29am] YesCT: I'm looking at sites/default/files/config_X3nyhr0UiW2Sjh9EyvTFP93nHcf7SRzPGAD1LADO6Oc/active/image.style.medium.yml [07:54am] YesCT: since I translated Medium (220x22) to Middle (220x220) [07:54am] YesCT: I searched in the db for Middle [07:54am] YesCT: and found two tables: [07:54am] YesCT: cache_config http://screencast.com/t/NlX3ArlF [07:54am] YesCT: with a cid of locale.config.yy.image.style.medium [07:56am] YesCT: and also in locals_target http://screencast.com/t/Zcu6VTAH [07:58am] YesCT: GaborHojtsy: thats what is meant in the test drive steps that say Observe change […] and similar data structures appearing in the database as config overrides, right? [07:58am] GaborHojtsy: YesCT: yup [07:58am] GaborHojtsy: YesCT: the locale.config.{langcode}.original_cmi_key [07:58am] GaborHojtsy: YesCT: is an override [07:59am] YesCT: is there a way to see what's in the "blob" ? [07:59am] GaborHojtsy: YesCT: which should ONLY contain the translated strings [07:59am] GaborHojtsy: YesCT: you should be able to see it as a file at sites/default/files/config_X3nyhr0UiW2Sjh9EyvTFP93nHcf7SRzPGAD1LADO6Oc/active/locale.config.yy.image.style.medium [07:59am] YesCT: GaborHojtsy: yep: http://screencast.com/t/vY4UE22YHBO4 [08:00am] GaborHojtsy: YesCT: so that is what the metadata patch does, it identifies pieces to extract for translation and then makes them translatable, so when you save translations, those get saved as appropriate overrides [08:00am] GaborHojtsy: YesCT: there is no other code in core that would save these overrides so this is a first [08:00am] YesCT: GaborHojtsy: so in general, config overrides are in the table cache_config ? [08:00am] GaborHojtsy: YesCT: previously we got in code to *read* these overrides [08:01am] GaborHojtsy: YesCT: yes, they are stored with CMI they have different config names prefixed with locale.config.langcode and then the original cmi name [08:01am] GaborHojtsy: YesCT: the localeconfig listener merges them in as needed [08:01am] YesCT: right. [08:01am] YesCT: so. [08:01am] GaborHojtsy: YesCT: [08:01am] GaborHojtsy: core/modules/locale/lib/Drupal/locale/LocaleConfigSubscriber.php [08:02am] GaborHojtsy: YesCT: configLoad() [08:02am] • YesCT looks [08:02am] GaborHojtsy: YesCT: so then the factory patch is about breaking this hardcoded assumption that is in LocaleConfigSubscriber that always overrides config with translated config in the interface language regardless of what you might need/want [08:03am] GaborHojtsy: YesCT: the metadata patch identifies strings for translation [08:03am] YesCT: metadata patch identifies strings. [08:03am] GaborHojtsy: YesCT: the factory patch lets us use config in different languages in one page request, such as when we need to send 3 emails in one request in 3 languages [08:03am] YesCT: config factory https://drupal.org/node/1763640 ... [08:03am] Druplicon: https://drupal.org/node/1763640 => Introduce config factory and context to make config accessible in different languages => Drupal core, configuration system, major, needs work, 24 comments, 5 IRC mentions [08:04am] YesCT: that's a little mind blowing. [08:05am] YesCT: GaborHojtsy: I think what I'm going to do, is blow away everything, got through my notes and make sure I have steps to reproduce/test drive. [08:06am] YesCT: I'll post those and some of my observations that I've had along the way. [08:06am] YesCT: I'll let that sink in a little … and then … maybe either look at the code, or try and figure out how the factory fits in. [08:09am] GaborHojtsy: YesCT: ok