Page MenuHomePhabricator

Error when using Translate extension to translate {{DISPLAYTITLE:}} contents
Open, Stalled, Needs TriagePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Create a page on a wiki with [[mw:Extension:Translate|Translate extension]] outside of main namespace. (Does not occur within main namespace)
  • Use {{DISPLAYTITLE:}} to set page title without Namespace
  • Set up {{DISPLAYTITLE:}} content for translation
  • Allow translation of page title when marking for translation
  • Translate into non-English language
  • Use Namespace in page title translation (Example:TranslationExample)
  • Use same text without namespace in {{DISPLAYTITLE:}} translation (TranslationExample)

What happens?:

  • Warning appears:
    • "Warning: Display title "TranslationExample" overrides earlier display title "Example:TranslationExample"."
  • Trying a {{PAGENAME}} workaround produces same error

What should have happened instead?:

  • Ideally no warning displayed - as is case when steps are taken within main namespace

Examples:

Workarounds

  • Do not set up page title for translation
  • Do not set up {{DISPLAYTITLE:}} for translation, leave note for translators to not include namespace in page's title, and hope note is seen

Event Timeline

Nikerabbit subscribed.

I have a counter proposal:

  • We would use the value of {{DISPLAYTITLE}} as the source text for translators. This is easy to implement (assuming nobody opposes the new behavior).
  • We provide a mechanism to set the display title (it cannot be used in the source page directly, as it would be replicated to the translation pages. Current workaround would be something like {{#ifempty:{{#translation:}}|{{{DISPLAYTITLE:...}}}}. We may want to provide more intuitive means of specifying the display title such as:
    • Automatically strip {{DISPLAYTITLE:..}} when generating translation pages, or
    • allow setting the displaytitle on Special:PageTranslation when marking the page for translation
Nikerabbit changed the task status from Open to Stalled.Apr 20 2022, 11:51 AM

@Varnent Any thoughts on my proposal?