[Mediawiki-i18n] I have colon trouble

Amir E. Aharoni amir.aharoni at mail.huji.ac.il
Thu Feb 14 07:59:43 UTC 2013

2013/2/14 S Page <spage at wikimedia.org>:
> Hi there.

Hi S,

Thank you for the question, comments inline.

> You may have seen the new-look account creation form on English
> Wikipedia.[1] For now it is an English-only experiment, but my team is
> developing it and a new-look userlogin form for all languages. The
> design moves from horizontal rows to vertical form labels, and as a
> result all the English form labels drop the trailing colon.  For
> example, the existing form uses
>    'yourpassword'               => 'Password:',
> but the new form needs
>   'userlogin-yourpassword' => 'Password',
> 1. It feels odd to duplicate dozens of messages solely because of the
> dropped punctuation.

Duplication of messages is not such a bad thing as it may seem at
first thought. If there is a small difference between the messages,
it's often OK to create another message. Translation memory at
translatewiki.net helps translators to re-use the needed parts of the
other message.

> The trailing ':' arises from using the message in
> a horizontal layout where English has the punctuation convention
>    Password:   ______
> But this is a property of the form layout rather than the text.  Has
> anyone considered separating the colon punctuation from messages?  I
> checked and a few languages don't use the colon in their translations;
> I couldn't tell if some non-Roman language uses other punctuation like
> a dot or ->. There is a 'colon-separator' message but it includes a
> trailing space as well.

The page https://www.mediawiki.org/wiki/L10n explains the reason for
including punctuation in the messages, under the heading "Symbols,
colons, brackets, etc. are parts of messages". French needs a space
before the colon, some languages don't use the colon at all or use a
different character, etc. A simplistic rule of thumb: Don't assume
that a colon that is used in English is used the same way in other
languages, so don't include in source code.

> 2. My first attempt at MessagesQqq documentation for these was only:
> 'userlogin-yourpassword' => "Same as yourpassword but no trailing colon",
> Siebrand didn't like it :) .  I can duplicate the existing
> explanation, but how should I note that it's the same text as another
> message except for the punctuation change?  Several of the existing
> messages have {{Identical|Username}}, I could use that but it's really
> {{Identical but for punctuation}}.

To write good qqq documentation simply explain the message
independently. qqq documentation should answer the following
questions, although not necessarily all of them:
* Where is it used?
* Is it a label, a button, a menu item, an error message or something else?
* Is it a verb, an adjective or a noun?
* Which UI controls are present near this message - tables, progress
bars, buttons, text areas, etc.
* Which messages are used near it? (It's sometimes useful to make
nearby messages similar in some way.)

In this case, you should mainly explain on which screen this message
appears, and where does the label appear in relation to the input box.
Including a screenshot will be helpful - simply upload it to Commons,
add a [[File:]] link to the qqq string, and the translators will see
it at translatewiki.net.

You may mention other similar messages in the documentation if you
think that it may be useful; if you do, use the {{msg-mw}} template:

> 3. What's the URL on translatewiki to see the MessagesQqq help in
> context with its templates expanded?


Replace "yourpassword" with any message key from MediaWiki core or
extension to see any other message's documentation.

Hope it helps.

Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬

More information about the Mediawiki-i18n mailing list