WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 20 months ago

#34753 new enhancement

Remove use of "Toggle" in strings

Reported by: xibe Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.4
Component: Text Changes Keywords: dev-feedback has-screenshots
Focuses: ui, javascript, administration Cc:

Description (last modified by SergeyBiryukov)

Hello!

It would be nice to have WordPress stop using "Toggle" in strings in multiple places and contexts -- most particularly action buttons and helper text.

It's really two possible actions/behaviors, most of the time different ones depending on the context/location/result of the previous clic, and it's always a pain to translate properly (current way in French replace "Toggle" with the French equivalent of "Open/Close". Not elegant).

I could change the text, sure. But the buttons themselves, not so much. They'd need to go from displaying "Toggle" to displaying "Open" or "Close" depending on the current status of the target. That'd require some JavaScript wizardry.

Hence, this ticket.

Thanks!

Change History (13)

This ticket was mentioned in Slack in #polyglots by xavier. View the logs.


4 years ago

#2 @SergeyBiryukov
4 years ago

  • Component changed from General to Text Changes
  • Description modified (diff)

#3 @SergeyBiryukov
4 years ago

  • Focuses ui javascript administration added

#4 @afercia
4 years ago

Yep, "Toggle" is a very difficult word to translate in Italian too, we have "Commutare" but no one uses that word in common language, sounds like something related to electronic components :)
I guess in English the term "Toggle" is handy because can be used for different things, for example to mean "Open/Close" but also "Switch On/Off" like in "Mute Toggle".
Will ask the Italian Polyglots team, bit curious to know how this is handled in other languages too.

Last edited 20 months ago by afercia (previous) (diff)

#5 follow-up: @xibe
4 years ago

In French, depending on the context, "Toggle" is translated into:

  • "Toggle section" > Open/close section
  • "Toolbar Toggle" > Open/close toolbar
  • "Toggle panel" > Open/close bloc
  • "until you toggle this option off." > until this option is disabled
  • "Mute Toggle" > Stop the sound
  • "Toggle Editor Text Direction" > Inverse the direction
  • "Toggle add category" > Add a category or not
  • "You can toggle between Network Admin and Site Admin" > You can switch from X to Y

Note to @ocean90 : yup, that's 8 strings indeed :)
...aaaaand in the end it seems there are no "Toggle" button. Phew! To be confirmed, please!

#6 in reply to: ↑ 5 @afercia
4 years ago

Replying to xibe:

it seems there are no "Toggle" button. Phew! To be confirmed, please!

Not sure about buttons text, I think no. But there are buttons aria-label attributes that use "Toggle".

#7 follow-up: @ramiy
4 years ago

Same for hebrew. We don't have one word for "open/close", like the english "toggle".

Instead, we can use the "close" string, and when clicked, change it using JS to "open".

Last edited 4 years ago by ramiy (previous) (diff)

#8 in reply to: ↑ 7 @SergeyBiryukov
4 years ago

Replying to ramiy:

Same for hebrew. We don't have one word for "open/close", like the english "toggle".

Same for Russian. It could be translated as "switch", but that only applies to one of the strings in comment:5, and for the rest we mostly translate it as open/close, show/hide, turn on/off, etc.

#9 @ramiy
4 years ago

  • Keywords dev-feedback added

Ok, we all generally agree that this string is not good for i18n. It needs to be changed.

Do you have alternative strings / solutions?

We also need a dev-feedback for the JS solution.

Last edited 3 years ago by ramiy (previous) (diff)

#10 @GaryJ
3 years ago

Adjust, switch, or alternate?

I guess the emphasis in English, is that it's not just a change, but a binary change between two options. It's one or the other.

#11 @afercia
3 years ago

  • Keywords has-screenshots added

Adding two screenshots for reference and better understand how accessibility is involved here. Just two examples, this applies to all the meta boxes and several other controls (e.g. in the Customizer) that use aria-label and aria-expanded attributes.

https://cldup.com/SojynzhlIH.png

https://cldup.com/dYqCMR1rtU.png

Last edited 21 months ago by afercia (previous) (diff)

This ticket was mentioned in Slack in #core by wolly. View the logs.


20 months ago

This ticket was mentioned in Slack in #polyglots by wolly. View the logs.


20 months ago

Note: See TracTickets for help on using tickets.