DevinWalker / wp-rollback

Rollback any WordPress.org plugin or theme to a previous (or newer) version.
https://wprollback.com
81 stars 22 forks source link

fix: use load_plugin_textdomain as primary localization function #48

Closed mathetos closed 2 years ago

mathetos commented 5 years ago

Bug Report

User Story

As a WP Rollback user, I want to be able to localize the strings properly.

As reported here using load_plugin_textdomain only as a fallback prevents localization with some plugins like Codestyling Localization.

The function is found here https://github.com/impress-org/wp-rollback/blob/c4daddf1bf930f48eae31238c5fca1a615262874/wp-rollback.php#L327-L336

The way we load it in Give seems streamlined and updated: https://github.com/impress-org/give/blob/bc08fb851b6b7a856ce6ea0936713a59b64490f6/give.php#L621-L623

DevinWalker commented 2 years ago

I just tested if translations are working properly and they are. We're only using load_plugin_textdomain as a fallback. Translations are also coming in fine in GlotPress: https://translate.wordpress.org/projects/wp-plugins/wp-rollback/