Last modified: 2013-03-09 17:35:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 32703 - Create {{SPACEUSER}} to improve detection of page owner in user spaces, also usable in interface messages, etc.
Create {{SPACEUSER}} to improve detection of page owner in user spaces, also ...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
unspecified
All All
: Lowest enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-29 03:03 UTC by Gustronico
Modified: 2013-03-09 17:35 UTC (History)
9 users (show)

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


Attachments

Description Gustronico 2011-11-29 03:03:32 UTC
It's a known issue that both {{PAGENAME}} and {{BASEPAGENAME}} fail to return the correct username of the 'owner' of a page when included in a 2nd level *sub*page of User: or User talk: spaces. And also it is known that the right username can be retrieved by means of {{#titleparts:{{PAGENAME}}|1}}.

Up to now, this only concerned to messages like → Hi {{BASEPAGENAME}}!, what in 
"User:Example/Archive/2010" looks → Hi Example/Archive! But now we have a {{gender:}} function to be used not only in user pages and discussions, but in MediaWiki interface messages.

As stated for instance in [[translatewiki:MediaWiki:Nstab-user/qqq]] documentation, "it is possible to use {{GENDER:{{BASEPAGENAME}}|male form|female form}} if needed". And it is what currently puts the Galician translation → [[translatewiki:MediaWiki:Nstab-user/gl]]. But BASEPAGENAME is only a partial approximation to the function needed, provided that it fails to return the user name in some pages.

You can see a live example of this issue at the user space of the female galician user [[:gl:Usuaria:Elvire]] and compare the user tab in her both subpages [[:gl:Usuaria:Elvire/Foo]] and [[:gl:Usuaria:Elvire/Foo/Bar]]. The former shows 'Páxina de usuaria' and the later states 'Páxina de usuario'.

