Let's make the field-collection interface properly translatable via i18n. Attached patch already cares about page titles when adding/editing/deleting field-collections via the formatter-links.

todo: Make edit/delete/add links translatable.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klonos’s picture

I cannot give this a proper review, only test it.

a few other todos(?):

- "Manage fields" and "Manage display" tabs titles don't return the collection's proper label. They have its machine name instead.

- The configuration page lists field collections by their machine name too. "Field name" column should perhaps be "Collection field" and display the proper label instead.

- The title of the "Translate Field instance" tab should also perhaps be "Translate [proper_label] collection field instance".

fago’s picture

- "Manage fields" and "Manage display" tabs titles don't return the collection's proper label. They have its machine name instead.

Agreed, that's not really related to translation though. Let's deal with it separately.

- The configuration page lists field collections by their machine name too. "Field name" column should perhaps be "Collection field" and display the proper label instead.

Which configuration page are you talking of?

- The title of the "Translate Field instance" tab should also perhaps be "Translate [proper_label] collection field instance".

Again, which tab do you mean? The "translate" tab? That one is generated by i18n_field.

fago’s picture

FileSize
7.43 KB

Attached is a completed patch which adds translation support for edit/delete/add links. It's odd that one have to translate them separately, but that's how i18n deals with it. I don't think we can do anything about it.

fago’s picture

FileSize
7.53 KB

missing check for existing defaults

fago’s picture

Status: Needs review » Fixed

and committed.

Note, that this depends on a recent entity api dev verision. I'll roll a new release asap though, so ideally the next field collection release could add a versioned dependency.

klonos’s picture

Status: Fixed » Needs review

Tested #4 again and it does what it advertises.

Which configuration page are you talking of?

Structure -> Field collections (/admin/structure/field-collections)

Again, which tab do you mean? The "translate" tab? That one is generated by i18n_field.

Yep, that'd be the one. You're right, sorry.

klonos’s picture

Status: Needs review » Fixed

...sorry, x-post.

Note, that this depends on a recent entity api dev verision.

I always use latest devs where available ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Elijah Lynn’s picture

Issue summary: View changes

Issue #1446674: make the interface translatable via i18n. Makes field-collection requiring a recent entity api dev version. - http://cgit.drupalcode.org/field_collection/commit/?h=7.x-1.x&id=5badc72...

follow-up #1446674: fixed notices during field creation.
http://cgit.drupalcode.org/field_collection/commit/?h=7.x-1.x&id=10c6574...