Last modified: 2012-04-16 09:15:54 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 T30040, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28040 - In tr, cannot lowercase I in title using {{DISPLAYTITLE:i}} because ->ucfirst(lcfirst('I')) is not I.
In tr, cannot lowercase I in title using {{DISPLAYTITLE:i}} because ->ucfirst...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: High enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://tr.wikipedia.org/wiki/IPhone
: i18n, platformeng
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-14 12:50 UTC by Ilhan Y.
Modified: 2012-04-16 09:15 UTC (History)
4 users (show)

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


Attachments

Description Ilhan Y. 2011-03-14 12:50:07 UTC
In the Turkish wiki if the address is "İPhone" then we can make the title "iPhone". but of course the address cannot be "İPhone".

Then if we change the address to IPhone then we cannot make the title "iPhone"

Also look for further information at
small letter (lowercase) at the Turkish wiki: http://tr.wikipedia.org/wiki/%C5%9Eablon:K%C3%BC%C3%A7%C3%BCk_harf

İ: http://en.wikipedia.org/wiki/Dotted_and_dotless_I
Comment 1 Antoine "hashar" Musso (WMF) 2011-03-14 14:56:22 UTC
On Wikipedia, the articles names are forced to an upper case first letter.

A workaround exist as you can see on the English wikipedia, the article at http://en.wikipedia.org/wiki/IPhone shows with a dot-less lower case i. This is made possible by using the template {{Lower case title}} available at http://en.wikipedia.org/wiki/Template:Lowercase_title

Template content as of today is:

