-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update text domain to eight-day-week-print-workflow #41
Conversation
I suspect |
So I think that captures the various changes called out as needed on https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/. Certainly needs reviewing to see if anything was missed or incorrectly updated. Fun. |
load_textdomain( 'eight-day-week', WP_LANG_DIR . '/print-production/print-production-' . $locale . '.mo' ); | ||
load_plugin_textdomain( 'eight-day-week', false, plugin_basename( EDW_PATH ) . '/languages/' ); | ||
$locale = apply_filters( 'plugin_locale', get_locale(), 'eight-day-week-print-workflow' ); | ||
load_textdomain( 'eight-day-week-print-workflow', WP_LANG_DIR . '/eight-day-week-print-workflow/eight-day-week-print-workflow-' . $locale . '.mo' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm least confident in this change here, so confirmation that the concatenation of this all makes sense would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is right, it works correctly locally. I can check some other plugins as well to confirm the approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this anymore if trying to use WordPress.org language packs? It means bumping the WP required version (4.6+ I believe) and then we can remove the text domain header. I'm going to ask somebody who knows more about how the .org side about why this doesn't work with the custom text domain header set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, not super urgent to get these changes handled, just more a "nice to check it off the list" sort of thing.
@jeffpaul I added a few missing textdomain replacements and renamed the translation files. TestingI tested this locally by setting my profile language to German and checking that all our custom strings are properly translated. They all looked good, other than a few that are hard coded into our JavaScript (for example https://github.com/10up/eight-day-week/blob/develop/assets/js/src/scripts.js#L356) - these can wither use JS translation functions or be localized from PHP and can be handled in a follow up PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swell
Pascal Casier (
|
I believe that the changes in this PR from me and @adamsilverstein cover the first two checklist items above, so I'm marking those off. The final checklist item relates to our existing conversation, I'd say that we bump to |
Updated "Requires at least" to version 4.6, this should be the last task to have this PR complete to allow proper translations. Based on @adamsilverstein's prior approval and final tweaks, I'll merge and include this alongside the "Tested up to" bump to version 5.3. |
Description of the Change
The Text Domain is currently set to
eight-day-week
, but needs to beeight-day-week-print-workflow
to match the plugin slug on WordPress.org in order for translations to be open on translate.wordpress.org. This PR updates the Text Domain toeight-day-week-print-workflow
.Alternate Designs
none
Benefits
Translations will now be open for contributions on translate.wordpress.org.
Possible Drawbacks
none identified
Verification Process
Manually verified via GitHub web UI.
Checklist:
Applicable Issues
Relates to #40.