r99290 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99289‎ | r99290 | r99291 >
Date:00:30, 8 October 2011
Author:brion
Status:ok
Tags:
Comment:
Revert r84057, r84080, part of r99074: lc() and uc() custom handling for Turkish breaks case-insensitive matches of special page names and parser function keywords (bug 31490)

Deleted extra bug file as that was updated in r99289
Modified paths:
  • /trunk/phase3/languages/classes/LanguageTr.php (modified) (history)
  • /trunk/phase3/tests/parser/bug31490.txt (deleted) (history)

Diff [purge]

Index: trunk/phase3/tests/parser/bug31490.txt
@@ -1,55 +0,0 @@
2 -!! test
3 -Bug31490 Turkish: ucfirst 'blah'
4 -!! options
5 -language=tr
6 -!! input
7 -{{ucfirst:blah}}
8 -!! result
9 -<p>Blah
10 -</p>
11 -!! end
12 -
13 -!! test
14 -Bug31490 Turkish: ucfirst 'ix'
15 -!! options
16 -language=tr
17 -!! input
18 -{{ucfirst:ix}}
19 -!! result
20 -<p>İx
21 -</p>
22 -!! end
23 -
24 -!! test
25 -Bug31490 Turkish: lcfirst 'BLAH'
26 -!! options
27 -language=tr
28 -!! input
29 -{{lcfirst:BLAH}}
30 -!! result
31 -<p>bLAH
32 -</p>
33 -!! end
34 -
35 -!! test
36 -Bug31490 Turkish: ucfırst (with a dotless i)
37 -!! options
38 -language=tr
39 -!! input
40 -{{ucfırst:blah}}
41 -!! result
42 -<p><a href="https://www.mediawiki.org/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&amp;action=edit&amp;redlink=1" class="new" title="Şablon:Ucfırst:blah (sayfa mevcut değil)">Şablon:Ucfırst:blah</a>
43 -</p>
44 -!! end
45 -
46 -!! test
47 -Bug31490 ucfırst (with a dotless i) with English language
48 -!! options
49 -language=en
50 -!! input
51 -{{ucfırst:blah}}
52 -!! result
53 -<p><a href="https://www.mediawiki.org/index.php?title=Template:Ucf%C4%B1rst:blah&amp;action=edit&amp;redlink=1" class="new" title="Template:Ucfırst:blah (page does not exist)">Template:Ucfırst:blah</a>
54 -</p>
55 -!! end
56 -
Index: trunk/phase3/languages/classes/LanguageTr.php
@@ -36,46 +36,4 @@
3737 }
3838 }
3939
40 - /**
41 - * @see bug 28040
42 - *
43 - * @param $string string
44 - * @param $first string|bool
45 - *
46 - * @return string
47 - */
48 - function uc( $string, $first = false ) {
49 - if ( strlen( $string ) ) {
50 - if ( $first ) {
51 - if ( $string[0] === 'i' ) {
52 - $string = 'İ' . substr( $string, 1 );
53 - }
54 - } else {
55 - $string = str_replace( 'i', 'İ', $string );
56 - }
57 - }
58 - return parent::uc( $string, $first );
59 - }
60 -
61 - /**
62 - * @see bug 28040
63 - *
64 - * @param $string string
65 - * @param $first string|bool
66 - *
67 - * @return string
68 - */
69 - function lc( $string, $first = false ) {
70 - if ( strlen( $string ) ) {
71 - if ( $first ) {
72 - if ( $string[0] == 'I' ) {
73 - $string = 'ı' . substr( $string, 1 );
74 - }
75 - } else {
76 - $string = str_replace( 'I', 'ı', $string );
77 - }
78 - }
79 - return parent::lc( $string, $first );
80 - }
81 -
8240 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r99291MFT r99289, r99290: rolls back Turkish uc()/lc() support for dotless/dotted i...brion00:36, 8 October 2011
r99292MFT r99289, r99290: rolls back Turkish uc()/lc() support for dotless/dotted i...brion00:37, 8 October 2011
r102466Readd Names.php and other files removed in r102465...platonides23:35, 8 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84057bug 28040 Turkish: properly handle dotted and dotless i...hashar21:56, 15 March 2011
r84080Makes LanguageTr uc & lc match parent declaration...hashar07:38, 16 March 2011
r99074Fixes for r84057 LanguageTr uc/lc:...tstarling02:31, 6 October 2011
r99246Tests for bug 31490 : turkish magic word with a 'i' are broken :d...hashar20:18, 7 October 2011
r99289followup r99246: fixes for test casesbrion00:27, 8 October 2011

Status & tagging log