Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Cool module, thanks! 🎉
I see the entity is marked as translatable, but I'm not seeing any way to translate it from the UI. Am I missing something or is that just not implemented yet?
Comment | File | Size | Author |
---|---|---|---|
#15 | 3128293-15.patch | 4.91 KB | slv_ |
#13 | 3128293-13.patch | 1.56 KB | deviantintegral |
#12 | 3128293-12.patch | 1.53 KB | larowlan |
#8 | 3128293-8.patch | 589 bytes | larowlan |
#4 | 3128293.patch | 2.32 KB | larowlan |
Comments
Comment #2
larowlanMost likely a bug.
To be honest, translation is not my strong suite.
I thought I added the required annotations to make this work, but without a use-case, hadn't tested it.
Will try and carve out some time to dig into it.
Comment #3
larowlanAh! it looks like content translation module only provides UI for entities that have a canonical route - which we don't.
So should just be a matter of adding them in.
Comment #4
larowlanGive this a shot
Comment #5
larowlanNote to self:
\Drupal\Tests\node\Functional\NodeTranslationUITest
should provide a good guide for an equivalent test for thisComment #6
justafishThanks @larowlan! I applied the patch and enabled translation for Microcontent at /admin/config/regional/content-language, and now I get the option to translate the microcontent. However clicking it throws up this error
/admin/content/microcontent/1/translations
Comment #7
larowlanSo content translation really wants the entity type to have a canonical URI.
Let me see what I can work out.
Comment #8
larowlanIt looks like block content just duplicates its edit form for the sake of a canonical route
Feels like a hack, but looks like tmgmt_content module can't handle the above patch so maybe shouldn't fight it.
Does this help?
Comment #9
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedAdding the canonical link looks to have fixed this for me - at least, I can now enable translations for a field.
Comment #10
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedActually, this seems to break editing microcontent entities. Instead of rendering the edit form, the entity is rendered instead.
Comment #11
larowlanok, will wrangle that a bit later today
Comment #12
larowlanPerhaps this?
Comment #13
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedI was still getting exceptions when trying to load the canonical route. I think this is probably a core bug since returning FALSE / NULL matches the API, but instead I did what media module does.
Comment #14
larowlanThanks, this looks good to me, just needs a test, will see if I can knock something out this week
Comment #15
slv_ CreditAttribution: slv_ at Lullabot for DocuSign commentedRe-rolling patch, adding KernelTest that verifies translation is handled by the default Core class, and that translations are stored as expected, with the proper per-translation values, etc.
Comment #17
larowlanFixed, cutting 8.x-1.0-alpha8
Thanks all