-
Notifications
You must be signed in to change notification settings - Fork 2k
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
i18n: Update textdomain for Event Countdown, Timeline and Blog Posts block #39554
Conversation
Thank you very much for this! After figuring out how to generate the After merging this, will you create a new full-site-editing release on .org so that the changes will be available on Atomic? This will allow us to get the newly added strings translated and get them back into a language pack. |
Hi, there. |
Thanks for the pointer. This means that we have a textdomain problem here, though. Are we planning to publish the |
Honestly, I don't know. We could move this question to @jeffersonrabb |
apps/full-site-editing/full-site-editing-plugin/event-countdown-block/blocks/src/view.js
Show resolved
Hide resolved
apps/full-site-editing/full-site-editing-plugin/event-countdown-block/blocks/src/view.js
Outdated
Show resolved
Hide resolved
apps/full-site-editing/full-site-editing-plugin/jetpack-timeline/index.php
Outdated
Show resolved
Hide resolved
...editing-plugin/blog-posts-block/newspack-homepage-articles/blocks/homepage-articles/index.js
Outdated
Show resolved
Hide resolved
...-editing-plugin/blog-posts-block/newspack-homepage-articles/blocks/homepage-articles/edit.js
Outdated
Show resolved
Hide resolved
Here's an alternative method I'm suggesting for pulling in Newspack block: #39196 — tho not sure if it's easier or harder to plug i18n considerations into that method. It would definitely make updates easier/more fun. |
...editing-plugin/blog-posts-block/newspack-homepage-articles/blocks/homepage-articles/view.php
Outdated
Show resolved
Hide resolved
It would be cool to switch to Sentence case from Title Case before we send these for the translation since that's the direction core is also taking. |
@@ -97,6 +97,10 @@ cp -R $CODE/src/blocks/homepage-articles $TARGET/blocks/ | |||
cp -R $CODE/src/shared $TARGET/ | |||
cp -R $CODE/src/components $TARGET/ | |||
|
|||
# Replace text domain | |||
find $TARGET/blocks/ -name \*.js -exec sed -i '' "s/, 'newspack-blocks' )/, 'full-site-editing' )/g" "{}" \; | |||
sed -i '' "s/'newspack-blocks',/'full-site-editing',/g" $TARGET/class-newspack-blocks.php |
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.
sed
ing is fine and fast — did you also consider running wp-textdomain
here? I'm assuming not worth for one file?
Would be great if it would handle .js files too, tho.
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.
should we remove the part of the syncing files on this process, in favor of #39196?
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.
@akirk as of now, no plans to publish to .org. |
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
- Add source code for Event Countdown block instead of just minified - Add Event Countdown Block build script to FSE process
Add text-domain and missing strings for Title and Description
- Adds the source for Timeline block - Fixes Internationalization text-domain and missing strings
f2d7a34
to
9db03e4
Compare
Rebased and all issues addressed (and tests properly kicked). |
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.
From the FSE plugin point of view, this is looking good!
- ✅ Added timeline and countdown blocks to a page on wpcom before syncing. Verified it looked good in editor and on front end.
- ✅ Pulled changes locally and ran the fse plugin dev & sync command
- ✅ Reloaded the editor on wpcom and verified that I can still make changes to those two blocks which are reflected on the front end. (and verified that I'm loading the dev version of the plugin.)
I did leave a comment D39116-code regarding the deploy step. I'm not sure if the diff was just for testing or if it was also meant to be merged there. Just want to make sure things will work well for the
P.S. once #39528 and D39062-code are merged, a link to a wpcom diff will be added to the PR if it affects FSE plugin files! It'll be nice for testing changes like this without having to do manual syncs :)
@noahtallen I was unaware of the procedure, thanks for the explanation on the Diff! I bumped the version here but then realized that this will be done separately a little later. So I guess this means that this PR can just be merged and will be shipped with the next iteration and we'll close D39116-code and get the changes online via the "normal procedure." |
If that works for you, yes! We're currently doing updates ad-hoc. Feel free to start the process if the FG page makes sense to you :) |
Though I will say that the update process will only affect the "wp-content/plugins/full-site-editing-plugin" directory. So if those other directories in the diff need to be merged, that would also need to happen separately. |
Changes proposed in this Pull Request
Updates were needed for Internationalization of Event Countdown, Timeline and Blog Posts blocks. This PR therefore moves the source for the Event Countdown and Timeline blocks into the FSE plugin and makes the updates to i18n, including the "full-site-editing" text-domain and add to missing strings.
The goals for FSE plugin changed so now it makes sense just to keep the source and blocks together here.
The two blocks were integrated into the build step, adding the proper package scripts. Building and testing is the same as any other FSE blocks.
Testing instructions
There is no intended functional change, for the two blocks, beyond including the source in the repo and the ability to translate as expected.
A full test to make sure nothing changed.
Tests on WordPress.com can be carried out with D39116-code.