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.
Right now if you want to use a pane in multiple languages you'd have to recreate it. It would be great if this could be translated like a node, with the option to sync translations so you don't have to upload the same image each time.
Comment | File | Size | Author |
---|---|---|---|
#60 | fpp-1536944-60.patch | 1.08 KB | stevector |
#53 | 1536944-fieldable_panels_pane-tranlsation-followup.patch | 666 bytes | mrfelton |
#52 | Entity Translation Screen.JPG | 54.86 KB | sylus |
#52 | No Translation Switcher.JPG | 40.42 KB | sylus |
#52 | Translate Field.JPG | 48.69 KB | sylus |
Comments
Comment #1
helior CreditAttribution: helior commentedThe following patch provides integration with the Entity Translation module, which provides plenty of capabilities to translate a pane entity. There is also integration with the Title module, which allows the entity to be fully translatable by replacing the default title field with a Field API counterpart.
Note: This patch requires #1607028: Entity base path is too deep in order to register menu callbacks.
Comment #2
helior CreditAttribution: helior commentedRe-rolling patch to accommodate updates in #1607028: Entity base path is too deep
Comment #3
helior CreditAttribution: helior commentedAdded admin link to edit translation from contextual links. Still depends on #1607028: Entity base path is too deep.
Comment #4
helior CreditAttribution: helior commentedRe-rolling to accommodate updates in #1607028: Entity base path is too deep.
Comment #5
helior CreditAttribution: helior commentedRe-rolling again to accommodate other changes in HEAD.
Comment #6
sylus CreditAttribution: sylus commentedAwesome Work @helior!
Re-rolling again to accommodate other changes in HEAD as of commit b4ae222.
Works great! Hopefully I created the patch properly :)
Comment #7
cangeceiro CreditAttribution: cangeceiro commentedThis could be my lack of experience with translation, but it wasn't immediately clear where to go to translate a pane. hitting admin/structure/fieldable-panels-panes/view/PID/translate did not result in the expected page and no tab ever showed up. This also needs rerolled against the latest head.
Comment #8
sylus CreditAttribution: sylus commentedIn entity translation config screen did you enable it for fieldable panel panes? This is a required step I believe.
Comment #9
cangeceiro CreditAttribution: cangeceiro commentedI did not, which could have been the problem. Like i said I haven't really done much with translation so I'm not terribly familiar with whats required to setup translation.
Comment #10
helior CreditAttribution: helior commentedHere are some steps to reproduce:
You should now see the "Translate" tab under /fieldable-panels-panes/view/[PID].
To support translating the FPP's title (after the doing the previous steps):
Attached is an updated patch against HEAD.
Comment #11
sylus CreditAttribution: sylus commentedRolled new patch on latest dev (August 17th)
Comment #12
sylus CreditAttribution: sylus commentedHmm it could be my patch though looks good, but translation is busted on fieldable panels pane dev (Aug 17th) using:
Comment #13
lathanHere is some feedback on this patch
patched with - translatable-panes-1536944-10.patch
In screen shot "Screen Shot 2012-09-25 at 15.37.49.png" i click add translation for an alternative language we have installed. I then change the language on the field that we have made translatable via this patch the content field in this case as seen in screen shot "Screen Shot 2012-09-25 at 15.39.07.png" you can also see the revision log for the different edits i have done "Screen Shot 2012-09-25 at 15.37.57.png" but in all cases the translated instance is not linked to the language in the translation tab and navigating to the path (we have language detection via url prefix) for the "UK" language set in our case give us the default instance of this panel. The content of the original panel is altered to what should be saved in the alternate translated instance.
Comment #14
sylus CreditAttribution: sylus commentedThanks @jucallme that is exactly the same problem we are having. Thanks for taking the time to write a detailed issue :)
Comment #15
sylus CreditAttribution: sylus commentedWas wondering if anyone has made progress on this :) Been trying to learn entity translation to fix this myself but still falling short currently ^_^
Comment #16
helior CreditAttribution: helior commentedIt's been a while since I looked at this patch, but I think maybe the only bug here is that we're supposed to prevent the user from changing the language after it has been created. Can anyone confirm if Entity Translation will allow the language to be changed on existing nodes?
Comment #17
lathanSomething that actually works.
Comment #18
mgiffordPatch applies to the git repo but there are some minor warnings: 4 lines add whitespace errors.
EDIT: Latest patch has 5 lines add whitespace errors but still applies.
Comment #20
lathanFix white space (this patch is against latest dev branch) and select bug introduced in #19
Comment #21
lathansorry another one left debug in now removed.
Comment #22
lathananother selector bug issue resolved.
Comment #23
lathanremove debug, sorry for the spam.
Comment #24
mgiffordApplied the latest #23 and it applied nicely. Just 1 whitespace errors. Not a big deal.
Comment #25
lathanFix issue with access check when viewing the rendered entity (call to entity_translation_tab_access).
Comment #26
sylus CreditAttribution: sylus commentedHey @jucallme thanks for moving this issue along.
The patch does make some fields become translatable. However I am still having problems with file / image upload.
Have you tried using entity translation + fpp for these types of fields?
Comment #27
lathanFinally figured out one need to use the translation API.
This patch should resolve all issues.
Comment #28
lathanoops missed a file
Comment #29
lathanfinally it added new file to the patch.
Comment #30
lathanremove debug.
Comment #31
sylus CreditAttribution: sylus commentedBased on initial evaluation and use. This seems to work! :) Awesome work!
Comment #32
mrfelton CreditAttribution: mrfelton commentedYes, only issue at the moment seems to be with translating the link path. We can translate the title text, but not the path that it links to.
Comment #33
lathanNow we also make the path a field instance.
Comment #34
lathanLeft the drop field commented in previous patch, fix.
Comment #35
lathanSmall bug on determining lang code fixed.
Comment #36
lathanBug in the edit form and validate function fixed.
Comment #37
lathantypo fix. dose /does
Comment #38
lathanfix display issue in rendering path link.
Comment #39
lathanFix validation check on path was previously not checking the make title link checkbox and allow external links as well.
Comment #40
lathanFix issue with drush make in the install update fieldable_panels_panes_update_7108 change drupal_flush_all_caches() -> field_info_cache_clear()
Comment #41
sylus CreditAttribution: sylus commentedThough I would mention that entity translation beta 2 is out, I'll try the latest patch here with that version later tonight :)
Comment #42
mrfelton CreditAttribution: mrfelton commentedentity_translation_tab_access() should take the entity type as the first arg, and not the bundle name. Otherwise we get WSOD with Fatal error: Class name must be a valid object or a string in /var/aegir/platforms/example/profiles/concern/modules/contrib/entity_translation/entity_translation.module on line 1687
Patch updates to pass in 'fieldable_panels_pane' as the entity type.
Comment #43
mrfelton CreditAttribution: mrfelton commentedOops, was missing the added file..
Comment #44
lathanFix issue in validating that path, need to first get the lang code.
Comment #45
lathanWrong patch above,
Fix issue in validating that path, need to first get the lang code.
Comment #46
Dave ReidWould it maybe be possible to separate out the actual translation ability vs having path as a field? We just need fieldable panes to translate their titles, but the link stays the same and it seems like it may not help this patch get reviewed/committed since it would be an API change for pane path.
Comment #47
Dave ReidNew version with just support for translation because that's the only thing I could test successfully.
Differences between this and #45:
Comment #48
Dave ReidFollow-up issues created:
#1860484: Add support for Title module field
#1860486: Convert the path property to a field so it can be translated
Comment #49
Dave ReidCommitted #47 to 7.x-1.x. Thanks everyone! http://drupalcode.org/project/fieldable_panels_panes.git/commit/3655f62
Comment #50
sylus CreditAttribution: sylus commentedNot sure if should file a new issue but translations are no longer working for me with latest commit to FPP 1.3.
I have tested #45 and that still works.
It looks like some of the custom language code was not added?
I would like to reopen this issue but not sure the correct way to go for this?
Comment #51
Dave ReidI just tested the 1.3 release and I was able to translate normally. Did you run update.php?
Comment #52
sylus CreditAttribution: sylus commentedThis is a fresh installation of our distribution. Really quite perplexed how this would work for you and not myself. Especially given that the earlier patch works.
Modules Used:
-projects[fieldable_panels_panes][version] = 1.2
+projects[fieldable_panels_panes][version] = 1.3
projects[fieldable_panels_panes][subdir] = contrib
-projects[fieldable_panels_panes][patch][1536944] = http://drupal.org/files/Fieldable_Panels_Pane-translatable_panes-1536944...
-projects[fieldable_panels_panes][patch][1818132] = http://drupal.org/files/1818132-prevent-uuids.patch
projects[entity_translation][version] = 1.x-dev
projects[entity_translation][type] = module
projects[entity_translation][subdir] = contrib
projects[entity_translation][download][type] = git
projects[entity_translation][download][revision] = 533c473
projects[entity_translation][download][branch] = 7.x-1.x
projects[title][version] = 1.x-dev
projects[title][type] = module
projects[title][subdir] = contrib
projects[title][download][type] = git
projects[title][download][revision] = ef3d5a14
projects[title][download][branch] = 7.x-1.x
Steps Followed:
1) Confirmed FPP is enabled in Entity Translation (tried also unchecking language selector but is for different area):
2) Made sure Field is Translated for our Custom FPP Type:
3) No language switcher in Navigation (Between Revisions and View Access where it normally appears):
As mentioned reverted to earlier patch and everything works again.
Comment #53
mrfelton CreditAttribution: mrfelton commentedSame problem here. The problem seems to be that the language of the entity is not saved properly. Attached patch resolves and gets the translation support going again properly.
Comment #54
sylus CreditAttribution: sylus commentedWoot thanks @mrfelton solves my problem!
Comment #55
jherencia CreditAttribution: jherencia commentedSame problem here and fixed with the patch.
Thank you @mrfelton.
Comment #56
mgiffordAny thoughts on when it might get into the git repo & more importantly a release? Great to see that there was just a release a month ago, but would be nice if there was an update for the dev version.
Comment #57
jherencia CreditAttribution: jherencia commentedTranslation is broken, let's try to make this more visible.
Comment #58
Dave ReidI'm not sure why I didn't need this change when I was testing things locally, but I committed it to 7.x-1.x: http://drupalcode.org/project/fieldable_panels_panes.git/commit/6f34e0b
Comment #59
jherencia CreditAttribution: jherencia commentedThank you @Dave.
Comment #60
stevectorOne more patch. The last one throws an error if entity_translation is not being used.
Can I get a test from someone who is using entity_translation?
Comment #61
Dave ReidActually I think the real issue here is that we don't expose $form['language'] in the edit form of the pane entity like other forms do. Since $entity->language gets initialized to LANGUAGE_NONE, we can add it to ensure that it will be present in $form_state['values'] always.
Comment #62
Dave ReidOk I fully tested adding $form['language'] and it works to avoid the error that stevector noticed and that entity translation functionalty works as expected on a fresh install now.
http://drupalcode.org/project/fieldable_panels_panes.git/commit/8cb2134