Skip to content
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

PO/MO language files and i18n improvements in 4.6 #967

Closed
ramiy opened this issue Aug 27, 2016 · 2 comments
Closed

PO/MO language files and i18n improvements in 4.6 #967

ramiy opened this issue Aug 27, 2016 · 2 comments
Assignees
Milestone

Comments

@ramiy
Copy link
Contributor

ramiy commented Aug 27, 2016

Now that we adopted the new translation standards using translate.wordpress.org we can ditch our PO/MO files located in the give/languages/ folder.

See i18n improvements in 4.6: https://make.wordpress.org/core/2016/07/06/i18n-improvements-in-4-6/

The plugin has two translation versions:

  • wp-content/plugins/give/languages/give-{lang}_{local}.mo - provided by the plugin.
  • wp-content/languages/plugins/give-{lang}_{local}.mo - translated by the community and downloaded automatically when new translations are available.

In the past, WordPress was searching for available translation files in the plugin-folder before checking the community-translations. Since 4.6 it checks the community-translations before checking the plugin-translations. The translation files attached to the plugin are absolute anyway. We can safely remove them. And reduce the plugin size.

The way the core is developed, I guess that in a few versions all the translations will be remove entirely from the plugin folder.


Note 1: We no longer need to call load_plugin_textdomain() but it's a good practice the remain this call for older WordPress versions.

Note 2: We no longer need the Text Domain: give header in give.php file, but it's a good practice the remain this for older WordPress versions.


As mentioned in #964, we should delete the entire CMB2 languages directory. It's useless, all the translation strings are loaded from Give language packs anyway. The CMB2 language files are just taking space, making the plugin much bigger than it is.

@ramiy
Copy link
Contributor Author

ramiy commented Aug 30, 2016

@DevinWalker I should mention again that this applies to plugins hosted on wp.org. Plugins and Add-ons not on the repo have to remain the translation files.

Each Add-on should have a language folder.

@DevinWalker
Copy link
Member

Yep, understood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants