Compare commits

...
13 Commits
Author SHA1 Message Date
Fred Delrieu f92481561c Merge pull request #530 from caouecs/analysis-zGDkeO
Applied fixes from StyleCI
2016-03-22 22:53:38 +01:00
Fred Delrieu 75377e7ac3 Applied fixes from StyleCI 2016-03-22 17:53:23 -04:00
caouecs 46e0d0375c feature: en version 2016-03-22 22:52:26 +01:00
caouecs 6476967415 review: todo script 2016-03-22 22:52:18 +01:00
Fred Delrieu 20cb3ef9d7 Merge pull request #527 from ARCANEFORKS/patch-2
Updating TODO.md generator script
2016-03-22 22:33:58 +01:00
ARCANEDEV 0aba9b16c4 Updating TODO.md generator script 2016-03-20 16:46:22 +00:00
caouecs 667d35d0f2 feature: todo list updated 2016-03-13 21:34:12 +01:00
Fred Delrieu 153c14344b Merge pull request #525 from hypernics/master-hu
Translate missing Hungarian strings
2016-03-13 12:47:45 +01:00
Fred Delrieu 2e4b4eed56 Merge pull request #524 from maelsoucaze/patch-1
Fixed untranslated word in 'distinct'
2016-03-13 12:47:10 +01:00
Janos Muzsi b8a835f53a Translate missing Hungarian strings 2016-03-13 08:59:23 +01:00
Maël Soucaze b552829f43 Fixed untranslated word in 'distinct' 2016-03-13 02:21:23 +01:00
caouecs a9cd259a0c feature: todo list 2016-03-12 09:28:04 +01:00
Fred Delrieu 29b8c1328c Update README.md 2016-03-12 09:25:11 +01:00
10 changed files with 362 additions and 269 deletions

No files matched your search

