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

"missing text" is not displayed in translation set view #519

Closed
yoavf opened this Issue Jul 28, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@yoavf
Member

yoavf commented Jul 28, 2016

Example:
wporg examle

This probably happens since 7b103dd - where the array of translations supplied by for_translation() is filtered with gp_is_not_empty_string()

Non translated entries will have an array with two null values. gp_is_not_empty_string returns true for them. A possible solution would be to amend it to

function gp_is_not_empty_string( $value ) {
    return is_string( $value ) && '' !== $value;
}

... but then the function name would not be semantically correct. Maybe we can rename it to gp_is_string_not_empty

@yoavf yoavf added the bug label Sep 8, 2016

@ocean90 ocean90 added this to the 2.3 milestone Sep 13, 2016

ocean90 added a commit that referenced this issue Sep 27, 2016

@ocean90

This comment has been minimized.

Member

ocean90 commented Sep 27, 2016

@yoavf See #560, instead of using a check for strings we can simply check if the value is null.

@ocean90 ocean90 added the has PR label Sep 27, 2016

@ocean90 ocean90 self-assigned this Sep 27, 2016

@ocean90 ocean90 closed this in #560 Sep 27, 2016

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