Page MenuHomePhabricator

Include language name placeholder in message livetranslate-translate-to
Closed, DeclinedPublic

Description

The message livetranslate-translate-to lacks a placeholder ($1) for the target language of the translation. It is not really feasible to make a phrase to which a language name could be appended giving a valid sentence in many languages.

See also: http://www.mediawiki.org/wiki/Localisation#Avoid_patchwork_messages

http://translatewiki.net/w/i.php?title=Support&offset=20110121132950#MediaWiki:livetranslate-translate-to_10589
is giving more - purely informational - details.


Version: unspecified
Severity: enhancement
URL: http://translatewiki.net/wiki/Thread:Support/MediaWiki:livetranslate-translate-to

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:18 PM
bzimport set Reference to bz26845.
bzimport added a subscriber: Unknown Object (MLST).

It's a valid point, although the target language can not simply be put in there. It's a HTML dropdown, not a simple word. See this image: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/File:Lte-article.png

I don't know how I can put the dropdown in while properly escaping the message, so cannot fix this. Help is welcome though.

Thanks a lot, I've added a link to the image to the message documentations (qqq) of this message and 'livetranslate-translate' as well. This will help translators a lot.

With the help of the layout, I found an imho very elegant way that includes the "translate"-button in a sentence, which would not work this way in English due to word order constraints.

We can say: "Do this page into [und language-name ] [translate!]"

In English, "[Translate] this page into [zxx language]!" had an unintuitive order of inputs, opposite to word and reading order.

A more general approach could be to make the entire box a translatable message and another, like this in English:

'livetranslate-translate-to' => 'Translate this page to $1 $2',
'livetranslate-translate' => 'Translate',

Message documentation (qqq):

'livetranslate-translate-to' => 'Parameters:

  • $1: an input (dropdown) to choose a language'
  • $2: a klickable button with text {{msg-mw|livetranslate-translate}}

Note, this message appears as the only content in a floated box on every content page.',
'livetranslate-translate' => 'Used as button text inside paramter $2 in {{msg-mw|livetranslate-translate-to}}',

which allows language translators a maximum of flexibility placing the inputs and putting words around and between them, such as:

'livetranslate-translate-to' => 'You can machine-translate this page.<br />
Choose a language: $1, and then $2 with it!'
'livetranslate-translate' => 'go ahead',

I could quickly implement this, or something similar, if you like me to.

mmovchin wrote:

Patch

I just added a patch for this.

Attached:

sumanah wrote:

Adding "patch" and "need-review" keywords.

Thanks for the patch Michael.

I have some concerns though: these are only changes to the i18n file, which seem to need matching changes on other places as well. And I am doubtful this actually would work at all, since you can not pass HTML to messages as argument AFAIK. Did you test your modifications?

Michael,

Could you please address the concerns raised above, and possibly consider getting developer access [1] and submitting this patch through Gerrit, our code review tool? We'd really love to solve this issue and close the bug.

Thanks!

(adding Michael to the CC list, hopefully that wasn't a conscious decision on his part)

[1] http://www.mediawiki.org/wiki/Developer_access

OK, I'm almost certain that, while the patch accomplishes the goal of the bug, there are places where this message is used that will need to be updated before we can accept it.

If someone else wants to take this and run with it, please do so.

[Removing "easy" keyword as per comment 7]

Aklapper lowered the priority of this task from Medium to Low.Jan 21 2015, 5:18 AM
Aklapper added a subscriber: Aklapper.
Liuxinyu970226 set Security to None.Oct 2 2015, 4:17 AM
jrbs added a subscriber: jrbs.

Change 250383 had a related patch set uploaded (by Purodha):
Allow message text on both sides of language selector

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

Aklapper removed Purodha as the assignee of this task.Oct 24 2016, 3:13 PM

Change 250383 abandoned by Siebrand:
Allow message text on both sides of language selector

Reason:
Aboandoning this patch set. The owner has passed away. If you want to take owership, please feel free to restore it.

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

MarcoAurelio closed this task as Declined.Mar 4 2020, 8:06 PM
MarcoAurelio added a subscriber: MarcoAurelio.

This extension has been archived. Please see T196452: Archive the LiveTranslate extension for details.