Index: branches/wmf/1.18wmf1/languages/classes/LanguageTr.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | * @return string |
19 | 19 | */ |
20 | 20 | function ucfirst ( $string ) { |
21 | | - if ( !empty( $string ) && $string[0] == 'i' ) { |
| 21 | + if ( strlen( $string ) && $string[0] == 'i' ) { |
22 | 22 | return 'İ' . substr( $string, 1 ); |
23 | 23 | } else { |
24 | 24 | return parent::ucfirst( $string ); |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | * @return mixed|string |
31 | 31 | */ |
32 | 32 | function lcfirst ( $string ) { |
33 | | - if ( !empty( $string ) && $string[0] == 'I' ) { |
| 33 | + if ( strlen( $string ) && $string[0] == 'I' ) { |
34 | 34 | return 'ı' . substr( $string, 1 ); |
35 | 35 | } else { |
36 | 36 | return parent::lcfirst( $string ); |
— | — | @@ -45,7 +45,15 @@ |
46 | 46 | * @return string |
47 | 47 | */ |
48 | 48 | function uc( $string, $first = false ) { |
49 | | - $string = preg_replace( '/i/', 'İ', $string ); |
| 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 | + } |
50 | 58 | return parent::uc( $string, $first ); |
51 | 59 | } |
52 | 60 | |
— | — | @@ -58,7 +66,15 @@ |
59 | 67 | * @return string |
60 | 68 | */ |
61 | 69 | function lc( $string, $first = false ) { |
62 | | - $string = preg_replace( '/I/', 'ı', $string ); |
| 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 | + } |
63 | 79 | return parent::lc( $string, $first ); |
64 | 80 | } |
65 | 81 | |
Property changes on: branches/wmf/1.18wmf1/languages/classes |
___________________________________________________________________ |
Added: svn:mergeinfo |
66 | 82 | Merged /branches/REL1_15/phase3/languages/classes:r51646 |
67 | 83 | Merged /branches/REL1_17/phase3/languages/classes:r81445,81448 |
68 | 84 | Merged /branches/nikola/phase3/languages/classes:r85224,85239,85308 |
69 | 85 | Merged /branches/sqlite/languages/classes:r58211-58321 |
70 | 86 | Merged /trunk/phase3/languages/classes:r92580,92713,92765,92884,92886-92887,92894,92898,92907,92932,93149,93151,93233-93234,93258,93266,93516-93518,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94346,94372,94422,94425,94444,94448,94456,94498,94601,94630,94728,94825,94862,94995-94997,95042,95155,95332,95410,95442,95468,95601,95812,99074 |
71 | 87 | Merged /branches/new-installer/phase3/languages/classes:r43664-66004 |