Merge branch 'master' into patch-ptbr

This commit is contained in:
Ian Rodrigues 2017-06-20 10:58:41 -03:00 committed by GitHub
commit 675c631acc
4 changed files with 97 additions and 4 deletions

View File

@ -114,6 +114,7 @@ Pull requests are welcome, but please make sure you provide unit tests to cover
- Spanish
- Italian ( provided by @aletundo )
- Brazilian Portuguese ( provided by @ianrodriguesbr )
- Traditional Chinese ( provided by @Nationalcat )
## License
This project is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

87
src/dict/zh-tw.php Normal file
View File

@ -0,0 +1,87 @@
<?php
return [
'幹',
'肏',
'雞掰',
'幹你娘',
'幹您娘',
'奈米屌',
'短屌',
'細軟腸',
'死肥子',
'死胖子',
'幹你老師',
'幹您老師',
'操你妹',
'耖你妹',
'肏你妹',
'崩崩',
'操機歪',
'娘被狗幹',
'耖機文',
'肏機歪',
'破麻',
'腦殘',
'王八蛋',
'白痴',
'畜生',
'色龜',
'龜公',
'智缺',
'沒屁眼',
'黑鮑',
'變形莖肛',
'LP',
'黑鬼',
'尼哥',
'懶趴',
'懶叫',
'打手槍',
'淫穴',
'討客兄',
'淫蟲',
'腦殘',
'智缺',
'智障',
'手殘',
'腳殘',
'嘴賤',
'綠吱',
'藍蛆',
'大龜頭',
'小雞雞',
'大奶頭',
'女乃豆頁',
'奶豆頁',
'女乃頭',
'GGininder',
'駱駝蹄',
'婊子',
'淫蕩',
'蕩婦',
'早洩',
'快槍俠',
'黑B',
'黑穴',
'黑逼',
'賣淫',
'口爆',
'中出',
'啪啪啪',
'口交',
'足交',
'乳交',
'雜交',
'獸交',
'多P',
'漱懶',
'騷逼',
'抽插',
'打砲',
'內射',
'顏射',
'肛交',
'潮吹',
'軟屌'
];

View File

@ -0,0 +1,5 @@
<?php
return [
'profane' => ':attribute欄位內容包含粗俗用詞請您修正:)'
];

View File

@ -28,8 +28,8 @@ class ProfaneValidatorTest extends PHPUnit_Framework_TestCase
{
$this->mockConfigs();
$attribute = 'description';
$text = 'fck you bitch';
$parameters = ['es', 'en'];
$text = 'fck you bitch. 幹!';
$parameters = ['es', 'en' , 'zh-tw'];
$profane = new ProfaneValidator();
@ -117,9 +117,9 @@ class ProfaneValidatorTest extends PHPUnit_Framework_TestCase
$this->mockConfigs();
$profane = new ProfaneValidator();
$profane->setDictionary(['es', 'en']);
$profane->setDictionary(['es', 'en', 'it', 'zh-tw']);
$expected = array_merge(include __DIR__.'/../src/dict/es.php', include __DIR__.'/../src/dict/en.php');
$expected = array_merge(include __DIR__.'/../src/dict/es.php', include __DIR__.'/../src/dict/en.php', include __DIR__.'/../src/dict/it.php', include __DIR__.'/../src/dict/zh-tw.php');
$this->assertEquals($profane->getBadwords(), $expected);
}