[go: up one dir, main page]

Page MenuHomePhabricator

WikiLambda: Provide a special page listing Functions without a name in a given language
Closed, ResolvedPublic

Description

Description

To encourage and facilitate contributions to Wikifunctions content, we want to bring to light opportunities for community members to get engaged with relatively small contributions (which can also be learning experiences), such as adding names and input labels in languages that are known to them.

  • Given a particular natural language, this special page will provide a list of functions that are lacking the key 'name' (label) element.
  • It will also provide a brief description of how to add the missing elements, or a pointer to that info.

The information can be obtained by querying WikiLambda's wikilambda_zobject_labels DB table.

Desired behavior/Acceptance criteria

  • Results should be displayed cleanly and readably, and easy to understand.
  • Results should be retrieved and presented quickly, with minimal lag time and minimal burden on processing nodes, utilizing paging if needed.

Completion checklist

Event Timeline

DMartin-WMF renamed this task from WikiLambda: Provide a special page listing Functions without name / input labels in a given language to WikiLambda: Provide a special page listing Functions without name or input labels in a given language .Oct 23 2024, 4:33 AM
DMartin-WMF created this task.

The absence of Function name can be gathered from the labels table. However, the absence of input labels is something which isn't available anywhere.

Options:

  1. We build a Special page that only lists Functions with missing names in a given language; we ignore input labels.
  2. We start tracking input labels in some secondary table:
    • We build a new table: this seems like an overkill considering this is only needed for this purpose
    • Use wikilambda_labels_table:
      • might need some table reshaping
      • needs extra work to make sure that this doesn't affect search (filters to ignore input labels, etc)
      • the table will grow. According to the last multilingual metrics, there's a total of 4997 input labels, which will be new rows in this table

How to adapt wikilambda_labels_table to accommodate input labels

  • wlzl_label_primary currently has boolean values, 1=label and 0=alias,
  • we could rename wlzl_label_primary to wlzl_label_type and have it hold int values that signal to other kinds of labels (e.g. input label=2)
wlzl_zobject_zidwlzl_typewlzl_languagewlzl_labelwlzl_label_type
Z802Z8Z1002if1<-- name in English
Z802Z8Z1002conditional0<-- alias in English
Z802Z8Z1430wenn1<-- name in German
Z802Z8Z1430falls0<-- alias in German
Z802Z8Z1002conditional2<-- first input label in English
Z802Z8Z1002then2<-- second input label in English
Z802Z8Z1002else2<-- third input label in English
Z802Z8Z1002Bedingung2<-- first input label in German
Z802Z8Z1002dann2<-- second input label in German
Z802Z8Z1002sonst2<-- third input label in German

We wouldn't have any information of what input each label corresponds to, unless we:

  • Add a field for the key
  • Add a field for the input index
  • Incorporate the input order in the wlzl_label_type int (e.g. 101, 102, 103, ... )
wlzl_zobject_zidwlzl_typewlzl_languagewlzl_labelwlzl_label_type
Z802Z8Z1002if1<-- name in English
Z802Z8Z1002conditional0<-- alias in English
Z802Z8Z1430wenn1<-- name in German
Z802Z8Z1430falls0<-- alias in German
Z802Z8Z1002conditional101<-- first input label in English
Z802Z8Z1002then102<-- second input label in English
Z802Z8Z1002else103<-- third input label in English
Z802Z8Z1002Bedingung101<-- first input label in German
Z802Z8Z1002dann102<-- second input label in German
Z802Z8Z1002sonst103<-- third input label in German

If we want to search for missing input labels in a given language, we would first need to know how many inputs the function has. This means that we need to query the wikilambda_zobject_join:

SELECT COUNT(*) FROM wikilambda_zobject_join WHERE wlzo_main_zid="Z802" AND wlzo_key="Z8K1"

@DMartin-WMF @Jdforrester-WMF What do you think?

I've experimented a bit, and the list of objects by type that have no name in a given language is quite manageable:

Screenshot from 2024-11-11 13-58-23.png (795×752 px, 157 KB)

Screenshot from 2024-11-11 13-57-41.png (466×679 px, 58 KB)

Change #1089844 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] [WIP] Add SpecialListMissingLabels page

https://gerrit.wikimedia.org/r/1089844

Provided List with form, with Type and Language fields. The list renders objects that are missing Name in the given language. Input labels are not included in here for the problems described in my previous comments.

Screenshot from 2024-11-12 15-59-41.png (752×1 px, 90 KB)

Change #1089844 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add SpecialListMissingLabels page

https://gerrit.wikimedia.org/r/1089844

Jdforrester-WMF renamed this task from WikiLambda: Provide a special page listing Functions without name or input labels in a given language to WikiLambda: Provide a special page listing Functions without a name in a given language .Thu, Nov 14, 3:45 PM
Jdforrester-WMF updated the task description. (Show Details)

To meet the "It will also provide a brief description of how to add the missing elements, or a pointer to that info." criterion, do we want to add a bit of blurb saying that you can add a label by clicking to the Object, and editing it?

To meet the "It will also provide a brief description of how to add the missing elements, or a pointer to that info." criterion, do we want to add a bit of blurb saying that you can add a label by clicking to the Object, and editing it?

This is necessary if it's put into a high visibility spot like the main page to not decrease newcomer retention from confusion. It's also worth noting that the current UX to add a language to an existing object is really confusing and not intuitive, so it's worth explaining it.

To meet the "It will also provide a brief description of how to add the missing elements, or a pointer to that info." criterion, do we want to add a bit of blurb saying that you can add a label by clicking to the Object, and editing it?

This is necessary if it's put into a high visibility spot like the main page to not decrease newcomer retention from confusion. It's also worth noting that the current UX to add a language to an existing object is really confusing and not intuitive, so it's worth explaining it.

No, this is talking about the on-page help, not the context for where people link it from. We agreed in the team that this will be for follow-up later.

To meet the "It will also provide a brief description of how to add the missing elements, or a pointer to that info." criterion, do we want to add a bit of blurb saying that you can add a label by clicking to the Object, and editing it?

This is necessary if it's put into a high visibility spot like the main page to not decrease newcomer retention from confusion. It's also worth noting that the current UX to add a language to an existing object is really confusing and not intuitive, so it's worth explaining it.

No, this is talking about the on-page help, not the context for where people link it from. We agreed in the team that this will be for follow-up later.

I'm not sure what you're saying? I'm saying that if we don't put a link to it anywhere, instructions on the page aren't really necessary, but if the link can be found on a high-traffic page, the page needs more instructions, because more people with less experience with Wikifunctions will visit the page.