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

Add loading of TGMPA native translation files. #521

Merged
merged 1 commit into from
Jan 23, 2016

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Jan 10, 2016

Implemented in a way that the language loading will work independently of whether TGMPA is included in a (must-use) plugin or a parent/child theme.
Includes compatibility for looking in both the WP_LANG_DIR/plugins/ as well as the WP_LANG_DIR/themes/ directory for translations served by wp.org.

I was hesitant to add this code when I wrote it initially some months ago, but now with the Custom TGMPA Generator, that's no longer an issue.
The PR for the Generator #519 already includes the necessary code to remove the code from this PR from TGMPA for wp.org hosted themes.

@jrfnl
Copy link
Contributor Author

jrfnl commented Jan 10, 2016

Added one extra bit of lean loading code: https://github.com/TGMPA/TGM-Plugin-Activation/pull/521/files#diff-6f3dff769e44625dd72b031675006eb3R455 just in case & adjusted the regex in the generator to match.

jrfnl added a commit that referenced this pull request Jan 10, 2016
Implemented in a way that the language loading will work independently of whether TGMPA is included in a plugin or a theme.
Including compatibility for looking in both the WP_LANG_DIR/plugins/ as well as the WP_LANG_DIR/themes/ directory for translations served by Wp.org.

Ignore warnings from PHPCS as we *really* should suppress warning on `is_readable()`.
@jrfnl
Copy link
Contributor Author

jrfnl commented Jan 23, 2016

Squashed the commits into one.

@jrfnl jrfnl force-pushed the feature/add-tgmpa-native-translations branch from 63960ab to 48fdf58 Compare January 23, 2016 14:41
GaryJones added a commit that referenced this pull request Jan 23, 2016
Add loading of TGMPA native translation files.
@GaryJones GaryJones merged commit 6c13739 into develop Jan 23, 2016
@GaryJones GaryJones deleted the feature/add-tgmpa-native-translations branch January 23, 2016 23:27
@jrfnl jrfnl mentioned this pull request Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants