-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
gedmo: allow to switch content language on list and filter by language #84
Conversation
@mcrinquand something with rebasing seems to have gone wrong. i took your branch and cleaned it up. i also added that this will bump the version to 1.1 as its a new feature. i wonder if we might need an option to disable this feature... but well, if somebody needs to disable it, they could do a PR to add that option... i will wait with merging until i tagged 1.0.2 which hopefully will happen soon. |
} | ||
} | ||
|
||
if ($aliasAlreadyExists === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$aliasAlreadyExists
is a boolean, I think you can use it directly in the condition, which is what booleans are made for, so if (!$aliasAlreadyExists)
, which sounds closer to plain english
|
||
{% if (admin.class is translatable) %} | ||
{% for extension in admin.extensions %} | ||
{% if(extension.translatableLocale is defined) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing space after the if
310c9a6
to
d4838bf
Compare
* | ||
* @return bool|null | ||
*/ | ||
public static function translationFieldFilter(ProxyQuery $queryBuilder, $alias, $field, $value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at the code this seems to never be used. if the user needs to do something to activate the filter, can you please add some documentation for this @mcrinquand ?
Yes @dbu I'll update the documentation. |
thanks. can you take this branch translate-gedmo-lists and do the pull request against it instead of master? that way we can keep the changes together and i can already merge the doc update. |
ping @mcrinquand |
Could you please rebase your PR and fix merge conflicts? |
@dbu The PR should be re-opened against master. Could you also please do your work from a fork? Working directly on the repo would be a problem with StyleCI sending auto fix PR. I'm closing this one. Thanks. |
@mcrinquand any chance you can pick this up and finalize it? |
public function configureQuery(AdminInterface $admin, ProxyQueryInterface $query, $context = 'list') | ||
{ | ||
$this->getTranslatableListener($admin)->setTranslatableLocale($this->getTranslatableLocale($admin)); | ||
$this->getTranslatableListener($admin)->setTranslationFallback(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Scrutinizer:
''
is of typestring
, but the function expects aboolean
.
fix #81, fix #83
continuation of #83
this can be merged after 1.0.2 has been tagged - its a new feature.