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

GP_Translation::can_set_status() doesn't allow CLI imports to set status = current #644

ocean90 opened this issue Jan 29, 2017 · 0 comments


Copy link

@ocean90 ocean90 commented Jan 29, 2017

In 2.2.2 setting a status doesn't require any capabilities but in 2.3 (#538) we now have a can_set_status() method which checks if the current user can approve translations. This check fails when importing strings via CLI.

A side effect of this issue is that you might end with duplicate current entries because there is no capability check when the import creates the translation.

That's a back-compat issue and was noticed on 🙁
To provide the same behaviour as before we could add a gp_pre_can_set_translation_status filter when WP-CLI is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant