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

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

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 ocean90 added a commit that referenced this issue Sep 27, 2016
@ocean90 ocean90 Restore edit text for non translated entries.
Broken since 7b103dd.
Fixes #519.
aeb3b48
@ocean90
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