+4
View File
@@ -5,6 +5,10 @@ In this repository, you can find the lang files for the framework PHP, [Laravel
---
News of 12 March 2016:
* todo list: in todo.md
News of 7 March 2016:
* validation: add *in_array*
+1 -1
View File
@@ -34,7 +34,7 @@ return [
'different' => 'Les champs :attribute et :other doivent être différents.',
'digits' => 'Le champ :attribute doit avoir :digits chiffres.',
'digits_between' => 'Le champ :attribute doit avoir entre :min et :max chiffres.',
'distinct' => 'Le champ :attribute a une value dupliquée.',
'distinct' => 'Le champ :attribute a une valeur dupliquée.',
'email' => 'Le champ :attribute doit être une adresse email valide.',
'exists' => 'Le champ :attribute sélectionné est invalide.',
'filled' => 'Le champ :attribute est obligatoire.',
+1 -1
View File
@@ -14,7 +14,7 @@ return [
*/
'password' => 'A jelszónak legalább hat karakterből kell állnia és egyeznie kell a jelszó megerősítéssel.',
'reset' => 'Password has been reset!',
'reset' => 'Az új jelszó beállítva!',
'sent' => 'Jelszó-emlékeztető elküldve!',
'token' => 'Ez az új jelszó generálásához tartozó token érvénytelen.',
'user' => 'Nem található felhasználó a megadott email címmel.',
+5 -5
View File
@@ -34,16 +34,16 @@ return [
'different' => 'A(z) :attribute és :other értékei különbözőek kell, hogy legyenek!',
'digits' => 'A(z) :attribute :digits számjegyűnek kell lennie!',
'digits_between' => 'A(z) :attribute értéke :min és :max közötti számjegy lehet!',
'distinct' => 'The :attribute field has a duplicate value.',
'distinct' => 'A(z) :attribute értékének egyedinek kell lennie!',
'email' => 'A(z) :attribute nem érvényes email formátum.',
'exists' => 'A(z) :attribute már létezik.',
'filled' => 'A(z) :attribute megadása kötelező!',
'image' => 'A(z) :attribute képfájl kell, hogy legyen!',
'in' => 'A kiválasztott :attribute érvénytelen.',
'in_array' => 'The :attribute field does not exist in :other.',
'in_array' => 'A(z) :attribute értéke nem található a(z) :other értékek között.',
'integer' => 'A(z) :attribute értéke szám kell, hogy legyen!',
'ip' => 'A(z) :attribute érvényes IP cím kell, hogy legyen!',
'json' => 'The :attribute must be a valid JSON string.',
'json' => 'A(z) :attribute érvényes JSON szöveg kell, hogy legyen!',
'max' => [
'numeric' => 'A(z) :attribute értéke nem lehet nagyobb, mint :max!',
'file' => 'A(z) :attribute mérete nem lehet több, mint :max kilobájt.',
@@ -59,11 +59,11 @@ return [
],
'not_in' => 'A(z) :attribute értéke érvénytelen.',
'numeric' => 'A(z) :attribute szám kell, hogy legyen!',
'present' => 'The :attribute field must be present.',
'present' => 'A(z) :attribute mező nem található!',
'regex' => 'A(z) :attribute formátuma érvénytelen.',
'required' => 'A(z) :attribute megadása kötelező!',
'required_if' => 'A(z) :attribute megadása kötelező, ha a(z) :other értéke :value!',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_unless' => 'A(z) :attribute megadása kötelező, amíg a(z) :other értéke :values!',
'required_with' => 'A(z) :attribute megadása kötelező, ha a(z) :values érték létezik.',
'required_with_all' => 'A(z) :attribute megadása kötelező, ha a(z) :values értékek léteznek.',
'required_without' => 'A(z) :attribute megadása kötelező, ha a(z) :values érték nem létezik.',
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -91,7 +91,7 @@ return [
|
*/
'custom' => [
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
@@ -108,6 +108,6 @@ return [
|
*/
'attributes' => [],
'attributes' => [],
];
+128 -34
View File
@@ -1,50 +1,144 @@
<?php
/**
* Todo generator for Laravel-lang project.
*
* @author arcanedev-maroc
*/
class TodoGenerator
{
/**
* Base path.
*
* @var string
*/
protected $basePath;
// Get list of languages
$glob = scandir(__DIR__.'/..');
/**
* Excluded directories.
*
* @var array
*/
protected $excluded = [];
$languages = null;
/**
* Path of output file.
*
* @var string
*/
protected $output = null;
foreach ($glob as $file) {
if (is_dir(__DIR__.'/../'.$file) && (!in_array($file, ['.', '..', '.git', '.phpintel', 'en', 'script']))) {
$languages[] = $file;
/**
* Construct.
*
* @param string $basePath Base path.
* @param array $excluded Excluded directories.
*/
public function __construct($basePath, $excluded = [])
{
$this->basePath = realpath($basePath);
$this->excluded = $excluded;
$this->load();
}
}
// Get English version
$english = [
'auth' => include(__DIR__.'/../en/auth.php'),
'pagination' => include(__DIR__.'/../en/pagination.php'),
'passwords' => include(__DIR__.'/../en/passwords.php'),
'validation' => include(__DIR__.'/../en/validation.php'),
];
/**
* Returns object.
*
* @param string $basePath Base path.
* @param array $excluded Excluded directories.
*
* @return TodoGenerator
*/
public static function make($basePath, $excluded = [])
{
return new self($basePath, $excluded);
}
$text = "# Todo list\n\n";
/**
* Compare translations and generate file.
*/
private function load()
{
// Get English version
$english = $this->getTranslations(__DIR__.'/en');
$languages = $this->getLanguages();
// Return diff language by language
foreach ($languages as $language) {
$text .= "\n * ".$language.":\n";
$this->output = "# Todo list\n\n";
$this->compareTranslations($english, $languages);
}
$current = [
'auth' => include(__DIR__.'/../'.$language.'/auth.php'),
'pagination' => include(__DIR__.'/../'.$language.'/pagination.php'),
'passwords' => include(__DIR__.'/../'.$language.'/passwords.php'),
'validation' => include(__DIR__.'/../'.$language.'/validation.php'),
];
/**
* Returns array of translations by language.
*
* @param string $language Language code.
*
* @return array
*/
private function getTranslations($language)
{
return [
'auth' => include($language.'/auth.php'),
'pagination' => include($language.'/pagination.php'),
'passwords' => include($language.'/passwords.php'),
'validation' => include($language.'/validation.php'),
];
}
foreach ($english as $key => $values) {
foreach ($values as $key2 => $value2) {
if ($key2 != 'custom' && $key2 != 'attributes') {
if (!isset($current[$key][$key2])) {
$text .= ' * '.$key.' : '.$key2." : needed\n";
} elseif ($current[$key][$key2] == $english[$key][$key2]) {
$text .= ' * '.$key.' : '.$key2." : not translated\n";
/**
* Returns list of languages.
*
* @return array
*/
private function getLanguages()
{
$directories = glob($this->basePath.'/*', GLOB_ONLYDIR);
$languages = array_map(function ($dir) {
$name = basename($dir);
return in_array($name, $this->excluded) ? null : $name;
}, $directories);
return array_filter($languages);
}
/**
* Compare translations.
*
* @param array $default Language by default.
* @param array $languages Others languages.
*/
private function compareTranslations(array $default, array $languages)
{
// Return diff language by language
foreach ($languages as $language) {
$this->output .= "\n * ".$language.":\n";
$current = $this->getTranslations("{$this->basePath}/{$language}");
foreach ($default as $key => $values) {
foreach ($values as $key2 => $value2) {
if (in_array($key2, ['custom', 'attributes'])) {
continue;
}
if (!isset($current[$key][$key2])) {
$this->output .= ' * '.$key.' : '.$key2." : not present\n";
} elseif ($current[$key][$key2] == $default[$key][$key2]) {
$this->output .= ' * '.$key.' : '.$key2."\n";
}
}
}
}
}
/**
* Save todo list.
*
* @param string $path Path.
*/
public function save($path)
{
file_put_contents($path, $this->output);
}
}
$pathTodoMd = __DIR__.'/../todo.md';
file_put_contents($pathTodoMd, $text);
TodoGenerator::make(__DIR__.'/..', ['script'])->save(__DIR__.'/../todo.md');
+221 -226
View File
@@ -2,328 +2,323 @@
* ar:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* be:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* bg:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : present
* validation : required_unless
* bs:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* ca:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : present
* validation : required_unless
* cs:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : present
* validation : required_unless
* cy:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : string
* da:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* validation : timezone : not translated
* validation : distinct
* validation : in_array
* validation : present
* validation : required_unless
* validation : string
* validation : timezone
* de:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* el:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* es:
* fa:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : string
* fi:
* auth : failed : not translated
* auth : throttle : not translated
* validation : array : not translated
* validation : digits_between : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : regex : not translated
* validation : required_if : not translated
* validation : required_unless : not translated
* validation : required_with : not translated
* validation : required_with_all : not translated
* validation : required_without : not translated
* validation : required_without_all : not translated
* validation : string : not translated
* validation : timezone : not translated
* auth : failed
* auth : throttle
* validation : array
* validation : digits_between
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : regex
* validation : required_if
* validation : required_unless
* validation : required_with
* validation : required_with_all
* validation : required_without
* validation : required_without_all
* validation : string
* validation : timezone
* fr:
* gl:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* he:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* hr:
* validation : distinct : not translated
* validation : filled : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* validation : distinct
* validation : filled
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : string
* hu:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* id:
* is:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : required_with : not translated
* validation : required_with_all : not translated
* validation : required_without : not translated
* validation : required_without_all : not translated
* validation : string : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : required_with
* validation : required_with_all
* validation : required_without
* validation : required_without_all
* validation : string
* it:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : present
* validation : required_unless
* ja:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* ka:
* validation : in_array : not translated
* validation : in_array
* km:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : required_with_all : not translated
* validation : string : not translated
* validation : timezone : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : required_with_all
* validation : string
* validation : timezone
* ko:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : string
* lt:
* me:
* validation : timezone : not translated
* validation : timezone
* mk:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : required_with_all : not translated
* validation : required_without_all : not translated
* validation : string : not translated
* validation : timezone : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : required_with_all
* validation : required_without_all
* validation : string
* validation : timezone
* ms:
* validation : distinct : not translated
* validation : exists : not translated
* validation : in : not translated
* validation : in_array : not translated
* validation : not_in : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : exists
* validation : in
* validation : in_array
* validation : not_in
* validation : present
* validation : required_unless
* nb:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* ne:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : distinct
* validation : in_array
* validation : present
* nl:
* nn:
* pl:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : string
* pt:
* validation : in_array : not translated
* validation : in_array
* pt-BR:
* validation : in_array : not translated
* validation : in_array
* ro:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : present
* validation : required_unless
* ru:
* validation : in_array : not translated
* validation : in_array
* sc:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : string
* sk:
* sl:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : filled : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* validation : timezone : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : filled
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : string
* validation : timezone
* sq:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* sr:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* sv:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* th:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : present
* validation : required_unless
* tk:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : string
* tr:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* uk:
* validation : distinct : not translated
* validation : in_array : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : string : not translated
* validation : distinct
* validation : in_array
* validation : present
* validation : required_unless
* validation : string
* vi:
* auth : failed : not translated
* auth : throttle : not translated
* validation : distinct : not translated
* validation : in_array : not translated
* validation : json : not translated
* validation : present : not translated
* validation : required_unless : not translated
* validation : required_with_all : not translated
* validation : string : not translated
* auth : failed
* auth : throttle
* validation : distinct
* validation : in_array
* validation : json
* validation : present
* validation : required_unless
* validation : required_with_all
* validation : string
* zh-CN: