Closed iandunn closed 1 year ago
@iandunn we have both es5 & esnext examples should we add the build tool config to both? cc: @swissspidy
Why not? It makes sense. I haven't really followed development here but it seems that even #23 already uses __()
and setLocaleData()
without anything to actually make the localization work. A half baked implementation, regardless of ES5 or ESNext is far from ideal. IMHO every example should include fully working I18N examples.
Unfortunately the current tools/solutions are still very fragmented and implementations differ when hosting on WordPress.org or not.
For the ES5 examples https://github.com/swissspidy/gutenberg-i18n-block/tree/no-babel is probably the best bet as it uses WP-CLI to extract strings and doesn't rely on Babel or any other npm package. It's really straightforward.
For ESNext examples the master branch of that repo is a good start.
Thanks for the info @swissspidy exactly what I was looking for, was not aware of no-babel
branch.
Will update #23 to include this
This issue seems to have been addressed prior to the major overhaul of this repo. Closing but we can re-examine if needed.
Currently the code examples use
__()
, but don't include any of the build tool configs necessary to make__()
actually output localized strings.Related: https://github.com/swissspidy/gutenberg-i18n-block