Last modified: 2009-08-26 15:48:12 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 8143 - Localized magic words don't ignore case if containing nonASCII characters
Localized magic words don't ignore case if containing nonASCII characters
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-04 01:09 UTC by Danny B.
Modified: 2009-08-26 15:48 UTC (History)
3 users (show)

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


Attachments
Use $wgContLang->lc() instead of strtolower in some cases (1.09 KB, patch)
2009-07-30 14:51 UTC, Matěj Grabovský
Details

Description Danny B. 2006-12-04 01:09:04 UTC
MessagesXx.php contains $magicWords array of synonyms.

The group of synonyms marked to ignore case ignores the case only if all the
synonyms are ASCII, otherwise not.

Test case:
MessagesCs.php
groups 'revisionday' and 'language' work properly
groups 'uc', 'fullurl' and many others don't - uppercase works properly,
lowercase appears as red link to non-existing template
Tested on cswikipedia 1.9alpha (r17974)
Comment 1 Niklas Laxström 2009-02-28 17:54:58 UTC
Just tested and case insensitive magic words do work correctly. Note that many magic words are marked as case sensitive.
Comment 2 Danny B. 2009-03-01 00:23:43 UTC
They do not. Did you check localized magic words of those I mentioned above?

Excerpt from MessagesCs.php:

'lcfirst' => array( '0', 'PRVNÍMALÉ:', 'LCFIRST:' ), // contains non-ASCII char(s)
'ucfirst' => array( '0', 'PRVNÍVELKÉ:', 'UCFIRST:' ),
'lc'      => array( '0', 'MALÁ:', 'LC:' ),
'uc'      => array( '0', 'VELKÁ:', 'UC:' ),
...
'padleft' => array( '0', 'ZAROVNATVLEVO', 'PADLEFT' ), // ASCII only
'padright'=> array( '0', 'ZAROVNATVPRAVO', 'PADRIGHT' ),

Tested on w:cs: sandbox:

{{PRVNÍVELKÉ:ěščř}} - OK
{{prvnívelké:ěščř}} - redlink to nonexisting template
{{PRVNÍMALÉ:ěščř}} - OK
{{prvnímalé:ěščř}} - redlink to nonexisting template
{{MALÁ:ěščř}} - OK
{{malá:ěščř}} - redlink to nonexisting template
{{VELKÁ:ěščř}} - OK
{{velká:ěščř}} - redlink to nonexisting template

etc., etc...

but:

{{zarovnatvlevo:12|5|x}} - OK
{{ZAROVNATVLEVO:12|5|x}} - OK
{{zarovnatvpravo:12|5|x}} - OK
{{ZAROVNATVPRAVO:12|5|x}} - OK

Comment 3 Niklas Laxström 2009-03-01 09:14:23 UTC
But {{názevserveru}} works, no idea why it is different.
Comment 4 Danny B. 2009-03-01 11:11:39 UTC
Looks like only where additional params are, it won't work correctly. Magic words without params seem to work correctly though I didn't test all marked case-insensitive.
Comment 5 Matěj Grabovský 2009-07-30 14:51:20 UTC
Created attachment 6406 [details]
Use $wgContLang->lc() instead of strtolower in some cases
Comment 6 Alexandre Emsenhuber [IAlex] 2009-08-26 15:48:12 UTC
Fixed in r55601.

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


Navigation
Links