Closed bobbingwide closed 2 years ago
During testing I noticed that the GitHub icon wasn't appearing for the Follow-me block.
I think it's because the icon name in SVG is github-link
not github
.
The [github]
shortcode works.
Fix: In bw_follow_link_svg()
change $lc_social
to 'github-link' when it's 'github' before calling get_icon()
During PHPUnit testing I noticed a number of things that needed changing
network1,network2
is network, network2
. Need to change the original source and tests to allow for the space. npm run makepot
eg Warning: The string "%s comment" contains placeholders but has no "translators:" comment to clarify their meaning. (admin/class-bw-list-table.php:634)While resolving the Warnings from makepot I came across another warning
Warning: The string "Current version: %s" has 2 different translator comments. (admin/oik-admin.php:1101)
%s
should be the same for both invocations. /* translators: %s: Current plugin version */
I came across this message a few more times. Another approach I used was to not include the translator's comment in subsequent usages or source files. How you're supposed to know which source file is the original is a challenge.
I used "Current version: %s" quite a few times. Sometimes the version was a plugin version, other times it was a theme. I'll have to check what actually appears in the .pot / .po files.
I used "Current version: %s" quite a few times. Sometimes the version was a plugin version, other times it was a theme. I'll have to check what actually appears in the .pot / .po files.
I checked the oik.pot
file. It was OK. But there was a problem with the translators comment for _sc_posts()
in libs/oik-sc-help.php
. It needed to be moved to after the first parameter.
, 'posts_per_page' => BW_::bw_skv( null, __( "numeric", null ) . "|.",
/* translators: %s current number of posts per page */
sprintf( __( 'Number of posts per page. Use \'.\' for current value %1$s', null ) , get_option( "posts_per_page", null ) ) )
Previous it was appearing against the string "numeric", which doesn't contain a placeholder.
Delivered in v4.8.1
oik's blocks are currently delivered with one entry point
/build/index.js
.wp-scripts
has been improved considerably. It now supports multiple blocks per plugin.Requirement
Process
npm run packages-update
webpack.config.js
to deliver multiple entry pointsblock.json
file to refer to the appropriate entry-points and CSSsrc/index.js
as supercededwp_set_script_translations()
for each block's editor-scriptload_script_textdomain_relative_path
npm run dev
Prior to implementing the changes check for any improvement between wp-scripts v22.0.1 and v22.3.0 that might affect the actual implementation.
For plugins which have already been changed refer to the code changes in https://github.com/bobbingwide/sb-starting-block/issues/3 and https://github.com/bobbingwide/oik-bob-bing-wide/issues/42