Last modified: 2013-12-16 15:14:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T21363, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19363 - Localize auto-summaries
Localize auto-summaries
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.21.x
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/w/index.php?t...
: i18n
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-23 15:06 UTC by Helder
Modified: 2013-12-16 15:14 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2009-06-23 15:06:11 UTC
Hi!

When we go to a wiki (like Wikipedia) and click at the "new section" link (or the [+] at the top of some page), and then click at the "preview" buttom, it is shown a header like
"Editing $1 (new section)". However, the language of this message not change to the language choosen by the user: at en.wikipedia it is always in English. At pt.wikibooks, it is always in Portuguese, and so on...

The same problem happens with MediaWiki:newsectionsummary, when we look at:
* dif: http://en.wikipedia.org/w/index.php?title=Wikipedia%3ASandbox&diff=298135586&oldid=298135490
* history: http://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=history
* recent changes

PS: I've also asked about this at translatewiki:
http://translatewiki.net/w/i.php?title=Support&oldid=1245792#New_section_message
Comment 1 Roan Kattouw 2009-06-23 18:11:25 UTC
This is because enwiki customized the message, see [[MediaWiki:Editingcomment]] and [[MediaWiki:Newsectionsummary]].
Comment 2 Helder 2009-06-23 18:19:17 UTC
I don't think so, because [[MediaWiki:Newsectionsummary/pt-br]] has the value "/* $1 */ nova seção" and when we set the language to "pt-br" in [[Special:Preferences]] the text does not change as could be expected.
Comment 3 Chad H. 2009-06-23 22:22:22 UTC
'Editingcomment' is a UI element, not an auto-summary. It _should_ change when you change your UI language. Do you mean something else?

In any case, 'Newsectionsummary' is wfMsgForContent(), so it should _not_ be changing based on your UI language. Cannot replicate faulty behavior on local install.
Comment 4 Helder 2009-06-23 23:24:33 UTC
Hi ^demon!

You can do the following to replicate the behavior at [[Main page|en.wikipedia]] (I did exactly these steps):
* Login at [[Special:UserLogin]];
* Go to [[Special:Preferences]] and at "User profile", under "Internationalisation", choose the language "pt-br-Português do Brasil" and Save;
* Go to [[Talk:Main Page]] and click [+], or click in the link below:
http://en.wikipedia.org/w/index.php?title=Talk:Main_Page&action=edit&section=new
* Type "something" at the Summary field ("Assunto/cabeçalho", in portuguese) and click "Preview" ("Mostrar previsão");
* Now you can see "Previsão de assunto/título: (→something:  new section)" instead of "Previsão de assunto/título: (→test:  NOVA SEÇÃO)";

By the way, what is "wfMsgForContent"?

Have a nice week! =)
Helder
Comment 5 Chad H. 2009-06-23 23:29:28 UTC
Ah ok, I see what you mean. That is a preview of what your edit summary will be. The edit summary text is supposed to be a content-language (which is what wfMsgForContent() does), not in your UI language. That's so going down the edit history, you don't see "new section," "nova secao", "nouvelle section", etc.

As far as I can tell, everything here is working like it should.
Comment 6 Helder 2009-06-23 23:48:18 UTC
I'm not sure what you mean by "The edit summary text is supposed to be a ''content-language''":
When we go to 
http://en.wikipedia.org/w/index.php?title=Talk%3AMain_Page&diff=298228627&oldid=298224522
it is shown "m (→something:  new section)" just below the user name. But when I did the edit, I didn't type "new section", so as a user, we could expect to see the text in our language, because it seems to be "part of the interface", and everything else that is part of it is shown in the correct language. Moreover, if it is not to be translated, and is expected that everybody will see "new section" in english, why there are several translated versions of these messages at /pt /fr /ja...?

How can I found where is wfMsgForContent defined at svn?

Thanks for clarifying... ;-)
Helder
Comment 7 Chad H. 2009-06-24 23:41:50 UTC
Rephrasing bug so it makes more sense to me and others in the future.

