Index: trunk/phase3/CREDITS |
— | — | @@ -81,6 +81,7 @@ |
82 | 82 | * Derk-Jan Hartman |
83 | 83 | * FunPika |
84 | 84 | * Ireas |
| 85 | +* Jaska Zedlik |
85 | 86 | * Jeremy Baron |
86 | 87 | * Jidanni |
87 | 88 | * Jimmy Xu |
Index: trunk/phase3/languages/messages/MessagesBe_tarask.php |
— | — | @@ -235,7 +235,10 @@ |
236 | 236 | 'DeletedContributions' => array( 'Выдалены_ўнёсак' ), |
237 | 237 | ); |
238 | 238 | |
239 | | -$separatorTransformTable = array(',' => '.', '.' => ',' ); |
| 239 | +$separatorTransformTable = array( |
| 240 | + ',' => "\xc2\xa0", # nbsp |
| 241 | + '.' => ',' |
| 242 | +); |
240 | 243 | |
241 | 244 | $linkTrail = '/^([абвгґджзеёжзійклмнопрстуўфхцчшыьэюяćčłńśšŭźža-z]+)(.*)$/sDu'; |
242 | 245 | |
Index: trunk/phase3/languages/classes/LanguageBe_tarask.php |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | * @ingroup Language |
6 | 6 | * |
7 | 7 | * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com> |
8 | | - * @link http://be.wikipedia.org/wiki/Talk:LanguageBe.php |
| 8 | + * @link http://be-x-old.wikipedia.org/wiki/Project_talk:LanguageBe_tarask.php |
9 | 9 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License |
10 | 10 | * @license http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License |
11 | 11 | */ |
— | — | @@ -40,4 +40,37 @@ |
41 | 41 | } |
42 | 42 | } |
43 | 43 | } |
| 44 | + |
| 45 | + /* |
| 46 | + * The Belarusian language uses apostrophe sign, |
| 47 | + * but the characters used for this could be both U+0027 and U+2019. |
| 48 | + * This function unifies apostrophe sign in search index values |
| 49 | + * to enable seach using both apostrophe signs. |
| 50 | + */ |
| 51 | + function normalizeForSearch( $string ) { |
| 52 | + wfProfileIn( __METHOD__ ); |
| 53 | + |
| 54 | + # MySQL fulltext index doesn't grok utf-8, so we |
| 55 | + # need to fold cases and convert to hex |
| 56 | + |
| 57 | + # Replacing apostrophe sign U+2019 with U+0027 |
| 58 | + $s = preg_replace( '/\xe2\x80\x99/', '\'', $string ); |
| 59 | + |
| 60 | + $s = parent::normalizeForSearch( $s ); |
| 61 | + |
| 62 | + wfProfileOut( __METHOD__ ); |
| 63 | + return $s; |
| 64 | + } |
| 65 | + |
| 66 | + /* |
| 67 | + * Four-digit number should be without group commas (spaces) |
| 68 | + * So "1 234 567", "12 345" but "1234" |
| 69 | + */ |
| 70 | + function commafy($_) { |
| 71 | + if (preg_match('/^-?\d{1,4}(\.\d*)?$/',$_)) { |
| 72 | + return $_; |
| 73 | + } else { |
| 74 | + return strrev((string)preg_replace('/(\d{3})(?=\d)(?!\d*\.)/','$1,',strrev($_))); |
| 75 | + } |
| 76 | + } |
44 | 77 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -101,7 +101,8 @@ |
102 | 102 | * (bug 16817) Group names in user rights log are now singular and in lowercase |
103 | 103 | * Special:Preferences no longer crashes if the wiki default date formatting |
104 | 104 | style is not valid for the user's interface language |
105 | | -* (bug 23167) Check the watch checkbox by default if the watchcreations preference is set |
| 105 | +* (bug 23167) Check the watch checkbox by default if the watchcreations |
| 106 | + preference is set |
106 | 107 | * Maintenance script cleanupTitles is now able to fix titles stored |
107 | 108 | in a negative namespace (which is invalid). |
108 | 109 | |
— | — | @@ -123,6 +124,9 @@ |
124 | 125 | * Latgalian (ltg) (new) |
125 | 126 | * Rusyn (rue) (new) |
126 | 127 | |
| 128 | +* (bug 23156) Commafy and search normalization updated for Belarusian |
| 129 | + (Tara�kievica) |
| 130 | + |
127 | 131 | == Compatibility == |
128 | 132 | |
129 | 133 | MediaWiki 1.17 requires PHP 5.1 (5.2 recommended). PHP 4 is no longer |