Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
4ab323589b | |
|
|
a7471a44a8 | |
|
|
0e7b6eff0c | |
|
|
a16589ef92 |
|
|
@ -16,7 +16,7 @@
|
||||||
},
|
},
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"require": {
|
"require": {
|
||||||
"illuminate/support": ">=5.2|^6.0|^7.0|^8.0"
|
"illuminate/support": ">=5.2|^6.0|^7.0|^8.0|^9.0|^10.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^8.0|^8.5",
|
"phpunit/phpunit": "^8.0|^8.5",
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class Dictionary
|
||||||
{
|
{
|
||||||
// Get default locale string in laravel project
|
// Get default locale string in laravel project
|
||||||
// and set it as default dictionary
|
// and set it as default dictionary
|
||||||
$locale = Config::has('app.locale') ? Config::get('app.locale') : 'en';
|
$locale = Config::has('app.locale') ? Config::get('app.locale') : 'en_US';
|
||||||
|
|
||||||
$this->setDictionary($dictionary ?: $locale);
|
$this->setDictionary($dictionary ?: $locale);
|
||||||
}
|
}
|
||||||
|
|
@ -60,8 +60,8 @@ class Dictionary
|
||||||
$baseDictPath = $this->getBaseDictPath();
|
$baseDictPath = $this->getBaseDictPath();
|
||||||
if (is_array($dictionary)) {
|
if (is_array($dictionary)) {
|
||||||
foreach ($dictionary as $file) {
|
foreach ($dictionary as $file) {
|
||||||
if (file_exists($baseDictPath.$file.'.php')) {
|
if (file_exists($baseDictPath . $file . '.php')) {
|
||||||
$dict = include $baseDictPath.$file.'.php';
|
$dict = include $baseDictPath . $file . '.php';
|
||||||
$words = array_merge($words, $dict);
|
$words = array_merge($words, $dict);
|
||||||
} else {
|
} else {
|
||||||
// if the file isn't in the dict directory,
|
// if the file isn't in the dict directory,
|
||||||
|
|
@ -72,8 +72,8 @@ class Dictionary
|
||||||
}
|
}
|
||||||
// just a single string, not an array
|
// just a single string, not an array
|
||||||
} elseif (is_string($dictionary)) {
|
} elseif (is_string($dictionary)) {
|
||||||
if (file_exists($baseDictPath.$dictionary.'.php')) {
|
if (file_exists($baseDictPath . $dictionary . '.php')) {
|
||||||
$dict = include $baseDictPath.$dictionary.'.php';
|
$dict = include $baseDictPath . $dictionary . '.php';
|
||||||
$words = array_merge($words, $dict);
|
$words = array_merge($words, $dict);
|
||||||
} else {
|
} else {
|
||||||
if (file_exists($dictionary)) {
|
if (file_exists($dictionary)) {
|
||||||
|
|
@ -93,6 +93,6 @@ class Dictionary
|
||||||
*/
|
*/
|
||||||
protected function getBaseDictPath()
|
protected function getBaseDictPath()
|
||||||
{
|
{
|
||||||
return property_exists($this, 'baseDictPath') ? $this->baseDictPath : __DIR__.DIRECTORY_SEPARATOR.'dict/';
|
return property_exists($this, 'baseDictPath') ? $this->baseDictPath : __DIR__ . DIRECTORY_SEPARATOR . 'dict/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => 'Das :attribute enthält vulgäre Wörter',
|
'profane' => 'Das :attribute enthält vulgäre Wörter.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'profane' => 'The :attribute contains vulgar content',
|
|
||||||
];
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'profane' => 'The :attribute contains vulgar content.',
|
||||||
|
];
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'profane' => 'El :attribute contiene palabras vulgares',
|
|
||||||
];
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => 'El :attribute contiene palabras vulgares',
|
'profane' => 'El :attribute contiene palabras vulgares.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'profane' => 'El :attribute contiene palabras vulgares.',
|
||||||
|
];
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => 'Le champ :attribute comporte du contenu vulgaire',
|
'profane' => 'Le champ :attribute comporte du contenu vulgaire.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => 'Στο πεδίο :attribute εμπεριέχονται χυδαίες εκφράσεις',
|
'profane' => 'Στο πεδίο :attribute εμπεριέχονται χυδαίες εκφράσεις.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => ':attribute mengandung konten yang vulgar',
|
'profane' => ':attribute mengandung konten yang vulgar.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => 'Il campo :attribute contiene parole volgari o offensive',
|
'profane' => 'Il campo :attribute contiene parole volgari o offensive.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => 'ഈ :attribute നകത്തു മ്ലേച്ഛമായ ഭാഷ ഉണ്ട്',
|
'profane' => 'ഈ :attribute നകത്തു മ്ലേച്ഛമായ ഭാഷ ഉണ്ട്.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => 'Het :attribute veld bevat vulgaire inhoud',
|
'profane' => 'Het :attribute veld bevat vulgaire inhoud.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'profane' => 'O campo :attribute contém palavras vulgares',
|
|
||||||
];
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'profane' => 'O campo :attribute contém palavras vulgares.',
|
||||||
|
];
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'profane' => ':attribute are un continut vulgar',
|
|
||||||
];
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => ':attribute are un continut vulgar',
|
'profane' => ':attribute are un continut vulgar.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'profane' => ':attribute are un continut vulgar.',
|
||||||
|
];
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => ':attribute obsahuje vulgárny obsah',
|
'profane' => ':attribute obsahuje vulgárny obsah.',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'profane' => ':attribute sadrži vulgarne reči',
|
|
||||||
];
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'profane' => ':attribute sadrži vulgarne reči.',
|
||||||
|
];
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'profane' => ':attribute欄位內容包含粗俗用詞,請您修正:)',
|
'profane' => ':attribute欄位內容包含粗俗用詞,請您修正。',
|
||||||
];
|
];
|
||||||
Loading…
Reference in New Issue