When installing Entity Translation to use field translation instead of node translation, and I set "Multilingual Support" to "Enabled, with field translation", the variable "language_content_type_MYCONTENTYPE" as the value of 4. I18n does not recognize this mode as a translation mode when I select the tab "Multilingual settings".
The reason is that the method that detects if translation is enabled or not only checks for value to be 1 or 2... Is there a specific reason for that ?
I found that if I modify the method i18n_node_type_enabled I18n correctly recognizes translations with "Enabled, with field translation". The patch follows.
Comments
Comment #1
emorency commentedComment #2
jose reyero commentedRight, we don't mess with ET nodes anymore which fixes some other issues.
Comment #3
lmeurs commented@Jose Reyero: may I ask you to elaborate on comment #2? The problem still seems to exist and the patch from #1 looks viable, but may effect other functions wrongly.
See _i18n_node_form_node_form_alter(): to allow higher values than 2 for
language_content_type_NODE_TYPE(Entity Translation uses ie. 4), maybe the first IF statement could be altered from:to:
Also see:
Comment #4
rv0 commentedSwitching to active as this is still an issue (see #1852102: Clarify that Multilingual Content (i18n_node) and ET are not compatible) just as reported in #3.
Comment #23 here proposes a simple solution for it https://www.drupal.org/node/1852102#comment-9612303
Comment #5
rv0 commentedBump.. (see above comment)
Comment #6
Cyclodex commentedYes, this function should not report no translation support, if there are other modules like entity adding other kind of support.
Why is it limited to 1, and 2 ? why not everything else than 0 ?
For the moment we have to correct things, like in #1852102: Clarify that Multilingual Content (i18n_node) and ET are not compatible
Comment #7
joseph.olstadI recently upgraded my content types to ET (entity translation) and I did not observe this issue. ?
hmm
Comment #8
joseph.olstadhere's the version of entity_translation I use:
Comment #9
srclarkx commentedHere is a patch from the code that Cyclodex provided.
Comment #11
srclarkx commentedWhoops, wrong Version. Patch is for 7.x-1.12
Comment #12
joseph.olstadI had to make these changes to the patch:
remove this line
replace with this line
Comment #13
joseph.olstadComment #14
joseph.olstadpasses simple tests
needs review by humans
Thanks to @srclarkx for the original patch
Comment #15
srclarkx commentedActually thanks to Cyclodex. I needed to get a patch together for our language people to do some testing. I'll use the clean patch when we actually deploy. Thanks! I'll let you know how it works after it makes it through the process and onto our server.
Comment #16
milopca commentedReview by a human and works for me!
Thanks
Comment #18
joseph.olstadComment #19
Cyclodex commentedThanks srclarkx for creating a patch of my mentioned changes!
And really nice community behaviour to mention me, thanks a lot, hope my changes are correct and helps :) !
Comment #20
joseph.olstadexcellent work everyone. this will hopefully make it into 7.x-1.15 which has been stalled pending the community feedback of the 7.x-1.x dev branch. Probably release 7.x-1.15 early 2017