WPupdatePHP / wp-update-php

Library to be bundled with WordPress plugins to enforce users to upgrade to supported PHP versions.
GNU General Public License v2.0
79 stars 11 forks source link

fix admin notice for beginning i18n and start #19

Closed afragen closed 9 years ago

afragen commented 9 years ago

foundation for plugin name setter.

afragen commented 9 years ago

I've left out the text domain. I think we may just have to put a dummy my-plugin-slug and remind the user to change it.

OK, I thought better of it and used a text domain that will need changing.

coenjacobs commented 9 years ago

I think we may just have to put a dummy my-plugin-slug and remind the user to change it.

That's not really going to work since this is a dependency class and should ideally be used as is. When you add it as a dependency to your project via Composer, you don't want to need to edit it. I doubt there is a valid way to do this in a way that supports the WordPress core way of translating things... :cry:

afragen commented 9 years ago

I'll pull out the text domain slug. I see what you mean.

afragen commented 9 years ago

How's the rest of it?

afragen commented 9 years ago

@coenjacobs when I update POT from sources using POEdit it pulls in this string without having an attached text domain :smile:

afragen commented 9 years ago

Let me know if there are other corrections.

coenjacobs commented 9 years ago

I still have a couple issues with this approach and this PR becomes a little confusing as well now that there are effectively three changes mixed up again. :smile:

We still don't have a real way to translate strings inside this library, as we can't use a different textdomain as the bundling plugin. More discussion about that in #8.

The changes to the does_my_plugin_meet_required_php_version method change its accepted parameters and that's gonna break backwards compatibility. I don't want to do that, plus I think it's overkill to pass the entire __FILE__ just to get the plugin name. Just passing the name as a string to a set method would do just fine in my opinion.

I'll have a look to split these commits into different branches so we can look at them case by case.

coenjacobs commented 9 years ago

I've extracted the plugin name part to #20 and will merge that into the release branch when I'm done.