<span>{{DISPLAYTITLE:{{#if:{{NAMESPACE}}|{{NAMESPACE}}:|}}{{lcfirst:{{PAGENAME}}}}}}</span>

You might want to use a similar template on the Turkish wiki.
Comment 2 Ilhan Y. 2011-03-14 15:18:27 UTC
There is one http://tr.wikipedia.org/wiki/%C5%9Eablon:K%C3%BC%C3%A7%C3%BCk_harf
it works for İPhone (makes it iPhone) but it doesn't work for IPhone (shows up again as IPhone), even if it works it will show it as ıPhone.
Comment 3 Bawolff (Brian Wolff) 2011-03-14 16:47:44 UTC
Updating summary to hopefully capture the issue better.

Basically, in turkish the page [[i]] = [[İ]], where the page [[ı]] -= [[I]]. Thus doing {{DISPLAYTITLE:{{lcfirst:{{PAGENAME}}}}}} won't work, since the target of {{lcfirst:IPhone}} (which is iPhone) does not have the same canonical name as IPhone (So the displaytitle restrictions come into affect).

I'm not sure if this is an issue that should be fixed as in Turkish, the lowercase of I is generally not i (from what I read on 'pedia), except for in circumstances such as iPhone where a foreign word is involved. It might make sense however to just put $wgRestrictDisplayTitle = false; for tr. (It can't be that bad, any wiki using language converter can already get around the display title restrictions)


As an aside, the Turkish language file is kind of interesting. Only the ucfirst is overridden to make i -> İ. uc (in general without the first) puts i -> I, and the lowercase functions all just inherit the standard lc, which puts I -> i. That is perhaps something that should be changed, but I don't know enough about the language to know if that's actually as wrong as I think it is. (and its somewhat beside the point for the issue reported above).
Comment 4 Antoine "hashar" Musso (WMF) 2011-03-14 22:02:48 UTC
The Turkish wikipedia got renamed to İPhone thus rendering as iPhone with the template above.

http://tr.wikipedia.org/wiki/%C4%B0Phone
Comment 5 Antoine "hashar" Musso (WMF) 2011-03-14 22:15:54 UTC
I have send a patch for the lcfirst case as well as unit tests ih r83970 

Keeping the bug open waiting for code review and user feedback (translatewiki comes to mind).
Comment 6 Antoine "hashar" Musso (WMF) 2011-03-15 21:57:22 UTC
I have forgotten about full strings case change. r84057 deals with it.
Comment 7 Ilhan Y. 2011-04-27 12:26:03 UTC
Any news?
Comment 8 Ilhan Y. 2011-04-27 12:32:08 UTC
Still it do not lowercase the title, see http://tr.wikipedia.org/wiki/IPhone_4
Comment 9 Bawolff (Brian Wolff) 2011-04-27 21:43:40 UTC
(In reply to comment #7)
> Any news?

The fix is in the unstable version of MediaWiki. It will be fixed on the site next general update (when its updated to 1.18). I have no idea when that will be. Perhaps in a month or two.

The code review Ashar talked about in comment 5 hasn't happened yet, but I don't think there will be any issues with that.
Comment 10 Antoine "hashar" Musso (WMF) 2011-05-21 10:22:05 UTC
Patches pending review are:

r83970
r84057
r84080

They are tagged with keyword 'patchset-turkish' (which will get removed one day).
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/tag/patchset-turkish
Comment 11 Antoine "hashar" Musso (WMF) 2011-07-27 11:00:15 UTC
Patches got reviewed and will be included in MediaWiki 1.18.

It will be deployed on WikiMedia live site whenever 1.18 is deployed there :)
Comment 12 Brion Vibber 2011-10-07 19:32:52 UTC
This fix triggers breakages with case-insensitive magic word matching for keywords containing "i", such as the {{ucfirst:}} and {{lcfirst:}} parser functions: bug 31490
Comment 13 Brion Vibber 2011-10-08 00:40:35 UTC
Has been reverted in r99289 / r99290.
Comment 14 Brion Vibber 2011-10-08 00:41:23 UTC
r83970 is still in place as it doesn't appear to break anything so far.
Comment 15 Ilhan Y. 2011-10-10 16:40:23 UTC
Uhmm, so what I have to do now in order to make http://tr.wikipedia.org/wiki/IPhone_4 's title "iPhone 4". Now it seems "ıPhone 4".
Comment 16 Ilhan Y. 2011-11-29 09:18:35 UTC
Since MediaWiki is out, I have a question regarding the usage of the patch. Consider this page http://tr.wikipedia.org/wiki/IPhone It has a template called {{Küçük harf}} which lowers the title to ıPhone. {{Küçük harf}} has lcfirst see http://tr.wikipedia.org/w/index.php?title=%C5%9Eablon:K%C3%BC%C3%A7%C3%BCk_harf&action=edit Instead of lcfirst what should be used in order to achieve the title iPhone?
Comment 17 Bawolff (Brian Wolff) 2011-11-29 21:13:19 UTC
(In reply to comment #16)
> Since MediaWiki is out, I have a question regarding the usage of the patch.
> Consider this page http://tr.wikipedia.org/wiki/IPhone It has a template called
> {{Küçük harf}} which lowers the title to ıPhone. {{Küçük harf}} has lcfirst see
> http://tr.wikipedia.org/w/index.php?title=%C5%9Eablon:K%C3%BC%C3%A7%C3%BCk_harf&action=edit
> Instead of lcfirst what should be used in order to achieve the title iPhone?

You essentially can't at the moment without resorting to js hacks or requesting that $wgRestrictDisplayTitle be set to false. (Since currently [[tr:iPhone]] and [[tr:IPhone]] refer to different articles, and displaytitle only works if the display title would refer to the exact same page as the original title)

The fix mentioned several comments above was so that {{lcfirst:I}} -> ı, so that lcfirst would correspond to the "exact" same article, so it could be used with displaytitle.
Comment 18 Antoine "hashar" Musso (WMF) 2011-12-21 10:50:42 UTC
The turkish language lcfirst() and ucfirst() methods have been fixed by 83970. That makes the parser functions {{lcfirst}} and {{ucfirs}} to behave correctly on turkish wikis.

That makes the template 'Küçük harf' referenced above behave correctly.

Source code:
{{DISPLAYTITLE:{{lcfirst:{{PAGENAME}}}}}} does work on a Turkish wiki now.

See http://tr.wikipedia.org/w/index.php?title=Şablon:Küçük_harf&action=edit


On the Turkish Wikipedia, the article is named İPhone (upper case dotted i), the above template does make it to render iPhone (lower case dotted i).

The IPhone (dot less i) is redirected to İPhone (upper case dotted i). Once redirect is done, DISPLAYTITLE correctly change the article title to iPhone (lower case dotted i).

So this bug is thus resolved.
Comment 19 Ilhan Y. 2011-12-21 10:59:09 UTC
Hmm, okay. But https://tr.wikipedia.org/wiki/IPhone_4 lowercase of I in English is not ı.

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


Navigation
Links