Added a validation top bar (and an opt-out) in the translation editor

Validators in the translation editorTranslation Editor Translation editors can approve translations for projects. The GTE (General Translation Editor) and LM (Locale Manager) roles can add new users with the "Project Translation Editor" role that can approve translations for specific projects. There are two different Translation Editor roles: General Translation Editor and Project Translation Editor often jump to the Discussion or Others tab to check context before acting on a stringString A string is a translatable part of the software. A translation consists of a multitude of localized strings.. The problem: the Approve, Reject, and Fuzzy buttons only live in the MetaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. panel, so the moment you leave that tab, the action buttons disappear. You have to switch back just to act on what you came to act on.

I have added a fixed top bar inside the translation editor that mirrors those buttons. It stays visible regardless of the tab you are on, so you can approve, reject, or mark a string as fuzzy without leaving Discussion or Others.

How it works

  • The bar appears when you open a translation row, and it disappears when you close it.
  • Each button is a clone of the original in the Meta panel, so clicking it triggers the same action. The behavior is identical; only the position is different.
  • The Reject and Fuzzy buttons keep their colored symbols, so the bar reads the same way the Meta panel does.
  • The × button on the right hides the bar until you reload the page or move to a new one.

Opt-out

Not everyone wants the bar. If you prefer the old behavior, there is a per-user setting to disable it permanently.

You will find it in your settings page, under “Translate settings“, as a checkbox labeled “Hide the validation top bar in the translation editor”. Tick it, save, and the bar will stop loading on any translation page the next time you will reload the page.

The setting only appears for users who are validators somewhere: global administrators, LocaleLocale Locale = language version, often a combination of a language code and a region code, for instance es_MX denotes Spanish as it’s used in Mexico. A list of all locales supported by WordPress in https://make.wordpress.org/polyglots/teams/ Managers, GTEs, or PTEs. Regular translators do not see the bar in the first place, so they do not see the setting either.

Feedback

If something does not work as you expect, or if you would like other actions mirrored in the bar, please leave a comment. Bug reports and ideas are welcome.

The relevant commits are 5f27f29 (the top bar) and 9e0ee24 (the opt-out).

#improvements