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

Add spanish license plates #2103

Merged
merged 1 commit into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions lib/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
2 changes: 2 additions & 0 deletions test/test_es_locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down