[wp-trac] [WordPress Trac] #54797: Allow languages path in register_block_type
WordPress Trac
noreply at wordpress.org
Wed Nov 6 15:13:19 UTC 2024
#54797: Allow languages path in register_block_type
-------------------------------------------------+-------------------------
Reporter: Rahe | Owner: gziolo
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future
| Release
Component: I18N | Version: 5.5
Severity: normal | Resolution:
Keywords: has-patch needs-refresh needs-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Comment (by swissspidy):
> > An alernative to consider is to detect whether a script is registered
inside a plugin (vs core block) and pass the custom path based on the
setting read from the domain path set in the plugin metadata. More about
that in https://developer.wordpress.org/plugins/internationalization/how-
to-internationalize-your-plugin/#domain-path.
>
> It might be challenging to read the domain path provided in the plugin's
metadata because `get_plugin_data()` is defined only in the admin but not
on the frontend.
We should be able to move the function. That would be useful for #62244 as
well.
I don't like duplicating `Domain Path` in `block.json`, just adds
redundancy.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54797#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list