Skip to content

Commit dea3d3c

Browse files
committed
remove error.signup.captcha_required which is not longer required
1 parent 1bd5650 commit dea3d3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+36
-66
lines changed

scripts/complete-translations.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const processLanguage = async lang => {
3434
console.log(`translating: ${lang}`);
3535
const langDictionary = require('../lib/i18n/' + lang).default;
3636
await processNode(enDictionary, langDictionary, lang);
37+
cleanNode(enDictionary, langDictionary);
3738
const communityAlert = `
3839
// This file was automatically translated.
3940
// Feel free to submit a PR if you find a more accurate translation.
@@ -63,6 +64,22 @@ const processNode = async (enNode, langNode, lang) => {
6364
}
6465
};
6566

67+
/**
68+
* delete deprecate translations that are not longer present in the english language
69+
*/
70+
const cleanNode = (enNode, langNode) => {
71+
for (let key of Object.keys(langNode)) {
72+
if (typeof langNode[key] === 'object') {
73+
cleanNode(enNode[key], langNode[key]);
74+
} else {
75+
if (typeof enNode[key] === 'undefined') {
76+
console.log('removing', key);
77+
delete langNode[key];
78+
}
79+
}
80+
}
81+
};
82+
6683
const translateKey = async (toTranslate, lang) => {
6784
if (lang == 'ua') {
6885
//Note: "ua" is not a valid language code, the actual lang code is uk-ua

src/core/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ export function setCaptcha(m, value, wasInvalid) {
418418
}
419419

420420
export function captcha(m) {
421+
//some tests send an string as model.
422+
// https://github.com/auth0/lock/blob/82f56187698528699478bd429858cf91e387763c/src/__tests__/engine/classic/sign_up_pane.test.jsx#L28
423+
if (typeof m !== 'object') { return; }
421424
return get(m, 'captcha');
422425
}
423426

src/i18n/af.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export default {
4545
password_strength_error: 'Wagwoord is swak.',
4646
user_exists: 'Gebruiker bestaan reeds.',
4747
username_exists: 'Gebruikersnaam bestaan reeds.',
48-
captcha_required: 'Voer die kode hieronder in om aan te sluit.',
4948
social_signup_needs_terms_acception:
5049
'Gee toestemming tot die onderstaande diensbepalings om voort te gaan.'
5150
}

src/i18n/ar.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export default {
4949
password_strength_error: 'كلمة المرور ضعيفة جداً.',
5050
user_exists: 'المستخدم موجود بالفعل.',
5151
username_exists: 'اسم المستخدم موجود بالفعل.',
52-
captcha_required: 'أدخل الرمز الموضح أدناه لإنهاء الاشتراك.',
5352
social_signup_needs_terms_acception: 'يرجى الموافقة على شروط الخدمة أدناه للمتابعة.'
5453
}
5554
},

src/i18n/az.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export default {
5050
password_strength_error: 'Şifrə çox sadədir.',
5151
user_exists: 'Bu istifadəçi artıq mövcuddur.',
5252
username_exists: 'Bu istifadəçi adı istifadə olunur.',
53-
captcha_required: 'Qeydiyyatı başa çatdırmaq üçün aşağıda göstərilən kodu daxil edin.',
5453
social_signup_needs_terms_acception:
5554
'Xahiş edirik davam etmək üçün aşağıda göstərilən Xidmət şərtlərinə razılıq verin.'
5655
}

src/i18n/bg.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export default {
5353
password_strength_error: 'Паролата е много несигурна.',
5454
user_exists: 'Този профил вече съществува.',
5555
username_exists: 'Това потребителско име вече съществува.',
56-
captcha_required: 'Въведете кода, показан по-долу, за да завършите регистрацията.',
5756
social_signup_needs_terms_acception:
5857
'Моля, приемете Общите условия по-долу, за да продължите.'
5958
}

src/i18n/ca.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ export default {
5252
password_strength_error: 'La contrasenya és massa feble.',
5353
user_exists: 'Ja existeix aquest usuari.',
5454
username_exists: "Ja existeix aquest nom d'usuari.",
55-
captcha_required:
56-
'Introduïu el codi que es mostra a continuació per finalitzar la inscripció.',
5755
social_signup_needs_terms_acception: 'Per continuar, accepteu les Condicions del servei.'
5856
}
5957
},

src/i18n/cs.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export default {
5050
password_strength_error: 'Heslo je příliš slabé.',
5151
user_exists: 'Uživatel už existuje.',
5252
username_exists: 'Uživatelské jméno už existuje.',
53-
captcha_required: 'Chcete-li dokončit registraci, zadejte níže uvedený kód.',
5453
social_signup_needs_terms_acception:
5554
'Pokračujte prosím souhlasem s níže uvedenými smluvními podmínkami.'
5655
}

src/i18n/da.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ export default {
5151
user_exists: 'Denne bruger eksisterer allerede.',
5252
username_exists: 'Dette brugernavn eksisterer allerede.',
5353
social_signup_needs_terms_acception:
54-
'Du accepterer servicevilkårene nedenfor for at fortsætte.',
55-
captcha_required: 'Indtast nedenstående kode for at afslutte tilmeldingen.'
54+
'Du accepterer servicevilkårene nedenfor for at fortsætte.'
5655
}
5756
},
5857
success: {

src/i18n/de.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ export default {
5454
user_exists: 'Der Nutzer existiert bereits.',
5555
username_exists: 'Der Nutzername wird bereits verwendet.',
5656
social_signup_needs_terms_acception:
57-
'Bitte stimmen Sie den untenstehenden Nutzungsbedingungen zu, um fortzufahren.',
58-
captcha_required: 'Geben Sie den unten gezeigten Code ein, um die Anmeldung abzuschließen.'
57+
'Bitte stimmen Sie den untenstehenden Nutzungsbedingungen zu, um fortzufahren.'
5958
}
6059
},
6160
success: {

0 commit comments

Comments
 (0)