Page MenuHomePhabricator

iso codes in object header when using fallback language - part 2
Closed, ResolvedPublic

Description

a follow up to this ticket: https://phabricator.wikimedia.org/maniphest/task/edit/310613/

  1. if ONLY the object LABEL is in a fallback language, show the iso code to the left of the label
  2. if BOTH are in the SAME fallback language, show the iso code to the left of the title
  3. if BOTH are in DIFFERENT fallback languages, show each iso code to the left of the respective text

Event Timeline

Ran the following tests on beta cluster:

CASE #0: ✅ (from this ticket: https://phabricator.wikimedia.org/T310613)

  1. set your user language to "es"
  2. load object Z10097 (which has a spanish label)

RESULT: the iso code 'en' appears to the left of the word FUNCTION

CASE #1: ❌
There are two problems with this case.

  1. It appears the title (ex: "FUNCTION") only renders in English, even though it seems to exist in the i18n files for other languages.
  2. There is no fallback for "english." If a ZObject has ONLY labels in non-English languages, when a user is viewing in English, it shows up as without a label

As a result of the combo of (1) and (2) this use case is impossible to test right now.

CASE #2: ✅

  1. set your user language to anything but english
  2. load object Z10018 (which only has english labels)

RESULT: the iso code 'en' appears to the left of the word FUNCTION (i.e. it is applying to both the word FUNCTION and the title, in this case "Convert C to F")

CASE #3: ✅

  1. set your user language to "wo"
  2. load object Z10099 (this object has a "fr" label, which is the first fallback language for "wo")

RESULT: the iso code 'en' appears to the left of the word FUNCTION and the iso code 'fr' appears to the left of the title ("le pizza")

Checking case #1:

type has no label in my language, title does

type has no label in my language, title doesn't

neither type nor title have label

With all this we can consider Case #1 as DONE, hence closing this task.

gengh assigned this task to JKieserman.