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

Make sure upgrader strings are always in English #54

Merged
merged 1 commit into from Aug 15, 2018

Conversation

3 participants
@swissspidy
Contributor

swissspidy commented Aug 15, 2018

Instead of manually copying all possible strings to the upgrader class I opted to use switch_to_locale().

The advantage of using switch_to_locale() is that we're always using the correct strings from WordPress core, even if they change between releases.

The disadvantage is that this only works for WordPress 4.7+ and that — given there are string changes in core — the upgrader messages might differ depending on the WP version.

Fixes #52.

@swissspidy swissspidy requested a review from wp-cli/committers Aug 15, 2018

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Aug 15, 2018

Member

The disadvantage is that this only works for WordPress 4.7+ and that — given there are string changes in core — the upgrader messages might differ depending on the WP version.

How should we support earlier WordPress versions?

Member

danielbachhuber commented Aug 15, 2018

The disadvantage is that this only works for WordPress 4.7+ and that — given there are string changes in core — the upgrader messages might differ depending on the WP version.

How should we support earlier WordPress versions?

@swissspidy

This comment has been minimized.

Show comment
Hide comment
@swissspidy

swissspidy Aug 15, 2018

Contributor

For earlier WordPress versions we could a) still manually copy the strings or b) leave as is, i.e. strings won't be in English depending on the site language.

Contributor

swissspidy commented Aug 15, 2018

For earlier WordPress versions we could a) still manually copy the strings or b) leave as is, i.e. strings won't be in English depending on the site language.

@wojsmol

This comment has been minimized.

Show comment
Hide comment
@wojsmol

wojsmol Aug 15, 2018

Contributor

@danielbachhuber @swissspidy Please see changelog here - this is introduced in WordPress 3.7.0.

Contributor

wojsmol commented Aug 15, 2018

@danielbachhuber @swissspidy Please see changelog here - this is introduced in WordPress 3.7.0.

@swissspidy

This comment has been minimized.

Show comment
Hide comment
@swissspidy

swissspidy Aug 15, 2018

Contributor

@wojsmol The changelog is not a problem. We're only concerned about WordPress 4.0 anyway. The problem is possible string changes between releases and how we support these.

Contributor

swissspidy commented Aug 15, 2018

@wojsmol The changelog is not a problem. We're only concerned about WordPress 4.0 anyway. The problem is possible string changes between releases and how we support these.

@danielbachhuber danielbachhuber added this to the 2.0.1 milestone Aug 15, 2018

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Aug 15, 2018

Member

we could a) still manually copy the strings or b) leave as is, i.e. strings won't be in English depending on the site language.

Ok. I'm fine with option B (degraded performance).

Member

danielbachhuber commented Aug 15, 2018

we could a) still manually copy the strings or b) leave as is, i.e. strings won't be in English depending on the site language.

Ok. I'm fine with option B (degraded performance).

@danielbachhuber danielbachhuber merged commit 8f66183 into master Aug 15, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the english-please branch Aug 15, 2018

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