From 16b8f22be68ec34741184888d8c45894a67af7bd Mon Sep 17 00:00:00 2001 From: Javier Aranda Date: Tue, 22 Sep 2020 00:23:03 +0200 Subject: [PATCH] Add spanish license plates (#2103) --- lib/locales/es.yml | 56 ++++++++++++++++++++++++++++++++++++++++++ test/test_es_locale.rb | 2 ++ 2 files changed, 58 insertions(+) diff --git a/lib/locales/es.yml b/lib/locales/es.yml index 4651a23513..42bf987b74 100644 --- a/lib/locales/es.yml +++ b/lib/locales/es.yml @@ -92,3 +92,59 @@ es: payment_methods: ["Tarjeta de credito", "Tarjeta de débito", "Paypal", "Efectivo", "Transferencia de dinero", "Bitcoins", "Cheque", "Apple Pay", "Google Pay", "WeChat Pay", "Alipay", "Visa Checkout"] subscription_terms: ["Diaria", "Semanal", "Mensual", "Anual", "Bienal", "Trienal", "Quinquenal", "De por vida"] payment_terms: ["Pago por adelantado", "Mensual", "Anual", "Suscripción completa"] + + vehicle: + license_plate: '####[B-DF-HJ-NPR-TV-Z]{3}' + license_plate_by_state: + A: 'A####[A-PS-Z]{1,2}' + AB: 'AB####[A-PS-Z]{1,2}' + AL: 'AL####[A-PS-Z]{1,2}' + AV: 'AV####[A-PS-Z]{1,2}' + B: 'B####[A-PS-Z]{1,2}' + BA: 'BA####[A-PS-Z]{1,2}' + BI: 'BI####[A-PS-Z]{1,2}' + BU: 'BU####[A-PS-Z]{1,2}' + C: 'C####[A-PS-Z]{1,2}' + CA: 'CA####[A-PS-Z]{1,2}' + CC: 'CC####[A-PS-Z]{1,2}' + CS: 'CS####[A-PS-Z]{1,2}' + CE: 'CE####[A-PS-Z]{1,2}' + CO: 'CO####[A-PS-Z]{1,2}' + CR: 'CR####[A-PS-Z]{1,2}' + CU: 'CU####[A-PS-Z]{1,2}' + GC: 'GC####[A-PS-Z]{1,2}' + GI: 'GI####[A-PS-Z]{1,2}' + GR: 'GR####[A-PS-Z]{1,2}' + GU: 'GU####[A-PS-Z]{1,2}' + H: 'H####[A-PS-Z]{1,2}' + HU: 'HU####[A-PS-Z]{1,2}' + IB: 'IB####[A-PS-Z]{1,2}' + J: 'J####[A-PS-Z]{1,2}' + L: 'L####[A-PS-Z]{1,2}' + LE: 'LE####[A-PS-Z]{1,2}' + LO: 'LO####[A-PS-Z]{1,2}' + LU: 'LU####[A-PS-Z]{1,2}' + M: 'M####[A-PS-Z]{1,2}' + MA: 'MA####[A-PS-Z]{1,2}' + ML: 'ML####[A-PS-Z]{1,2}' + MU: 'MU####[A-PS-Z]{1,2}' + NA: 'NA####[A-PS-Z]{1,2}' + O: 'O####[A-PS-Z]{1,2}' + OU: 'OU####[A-PS-Z]{1,2}' + P: 'P####[A-PS-Z]{1,2}' + PO: 'PO####[A-PS-Z]{1,2}' + S: 'S####[A-PS-Z]{1,2}' + SA: 'SA####[A-PS-Z]{1,2}' + SE: 'SE####[A-PS-Z]{1,2}' + SG: 'SG####[A-PS-Z]{1,2}' + SO: 'SO####[A-PS-Z]{1,2}' + SS: 'SS####[A-PS-Z]{1,2}' + T: 'T####[A-PS-Z]{1,2}' + TE: 'TE####[A-PS-Z]{1,2}' + TF: 'TF####[A-PS-Z]{1,2}' + TO: 'TO####[A-PS-Z]{1,2}' + V: 'V####[A-PS-Z]{1,2}' + VA: 'VA####[A-PS-Z]{1,2}' + VI: 'VI####[A-PS-Z]{1,2}' + Z: 'Z####[A-PS-Z]{1,2}' + ZA: 'ZA####[A-PS-Z]{1,2}' diff --git a/test/test_es_locale.rb b/test/test_es_locale.rb index 0482d7e3d8..e9dbbf0f47 100644 --- a/test/test_es_locale.rb +++ b/test/test_es_locale.rb @@ -91,6 +91,8 @@ def test_es_name_methods def test_es_vehicle_methods assert Faker::Vehicle.license_plate.is_a? String + assert Faker::Vehicle.license_plate.match(/\d{4}[A-Z]{3}/) + assert Faker::Vehicle.license_plate(state_abbreviation: 'GR').match(/GR\d{4}[A-Z]{1,2}/) end def test_es_subscription_methods