WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.48k stars 4.18k forks source link

Remove all the occurrences of the verb Toggle from translatable strings #66369

Open afercia opened 5 days ago

afercia commented 5 days ago

Description

Similarly to https://github.com/WordPress/gutenberg/pull/65983 and https://github.com/WordPress/gutenberg/pull/66334

The verb 'toggle' isn't well translatable in many languages and should not be used. See #42492 and similar trac ticket for Core.

Instead of attempting to fix each occurrence at a time, I'd liek to propose to remove all occurrences from the codebase. It would be great to include this best practice in the dev documentation and the design guidelines. Cc @wordpress/gutenberg-core @WordPress/gutenberg-design

Props to @AhmarZaidi for reporting some of the occurrences on https://github.com/WordPress/gutenberg/issues/66319#issuecomment-2429476464

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Please confirm which theme type you used for testing.

mcsf commented 5 days ago

What do you propose we do with the strings?

afercia commented 5 days ago

What do you propose we do with the strings?

@mcsf see https://github.com/WordPress/gutenberg/pull/66371 and https://github.com/WordPress/gutenberg/issues/66372

In general, I would recommend;

mcsf commented 5 days ago

Thanks, @afercia.

When the string is used for a label […] just keep it short and use 'Settings'

Agreed, makes perfect sense.

When the string is used for a description [...] e.g. "Show or hide the Settings sidebar." [,] "Enter or exit distraction free mode"

I can get behind this, no strong opinion here.

Still, I have mixed feelings about enforcing that the word not be used, even though we can give it a try. This mostly comes down to opinion and life experience (including having worked as a translator in the past), but I believe translators should be given ample room to make the best decisions for their locale. They ought to produce a version that feels natural and clear, and I don't think a weird word like "toggle" would really get in the way of that. To me, the fact that the French, Italian, Swedish, etc. versions — mentioned in prior issues — resorted to constructs like "open/close" is not so much proof that we should get rid of "toggle" so much as proof that translators will find decent solutions for their locales. In other instances, we see that translators have chosen verbs like "permuter", "basculer", "alternar", "comutar" (sampling across a few Romance languages); some of these are more rigid latinates, others are IMO clever images ("basculer"), but all have their merits. The fact that the source used "toggle" wasn't really an obstacle — except for the Greek community, apparently? Finally, if I may be a little pedantic, sometimes these verbs might strike the reader as uncommon, but qualified translators should feel comfortable promoting certain forms if they believe they are correct and clear.

Digression aside, I'll just reiterate that I'm OK with giving this a try!

The verb 'toggle' isn't well translatable in many languages

(I appreciate the sentiment, but have we meaningfully sampled languages beyond a small pocket of Indo-European languages spoken in Europe?)

Finally, let's take a moment to acknowledge how weird the verb "toggle" is even for English. :)

afercia commented 4 days ago

@mcsf Thank you for your interesting considerations. In principle, I agree on some of your points which, in a way, aren't new. However, I think it is necessary to have a pragmatic approach. Anyways, I'd suggest to move your considerations to the GitHub discussion I created on July 2022 or, even better, to the Trac ticket that was created on November 2015 to discuss this issue in a broader way.

Re: the pragmatic approach, the following examples are just not a good UI and don't provide a good user experience:

Image

Strings like the following ones are just too long and add too much cognitive load:

To me, we can't blame translators for such less than ideal UI. It's the English string that is less than ideal in the first place.

mcsf commented 4 days ago

Re: the pragmatic approach, the following examples are just not a good UI and don't provide a good user experience:

I completely agree, but I think those are instances where no verb should even be used. Users don't expect their basic inline formatting buttons to say "Enable/disable bold", it's obvious what "Bold" means.