Page MenuHomePhabricator

Design: Localized label style
Closed, ResolvedPublic

Assigned To
Authored By
gengh
Feb 7 2023, 6:13 PM
Referenced Files
F36885718: image.png
Mar 1 2023, 10:09 AM
F36877220: image.png
Feb 28 2023, 4:10 PM
F36877218: image.png
Feb 28 2023, 4:10 PM
F36874814: image.png
Feb 27 2023, 4:12 PM
F36874809: image.png
Feb 27 2023, 4:12 PM
F36874807: image.png
Feb 27 2023, 4:12 PM
F36858670: image.png
Feb 17 2023, 2:19 PM
F36858656: image.png
Feb 17 2023, 2:19 PM

Description

Description

When showing key-labels in default view, if the label is not available in the user language, the closest fallback is shown.
In that case, we show the language code of the label.

We should look at the design of this label language chip and the one in the title and rethink how we want it to look.

Currently:

  • LocalizedLabel and ZMonolingualString styles are indistinguishable, and it lacks tooltip.

Screenshot from 2023-02-09 09-17-24.png (732×410 px, 48 KB)

  • Title localization style is quite broken, plus it shows the language name in the language of the label instead of the language of the user.

Screenshot from 2023-02-02 12-11-55.png (422×165 px, 18 KB)


Completion checklist

Event Timeline

i've been thinking about a couple of proposals driving inspiration from wikidata. for example, we could try to add the language as a super script text, maybe with the CSS property vertical-align: super;. in the example below, imagine your ui language to be set to spanish.

in read mode:

  1. inglés
  2.   + inglés
  3. (inglés)
  4.   + (inglés)
  5. ( +   + inglés +   + )
  6. [ +   + inglés +   + ]

image.png (2,962×846 px, 168 KB)

and in edit source:

  1. inglés editar // link set as progressive blue
  2. inglés editar // link set as dark link
  3. inglés añadir traducción // link set as progressive blue
  4. inglés añadir traducción // link set as dark link

image.png (2,590×1,128 px, 231 KB)

doing some more thinking about this. we initially explored an option to display the fallback language as superscript, similarly to wikidata. displaying the whole language may add too much noise, especially for those languages with a low coverage rate.

image.png (2,336×1,830 px, 232 KB)

alternatively, we could opt for displaying only the language ISO code? we could then test in code style/spacing to strike the right balance.

image.png (3,654×1,424 px, 354 KB)

while this solution might be trivial, it puts most of the work for figuring out how to localize labels on the user.

so, after a couple of conversations with the design team, we wondered if it would be more beneficial to not disrupt the original intent/flow of an editor with additional elements, and instead display a disclaimer to signal that there are some labels missing in your language. only when an editor wants to, we could highlight those labels, and then let them go to the respective object page to add the missing translation.

in read mode, we could display a disclaimer (right now in the top left corner, design TBD), and mark the missing labels with a subtle dashed border. once an editor tap/clicks on the disclaimer, we could highlight with a background the missing labels. on hover, we could display a helper text, and on click we could redirect the editor to the respective object page where the can localize the label.

image.png (2,784×1,050 px, 228 KB)

in edit mode, we do the same, but when the labels are highlighted we set make the selects "inactive".

image.png (2,842×1,070 px, 308 KB)

we could even let editors add the translation right on the same view, but this direction might stretch the scope of this task too far.

doing some more thinking about this. we initially explored an option to display the fallback language as superscript, similarly to wikidata. displaying the whole language may add too much noise, especially for those languages with a low coverage rate.

image.png (2,336×1,830 px, 232 KB)

Right. Note that the longest label right now in English for a language is 39 characters long ("Eastern Canadian (Aboriginal syllabics)"); the shortest is 2 ("Ga"). The range of lengths will make this challenging.

alternatively, we could opt for displaying only the language ISO code? we could then test in code style/spacing to strike the right balance.

image.png (3,654×1,424 px, 354 KB)

while this solution might be trivial, it puts most of the work for figuring out how to localize labels on the user.

Yeah, most users won't know these codes much, I imagine. (In length concerns, the longest is 12 chars ("zh-classical") though the majority are 2 or 3.)

so, after a couple of conversations with the design team, we wondered if it would be more beneficial to not disrupt the original intent/flow of an editor with additional elements, and instead display a disclaimer to signal that there are some labels missing in your language. only when an editor wants to, we could highlight those labels, and then let them go to the respective object page to add the missing translation.

in read mode, we could display a disclaimer (right now in the top left corner, design TBD), and mark the missing labels with a subtle dashed border. once an editor tap/clicks on the disclaimer, we could highlight with a background the missing labels. on hover, we could display a helper text, and on click we could redirect the editor to the respective object page where the can localize the label.

image.png (2,784×1,050 px, 228 KB)

in edit mode, we do the same, but when the labels are highlighted we set make the selects "inactive".

image.png (2,842×1,070 px, 308 KB)

I imagine this banner might be there almost all the time for users in some languages, and very rarely for most; it might be a bit surprising for mainstream users when they encounter it? It's a nice idea. I especially like the concept of hover/explain/CTA-to-fix as a paradigm, though.

we could even let editors add the translation right on the same view, but we this direction might stretch the scope of this task too far.

Yes, let's not go too far with multiple levels of inline editing and multiple Publish buttons. :-)

AAlhazwani-WMF changed the task status from Open to Stalled.Apr 17 2023, 1:43 PM

the design team recently switch testing provider from usertesting.com to userlytics. i need a bit of time to get use to the platform before running the usability test. that said, the most recent design can be found here, while the research protocol is viewable here.

Can we declare this Resolved now? I'm sure that we'll get a lot of feedback post-launch, but I don't think we have anything outstanding to block launch at this point?