[wp-trac] [WordPress Trac] #50493: more detailed notice for register_rest_route

WordPress Trac noreply at wordpress.org
Tue Jul 21 08:35:18 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):

 hey @TimothyBlynJacobs I've tried to take into account your
 considerations, so I have modified the grammatical order of a couple of
 the sprintf messages
 (https://core.trac.wordpress.org/attachment/ticket/50493
 /register_rest_route-patch-2.patch.txt). I don't believe we can only take
 into account translators, we must also take into account an orderly code
 base. Seems to make sense to me that in the code base, the logical order
 should be respected, so you will always find the namespace before the
 route.
 In the translatable messages themselves, it really depends on what the
 message is trying to convey. So in those cases where the "route" is the
 subject, I tried to have it come first in the sentence, and in those cases
 where the "namespace" is the subject, I tried to have it come first in the
 sentence. Or in any case, when it was grammatically feasible to have the
 "namespace" come first, I tried to do so so that the grammatical order
 would follow the logical order. But that isn't always the case, and I
 really don't think we should force this. Translators shouldn't really care
 whether numbered placeholders have a certain order, it's actually self-
 explanatory from the translator comment provided, where the logical order
 IS respected.
 I'm not sure how this could be done better without becoming confusing in
 the codebase...

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50493#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list