Page MenuHomePhabricator

isolate input names in the "About" box in the Wikifunctions function view
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Screenshot, in case someone translates it:

צילום מסך מ־2024-08-16 23-28-03.png (1,543×663 px, 104 KB)

What happens?:

The colon (:) appears on the right-hand side of "adj" in the About box.

What should have happened instead?:

Briefly, the colon (:) is supposed to appear on the left-hand side of "adj" in the About box, because the general orientation of the page is right-to-left.

In general, completing the localization solves this bug for each particular function. However, unlike it is with software localization on translatewiki, completely translating all the labels of functions, inputs, etc., is not really feasible. At least that's how it is now; I hope that some day Wikifunctions (and Wikidata! See T64695) will make this more convenient, but now we have what we have.

However, it is possible to fix this without completing the localization with simple HTML. As far as I can see, the HTML structure of that area is this:

<div class="ext-wikilambda-about-function-field-value" bis_skin_checked="1">
  <span class="ext-wikilambda-about-function-input-label" lang="en" dir="ltr">adj<span>:</span></span>
  <div class="ext-wikilambda-zobject-to-string" role="ext-wikilambda-zobject-to-string-link" bis_skin_checked="1">
    <div class="ext-wikilambda-zobject-to-string" bis_skin_checked="1">
      <a href="/view/he/Z6" lang="he" dir="rtl">מחרוזת</a>
    </div>
  <!---->
  </div>
</div>

This <span> with colon is problematic for several reasons:

  1. Different languages use the colon character differently. Some languages, like French, put a space before it. In some other languages, a different punctuation character may be more appropriate. Currently, it's hard-coded in resources/ext.wikilambda.app/components/widgets/about/About.vue as a colon without a space before it.
  2. It is right to put the label in a <span> with its own lang and dir, but nothing else should be in that <span>. It's just semantically incorrect.
  3. Finally, if the <span> with the colon is taken out of the <span> with the dir, it will solve the RTL problem because the <span> with the dir will correctly isolate.

An even better solution would be to discard the colon completely and to convert the list of inputs into a table.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Oh, yes, appears fixed to me.

Updated screenshot:

{F57345834,size=full}