Page MenuHomePhabricator

[Bug] Mark keywords in API help messages as "do not translate!"
Closed, ResolvedPublic


I just realized that lots and lots of messages that are shown in the ApiSandbox do not have untranslatable keywords and other string constants marked as "do not translate!".

  1. The entity type identifiers item and property are translated in a lot of messages. This can't work. Code relies on these strings and will fail if you try to create an entity of type "Eigenschaft", for example. One example is the message apihelp-wbeditentity-param-new.
  2. Some parameters in API modules refer to other parameters by their name. One example is the message apihelp-wbeditentity-param-title. It explains that the parameter title must be used together with sitelink. The message does not make much sense if sitelink is translated.

I think there is no "do not translate!" tag. This must either be described in the qqq descriptions or fixed keywords should be passed in as a variable.

Event Timeline

thiemowmde raised the priority of this task from to Needs Triage.
thiemowmde updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 7 2015, 1:15 PM
JanZerebecki triaged this task as Medium priority.Sep 10 2015, 8:32 PM
JanZerebecki set Security to None.
JanZerebecki moved this task from incoming to needs discussion or investigation on the Wikidata board.
JanZerebecki added a project: I18n.
JanZerebecki added a subscriber: JanZerebecki.

Wasn't there also markup for in the messages for this is an untranslatable part?

thiemowmde renamed this task from Mark keywords in API help messages as "do not translate!" to [Bug] Mark keywords in API help messages as "do not translate!".Sep 11 2015, 8:33 AM
thiemowmde added subscribers: Jonas, Bene.

@JanZerebecki, no, there is no such tag. I remember @siebrand talking about this. You can:

  1. Explain the fact that a keyword should not be translated in the qqq message.
  2. Remove the keyword from the message and replace it with a $1 placeholder. This needs a code change.
  3. Mark it with:
    • <code> ("represents a fragment of computer code. This could be an XML element name, a file name, a computer program, or any other string that a computer would recognize")
    • <var> ("represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or just be a term used as a placeholder in prose")
    • <samp> ("represents (sample) output from a program or computing system")
    • <kbd> ("represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands)")

(Quotes from

Please see for i18n and L10n in the scope of the MediaWiki API. If anything is unclear, we should update that page.

I was referring to 3, which is also what mentions. Doing 1 in addition shouldn't hurt.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptNov 3 2016, 8:18 PM

Change 330630 had a related patch set uploaded (by SacredWKnight):
Markup apihelp messages to prevent translation of literals

thiemowmde moved this task from ready to go to in progress on the Wikidata board.
thiemowmde moved this task from Proposed to Doing on the Wikidata-Former-Sprint-Board board.

Change 330630 merged by jenkins-bot:
Markup apihelp messages to prevent translation of literals

thiemowmde closed this task as Resolved.Feb 2 2017, 9:36 AM
thiemowmde moved this task from Doing to Done on the Wikidata-Former-Sprint-Board board.
thiemowmde removed a project: Patch-For-Review.