Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inline table collection translation domain #6401

Merged
merged 1 commit into from
Sep 27, 2020

Conversation

EmmanuelVella
Copy link
Contributor

@EmmanuelVella EmmanuelVella commented Sep 21, 2020

Subject

Currently, inline table / tabs collection labels will get the translation domain in this order :

  • the admin one
  • if it's empty, the field options one.

I think it should be the opposite ? Check the option first, and fallback to the admin.

I am targeting this branch, because it's a bugfix.

Changelog

### Fixed
- Fixed incorrect inline table / tabs collection translation domain

VincentLanglet
VincentLanglet previously approved these changes Sep 22, 2020
@VincentLanglet VincentLanglet requested a review from a team September 22, 2020 09:54
jordisala1991
jordisala1991 previously approved these changes Sep 22, 2020
@EmmanuelVella
Copy link
Contributor Author

Sorry guys, I just added the same fix for tabs !

Before
image

After
image

VincentLanglet
VincentLanglet previously approved these changes Sep 22, 2020
@phansys phansys added the patch label Sep 22, 2020
@VincentLanglet
Copy link
Member

Please take a new look @phansys :)

{% if nested_field.vars.translation_domain is same as(false) %}
{{ nested_field.vars.label }}
{% else %}
{% set translationDomain = nested_field.vars.translation_domain|default(nested_field.vars['sonata_admin'].admin.translationDomain) %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first sight, there is no other variable using camel case in this file, excepting this property:

sonata_admin.field_description.associationadmin.formfielddescriptions[field_name].translationDomain

@VincentLanglet VincentLanglet merged commit d71c4f5 into sonata-project:3.x Sep 27, 2020
@VincentLanglet
Copy link
Member

Thanks ! @EmmanuelVella

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants