Page MenuHomePhabricator

Some raw message keys shown literally when using an invalid one-letter ?uselang=x value
Open, Needs TriagePublic

Description

Some message keys are shown literally when using ?uselang=x with x=1 letter

Steps to reproduce:

  1. Call a page like https://de.wikipedia.org/wiki/Chevrolet_900
  2. Change URL by adding ?uselang=a

ULS.JPG (879×1 px, 130 KB)

Some messages are shown as literally message key, see markings in the screenshot

This does happen for 1 character language codes only (which are invalid). For invalid language codes with 3 or more characters this effect is not shown.

Event Timeline

Aklapper renamed this task from Some message keys shown literally when using ?uselang=x to Some raw message keys shown literally when using an invalid one-letter ?uselang=x value.Apr 19 2020, 1:37 PM

Why would you use ?uselang=a, what's the usecase?

Why would you use ?uselang=a, what's the usecase?

No usecase. I made a typing error in the URL and spotted this bug. For non-existing language codes all messages should be shown in the default content language, for Commons English.

The message are set by javascript. There are first in english and than changed (Sometimes the page was loaded/rendered slow and the change of the description was visible)

For example: "In other language" -> "(uls-plang-title-languages)"
or "edit" -> "(vector-view-edit)"

That is a js vs. php thing, so maybe resourceloader?