[wp-trac] [WordPress Trac] #56234: error logged messages should not be translateable
WordPress Trac
noreply at wordpress.org
Mon Jul 18 13:57:08 UTC 2022
#56234: error logged messages should not be translateable
--------------------------+------------------------------
Reporter: malthert | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
--------------------------+------------------------------
Comment (by malthert):
Replying to [comment:5 audrasjb]:
>
> Let's take `register_nav_menus()`, for example.
> It throws the following `_doing_it_wrong` message:
> {{{
> _doing_it_wrong( __FUNCTION__, __( 'Nav menu locations must be strings.'
), '5.3.0' );
> }}}
>
> I don't see any point in not translating this message. It is a simple,
clear, message and it makes sense when it's translated. Why shouldn't we
translate this? It doesn’t contain any code at all.
It's not about whether it contains code, but whether you need to be able
to modify code to fix the issue. This error is a warning about a PHP type
(int vs string) and the doing_it_wrong errors are not generally something
laymen can fix (not even WP core can get it quite right with type juggling
going on in tons of places).
Replying to [comment:6 audrasjb]:
> Also:
>
> > If you do not understand English, there is nothing you can do with
these (_doing_it_wrong,...) errors, since they require someone/a developer
who understands English to have them fixed (since the WP code is in
English)
>
> While it may **kinda** be true for experimented developers, don't forget
that most of people writing code for their WordPress site are not
experimented developers nor agencies: they are are mostly people writing
code just because they are curious about how to put together their own
personal website by themselves.
>
> Sending error messages in their own language is something truly useful.
On the contrary - as someone who worked on tons of localized WP installs,
I can guarantee you the opposite is the case.
e.g. I google the error but don't find (m)any useful results. Now the
first challenge is to find the exact error text in English in WP core.
Then search for the English text in Google and 99% of times find something
on stackoverflow or some blog that guides me on how to fix that issue.
**Not once** has it been helpful, that those errors show up in my
language, when I had the smallest of personal WP blogs nor when I worked
for a big WC e-commerce company.
To make matters worse: when you have a multilingual installation, you may
not even speak some of the languages, because the translations were ML or
user contributed - now I get errors in languages I definitely won't
understand.
Replying to [comment:7 audrasjb]:
> Another thing we should take into account: some Locales started to
translate the WordPress Documentation. So "googling" any error message in
these languages may start to provide some meaningful results.
>
> However, I don't see any problem with the fact that some Locales would
decide to not translate those strings. This decision is up to Locale
Managers and/or General Translation Editors, **not us** (core developers).
>
> I think we have to make these strings translatable so each Locale can
choose the best option.
While that's definitely great, 95% of error resolutions for beginners come
from stackoverflow,.... There's a reason why software development = copy +
paste is a meme :-) And those are in English.
If we take a look at the stack required to run a WP page - none (PHP,
MySQL) localize their error messages either. e.g. if you produce a notice
or fatal, it will be in English.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56234#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list