-
Notifications
You must be signed in to change notification settings - Fork 800
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
Adds Javascript translation files to jetpack-mu-wpcom #39178
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! |
daa36ff
to
bdede8a
Compare
608289f
to
290e82d
Compare
3a407d2
to
1799585
Compare
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.
It would be really nice if this could be handled through translate.wordpress.com instead of dumping 693 files into the repository. Is there really no other way to do this?
This was meant to be a workaround until we can import these strings into a |
1799585
to
a3e3a18
Compare
261707b
to
32ba294
Compare
603df83
to
8313bfc
Compare
451916d
to
f60915f
Compare
fe54bf5
to
a0c6ede
Compare
Not sure if I'm missing something, but I don't get this to work after applying the changes to my sandbox:
Yeah, I agree. Also, what would be the process if we add new translatable strings to the code or if we modify existing ones?
Do you have any update about that project? |
The locale on Simple Sites is `es` rather than `es_ES`
See #39324 (comment) for more details
2236cae
to
c895a53
Compare
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.
@mmtr has some good questions in #39178 (comment).
I hope Automattic/i18n-issues#875 doesn't wind up being forgotten about, and doesn't change course such that this workaround becomes permanent.
if ( preg_match( $pattern, $relative ) ) { | ||
$relative = preg_replace( $pattern, '', $relative ); // Remove the environment prefix | ||
} |
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.
Could this be simplified to
if ( preg_match( $pattern, $relative ) ) { | |
$relative = preg_replace( $pattern, '', $relative ); // Remove the environment prefix | |
} | |
$relative = preg_replace( $pattern, '', $relative ); // Remove the environment prefix |
?
Actually, a draft post is being written, based on pxLjZ-955-p2 to see if we can keep this and other mu plugins updated. |
@d-alleyne can you clarify this too? Thanks. |
Correct. This release is meant to allow users to see localized text, rather than English in their MAG-16 locale. |
The text there says
It's not clear to me whether that means creating a unified script for wpcom environments (Simple and WoA) to download the language packs where needed like Core does for translations from translate.wordpress.org, or creating a unified script to make the workaround here (i.e. copying the translations into the repo) permanent and updated. |
As part of the decision process for implementing an automatic translation process we'd decide whether the translation files would be bundled with the plugin or downloaded using the process similar to what's used for translate.wordpress.org. Using the translate.wordpress.org-like approach would simplify the process for releasing the plugins, but from our experience the translations are not always being fetched automatically, so that'd have to be addressed. Bundling the translations in the repository works pretty well for wpcomsh and wc-calypso-bridge and is a safe alternative if the other approaches won't be feasible. |
This reverts commit c8c3ec5.
* Add Language Pack JSON files * Rename language files * changelog * Load javascript translations * Add Spanish Translations for the Welcome Guide * Adjust relative paths so that the md5 calculation is the same on Atomic and Simple sites * Remove unnecessary usages of `_x()` in favor of `__()` * Create symlink file for Simple Site The locale on Simple Sites is `es` rather than `es_ES` * Rename files so that their locales and MD5 hashes work on Simple and Atomic sites * Add the translation directory for the Global Styles * Update JSON files and code to use a 'workaround' context See #39324 (comment) for more details * Add Global Styles translation files * Add symlinks for Simple Sites Bugfix * Bugfix * Add Translations for Page Patters selector See Automattic/wp-calypso#94070 * Revert unused changed * Remove unused JSON files
Fixes Automattic/i18n-issues#858 and Automattic/wp-calypso#94070
Proposed changes:
Welcome Guide
andLimited Global Styles
andPage Patterns
selector are fully translated.Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
bin/jetpack-downloader test jetpack fix/etk-translation-issues && bin/jetpack-downloader test jetpack-mu-wpcom-plugin fix/etk-translation-issues
to release these changes on the sandbox