Last modified: 2012-01-10 20:24:32 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 T33490, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31490 - lcfirst and ucfirst parser functions do not work on Turkish wikis
lcfirst and ucfirst parser functions do not work on Turkish wikis
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: High critical (vote)
: ---
Assigned To: Antoine "hashar" Musso (WMF)
http://tr.wikipedia.org/wiki/Kullan%C...
: i18n, platformeng
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-07 07:54 UTC by Sadrettin
Modified: 2012-01-10 20:24 UTC (History)
7 users (show)

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


Attachments

Description Sadrettin 2011-10-07 07:54:04 UTC
lcfirst and ucfirst parser functions do not work on tr.wikipedia.
Comment 1 Tim Starling 2011-10-07 12:43:30 UTC
In what way do they not work?
Comment 2 Brion Vibber 2011-10-07 17:54:31 UTC
The magic words are not recognized, it tries to load templates with the ucfirst or lcfirst names.

http://tr.wikipedia.org/wiki/Kullan%C4%B1c%C4%B1:Brion_VIBBER/ucfirst-bug
Comment 3 Max Semenik 2011-10-07 18:21:36 UTC
Broken by r84057.
Comment 4 Brion Vibber 2011-10-07 18:26:48 UTC
Heh... looks like that basically broke the case-insensitive matching of the keywords. :)

{{ucfırst:blah}} (using dotless lowercase i!) does work, as does {{UCFIRST:blah}}
 (uppercase dotless I)
Comment 5 Antoine "hashar" Musso (WMF) 2011-10-07 20:19:05 UTC
I have added Brion tests to our parser tests system with r99246.

 $ cd tests
 $ php parserTests.php --file=parser/bug31490.txt
Comment 6 Brion Vibber 2011-10-08 00:15:25 UTC
Noted on CR; Special:Specialpages crashes with a fatal error as well: http://tr.wikipedia.org/wiki/%C3%96zel:%C3%96zelSayfalar

Looks like we'll do a quick revert on the lc() / uc() for the moment until we get a cleaner case-sensitive compare.

This .... I think will also partially revert r99074, which changes the uc() logic. I'm not sure if the $first parameter on uc()/lc() is used by anything other than ucfirst()/lcfirst() default implementations. icky :)
Comment 7 Brion Vibber 2011-10-08 00:39:42 UTC
Ok, r99289 / r99290 backs out the lc/uc() implementations in r84057, r84080, part of r99074.

* Special:Specialpages now works (good!)
* {{ucfirst:}} works again
* {{lcfirst:}} works again

The existing ucfirst()/lcfirst() remain, which handle uppercasing the first letter of page titles.
Comment 8 Sadrettin 2011-10-08 13:47:25 UTC
Thank you. Other turkish wikis can be updated? do not work ucfirst, lcfirst.
Example: tr.wiktionary. http://tr.wiktionary.org/wiki/Ahat
Comment 9 Sadrettin 2011-10-08 14:19:34 UTC
no problem. ok.
Comment 10 Ilhan Y. 2011-10-11 13:25:43 UTC
And how we will handle IPhone_4 -> iPhone_4. Now it works as this; IPhone_4 -> ıPhone_4
See http://tr.wikipedia.org/wiki/IPhone_4
Comment 11 Antoine "hashar" Musso (WMF) 2011-10-18 18:22:00 UTC
We had a discussion on IRC about this bug last week with the operation team. The position was that we preferred reestablishing the magic word lcfirst & ucfirst functionality.

I have this bug on the top of my bug fixing task list but it need a proper patch to not break the magic word using a dotted i :-P
Comment 12 Mark A. Hershberger 2011-10-28 14:42:00 UTC
removing dep on tarball blockers for things that aren't in mw core.
Comment 13 Mark A. Hershberger 2011-11-29 22:17:45 UTC
*** Bug 32707 has been marked as a duplicate of this bug. ***
Comment 14 Rob Lanphier 2011-12-20 19:44:56 UTC
Is this a duplicate of bug 28040, or are they subtly different?
Comment 15 Antoine "hashar" Musso (WMF) 2011-12-21 11:14:17 UTC
Here is a summary of the issue this bug is about.

r84057 implemented string upper/lower casing methods for the Turkish language.

The MediaWiki code handling magic words normalize then to lower case using the content language (see lc() calls in MagicWord class). Hence a magic word such as lcfirst is treated just like a turkish word and end up upper cased with a dotted i.

Two possibilities:
- magic words could optionally be made an array referencing the language. Then we could use that language thus using the proper lc / uc implementations
- for turkish language, forge magic words aliases having dotted or dot less i. i.e. 'ucfirst' (with dot) could have an alias UCFIRST (without dot). Both would then be valid.
Comment 16 Ilhan Y. 2011-12-21 11:22:48 UTC
(In reply to comment #15)
> - magic words could optionally be made an array referencing the language. Then
> we could use that language thus using the proper lc / uc implementations

Yes. This option seems better.
Comment 17 Hydriz Scholz 2011-12-21 11:38:20 UTC
*** Bug 33299 has been marked as a duplicate of this bug. ***
Comment 18 Antoine "hashar" Musso (WMF) 2012-01-10 20:24:32 UTC
The original issue was about lcfirst / ucfirst being broken on Turkish wikis. This has long been solved by reverting the code.

The issue derived to about our Turkish language class lacking uc() / lc() implementation. I have thus split that part in a new bug report : bug 33643

So there is nothing left in this bug.

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


Navigation
Links