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.
Followup to #1962022: Allow labels to be overriden.
The admin can now override labels with custom ones. (So instead of node/nodes, it can be book/books, etc).
However, these labels are not translatable.
We need to integrate with i18n_string (or possibly i18n_field) to allow them to be translated.
Comment | File | Size | Author |
---|---|---|---|
#14 | 2164511-14.patch | 14.42 KB | mikran |
| |||
#14 | interdiff.txt | 469 bytes | mikran |
#9 | 2164511-9-translate-labels.patch | 13.87 KB | rodrigoaguilera |
#7 | 2164511-7-translate-labels.patch | 14.1 KB | rodrigoaguilera |
#7 | interdiff.txt | 8.48 KB | rodrigoaguilera |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedFirst stab.
This works, but I'm not exactly happy with it.
Comment #2
MXTHi Bojanz,
I've applied this patch to latest stable release and, although patch applies cleanly, labels are not translated and system returns the following errors:
Trying to refresh inline_entity_forms i18n strings at '/admin/config/regional/translate/i18n_string' I receive the following warning:
On field edit settings I receive:
So I've tryed to upgrade IEF to latest DEV version but patch doesn't apply on this:
Thank you very much for your work
Comment #3
ayalas CreditAttribution: ayalas commentedI fixed the missing argument warning in the field settings form. There was a missing $instance argument in the call to label() in entity.inline_entity_form.inc line 171
Attached is a combined patch.
Comment #4
ayalas CreditAttribution: ayalas commentedPrevious patch failed some tests. I searched the project and there were some other calls to labels() that missed the new argument.
Here's a revised patch.
Comment #5
minorOffense CreditAttribution: minorOffense commentedPatch doesn't appear to do anything. No new field options available in the field translation settings page.
Using an inline entity form widget (multiple).
Comment #6
minorOffense CreditAttribution: minorOffense commentedI should clarify, the patch adds the listing in to the translation system, but the "Translation" tab on the field settings doesn't list the additional fields.
Comment #7
rodrigoaguileraI had problems with this patch wit the strings not being detected on a field created by features on install.
I added a hook_field_create_instance calling hook_field_update_instance and some coding standard corrections
Also my entitities are eck and I created this patch.
https://www.drupal.org/node/2395307
Comment #8
rodrigoaguilera@minorOffense
Maybe your problem is related to this.
Comment #9
rodrigoaguileraRebased patch
Comment #10
mikran CreditAttribution: mikran at Mediamaisteri Oy commentedRe-uploading the same patch to trigger testbot. Patch is so old that it was not tested by the new bot and tests are failing locally for me.
Comment #12
mikran CreditAttribution: mikran at Mediamaisteri Oy commentedA new patch, rerolled & fixed to make the tests pass.
This patch also includes the change made in #2862391: D7 branch tests are not passing in current HEAD.
Comment #14
mikran CreditAttribution: mikran at Mediamaisteri Oy commentedohh I actually forgot to include the change made in other issue, here it is
Comment #15
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 2 year old patch in #14 applied cleanly to the latest inline_entity_form 7.x-1.x-dev and if still applicable needs review.