In the other hand, {{#titleparts:}} is an 'extension' parser function, and just as user Raymond at translatewiki.net confirmed a few hours ago, we cannot rely on the existence of any extension on other projects. → [[translatewiki:Thread:Support/About_including_ParserFunctions_in_MediaWiki_messages]]

Just as Niklas Laxström suggested to me in bug 30569, comment 11, I've created a simple {{SPACEUSER}} template at es:wikipedia, what is satisfactorily functioning in 15000+ user pages. But it is a local template based on #titleparts, not a MediaWiki function, so it can't be used in translatewiki general messages. I still think that a real {{SPACEUSER}} MediaWiki function should be created to fix this issue. Please excuse me for my poor English. P.S. Formerly, I've called this functionality as PAGEOWNER.
Comment 1 Daniel Friesen 2011-11-29 09:12:32 UTC
We have {{BASEPAGENAME}}, {{SUBPAGENAME}}, why not just go for adding a {{ROOTPAGENAME}}?
Comment 2 Roan Kattouw 2011-11-30 13:00:34 UTC
(In reply to comment #1)
> We have {{BASEPAGENAME}}, {{SUBPAGENAME}}, why not just go for adding a
> {{ROOTPAGENAME}}?
+1
Comment 3 Gustronico 2011-11-30 14:32:26 UTC
(In reply to comment #1)
> why not just go for adding a {{ROOTPAGENAME}}?
May be an acceptable alternative. But {{SPACEUSER}} is supposed to be only active in User and User talk spaces, and to return only registered usernames, returning nothing in other circumstances. Thus, 

"Hi {{SPACEUSER}}" will return "Hi " in a IP user talk. And

{{gender:{{SPACEUSER}} }} won't misunderstand a Template root pagename as a registered user.
Comment 4 Purodha Blissenbach 2011-11-30 17:28:17 UTC
(In reply to comment #0)
> "it is possible to use {{GENDER:{{BASEPAGENAME}}|male
> form|female form}} if needed".

I strictly recommend against using this sort of approach anywhere.
I will inevitably create more problematic issues.

A structurally cleaner way to deal with GENDER is suggested in bug 27743 (Handle GENDER more efficiently)
Comment 5 Antoine "hashar" Musso (WMF) 2012-01-13 09:44:23 UTC
{{ROOTPAGENAME}} sounds like a good name. It could be used on other namespaces too.
Comment 6 p858snake 2012-01-13 11:05:44 UTC
(In reply to comment #3) 
> "Hi {{SPACEUSER}}" will return "Hi " in a IP user talk. And

Shouldn't that return "Hi <ip>", since they are the "spaceuser" for that talkpage?
Comment 7 Gustronico 2012-01-13 17:25:15 UTC
(In reply to comment #6)
> Shouldn't that return "Hi <ip>", since they are the "spaceuser" for that
> talkpage?

I think that the use of an ip address as a [[vocative]] is not a good practice. If you don't know the name of a person, you may use a friendly noun, like "Hi my friend" or so, not a number. (I'm not a English speaker, so excuse me for a better example)

{{SPACEUSER}} is suggested to be a users-specific function, capable to detect registered user names. If it is considered unnecessary, I still can reopen bug 30569 and insist in adding it as a special parameter to gender function:
{{gender:#spaceuser|male form|female form}}
Comment 8 MZMcBride 2012-07-29 00:58:58 UTC
(In reply to comment #5)
> {{ROOTPAGENAME}} sounds like a good name. It could be used on other namespaces
> too.

Personally, the idea of adding yet another magic word seems kind of silly to me. People have been using #titleparts for this for years, as it's vastly more flexible than an arbitrary set of magic words could ever be.

Does anyone have thoughts about merging the #titleparts parser function into MediaWiki core instead of introducing a new magic word?
Comment 9 Nemo 2012-11-20 08:31:25 UTC
(In reply to comment #8)
> (In reply to comment #5)
> > {{ROOTPAGENAME}} sounds like a good name. It could be used on other namespaces
> > too.
> 
> Personally, the idea of adding yet another magic word seems kind of silly to
> me. People have been using #titleparts for this for years, as it's vastly more
> flexible than an arbitrary set of magic words could ever be.

Very true. This magic word shouldn't be added to MediaWiki core only to be used for some templates of ours, which seems to be the original request here.

Comment 0, however, also mentions the possibility that this magic word might be needed for core system messages like tabs names, in relation to gender. This is quite surprising to me: shouldn't this use case be covered by gender namespaces? If not, this would be a valid request.
Comment 10 Daniel Friesen 2012-11-20 09:04:01 UTC
(In reply to comment #9)
> Comment 0, however, also mentions the possibility that this magic word might be
> needed for core system messages like tabs names, in relation to gender. This is
> quite surprising to me: shouldn't this use case be covered by gender
> namespaces? If not, this would be a valid request.

The issue isn't the namespace. The issue is knowing what user we're supposed to know the gender of. {{GENDER:|...|...}} and {{GENDER:{{BASEPAGENAME}}|...|...}} are two completely different things.
Comment 11 Nemo 2012-11-20 09:19:52 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Comment 0, however, also mentions the possibility that this magic word might be
> > needed for core system messages like tabs names, in relation to gender. This is
> > quite surprising to me: shouldn't this use case be covered by gender
> > namespaces? If not, this would be a valid request.
> 
> The issue isn't the namespace. The issue is knowing what user we're supposed to
> know the gender of. {{GENDER:|...|...}} and {{GENDER:{{BASEPAGENAME}}|...|...}}
> are two completely different things.

Yes, of course. So?
If gender in tabs is wrong, that's a bug by itself.
Comment 12 Gustronico 2012-11-20 14:04:02 UTC
Summary reverted to original {{SPACEUSER}} request. It is supposed to be only
active in User and User talk spaces, and to return only registered usernames,
returning nothing in other circumstances. May be it also would accept a parameter for a friendly vocative term, like Hi {{SPACEUSER|my friend}}!
Comment 13 Nemo 2012-11-20 14:17:36 UTC
(In reply to comment #12)
> Summary reverted to original {{SPACEUSER}} request. It is supposed to be only
> active in User and User talk spaces, and to return only registered usernames,
> returning nothing in other circumstances. May be it also would accept a
> parameter for a friendly vocative term, like Hi {{SPACEUSER|my friend}}!

Ok, thanks for the clarification: then this is not something we're going to do, most likely; closing accordingly, for better clarity.
Please use (templates with) titleparts, if you need to write to people on their subpages instead of the designated talk page.
Comment 14 Gustronico 2012-11-20 14:32:13 UTC
(In reply to comment #13)
> Please use (templates with) titleparts, if you need to write to people on their
> subpages instead of the designated talk page.
I think you partially misunderstand the problem. titleparts works for talks, ok, but interface messages issue persists. See summary ending: "also usable in interface messages"

(In reply to comment #11)
> Yes, of course. So?
> If gender in tabs is wrong, that's a bug by itself.
This is not exactly a gender bug.
The problem consists in that there is no secure way to detect the username of
the registered 'owner' of a space, being it to be used either for friendly 
messages or for *core interface* ones.
Comment 15 Nemo 2012-11-20 14:39:17 UTC
> (In reply to comment #11)
> > If gender in tabs is wrong, that's a bug by itself.
> This is not exactly a gender bug.
> The problem consists in that there is no secure way to detect the username of
> the registered 'owner' of a space, being it to be used either for friendly 
> messages or for *core interface* ones.

Please file a bug for each system message which should support gender and doesn't. Thanks!
Comment 16 Gustronico 2013-03-09 17:33:43 UTC
(In reply to comment #15)
> Please file a bug for each system message which should support gender and
> doesn't. Thanks!

Bag 45938 opened.

Note: This is a horrible hack to obtain the username of the 'owner' of the page, up to 5th level of subpages, without using #titleparts. It also works in the User talk namespace:

{{BASEPAGENAME:User:{{BASEPAGENAME:User:{{BASEPAGENAME:User:{{BASEPAGENAME:User:{{BASEPAGENAME}}}}}}}}}}
Comment 17 Gustronico 2013-03-09 17:35:00 UTC
Oops. Bug 45938 opened.

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


Navigation
Links