Page MenuHomePhabricator

Show an error which explains that introducing line feeds in message documentation is prohibited
Closed, InvalidPublicFeature

Description

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

  • Go to any translatable page that has not been translated
  • Find a source string that needs documentation
  • Write documentation that includes a line feed (Shift+Enter) then press Publish documentation

What happens?:
The save fails with 1–2 momentary “Error saving message documentation” popups

What should have happened instead?:
It should either (1) save the documentation, or (2) explain that line feeds are prohibited.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Having line feeds in documentation is often helpful, so this is a real problem. The problem is compounded by an unhelpful error message that doesn’t explain why the save has failed, causing the user to just give up, leaving the segment with no documentation.

Also, the fact that the error messages pop up at the top-right corner and are momentary is a problem. On portrait screens (common for translators coming from actual profeessional editorial backgrounds) the top-right corner can be visually pretty far from the active segment. If the pop-up is momentary there’s a real risk the user will never see the popup.

Event Timeline

Aklapper renamed this task from Adding message documentation with line feed causes unhelpful error message to Show an error which explains that introducing line feeds in translated messages is prohibited.Dec 20 2022, 8:05 AM
Aklapper changed the subtype of this task from "Bug Report" to "Feature Request".

For which message, with what browser/OS? I could type Test <Shift+Enter> Documentation and successfully save it in my private wiki (Firefox 102.6.0esr on Debian 11).

The detailed error message is needed to investigate this.

Line feeds are not prohibited in message documentation.

@Nikerabbit - What I wrote in my original comment was the complete error message. It was just “Error saving message documentation”.

@Tacsipacsi - I could not find which message it was. I’ll try to reproduce the problem with a different segment.

Al12si renamed this task from Show an error which explains that introducing line feeds in translated messages is prohibited to Show an error which explains that introducing line feeds in message documentation is prohibited.Dec 20 2022, 9:52 PM

BTW I’ve partially reverted the title of this ticket because it was reworded incorrectly. This is about the “message documentation” (annotation subpages, /qqq; “message documentation” is how this is labelled in the UI), not about translated messages (target strings). Since I’m still trying to reproduce it the title might still be wrong but this is at least more accurate.

I'm really not sure that the line feeds are a problem. They are allowed in message documentation, and they are often used in it.

A couple of comments about that:

  • You don't have to do it with Shift-Enter. Just Enter is enough. As far as I can see, the effect is the same.
  • Like elsewhere in wikitext, to actually get paragraph separation, you need to type two line breaks (press Enter twice).

I've just tried saving a documentation message with line breaks on translatewiki.net, and it worked. I use Firefox on Ubuntu with English US keyboard. Perhaps other browsers, operating systems, or keyboard layouts do something unusual, but in this bug report, I don't see any more clues as to what the problem is.

Line feeds are allowed in message documentation. There isn't enough info to know why the save has failed.