Index: branches/REL1_18/phase3/tests/phpunit/languages/LanguageTrTest.php |
— | — | @@ -16,40 +16,13 @@ |
17 | 17 | unset( $this->lang ); |
18 | 18 | } |
19 | 19 | |
20 | | -##### Full Turkish alphabet ################################################# |
21 | | - |
22 | | - function testLowerCaseTurkishAlphabetToUppercase() { |
23 | | - $this->assertEquals( 'ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ', |
24 | | - $this->lang->uc( 'abcçdefgğhıijklmnoöprsştuüvyz' ), |
25 | | - 'Lower case Turkish alphabet to upper case' |
26 | | - ); |
27 | | - } |
28 | | - function testUpperCaseTurkishAlphabetToUppercase() { |
29 | | - $this->assertEquals( 'ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ', |
30 | | - $this->lang->uc( 'ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ' ), |
31 | | - 'Upper case Turkish alphabet to upper case' |
32 | | - ); |
33 | | - } |
34 | | - function testUpperCaseTurkishAlphabetToLowercase() { |
35 | | - $this->assertEquals( 'abcçdefgğhıijklmnoöprsştuüvyz', |
36 | | - $this->lang->lc( 'ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ' ), |
37 | | - 'Upper case Turkish alphabet to lower case' |
38 | | - ); |
39 | | - } |
40 | | - function testLowerCaseTurkishAlphabetToLowercase() { |
41 | | - $this->assertEquals( 'abcçdefgğhıijklmnoöprsştuüvyz', |
42 | | - $this->lang->lc( 'abcçdefgğhıijklmnoöprsştuüvyz' ), |
43 | | - 'Lower case Turkish alphabet to lower case' |
44 | | - ); |
45 | | - } |
46 | | - |
47 | 20 | /** |
48 | 21 | * See @bug 28040 |
49 | 22 | * Credits to #wikipedia-tr users berm, []LuCkY[] and Emperyan |
50 | 23 | * @see http://en.wikipedia.org/wiki/Dotted_and_dotless_I |
51 | 24 | * @dataProvider provideDottedAndDotlessI |
52 | 25 | */ |
53 | | - function testChangeCaseOfFirstCharBeingDottedAndDotlessI( $func, $input, $inputCase, $expected ) { |
| 26 | + function testDottedAndDotlessI( $func, $input, $inputCase, $expected ) { |
54 | 27 | if( $func == 'ucfirst' ) { |
55 | 28 | $res = $this->lang->ucfirst( $input ); |
56 | 29 | } elseif( $func == 'lcfirst' ) { |
— | — | @@ -87,60 +60,6 @@ |
88 | 61 | array( 'lcfirst', 'IPhone', 'upper', 'ıPhone' ), |
89 | 62 | |
90 | 63 | ); |
91 | | - } |
92 | | - |
93 | | -##### LanguageTr specificities ############################################# |
94 | | - /** |
95 | | - * @cover LanguageTr:lc |
96 | | - * See @bug 28040 |
97 | | - */ |
98 | | - function testLanguageTrLowerCasingOverride() { |
99 | | - $this->assertEquals( 'ııııı', $this->lang->lc( 'IIIII') ); |
100 | 64 | } |
101 | | - /** |
102 | | - * @cover LanguageTr:uc |
103 | | - * See @bug 28040 |
104 | | - */ |
105 | | - function testLanguageTrUpperCasingOverride() { |
106 | | - $this->assertEquals( 'İİİİİ', $this->lang->uc( 'iiiii') ); |
107 | | - } |
108 | 65 | |
109 | | -##### Upper casing a string ################################################# |
110 | | - /** |
111 | | - * Generic test for the Turkish dotted and dotless I strings |
112 | | - * See @bug 28040 |
113 | | - * @dataProvider provideUppercaseStringsWithDottedAndDotlessI |
114 | | - */ |
115 | | - function testUpperCasingOfAStringWithDottedAndDotLessI( $expected, $input ) { |
116 | | - $this->assertEquals( $expected, $this->lang->uc( $input ) ); |
117 | | - } |
118 | | - function provideUppercaseStringsWithDottedAndDotlessI() { |
119 | | - return array( |
120 | | - # expected, input string to uc() |
121 | | - array( 'IIIII', 'ııııı' ), |
122 | | - array( 'IIIII', 'IIIII' ), #identity |
123 | | - array( 'İİİİİ', 'iiiii' ), # Specifically handled by LanguageTr:uc |
124 | | - array( 'İİİİİ', 'İİİİİ' ), #identity |
125 | | - ); |
126 | | - } |
127 | | - |
128 | | -##### Lower casing a string ################################################# |
129 | | - /** |
130 | | - * Generic test for the Turkish dotted and dotless I strings |
131 | | - * See @bug 28040 |
132 | | - * @dataProvider provideLowercaseStringsWithDottedAndDotlessI |
133 | | - */ |
134 | | - function testLowerCasingOfAStringWithDottedAndDotLessI( $expected, $input ) { |
135 | | - $this->assertEquals( $expected, $this->lang->lc( $input ) ); |
136 | | - } |
137 | | - function provideLowercaseStringsWithDottedAndDotlessI() { |
138 | | - return array( |
139 | | - # expected, input string to lc() |
140 | | - array( 'ııııı', 'IIIII' ), # Specifically handled by LanguageTr:lc |
141 | | - array( 'ııııı', 'ııııı' ), #identity |
142 | | - array( 'iiiii', 'İİİİİ' ), |
143 | | - array( 'iiiii', 'iiiii' ), #identity |
144 | | - ); |
145 | | - } |
146 | | - |
147 | 66 | } |
Index: branches/REL1_18/phase3/tests/parser/parserTests.txt |
— | — | @@ -8716,6 +8716,61 @@ |
8717 | 8717 | !! end |
8718 | 8718 | |
8719 | 8719 | |
| 8720 | +!! test |
| 8721 | +Bug31490 Turkish: ucfirst 'blah' |
| 8722 | +!! options |
| 8723 | +language=tr |
| 8724 | +!! input |
| 8725 | +{{ucfirst:blah}} |
| 8726 | +!! result |
| 8727 | +<p>Blah |
| 8728 | +</p> |
| 8729 | +!! end |
| 8730 | + |
| 8731 | +!! test |
| 8732 | +Bug31490 Turkish: ucfirst 'ix' |
| 8733 | +!! options |
| 8734 | +language=tr |
| 8735 | +!! input |
| 8736 | +{{ucfirst:ix}} |
| 8737 | +!! result |
| 8738 | +<p>İx |
| 8739 | +</p> |
| 8740 | +!! end |
| 8741 | + |
| 8742 | +!! test |
| 8743 | +Bug31490 Turkish: lcfirst 'BLAH' |
| 8744 | +!! options |
| 8745 | +language=tr |
| 8746 | +!! input |
| 8747 | +{{lcfirst:BLAH}} |
| 8748 | +!! result |
| 8749 | +<p>bLAH |
| 8750 | +</p> |
| 8751 | +!! end |
| 8752 | + |
| 8753 | +!! test |
| 8754 | +Bug31490 Turkish: ucfırst (with a dotless i) |
| 8755 | +!! options |
| 8756 | +language=tr |
| 8757 | +!! input |
| 8758 | +{{ucfırst:blah}} |
| 8759 | +!! result |
| 8760 | +<p><a href="https://www.mediawiki.org/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Şablon:Ucfırst:blah (sayfa mevcut değil)">Şablon:Ucfırst:blah</a> |
| 8761 | +</p> |
| 8762 | +!! end |
| 8763 | + |
| 8764 | +!! test |
| 8765 | +Bug31490 ucfırst (with a dotless i) with English language |
| 8766 | +!! options |
| 8767 | +language=en |
| 8768 | +!! input |
| 8769 | +{{ucfırst:blah}} |
| 8770 | +!! result |
| 8771 | +<p><a href="https://www.mediawiki.org/index.php?title=Template:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Template:Ucfırst:blah (page does not exist)">Template:Ucfırst:blah</a> |
| 8772 | +</p> |
| 8773 | +!! end |
| 8774 | + |
8720 | 8775 | TODO: |
8721 | 8776 | more images |
8722 | 8777 | more tables |
Index: branches/REL1_18/phase3/languages/classes/LanguageTr.php |
— | — | @@ -36,30 +36,4 @@ |
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
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 | | - $string = preg_replace( '/i/', 'İ', $string ); |
50 | | - return parent::uc( $string, $first ); |
51 | | - } |
52 | | - |
53 | | - /** |
54 | | - * @see bug 28040 |
55 | | - * |
56 | | - * @param $string string |
57 | | - * @param $first string|bool |
58 | | - * |
59 | | - * @return string |
60 | | - */ |
61 | | - function lc( $string, $first = false ) { |
62 | | - $string = preg_replace( '/I/', 'ı', $string ); |
63 | | - return parent::lc( $string, $first ); |
64 | | - } |
65 | | - |
66 | 40 | } |