[wp-trac] [WordPress Trac] #50493: more detailed notice for register_rest_route
WordPress Trac
noreply at wordpress.org
Wed Jul 22 23:56:01 UTC 2020
#50493: more detailed notice for register_rest_route
--------------------------+-----------------------------
Reporter: Lwangaman | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: REST API | Version: 5.4.2
Severity: normal | Resolution:
Keywords: has-patch | Focuses: rest-api
--------------------------+-----------------------------
Comment (by Lwangaman):
Just to say, this is just my opinion, I'm a plugin developer but I haven't
contributed much to the codebase yet. I like to be precise and logical and
I like to write clean code, but if you think it really should be done
differently don't be afraid to say so, I can change the code accordingly.
In my opinion, if we have ten sprintf error messages that all deal with
"namespace" and "route", it makes for cleaner code to have them ordered in
the same logical order throughout the codebase (considering they're all
within the same function, near each other), seems to me to make for better
readability. But that's just a personal opinion, if you do think it should
be done differently I will change it. I'm just throwing in my two cents.
And if you think it's cleaner to put "1. 2." in the translator comments
rather than "%1$s %2$s", I can change that too, I'm not as familiar with
the current codebase and conventions, so let me know if this is a change
worth making, no problem. I see the other translator comments that don't
have numbering use %s or %d, if when using numbering "1. 2." seems cleaner
that's fine with me.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50493#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list