I noticed that this module does not follow the 'source picking' feature on translation. When hitting 'translate' on a node that already has more than one translation associated with it, Drupal lets the author pick a 'source language'. When a source language is changed Drupal will rebuild the form with updated values from that source language.
I noticed that this module does not honor that source option - it seems to always go back to the 'original'. I am not 100% sure quite what the difference is between source and original - I kinda thought they were the same thing.
I noticed in the code we call getUntranslated - I looked to see if there was another language value that might be available.
I just thought, perhaps the form state would convey that info. I will take a look.
Comment | File | Size | Author |
---|---|---|---|
#2 | use-source-translation-3086326-1.patch | 1.15 KB | AndyThornton |
#8 | 3086326-8.patch | 4.34 KB | swentel |
#8 | 3086326-8-test-only.patch | 3.19 KB | swentel |
Comments
Comment #2
AndyThornton CreditAttribution: AndyThornton commentedComment #3
AndyThornton CreditAttribution: AndyThornton commentedComment #4
AndyThornton CreditAttribution: AndyThornton commentedComment #5
swentel CreditAttribution: swentel commentedOoh right, nice catch, never thought about this one. Setting to needs work because a test would be nice here.
I have some time normally next week to come up with one - unless you beat me to it of course :)
Comment #6
SoCalErich CreditAttribution: SoCalErich commentedOK, yeah so I thought I was going crazy here or misconfiguring something. I have multiple languages set up and I have the layout set to be translatable and I have this module enabled. When I create the sometimes large extensive layout for a page in the default language, I would expect that if I go to now "translate" this layout into another language, that the layout would AT LEAST give me what is already in the default language layout as far as what blocks have been added/configured. Instead, I get a blank canvas where I would have to completely recreate the layout from scratch for this new language. Is that the default behavior for this? I did notice that it will preserve any default blocks that were put in the default layout for the content type itself, but you lose any layout config for the language you already did. Is this what this patch is intended to fix?
THANKS
EDIT: I just applied this patch and it didn't seem to remedy this particular issue I described above. Maybe it was meant to fix something else?
Comment #7
swentel CreditAttribution: swentel commentedHmmm, the module comes with an option to copy the blocks when creating a translation. On the manage form display of the entity, you can change the form widget for the layout where you can also set the default setting of the widget. On the edit form a checkbox will appear to copy the blocks. Unless I understand it wrong, let me know! :)
Comment #8
swentel CreditAttribution: swentel commentedfailing test patch + fix
Comment #10
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedcommitted and pushed, thanks!
Comment #11
AndyThornton CreditAttribution: AndyThornton commentedthank you!
Comment #12
SoCalErich CreditAttribution: SoCalErich commentedWow user error!! I didn't even know that check box existed even though it's right there in the description of the module. I guess I just never noticed that. I see the patch got committed into the latest version of the module. I checked that checkbox, updated the module to the latest version and now it's working perfect.
THANKS!