[wp-trac] [WordPress Trac] #54229: Make dashboard widget control submit text filterable or change to "Save changes"

WordPress Trac noreply at wordpress.org
Thu Oct 7 11:19:13 UTC 2021


#54229: Make dashboard widget control submit text filterable or change to "Save
changes"
----------------------------+----------------------
 Reporter:  zodiac1978      |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  5.9
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:  ui-copy
----------------------------+----------------------

Comment (by zodiac1978):

 Replying to [comment:4 knutsp]:
 > Replying to [comment:3 zodiac1978]:
 >
 > As with any hooked functios you can detect where you are in the
 function, or add the filter on another hook just before needed. I have not
 tested this exact case yet, but I do a lot of such conditional
 replacements since same English word may have to be translated to
 different words in output language.

 Looks like a complex solution to a simple problem.

 > Adding a context to this translatable string is the best way, IMO.

 That would make it much easier to filter the translation but why not
 change the text completely?

 We are talking about a ''control'', so why do we just "Submit" a
 configuration change? The used `submit_button()` function has a default of
 "Save Changes". We could just remove the custom text "Submit" and go with
 "Save changes".

 I still find it useful to customize this text easier. And core uses this
 in other places too (in
 [https://developer.wordpress.org/reference/hooks/excerpt_more/
 excerpt_more] for example).

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


More information about the wp-trac mailing list