Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

French: added translated color for french language #466

Merged
merged 13 commits into from
Jun 9, 2022
2 changes: 1 addition & 1 deletion src/Faker/Calculator/Isbn.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function checksum(string $input): string
$digits = str_split($input);
array_walk(
$digits,
static function (&$digit, $position) {
static function (& $digit, $position) {
RSickenberg marked this conversation as resolved.
Show resolved Hide resolved
RSickenberg marked this conversation as resolved.
Show resolved Hide resolved
RSickenberg marked this conversation as resolved.
Show resolved Hide resolved
$digit = (10 - $position) * $digit;
}
);
Expand Down
7 changes: 7 additions & 0 deletions src/Faker/Provider/fr_BE/Color.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Faker\Provider\fr_BE;

class Color extends \Faker\Provider\fr_FR\Color
{
}
7 changes: 7 additions & 0 deletions src/Faker/Provider/fr_CA/Color.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Faker\Provider\fr_CA;

class Color extends \Faker\Provider\fr_FR\Color
{
}
7 changes: 7 additions & 0 deletions src/Faker/Provider/fr_CH/Color.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Faker\Provider\fr_CH;

class Color extends \Faker\Provider\fr_FR\Color
{
}
40 changes: 40 additions & 0 deletions src/Faker/Provider/fr_FR/Color.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

namespace Faker\Provider\fr_FR;

class Color extends \Faker\Provider\Color
{
protected static $safeColorNames = [
'noir', 'maron', 'vert', 'marine', 'olive',
RSickenberg marked this conversation as resolved.
Show resolved Hide resolved
'violet', 'turquoise', 'citron', 'bleu',
'argenté', 'gris', 'jaune', 'fuchsia', 'blanc',
];

/**
* @source: https://fr.wikipedia.org/wiki/Liste_de_noms_de_couleur#Liste
*/
protected static $allColorNames = [
'Abricot', 'Acajou', 'Aigue-marine', 'Amande', 'Amarante', 'Ambre', 'Améthyste', 'Anthracite', 'Argent', 'Aubergine',
'Aurore', 'Avocat', 'Azur', 'Basané', 'Beurre', 'Bis', 'Bisque', 'Bistre', 'Bitume', 'Blanc cassé', 'Blanc lunaire',
'Blé', 'Bleu acier', 'Bleu barbeau', 'Bleu canard', 'Bleu céleste', 'Bleu charrette', 'Bleu ciel', 'Bleu de cobalt',
'Bleu de Prusse', 'Bleu électrique', 'Bleu givré', 'Bleu marine', 'Bleu nuit', 'Bleu outremer', 'Bleu paon', 'Bleu persan',
'Bleu pétrole', 'Bleu roi', 'Bleu turquin', "Bouton d'or", 'Brique', 'Bronze', 'Brou de noix', "Caca d'oie", 'Cacao',
'Cachou', 'Cæruleum', 'Café', 'Café au lait', 'Cannelle', 'Capucine', 'Caramel', 'Carmin', 'Carotte', 'Chamois', 'Chartreuse',
'Chaudron', 'Chocolat', 'Cinabre', 'Citrouille', "Coquille d'œuf", 'Corail', 'Cramoisi', 'Cuisse de nymphe', 'Cuivre',
'Cyan', 'Écarlate', 'Écru', 'Émeraude', 'Fauve', 'Flave', 'Fraise', 'Fraise écrasée', 'Framboise', 'Fuchsia', 'Fumée',
'Garance (pigment)', 'Glauque', 'Glycine', 'Grège', 'Grenadine', 'Grenat', 'Gris acier', 'Gris de Payne', 'Gris fer',
'Gris perle', 'Gris souris', 'Groseille', 'Gueules', 'Héliotrope', 'Incarnat', 'Indigo', 'Indigo', 'Isabelle',
'Jaune canari', 'Jaune citron', "Jaune d'or", 'Jaune de cobalt', 'Jaune de Mars', 'Jaune de Naples', 'Jaune impérial',
'Jaune mimosa', 'Lapis-lazuli', 'Lavallière', 'Lavande', 'Lie de vin', 'Lilas', 'Lime ou vert citron', 'Lin', 'Magenta',
'Maïs', 'Malachite', 'Mandarine', 'Marron', 'Mastic', 'Mauve', 'Menthe', 'Moutarde', 'Nacarat', 'Nankin', 'Noisette',
'Ocre', 'Ocre rouge', 'Olive', 'Or (couleur)', 'Orange brûlé', 'Orchidée', 'Orpiment (pigment)', 'Paille', 'Parme', "Pelure d'oignon",
'Pervenche', 'Pistache', 'Poil de chameau', 'Ponceau', 'Pourpre (héraldique)', 'Prasin', 'Prune', 'Puce', 'Rose Mountbatten',
'Rouge anglais', 'Rouge cardinal', 'Rouge cerise', "Rouge d'Andrinople", 'Rouge de Falun', 'Rouge feu', 'Rouge indien', 'Rouge tomette', 'Rouille',
'Rubis', 'Sable', 'Sable (héraldique)', 'Safre', 'Sang de bœuf', 'Sanguine', 'Saphir', 'Sarcelle', 'Saumon', 'Sépia',
'Sinople', 'Smalt', 'Soufre', 'Tabac', "Terre d'ombre", 'Tomate', 'Topaze', 'Tourterelle', 'Turquoise', 'Vanille',
'Vermeil', 'Vermillon', 'Vert bouteille', 'Vert céladon', "Vert d'eau", 'Vert de chrome', 'Vert-de-gris', 'Vert de Hooker',
'Vert de vessie', 'Vert épinard', 'Vert impérial', 'Vert lichen', 'Vert olive', 'Vert perroquet', 'Vert poireau',
'Vert pomme', 'Vert prairie', 'Vert printemps', 'Vert sapin', 'Vert sauge', 'Vert tilleul', 'Vert Véronèse',
'Violet', "Violet d'évêque", 'Viride', 'Zinzolin',
];
}
2 changes: 1 addition & 1 deletion src/Faker/UniqueGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class UniqueGenerator
* @param int $maxRetries
* @param array<string, array<string, null>> $uniques
*/
public function __construct($generator, $maxRetries = 10000, &$uniques = [])
public function __construct($generator, $maxRetries = 10000, & $uniques = [])
RSickenberg marked this conversation as resolved.
Show resolved Hide resolved
RSickenberg marked this conversation as resolved.
Show resolved Hide resolved
RSickenberg marked this conversation as resolved.
Show resolved Hide resolved
{
$this->generator = $generator;
$this->maxRetries = $maxRetries;
Expand Down