Page MenuHomePhabricator

Create essential article: Write-from-scratch opens the editor with a hardcoded English title
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

In the Create essential articles task (create-essential-article), the write-from-scratch approach opens the local wiki's editor via a URL built from the picked article's English source title (from the 1000 Essential articles list):

  • EssentialArticleStepPick.vue — ${wikiUrl}/w/index.php?title=${encodeURIComponent(title)}&action=edit
  • EssentialArticleStepCreate.vue — same pattern with props.articleTitle

The translate approach is unaffected: it opens Special:CX, and ContentTranslation handles target-title naming itself.

Problem

The page title is hardcoded to the English title and cannot be changed anywhere in the flow. A user on a non-English wiki who follows the button ends up creating an English-titled article on their wiki, or has to abandon the flow and navigate to the right title manually. Every write-from-scratch pick recorded in prod so far stored only the English title (e.g. "Indian Ocean" on ppl, "Meat" on yo).

This also blocks completion verification: without knowing the target-language title, the server cannot check that the user's article exists (the write-from-scratch attestation in the companion "definition of done" task depends on capturing it).

Proposed approach

When the user selects the write-from-scratch approach:

  • Show a title input for the article's name in the target language, with a short explanatory message (this is the title the editor will be opened with).
  • Pre-fill the input from the cxserver title-suggestion endpoint: GET https://cxserver.wikimedia.org/v2/suggest/title/{sourceTitle}/en/{targetLang} → targetTitle from the response (e.g. en/el for "Arabic script" returns "Αραβική γραφή").
  • If the cxserver request fails, leave the input empty and let the user type the title — no error, no blocked flow. This is the common path, not an edge case: many small wikis have no provider.
  • The entered title is used to build the editor URL in both places (pick step and create step), and is persisted with the task metadata alongside the source title and approach — it becomes the run's verifiable artifact key for the companion task.
  • The open-editor CTA requires a non-empty target title in this approach.

New user-facing text goes through i18n/en.json + qqq.json as usual.

Acceptance criteria

  • Selecting write-from-scratch shows a target language title input with an explanatory message
  • The input is pre-filled from cxserver's suggest-title endpoint when a suggestion is available; any cxserver failure silently results in an empty input
  • The editor opens with the user-set target title from both the pick step and the create step
  • The target title is saved in the task metadata together with the source title and approach
  • The open-editor button is disabled until the target title is non-empty (write-from-scratch only)
  • The translate approach is unchanged

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Feat: Capture a target-language title for write-from-scratch articlesrepos/lpl/starterkit-v1!147ngkountasfeat/T433039-scratch-title-inputmain
Customize query in GitLab

Event Timeline

ngkountas set the point value for this task to 1.

eamedina merged https://gitlab.wikimedia.org/repos/lpl/starterkit-v1/-/merge_requests/147

Feat: Capture a target-language title for write-from-scratch articles

srishakatux subscribed.

Done, considering that a translated title is shown for a suggested article and can be edited before proceeding to develop the article from scratch.