[wp-trac] [WordPress Trac] #52438: Theme translations in WP_LANG_DIR are loaded twice, no (logical) way to override from a (child) theme.
WordPress Trac
noreply at wordpress.org
Mon Dec 2 14:47:15 UTC 2024
#52438: Theme translations in WP_LANG_DIR are loaded twice, no (logical) way to
override from a (child) theme.
---------------------------------------+-------------------------
Reporter: captain.crash | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: I18N | Version: 5.6
Severity: minor | Resolution: worksforme
Keywords: needs-patch needs-testing | Focuses:
---------------------------------------+-------------------------
Comment (by captain.crash):
> I literally shared the code to do this. [...] The reason is that
otherwise your file would be loaded afterwards
No, you shared code where I have to load the parent theme translations
''as well'', although they had been working perfectly fine before I tried
to override some of them from my child theme.
And no, as we came to know in this very thread, loading ''just'' my
overrides would not make them load afterwards, it would make the original
parent theme translations ''not load at all''.
> Because that's not how [...] child theme functionality were designed.
I'm sorry, but it is ''exactly'' how child themes function. Take template
hierarchy or `add_editor_style()` as just two examples: they look up the
relevant files in a child theme first. The concept of "filling in the
blanks" has nothing to do with it. Blanks would be filled regardless if
the file loads first or last.
It was and stays unintuitive to override translations, so yes, naturally,
I am inclined to suggest an enhancement (which I thought I've done in a
way).
> This has now diverged quite a bit from the original bug report.
Indeed, which is mainly because it took about four years and I'm told
things work like they work.
It's neither motivational nor rewarding to put all this in its own
enhancement ticket, sorry.
Genuinely, thank you for your time nonetheless!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52438#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list