Not sure how much interest there is in implementing this, though. *shrug*
Comment 8 Niklas Laxström 2009-06-25 06:36:30 UTC
Lot's of work for minor benefit, imho.
Comment 9 Roan Kattouw 2009-06-25 10:00:31 UTC
(In reply to comment #6)
> I'm not sure what you mean by "The edit summary text is supposed to be a
> ''content-language''":
> When we go to 
> http://en.wikipedia.org/w/index.php?title=Talk%3AMain_Page&diff=298228627&oldid=298224522
> it is shown "m (→something:  new section)" just below the user name. But when
> I did the edit, I didn't type "new section", so as a user, we could expect to
> see the text in our language, because it seems to be "part of the interface",
> and everything else that is part of it is shown in the correct language.
> Moreover, if it is not to be translated, and is expected that everybody will
> see "new section" in english, why there are several translated versions of
> these messages at /pt /fr /ja...?
> 
Currently, autosummaries are not part of the interface, but are saved in the database verbatim. This means that for every revision, there's only one summary in one language that everybody sees. For this reason, it's undesirable to have this stored in the UI language, because then an edit made by a Brazilian person would show an edit summary in pt-br for everyone.

> How can I found where is wfMsgForContent defined at svn?
> 
It's in includes/GlobalFunctions.php . What it does is format a message in the content language as opposed to the UI language.
Comment 10 Helder 2009-06-25 18:38:56 UTC
Hi Roan!

(In reply to comment #9)
> Currently, autosummaries are not part of the interface, but are saved in the
> database verbatim. This means that for every revision, there's only one summary
> in one language that everybody sees. For this reason, it's undesirable to have
> this stored in the UI language, because then an edit made by a Brazilian person
> would show an edit summary in pt-br for everyone.
> 
Suppose that a user speaks the language PT-BR and has set this in the preferences. When the user do an edit at the project EN.wikipedia, I can imagine three possible behaviors that autosumaries we could have:
(1) The user sees "Editing $1 (new section)" when previewing and "/* $1 */ new section" in the history and recent changes. If the user changes from PT-BR to any other language, these messages remain UNCHANGED;
(2) The user sees "Editando $1 (nova seção)" when previewing and "/* $1 */ nova seção" in the history and recentchanges. If the user changes from PT-BR to any other language, these messages remain UNCHANGED;
(3) The user sees "Editando $1 (nova seção)" when previewing and "/* $1 */ nova seção" in the history and recentchanges. If the user changes from PT-BR to any other language, these messages CHANGES according to the new language;

Currently, what we have is the version (1).

Considering that (A) the "new section" part of the messages are _not_ typed by the user, and that (B) what the user type is usually in the language set in the preferences (PT-BR), and that (C) the sumaries should be saved exactly as they are when the user preview his edit, I think that what makes more sense for the user is the option (2).

Maybe what I've said in my previous comments was not clear, but I'm not asking to have the option (3): the second one makes more sense.

(In reply to comment #8)
> Lot's of work for minor benefit, imho.
> 
By the way, this is indeed a "minor benefit" but it has confused me a lot =S when I came across this: The default language at Portuguese projects is PT and I'm Brazilian, so I set PT-BR in the preferences. But every time I've created a new section since I collaborate at pt.wikibooks I see "nova secção" instead of "nova seção". And this looks like a "typo" considering that the language was set to PT-BR, and not PT. So I was looking at
http://pt.wikibooks.org/wiki/Especial:Todas_as_mensagens
, then at
http://pt.wikibooks.org/wiki/MediaWiki_Discuss%C3%A3o:Newsectionsummary
and then at translatewiki
http://translatewiki.net/w/i.php?title=MediaWiki:Newsectionsummary/pt-br&action=edit&loadgroup=core&loadtask=view
trying to understand what is wrong... =/
It took me a while before I realize this is what MediaWiki was "supposed" to do...

So the current behavior do not seems the correct one...

Question: Is it difficult to change from (1) to (2)?

> > How can I found where is wfMsgForContent defined at svn?
> > 
> It's in includes/GlobalFunctions.php . What it does is format a message in the
> content language as opposed to the UI language.
> 

Thanks!

Helder
Comment 11 Chad H. 2009-06-25 18:45:05 UTC
Moving to option 2 is certainly easy, but I'm not sure that's desirable. As Roan pointed out, summaries are currently stored verbatim. The reason the summaries are the way they are (in the content language) is because seeing these change on a history page would be confusing; imagine 4 users with en, fr, pt-br and ja all edit the same page and leave their localized versions of "New section" in the history.

Option 3 would be ideal, but it's not really easy. We'd have to extract the auto-summary part of the stored edit summary and then change it to the correct content language. Like Niklas said in comment 8, a lot of work for a minor benefit.
Comment 12 Helder 2009-06-25 21:17:41 UTC
Humm... good point.

Indeed of admin's point of view, that page history would be somewhat confusing =/. But I think that situation is not very usual at the localized projects... =)  Anyway at commons and meta this seems to be more frequent... In this sense, I agree that (3) would be the better choice...

But since it is not so easy, I can live with (1) for while... At least now I understand we wasn't doing anything wrong and I know where I can read the source code of MediaWiki... ;-)

Thanks everybody!
Helder
Comment 13 Siebrand Mazeland 2009-06-27 08:12:42 UTC
Closing WONTFIX. Original reporter seems to agree in comment 12.
Comment 14 Helder 2012-11-01 02:58:27 UTC
Reopening since this is now implemented at least for Wikidata.

Compare
<http://www.wikidata.org/w/index.php?title=Q4918&action=history&uselang=en>
<http://www.wikidata.org/w/index.php?title=Q4918&action=history&uselang=pt>

In the first case we have "Added site-specific [ruwiki] link". In the second, "Adicionado link específico do site [ruwiki]".

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links