Steps to replicate the issue (include links if applicable):
- Use Vector-2022
- Enable the Translate extension and translatable pages
- In LocalSettings, add $wgPageTranslationLanguageList = 'sidebar-only';
- Create a page on the wiki, add some <translate> tags
- Mark the page for translation via the link on top, and don't set any priority languages
What happens?:
- The language button at the top right (or left for RTL languages) shows "2 languages", even though the page hasn't yet been translated into any languages.
- When you click the language button, there is only one language available
What should have happened instead?:
- The button should have the correct number of languages (1 for a newly-marked page with no translations and no priority languages set)
Other information (browser name/version, screenshots, etc.): This is a regression caused by the change to Hooks.php in Ia73b8d85fb90edc604b38bc8e54ccc69cd1d3082.
