In cases where we're operating on text data (and not binary data),
use e.g. "\u{00A0}" to refer directly to the Unicode character
'NO-BREAK SPACE' instead of "\xc2\xa0" to specify the bytes C2h A0h
(which correspond to the UTF-8 encoding of that character). This
makes it easier to look up those mysterious sequences, as not all
are as recognizable as the no-break space.
This is not enforced by PHP, but I think we should write those in
uppercase and zero-padded to at least four characters, like the
Unicode standard does.
Note that not all "\xNN" escapes can be automatically replaced:
* We can't use Unicode escapes for binary data that is not UTF-8
(e.g. in code converting from legacy encodings or testing the
handling of invalid UTF-8 byte sequences).
* '\xNN' escapes in regular expressions in single-quoted strings
are actually handled by PCRE and have to be dealt with carefully
(those regexps should probably be changed to use the /u modifier).
* "\xNN" referring to ASCII characters ("\x7F" and lower) should
probably be left as-is.
The replacements in this commit were done semi-manually by piping
the existing "\xNN" escapes through the following terrible Ruby
script I devised:
chars = eval('"' + ARGV[0] + '"').force_encoding('utf-8')
puts chars.split('').map{|char|
'\\u{' + char.ord.to_s(16).upcase.rjust(4, '0') + '}'
}.join('')
Change-Id: Idc3dee3a7fb5ebfaef395754d8859b18f1f8769a
72 lines
2.4 KiB
PHP
72 lines
2.4 KiB
PHP
<?php
|
||
/** Belarusian (беларуская)
|
||
*
|
||
* To improve a translation please visit https://translatewiki.net
|
||
*
|
||
* @ingroup Language
|
||
* @file
|
||
*
|
||
*/
|
||
|
||
$namespaceNames = [
|
||
NS_MEDIA => 'Мультымедыя',
|
||
NS_SPECIAL => 'Адмысловае',
|
||
NS_TALK => 'Размовы',
|
||
NS_USER => 'Удзельнік',
|
||
NS_USER_TALK => 'Размовы_з_удзельнікам',
|
||
NS_PROJECT_TALK => 'Размовы_пра_{{GRAMMAR:вінавальны|$1}}',
|
||
NS_FILE => 'Файл',
|
||
NS_FILE_TALK => 'Размовы_пра_файл',
|
||
NS_MEDIAWIKI => 'MediaWiki',
|
||
NS_MEDIAWIKI_TALK => 'Размовы_пра_MediaWiki',
|
||
NS_TEMPLATE => 'Шаблон',
|
||
NS_TEMPLATE_TALK => 'Размовы_пра_шаблон',
|
||
NS_HELP => 'Даведка',
|
||
NS_HELP_TALK => 'Размовы_пра_даведку',
|
||
NS_CATEGORY => 'Катэгорыя',
|
||
NS_CATEGORY_TALK => 'Размовы_пра_катэгорыю',
|
||
];
|
||
|
||
$namespaceAliases = [
|
||
'$1_размовы' => NS_PROJECT_TALK,
|
||
'Выява' => NS_FILE,
|
||
'Размовы_пра_выяву' => NS_FILE_TALK,
|
||
];
|
||
|
||
$magicWords = [
|
||
'img_thumbnail' => [ '1', 'міні', 'мініяцюра', 'thumb', 'thumbnail' ],
|
||
'img_manualthumb' => [ '1', 'міні=$1', 'мініяцюра=$1', 'thumbnail=$1', 'thumb=$1' ],
|
||
'img_right' => [ '1', 'справа', 'right' ],
|
||
'img_left' => [ '1', 'злева', 'left' ],
|
||
'img_none' => [ '1', 'няма', 'none' ],
|
||
'img_width' => [ '1', '$1пкс', '$1px' ],
|
||
'img_center' => [ '1', 'цэнтр', 'center', 'centre' ],
|
||
'img_framed' => [ '1', 'безрамкі', 'frame', 'framed', 'enframed' ],
|
||
];
|
||
|
||
$bookstoreList = [
|
||
'OZ.by' => 'http://oz.by/search.phtml?what=books&isbn=$1',
|
||
'Amazon.com' => 'https://www.amazon.com/exec/obidos/ISBN=$1'
|
||
];
|
||
|
||
$datePreferences = [
|
||
'default',
|
||
'dmy',
|
||
'ISO 8601',
|
||
];
|
||
|
||
$defaultDateFormat = 'dmy';
|
||
|
||
$dateFormats = [
|
||
'dmy time' => 'H:i',
|
||
'dmy date' => 'j xg Y',
|
||
'dmy both' => 'H:i, j xg Y',
|
||
];
|
||
|
||
# Per discussion on https://translatewiki.net/wiki/Thread:Support/Customization_of number format
|
||
$separatorTransformTable = [
|
||
',' => "\u{00A0}", # nbsp
|
||
'.' => ','
|
||
];
|
||
|
||
$linkTrail = '/^([абвгґджзеёжзійклмнопрстуўфхцчшыьэюяćčłńśšŭźža-z]+)(.*)$/sDu';
|