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

[ProductAttribute] Make select attribute translatable #8766

Merged
merged 9 commits into from Oct 24, 2017

Conversation

Projects
None yet
3 participants
@GSadee
Member

GSadee commented Oct 4, 2017

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets fixes #8220
License MIT

Based on the PR #8206 created by @Lowlo and partially based on the PR #8751

@GSadee GSadee added this to the 1.1 milestone Oct 4, 2017

Show outdated Hide outdated app/migrations/Version20171003103916.php Outdated
Show outdated Hide outdated ..._products/viewing_select_product_attributes_in_different_locales.feature Outdated
$attributeChoiceElement = $this->getElement('attribute_choice_list_element', ['%value%' => $value])->getParent();
$attributeChoiceElement = $this
->getElement('attribute_choice_list_element', ['%value%' => $value])
->getParent()->getParent()->getParent()->getParent()

This comment has been minimized.

@pamil

pamil Oct 17, 2017

Member

Hmm, is there any way we can get rid of those parent calls?

@pamil

pamil Oct 17, 2017

Member

Hmm, is there any way we can get rid of those parent calls?

This comment has been minimized.

@GSadee

GSadee Oct 17, 2017

Member

I've been trying to come up with better solution, but without success. If you have any suggestion, please share with me 😃

@GSadee

GSadee Oct 17, 2017

Member

I've been trying to come up with better solution, but without success. If you have any suggestion, please share with me 😃

Show outdated Hide outdated src/Sylius/Bundle/AdminBundle/Resources/views/Form/theme.html.twig Outdated
Show outdated Hide outdated ...ype/AttributeType/Configuration/SelectAttributeChoicesCollectionType.php Outdated
Show outdated Hide outdated ...ype/AttributeType/Configuration/SelectAttributeValueTranslationsType.php Outdated
Show outdated Hide outdated ...s/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php Outdated
Show outdated Hide outdated ...s/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php Outdated
Show outdated Hide outdated ...s/Bundle/AttributeBundle/Form/Type/AttributeType/SelectAttributeType.php Outdated
Show outdated Hide outdated src/Sylius/Bundle/AttributeBundle/Resources/views/Types/select.html.twig Outdated
<service id="sylius.attribute_type.select.value.translations" class="Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\Configuration\SelectAttributeValueTranslationsType">
<argument id="sylius.translation_locale_provider" type="service"/>
<tag name="form.type" />
</service>

This comment has been minimized.

@pamil

pamil Oct 23, 2017

Member

I guess there's still something wrong with those definitions, %locale% points to a base locale code, whereas sylius.translation_locale_provider service has getDefaultLocaleCode method which returns current channel's default locale. Is there any reason for using these two simultaneously instead of only one of them?

@pamil

pamil Oct 23, 2017

Member

I guess there's still something wrong with those definitions, %locale% points to a base locale code, whereas sylius.translation_locale_provider service has getDefaultLocaleCode method which returns current channel's default locale. Is there any reason for using these two simultaneously instead of only one of them?

This comment has been minimized.

@GSadee

GSadee Oct 24, 2017

Member

I didn't notice that 👍
I've changed to use sylius.translation_locale_provider instead of %locale%.

@GSadee

GSadee Oct 24, 2017

Member

I didn't notice that 👍
I've changed to use sylius.translation_locale_provider instead of %locale%.

@pamil

pamil approved these changes Oct 24, 2017

@pamil pamil merged commit de016ee into Sylius:master Oct 24, 2017

2 checks passed

Scrutinizer 19 updated code elements
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pamil

This comment has been minimized.

Show comment
Hide comment
@pamil

pamil Oct 24, 2017

Member

Thanks @Lowlo & @GSadee, especially for your patience! :)

Member

pamil commented Oct 24, 2017

Thanks @Lowlo & @GSadee, especially for your patience! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment