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

refactor(locale): normalize finance data #2915

Merged
merged 3 commits into from
May 25, 2024
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
1 change: 0 additions & 1 deletion scripts/generate-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ async function normalizeLocaleFile(filePath: string, definitionKey: string) {

const legacyDefinitions = ['app', 'cell_phone', 'team'];
const definitionsToSkip = [
'finance',
'internet',
'location',
'lorem',
Expand Down
2 changes: 1 addition & 1 deletion src/locales/el/finance/account_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['Καταθετικός', 'Μισθοδοσίας', 'Δανειακός'];
export default ['Δανειακός', 'Καταθετικός', 'Μισθοδοσίας'];
6 changes: 3 additions & 3 deletions src/locales/el/finance/credit_card/discover.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default [
'/6011-####-####-###L/',
'/65##-####-####-###L/',
'/64[4-9]#-####-####-###L/',
'/6011-62##-####-####-###L/',
'/65##-62##-####-####-###L/',
'/64[4-9]#-####-####-###L/',
'/64[4-9]#-62##-####-####-###L/',
'/65##-####-####-###L/',
'/65##-62##-####-####-###L/',
];
2 changes: 1 addition & 1 deletion src/locales/el/finance/credit_card/mastercard.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['5[1-5]##-####-####-###L', '2[221-720]-####-####-###L'];
export default ['2[221-720]-####-####-###L', '5[1-5]##-####-####-###L'];
2 changes: 1 addition & 1 deletion src/locales/el/finance/transaction_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['κατάθεση', 'ανάληψη', 'πληρωμή', 'τιμολόγιο'];
export default ['ανάληψη', 'κατάθεση', 'πληρωμή', 'τιμολόγιο'];
10 changes: 5 additions & 5 deletions src/locales/en/finance/account_type.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default [
'Auto Loan',
'Checking',
'Savings',
'Money Market',
'Investment',
'Home Loan',
'Credit Card',
'Auto Loan',
'Home Loan',
'Investment',
'Money Market',
'Personal Loan',
'Savings',
];
6 changes: 3 additions & 3 deletions src/locales/en/finance/credit_card/discover.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default [
'6011-####-####-###L',
'65##-####-####-###L',
'64[4-9]#-####-####-###L',
'6011-62##-####-####-###L',
'65##-62##-####-####-###L',
'64[4-9]#-####-####-###L',
'64[4-9]#-62##-####-####-###L',
'65##-####-####-###L',
'65##-62##-####-####-###L',
];
2 changes: 1 addition & 1 deletion src/locales/en/finance/credit_card/mastercard.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['5[1-5]##-####-####-###L', '2[221-720]-####-####-###L'];
export default ['2[221-720]-####-####-###L', '5[1-5]##-####-####-###L'];
2 changes: 1 addition & 1 deletion src/locales/en/finance/transaction_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['deposit', 'withdrawal', 'payment', 'invoice'];
export default ['deposit', 'invoice', 'payment', 'withdrawal'];
6 changes: 3 additions & 3 deletions src/locales/fa/finance/account_type.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default [
'پس انداز',
'سرمایه گذاری',
'وام مسکن',
'کارت اعتباری',
'وام خودرو',
'وام شخصی',
'وام مسکن',
'پس انداز',
'کارت اعتباری',
];
2 changes: 1 addition & 1 deletion src/locales/fa/finance/credit_card/mastercard.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['5[1-5]##-####-####-###L', '2[221-720]-####-####-###L'];
export default ['2[221-720]-####-####-###L', '5[1-5]##-####-####-###L'];
2 changes: 1 addition & 1 deletion src/locales/fa/finance/transaction_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['سپرده', 'برداشت از حساب', 'پرداخت', 'صورتحساب'];
export default ['برداشت از حساب', 'سپرده', 'صورتحساب', 'پرداخت'];
4 changes: 2 additions & 2 deletions src/locales/fr/finance/account_type.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default [
'Carte de crédit',
'Chèque',
'Epargne',
'Marché monétaire',
'Investissement',
'Marché monétaire',
'Prêt immobilier',
'Carte de crédit',
'Prêt personnel',
];
2 changes: 1 addition & 1 deletion src/locales/fr/finance/transaction_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['dépôt', 'retrait', 'paiement', 'facture'];
export default ['dépôt', 'facture', 'paiement', 'retrait'];
8 changes: 4 additions & 4 deletions src/locales/hu/finance/account_type.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default [
'Befektetés',
'Fizetési',
'Gépjármű kölcsön',
'Hitelkártya',
'Lakáshitel',
'Megtakaritás',
'Money Market',
'Befektetés',
'Lakáshitel',
'Hitelkártya',
'Gépjármű kölcsön',
'Személyi kölcsön',
];
2 changes: 1 addition & 1 deletion src/locales/hu/finance/transaction_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['pénzbefizetés', 'pénzfelvétel', 'fizetés', 'számlázás'];
export default ['fizetés', 'pénzbefizetés', 'pénzfelvétel', 'számlázás'];
2 changes: 1 addition & 1 deletion src/locales/ur/finance/account_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['Savings', 'Current'];
export default ['Current', 'Savings'];
2 changes: 1 addition & 1 deletion src/locales/ur/finance/transaction_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['deposit', 'withdrawal', 'payment', 'invoice'];
export default ['deposit', 'invoice', 'payment', 'withdrawal'];
10 changes: 5 additions & 5 deletions src/locales/zh_CN/finance/account_type.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default [
'支票',
'个人贷款',
'信用卡',
'储蓄',
'货币市场',
'投资',
'房屋贷款',
'信用卡',
'投资',
'支票',
'汽车贷款',
'个人贷款',
'货币市场',
];
2 changes: 1 addition & 1 deletion src/locales/zh_CN/finance/credit_card/mastercard.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['5[1-5]##-####-####-###L', '2[221-720]-####-####-###L'];
export default ['2[221-720]-####-####-###L', '5[1-5]##-####-####-###L'];
6 changes: 3 additions & 3 deletions src/locales/zh_CN/finance/credit_card/unionpay.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default [
'62#############L',
'67#############L',
'81#############L',
'81##############L',
'81###############L',
'81################L',
'81###############L',
'81##############L',
'81#############L',
];
2 changes: 1 addition & 1 deletion src/locales/zh_CN/finance/transaction_type.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['存款', '取款', '支付', '开票'];
export default ['取款', '存款', '开票', '支付'];
22 changes: 11 additions & 11 deletions test/modules/__snapshots__/finance.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`finance > 42 > accountName 1`] = `"Money Market Account"`;
exports[`finance > 42 > accountName 1`] = `"Credit Card Account"`;

exports[`finance > 42 > accountNumber > noArgs 1`] = `"39751108"`;

Expand Down Expand Up @@ -30,11 +30,11 @@ exports[`finance > 42 > creditCardCVV 1`] = `"397"`;

exports[`finance > 42 > creditCardIssuer 1`] = `"discover"`;

exports[`finance > 42 > creditCardNumber > noArgs 1`] = `"6485-6211-0867-0982-1138"`;
exports[`finance > 42 > creditCardNumber > noArgs 1`] = `"6575-6211-0867-0982-1139"`;

exports[`finance > 42 > creditCardNumber > with issuer 1`] = `"4975110867099"`;

exports[`finance > 42 > creditCardNumber > with issuer option mastercard 1`] = `"5575-1108-6709-8213"`;
exports[`finance > 42 > creditCardNumber > with issuer option mastercard 1`] = `"2696-7511-0867-0988"`;

exports[`finance > 42 > creditCardNumber > with issuer option visa 1`] = `"4975110867099"`;

Expand Down Expand Up @@ -82,9 +82,9 @@ exports[`finance > 42 > routingNumber 1`] = `"397511082"`;

exports[`finance > 42 > transactionDescription 1`] = `"deposit transaction at Reynolds, Miller and Crist using card ending with ***(...1135) for KES 374.54 in account ***08670982"`;

exports[`finance > 42 > transactionType 1`] = `"withdrawal"`;
exports[`finance > 42 > transactionType 1`] = `"invoice"`;

exports[`finance > 1211 > accountName 1`] = `"Personal Loan Account"`;
exports[`finance > 1211 > accountName 1`] = `"Savings Account"`;

exports[`finance > 1211 > accountNumber > noArgs 1`] = `"98296673"`;

Expand Down Expand Up @@ -118,7 +118,7 @@ exports[`finance > 1211 > creditCardNumber > noArgs 1`] = `"4296-6736-8768-4885"

exports[`finance > 1211 > creditCardNumber > with issuer 1`] = `"4829-6673-6876-8484"`;

exports[`finance > 1211 > creditCardNumber > with issuer option mastercard 1`] = `"2667-2966-7368-7681"`;
exports[`finance > 1211 > creditCardNumber > with issuer option mastercard 1`] = `"5529-6673-6876-8484"`;

exports[`finance > 1211 > creditCardNumber > with issuer option visa 1`] = `"4829-6673-6876-8484"`;

Expand Down Expand Up @@ -166,9 +166,9 @@ exports[`finance > 1211 > routingNumber 1`] = `"982966738"`;

exports[`finance > 1211 > transactionDescription 1`] = `"payment transaction at Fahey, Zieme and Osinski using card ending with ***(...8825) for CRC 928.52 in account ***73687684"`;

exports[`finance > 1211 > transactionType 1`] = `"invoice"`;
exports[`finance > 1211 > transactionType 1`] = `"withdrawal"`;

exports[`finance > 1337 > accountName 1`] = `"Money Market Account"`;
exports[`finance > 1337 > accountName 1`] = `"Credit Card Account"`;

exports[`finance > 1337 > accountNumber > noArgs 1`] = `"21243529"`;

Expand Down Expand Up @@ -202,7 +202,7 @@ exports[`finance > 1337 > creditCardNumber > noArgs 1`] = `"3014-352971-3614"`;

exports[`finance > 1337 > creditCardNumber > with issuer 1`] = `"4124352971364"`;

exports[`finance > 1337 > creditCardNumber > with issuer option mastercard 1`] = `"5124-3529-7136-1949"`;
exports[`finance > 1337 > creditCardNumber > with issuer option mastercard 1`] = `"2300-2435-2971-3611"`;

exports[`finance > 1337 > creditCardNumber > with issuer option visa 1`] = `"4124352971364"`;

Expand Down Expand Up @@ -248,6 +248,6 @@ exports[`finance > 1337 > pin > with length option 1`] = `"2124352971"`;

exports[`finance > 1337 > routingNumber 1`] = `"212435298"`;

exports[`finance > 1337 > transactionDescription 1`] = `"withdrawal transaction at Gottlieb - Koelpin using card ending with ***(...9477) for HUF 262.02 in account ***52971361"`;
exports[`finance > 1337 > transactionDescription 1`] = `"invoice transaction at Gottlieb - Koelpin using card ending with ***(...9477) for HUF 262.02 in account ***52971361"`;

exports[`finance > 1337 > transactionType 1`] = `"withdrawal"`;
exports[`finance > 1337 > transactionType 1`] = `"invoice"`;