Page MenuHomePhabricator

Remove language chip from title header when an object with no userlang label is edited to add one
Open, MediumPublicBUG REPORT

Description

Description

Consider a ZObject that:

  • Has no label in the userlang,
  • But has a fallback label.

E.g. An object with an English label, and no Spanish label, while the uselang is set to Spanish (es).

The page title shows the fallback label:

Screenshot from 2024-04-03 17-27-15.png (424×840 px, 50 KB)

While editing the object in the Edit page (?action=edit&uselang=es), when we add a label in the user language, the title updates to the new value:

Screenshot from 2024-04-03 17-28-47.png (444×986 px, 52 KB)

However, the language chip is not removed.

Similarly, when removing the label in the user language, instead of reinstating the fallback title, we are setting it as "Untitled", but now it is shown with the existing language chip:

Screenshot from 2024-04-03 17-30-08.png (396×748 px, 46 KB)

We have recently fixed the update of the title when the label of the user language is updated in the edit page, but we haven't accounted for all the possible cases:

  • There is no fallback title:
    • From Untitled --> Titled
    • From Titled --> Untitled
  • There is fallback title:
    • From (lang) Fallback title --> Title
    • From Title --> (lang) Fallback title

Completion checklist