fix: naming scheme for messages in translation files (#40642)

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
This commit is contained in:
Tom
2021-01-08 10:40:31 -06:00
committed by Mrugesh Mohapatra
parent b0aaff19dc
commit 14ca6beb0a
18 changed files with 272 additions and 273 deletions

View File

@ -180,10 +180,7 @@ function createGetPasswordlessAuth(app) {
// update user and log them in // update user and log them in
.map(user => user.loginByRequest(req, res)) .map(user => user.loginByRequest(req, res))
.do(() => { .do(() => {
req.flash( req.flash('success', 'flash.signin-success');
'success',
'Success! You have signed in to your account. Happy Coding!'
);
return res.redirectWithFlash(`${origin}/learn`); return res.redirectWithFlash(`${origin}/learn`);
}) })
.subscribe(() => {}, next) .subscribe(() => {}, next)

View File

@ -283,7 +283,7 @@ function createVerifyCert(certTypeIds, app) {
if (user[certType]) { if (user[certType]) {
return Observable.just({ return Observable.just({
type: 'info', type: 'info',
message: 'flash.msg-27', message: 'flash.already-claimed',
variables: { name: certName } variables: { name: certName }
}); });
} }
@ -294,7 +294,7 @@ function createVerifyCert(certTypeIds, app) {
reportError(`Error claiming ${certName}`); reportError(`Error claiming ${certName}`);
return Observable.just({ return Observable.just({
type: 'danger', type: 'danger',
message: 'flash.msg-29', message: 'flash.wrong-name',
variables: { name: certName } variables: { name: certName }
}); });
} }
@ -303,7 +303,7 @@ function createVerifyCert(certTypeIds, app) {
if (!canClaim(tests, user.completedChallenges)) { if (!canClaim(tests, user.completedChallenges)) {
return Observable.just({ return Observable.just({
type: 'info', type: 'info',
message: 'flash.msg-26', message: 'flash.incomplete-steps',
variables: { name: certName } variables: { name: certName }
}); });
} }
@ -323,7 +323,7 @@ function createVerifyCert(certTypeIds, app) {
if (!user.name) { if (!user.name) {
return Observable.just({ return Observable.just({
type: 'info', type: 'info',
message: 'flash.msg-25' message: 'flash.name-needed'
}); });
} }
// set here so sendCertifiedEmail works properly // set here so sendCertifiedEmail works properly
@ -351,7 +351,7 @@ function createVerifyCert(certTypeIds, app) {
log('Certificates updated'); log('Certificates updated');
return { return {
type: 'success', type: 'success',
message: 'flash.msg-28', message: 'flash.cert-claim-success',
variables: { variables: {
username: user.username, username: user.username,
name: certName name: certName
@ -417,7 +417,7 @@ function createShowCert(app) {
messages: [ messages: [
{ {
type: 'info', type: 'info',
message: 'flash.msg-31', message: 'flash.username-not-found',
variables: { username: username } variables: { username: username }
} }
] ]
@ -430,7 +430,7 @@ function createShowCert(app) {
messages: [ messages: [
{ {
type: 'info', type: 'info',
message: 'flash.msg-32' message: 'flash.add-name'
} }
] ]
}); });
@ -441,7 +441,7 @@ function createShowCert(app) {
messages: [ messages: [
{ {
type: 'info', type: 'info',
message: 'flash.msg-33' message: 'flash.not-eligible'
} }
] ]
}); });
@ -452,7 +452,7 @@ function createShowCert(app) {
messages: [ messages: [
{ {
type: 'info', type: 'info',
message: 'flash.msg-34', message: 'flash.profile-private',
variables: { username: username } variables: { username: username }
} }
] ]
@ -464,7 +464,7 @@ function createShowCert(app) {
messages: [ messages: [
{ {
type: 'info', type: 'info',
message: 'flash.msg-35', message: 'flash.certs-private',
variables: { username: username } variables: { username: username }
} }
] ]
@ -476,7 +476,7 @@ function createShowCert(app) {
messages: [ messages: [
{ {
type: 'info', type: 'info',
message: 'flash.msg-36', message: 'flash.not-honest',
variables: { username: username } variables: { username: username }
} }
] ]
@ -524,7 +524,7 @@ function createShowCert(app) {
messages: [ messages: [
{ {
type: 'info', type: 'info',
message: 'flash.msg-37', message: 'flash.user-not-certified',
variables: { username: username, cert: certText[certType] } variables: { username: username, cert: certText[certType] }
} }
] ]

View File

@ -53,12 +53,12 @@ export default function settingsController(app) {
const standardErrorMessage = { const standardErrorMessage = {
type: 'danger', type: 'danger',
message: 'flash.msg-9' message: 'flash.wrong-updating'
}; };
const standardSuccessMessage = { const standardSuccessMessage = {
type: 'success', type: 'success',
message: 'flash.msg-10' message: 'flash.updated-preferences'
}; };
const createStandardHandler = (req, res, next) => err => { const createStandardHandler = (req, res, next) => err => {
@ -195,7 +195,7 @@ function createUpdateMyUsername(app) {
if (username === user.username) { if (username === user.username) {
return res.json({ return res.json({
type: 'info', type: 'info',
message: 'flash.msg-16' message: 'flash.username-used'
}); });
} }
const validation = isValidUsername(username); const validation = isValidUsername(username);
@ -212,7 +212,7 @@ function createUpdateMyUsername(app) {
if (exists) { if (exists) {
return res.json({ return res.json({
type: 'info', type: 'info',
message: 'flash.msg-17' message: 'flash.username-taken'
}); });
} }
@ -224,7 +224,7 @@ function createUpdateMyUsername(app) {
return res.status(200).json({ return res.status(200).json({
type: 'success', type: 'success',
message: `flash.msg-18`, message: `flash.username-updated`,
variables: { username: username } variables: { username: username }
}); });
}); });

View File

@ -216,7 +216,7 @@ function createPostReportUserProfile(app) {
if (!username || !report || report === '') { if (!username || !report || report === '') {
return res.json({ return res.json({
type: 'danger', type: 'danger',
message: 'flash.msg-44' message: 'flash.provide-username'
}); });
} }
return Email.send$( return Email.send$(
@ -247,7 +247,7 @@ function createPostReportUserProfile(app) {
return res.json({ return res.json({
type: 'info', type: 'info',
message: 'flash.msg-45', message: 'flash.report-sent',
variables: { email: user.email } variables: { email: user.email }
}); });
} }

View File

@ -118,12 +118,7 @@ export const createPassportCallbackAuthenticator = (strategy, config) => (
const { provider } = config; const { provider } = config;
if (accessToken && accessToken.id) { if (accessToken && accessToken.id) {
if (provider === 'auth0') { if (provider === 'auth0') {
req.flash( req.flash('success', 'flash.signin-success');
'success',
dedent`
Success! You have signed in to your account. Happy Coding!
`
);
} else if (user.email) { } else if (user.email) {
req.flash( req.flash(
'info', 'info',

View File

@ -414,63 +414,63 @@
"last-page": "访问最后一页" "last-page": "访问最后一页"
}, },
"flash": { "flash": {
"msg-1": "申请认证之前,你必须先接受我们的《学术诚信条例》", "honest-first": "申请认证之前,你必须先接受我们的《学术诚信条例》",
"msg-2": "出现了一些奇怪的情况。如果再出现这种情况,请考虑在 https://github.com/freeCodeCamp/freeCodeCamp/issues/new 提 issue", "really-weird": "出现了一些奇怪的情况。如果再出现这种情况,请考虑在 https://github.com/freeCodeCamp/freeCodeCamp/issues/new 提 issue",
"msg-3": "有些不对劲。已生成报告,通知 freeCodeCamp.org 团队。", "not-right": "有些不对劲。已生成报告,通知 freeCodeCamp.org 团队。",
"msg-4": "出了点问题,请检查并重试。", "went-wrong": "出了点问题,请检查并重试。",
"msg-5": "你的账号已被成功删除", "account-deleted": "你的账号已被成功删除",
"msg-6": "你的进度已被重置", "progress-reset": "你的进度已被重置",
"msg-7": "你无权继续访问", "not-authorized": "你无权继续访问",
"msg-8": "我们未找到你搜索的信息。请检查并重试。", "could-not-find": "我们未找到你搜索的信息。请检查并重试。",
"msg-9": "更新你的账号出了点问题。请检查并重试。", "wrong-updating": "更新你的账号出了点问题。请检查并重试。",
"msg-10": "我们已更新你的偏好设置。", "updated-preferences": "我们已更新你的偏好设置。",
"msg-11": "邮箱格式无效", "email-invalid": "邮箱格式无效",
"msg-12": "currentChallengeId 是无效的挑战 ID", "bad-challengeId": "currentChallengeId 是无效的挑战 ID",
"msg-13": "主题无效", "theme-invalid": "主题无效",
"msg-14": "主题已设置", "theme-set": "主题已设置",
"msg-15": "你的主题已更新!", "theme-updated": "你的主题已更新!",
"msg-16": "用户名已和此账号关联", "username-used": "用户名已和此账号关联",
"msg-17": "用户名已和别的账号关联", "username-taken": "用户名已和别的账号关联",
"msg-18": "我们已更新你的用户名为 {{username}}", "username-updated": "我们已更新你的用户名为 {{username}}",
"msg-19": "你的账号未退出,请稍后重试。", "could-not-logout": "你的账号未退出,请稍后重试。",
"msg-20": "链接中的邮箱格式不正确", "email-encoded-wrong": "链接中的邮箱格式不正确",
"msg-21": "有点不对劲。请刷新链接再登录/注册", "oops-not-right": "有点不对劲。请刷新链接再登录/注册",
"msg-22": "你点击的链接似乎已过期,请刷新链接再登录", "expired-link": "你点击的链接似乎已过期,请刷新链接再登录",
"msg-23": "成功了!你已经登录账号。", "signin-success": "成功了!你已经登录账号。",
"msg-24": "鉴于隐私原因,我们已取消社交账号授权。我们建议你下次使用邮箱:{{email}} 登录。", "social-auth-gone": "鉴于隐私原因,我们已取消社交账号授权。我们建议你下次使用邮箱:{{email}} 登录。",
"msg-25": "我们需要将你的名字放在认证证书上。在你的账号设置中添加名字,点击保存按钮。然后我们会给你发布认证。", "name-needed": "我们需要将你的名字放在认证证书上。在你的账号设置中添加名字,点击保存按钮。然后我们会给你发布认证。",
"msg-26": "你似乎未完成必要的步骤。请完成必做项目以申请 {{name}} 认证。", "incomplete-steps": "你似乎未完成必要的步骤。请完成必做项目以申请 {{name}} 认证。",
"msg-27": "你似乎已申请 {{name}} 认证", "already-claimed": "你似乎已申请 {{name}} 认证",
"msg-28": "@{{username}},你已成功申请 {{name}} 认证!代表 freeCodeCamp.org 团队恭喜你!", "cert-claim-success": "@{{username}},你已成功申请 {{name}} 认证!代表 freeCodeCamp.org 团队恭喜你!",
"msg-29": "{{name}} 验证有点问题,请重试。如果你继续收到这个错误提示,你可以发邮件至 support@freeCodeCamp.org获得帮助", "wrong-name": "{{name}} 验证有点问题,请重试。如果你继续收到这个错误提示,你可以发邮件至 support@freeCodeCamp.org获得帮助",
"msg-30": "申请 {{certName}} 认证出错", "error-claiming": "申请 {{certName}} 认证出错",
"msg-31": "我们未找到用户名为 \"{{username}}\" 的用户", "username-not-found": "我们未找到用户名为 \"{{username}}\" 的用户",
"msg-32": "这个用户需要在账号中添加名字,以便其他人查看该用户的认证。", "add-name": "这个用户需要在账号中添加名字,以便其他人查看该用户的认证。",
"msg-33": "这个用户目前不符合 freeCodeCamp.org 认证的条件。", "not-eligible": "这个用户目前不符合 freeCodeCamp.org 认证的条件。",
"msg-34": "{{username}} 已将其作品集设置为仅自己可见。用户需要将作品集设置为公开,其他人才能查看该用户的认证。", "profile-private": "{{username}} 已将其作品集设置为仅自己可见。用户需要将作品集设置为公开,其他人才能查看该用户的认证。",
"msg-35": "{{username}} 已将其作品集设置为仅自己可见。用户需要将认证设置为公开,其他人才能查看该用户的认证。", "certs-private": "{{username}} 已将其作品集设置为仅自己可见。用户需要将认证设置为公开,其他人才能查看该用户的认证。",
"msg-36": "{{username}} 未接受我们的《学术诚信条例》。", "not-honest": "{{username}} 未接受我们的《学术诚信条例》。",
"msg-37": "用户 {{username}} 似乎未获得 {{cert}} 认证", "user-not-certified": "用户 {{username}} 似乎未获得 {{cert}} 认证",
"msg-38": "这似乎不是一个有效的提交", "invalid-challenge": "这似乎不是一个有效的提交",
"msg-39": "你未提供有效链接,我们无法检查你的作品。", "no-links-provided": "你未提供有效链接,我们无法检查你的作品。",
"msg-40": "未发现社交账号", "no-social": "未发现社交账号",
"msg-41": "无效的社交账号", "invalid-social": "无效的社交账号",
"msg-42": "未链接 {{website}} 账号", "no-account": "未链接 {{website}} 账号",
"msg-43": "你已成功取消 {{website}} 链接", "unlink-success": "你已成功取消 {{website}} 链接",
"msg-44": "检查你是否提供用户名和报告", "provide-username": "检查你是否提供用户名和报告",
"msg-45": "已通过 {{email}} 向团队发送副本报告" "report-sent": "已通过 {{email}} 向团队发送副本报告"
}, },
"validation": { "validation": {
"msg-1": "字符数最多为 288 characters你还可以输入 {{charsLeft}} 个字符", "max-characters": "字符数最多为 288 characters你还可以输入 {{charsLeft}} 个字符",
"msg-2": "这个邮箱和你当前邮箱一样", "same-email": "这个邮箱和你当前邮箱一样",
"msg-3": "我们无法验证你的邮箱,请确保填写正确", "invalid-email": "我们无法验证你的邮箱,请确保填写正确",
"msg-4": "两个新邮箱必须相同", "email-mismatch": "两个新邮箱必须相同",
"msg-5": "必须填写标题", "title-required": "必须填写标题",
"msg-6": "标题太长", "title-short": "标题太长",
"msg-7": "标题太短", "title-long": "标题太短",
"msg-8": "我们无法验证你的 URL请确保填写正确", "invalid-url": "我们无法验证你的 URL请确保填写正确",
"msg-9": "URL 必须以 http 或 https 开头", "invalid-protocol": "URL 必须以 http 或 https 开头",
"msg-10": "URL 必须直接链接到图片文件", "url-not-image": "URL 必须直接链接到图片文件",
"msg-11": "请使用有效的 URL" "use-valid-url": "请使用有效的 URL"
} }
} }

View File

@ -416,63 +416,63 @@
"last-page": "Go to last page" "last-page": "Go to last page"
}, },
"flash": { "flash": {
"msg-1": "To claim a certification, you must first accept our academic honesty policy", "honest-first": "To claim a certification, you must first accept our academic honesty policy",
"msg-2": "Something really weird happened, if it happens again, please consider raising an issue on https://github.com/freeCodeCamp/freeCodeCamp/issues/new", "really-weird": "Something really weird happened, if it happens again, please consider raising an issue on https://github.com/freeCodeCamp/freeCodeCamp/issues/new",
"msg-3": "Something is not quite right. A report has been generated and the freeCodeCamp.org team have been notified", "not-right": "Something is not quite right. A report has been generated and the freeCodeCamp.org team have been notified",
"msg-4": "Something went wrong, please check and try again", "went-wrong": "Something went wrong, please check and try again",
"msg-5": "Your account has been successfully deleted", "account-deleted": "Your account has been successfully deleted",
"msg-6": "Your progress has been reset", "progress-reset": "Your progress has been reset",
"msg-7": "You are not authorized to continue on this route", "not-authorized": "You are not authorized to continue on this route",
"msg-8": "We couldn't find what you were looking for. Please check and try again", "could-not-find": "We couldn't find what you were looking for. Please check and try again",
"msg-9": "Something went wrong updating your account. Please check and try again", "wrong-updating": "Something went wrong updating your account. Please check and try again",
"msg-10": "We have updated your preferences", "updated-preferences": "We have updated your preferences",
"msg-11": "Email format is invalid", "email-invalid": "Email format is invalid",
"msg-12": "currentChallengeId is not a valid challenge ID", "bad-challengeId": "currentChallengeId is not a valid challenge ID",
"msg-13": "Theme is invalid", "theme-invalid": "Theme is invalid",
"msg-14": "Theme already set", "theme-set": "Theme already set",
"msg-15": "Your theme has been updated!", "theme-updated": "Your theme has been updated!",
"msg-16": "Username is already associated with this account", "username-used": "Username is already associated with this account",
"msg-17": "Username is already associated with a different account", "username-taken": "Username is already associated with a different account",
"msg-18": "We have updated your username to {{username}}", "username-updated": "We have updated your username to {{username}}",
"msg-19": "We could not log you out, please try again in a moment", "could-not-logout": "We could not log you out, please try again in a moment",
"msg-20": "The email encoded in the link is incorrectly formatted", "email-encoded-wrong": "The email encoded in the link is incorrectly formatted",
"msg-21": "Oops, something is not right, please request a fresh link to sign in / sign up", "oops-not-right": "Oops, something is not right, please request a fresh link to sign in / sign up",
"msg-22": "Looks like the link you clicked has expired, please request a fresh link, to sign in", "expired-link": "Looks like the link you clicked has expired, please request a fresh link, to sign in",
"msg-23": "Success! You have signed in to your account. Happy Coding!", "signin-success": "Success! You have signed in to your account. Happy Coding!",
"msg-24": "We are moving away from social authentication for privacy reasons. Next time we recommend using your email address: {{email}} to sign in instead.", "social-auth-gone": "We are moving away from social authentication for privacy reasons. Next time we recommend using your email address: {{email}} to sign in instead.",
"msg-25": "We need your name so we can put it on your certification. Add your name to your account settings and click the save button. Then we can issue your certification.", "name-needed": "We need your name so we can put it on your certification. Add your name to your account settings and click the save button. Then we can issue your certification.",
"msg-26": "It looks like you have not completed the necessary steps. Please complete the required projects to claim the {{name}} Certification.", "incomplete-steps": "It looks like you have not completed the necessary steps. Please complete the required projects to claim the {{name}} Certification.",
"msg-27": "It looks like you already have claimed the {{name}} Certification", "already-claimed": "It looks like you already have claimed the {{name}} Certification",
"msg-28": "@{{username}}, you have successfully claimed the {{name}} Certification! Congratulations on behalf of the freeCodeCamp.org team!", "cert-claim-success": "@{{username}}, you have successfully claimed the {{name}} Certification! Congratulations on behalf of the freeCodeCamp.org team!",
"msg-29": "Something went wrong with the verification of {{name}}, please try again. If you continue to receive this error, you can send a message to support@freeCodeCamp.org to get help.", "wrong-name": "Something went wrong with the verification of {{name}}, please try again. If you continue to receive this error, you can send a message to support@freeCodeCamp.org to get help.",
"msg-30": "Error claiming {{certName}}", "error-claiming": "Error claiming {{certName}}",
"msg-31": "We could not find a user with the username \"{{username}}\"", "username-not-found": "We could not find a user with the username \"{{username}}\"",
"msg-32": "This user needs to add their name to their account in order for others to be able to view their certification.", "add-name": "This user needs to add their name to their account in order for others to be able to view their certification.",
"msg-33": "This user is not eligible for freeCodeCamp.org certifications at this time.", "not-eligible": "This user is not eligible for freeCodeCamp.org certifications at this time.",
"msg-34": "{{username}} has chosen to make their portfolio private. They will need to make their portfolio public in order for others to be able to view their certification.", "profile-private": "{{username}} has chosen to make their portfolio private. They will need to make their portfolio public in order for others to be able to view their certification.",
"msg-35": "{{username}} has chosen to make their certifications private. They will need to make their certifications public in order for others to be able to view them.", "certs-private": "{{username}} has chosen to make their certifications private. They will need to make their certifications public in order for others to be able to view them.",
"msg-36": "{{username}} has not yet agreed to our Academic Honesty Pledge.", "not-honest": "{{username}} has not yet agreed to our Academic Honesty Pledge.",
"msg-37": "It looks like user {{username}} is not {{cert}} certified", "user-not-certified": "It looks like user {{username}} is not {{cert}} certified",
"msg-38": "That does not appear to be a valid challenge submission", "invalid-challenge": "That does not appear to be a valid challenge submission",
"msg-39": "You have not provided the valid links for us to inspect your work.", "no-links-provided": "You have not provided the valid links for us to inspect your work.",
"msg-40": "No social account found", "no-social": "No social account found",
"msg-41": "Invalid social account", "invalid-social": "Invalid social account",
"msg-42": "No {{website}} account associated", "no-account": "No {{website}} account associated",
"msg-43": "You've successfully unlinked your {{website}}", "unlink-success": "You've successfully unlinked your {{website}}",
"msg-44": "Check if you have provided a username and a report", "provide-username": "Check if you have provided a username and a report",
"msg-45": "A report was sent to the team with {{email}} in copy" "report-sent": "A report was sent to the team with {{email}} in copy"
}, },
"validation": { "validation": {
"msg-1": "There is a maximum limit of 288 characters, you have {{charsLeft}} left", "max-characters": "There is a maximum limit of 288 characters, you have {{charsLeft}} left",
"msg-2": "This email is the same as your current email", "same-email": "This email is the same as your current email",
"msg-3": "We could not validate your email correctly, please ensure it is correct", "invalid-email": "We could not validate your email correctly, please ensure it is correct",
"msg-4": "Both new email addresses must be the same", "email-mismatch": "Both new email addresses must be the same",
"msg-5": "A title is required", "title-required": "A title is required",
"msg-6": "Title is too short", "title-short": "Title is too short",
"msg-7": "Title is too long", "title-long": "Title is too long",
"msg-8": "We could not validate your URL correctly, please ensure it is correct", "invalid-url": "We could not validate your URL correctly, please ensure it is correct",
"msg-9": "URL must start with http or https", "invalid-protocol": "URL must start with http or https",
"msg-10": "URL must link directly to an image file", "url-not-image": "URL must link directly to an image file",
"msg-11": "Please use a valid URL" "use-valid-url": "Please use a valid URL"
} }
} }

View File

@ -416,63 +416,63 @@
"last-page": "Ir a la última página" "last-page": "Ir a la última página"
}, },
"flash": { "flash": {
"msg-1": "Para reclamar una certificación, primero debes aceptar nuestra política de honestidad académica.", "honest-first": "Para reclamar una certificación, primero debes aceptar nuestra política de honestidad académica.",
"msg-2": "Algo realmente extraño sucedió. Si vuelve a ocurrir, considera hacer un reporte del problema en https://github.com/freeCodeCamp/freeCodeCamp/issues/new", "really-weird": "Algo realmente extraño sucedió. Si vuelve a ocurrir, considera hacer un reporte del problema en https://github.com/freeCodeCamp/freeCodeCamp/issues/new",
"msg-3": "Algo no está bien. Se ha generado un informe y se ha notificado al equipo de freeCodeCamp.org", "not-right": "Algo no está bien. Se ha generado un informe y se ha notificado al equipo de freeCodeCamp.org",
"msg-4": "Algo salió mal, verifica e intenta nuevamente", "went-wrong": "Algo salió mal, verifica e intenta nuevamente",
"msg-5": "Tu cuenta ha sido eliminada con éxito", "account-deleted": "Tu cuenta ha sido eliminada con éxito",
"msg-6": "Tu progreso se ha restablecido", "progress-reset": "Tu progreso se ha restablecido",
"msg-7": "No estás autorizado a continuar en esta ruta", "not-authorized": "No estás autorizado a continuar en esta ruta",
"msg-8": "No pudimos encontrar lo que buscabas. Por favor revisa e intenta de nuevo", "could-not-find": "No pudimos encontrar lo que buscabas. Por favor revisa e intenta de nuevo",
"msg-9": "Se produjo un error al actualizar tu cuenta. Por favor revisa e intenta de nuevo", "wrong-updating": "Se produjo un error al actualizar tu cuenta. Por favor revisa e intenta de nuevo",
"msg-10": "Hemos actualizado tus preferencias", "updated-preferences": "Hemos actualizado tus preferencias",
"msg-11": "El formato del correo electrónico no es válido", "email-invalid": "El formato del correo electrónico no es válido",
"msg-12": "currentChallengeId no es un ID de desafío válido", "bad-challengeId": "currentChallengeId no es un ID de desafío válido",
"msg-13": "El tema no es válido", "theme-invalid": "El tema no es válido",
"msg-14": "Tema ya establecido", "theme-set": "Tema ya establecido",
"msg-15": "¡Tu tema ha sido actualizado!", "theme-updated": "¡Tu tema ha sido actualizado!",
"msg-16": "El nombre de usuario ya está asociado a esta cuenta", "username-used": "El nombre de usuario ya está asociado a esta cuenta",
"msg-17": "El nombre de usuario ya está asociado a una cuenta diferente", "username-taken": "El nombre de usuario ya está asociado a una cuenta diferente",
"msg-18": "Hemos actualizado tu nombre de usuario a {{username}}", "username-updated": "Hemos actualizado tu nombre de usuario a {{username}}",
"msg-19": "No pudimos cerrar la sesión. Vuelve a intentarlo en un momento.", "could-not-logout": "No pudimos cerrar la sesión. Vuelve a intentarlo en un momento.",
"msg-20": "El correo electrónico codificado en el enlace tiene un formato incorrecto", "email-encoded-wrong": "El correo electrónico codificado en el enlace tiene un formato incorrecto",
"msg-21": "¡uy!, algo no está bien, solicite un enlace nuevo para iniciar sesión / registrarse", "oops-not-right": "¡uy!, algo no está bien, solicite un enlace nuevo para iniciar sesión / registrarse",
"msg-22": "Parece que el enlace en el que hiciste clic ha expirado, solicita un enlace nuevo para iniciar sesión", "expired-link": "Parece que el enlace en el que hiciste clic ha expirado, solicita un enlace nuevo para iniciar sesión",
"msg-23": "¡Éxito! Ha iniciado sesión en su cuenta. ¡Feliz día programando!", "signin-success": "¡Éxito! Ha iniciado sesión en su cuenta. ¡Feliz día programando!",
"msg-24": "Nos estamos alejando de la autenticación social por razones de privacidad. La próxima vez, te recomendamos que utilices tu dirección de correo electrónico: {{email}} para iniciar sesión.", "social-auth-gone": "Nos estamos alejando de la autenticación social por razones de privacidad. La próxima vez, te recomendamos que utilices tu dirección de correo electrónico: {{email}} para iniciar sesión.",
"msg-25": "Necesitamos tu nombre para poder incluirlo en tu certificación. Agregue tu nombre a la configuración de tu cuenta y haz clic en el botón Guardar. Entonces podemos emitir tu certificación.", "name-needed": "Necesitamos tu nombre para poder incluirlo en tu certificación. Agregue tu nombre a la configuración de tu cuenta y haz clic en el botón Guardar. Entonces podemos emitir tu certificación.",
"msg-26": "Parece que no haz completado los pasos necesarios. Completa los proyectos requeridos para reclamar la Certificación {{name}}", "incomplete-steps": "Parece que no haz completado los pasos necesarios. Completa los proyectos requeridos para reclamar la Certificación {{name}}",
"msg-27": "Parece que ya reclamó la Certificación {{name}}", "already-claimed": "Parece que ya reclamó la Certificación {{name}}",
"msg-28": "@{{usernane}}, has reclamado con éxito el {{name}} Certificación! ¡Felicitaciones en nombre del equipo de freeCodeCamp.org!", "cert-claim-success": "@{{username}}, has reclamado con éxito el {{name}} Certificación! ¡Felicitaciones en nombre del equipo de freeCodeCamp.org!",
"msg-29": "Se produjo un error con la verificación de {{name}}. Vuelve a intentarlo. Si continúas recibiendo este error, puedes enviar un mensaje a support@freeCodeCamp.org para obtener ayuda.", "wrong-name": "Se produjo un error con la verificación de {{name}}. Vuelve a intentarlo. Si continúas recibiendo este error, puedes enviar un mensaje a support@freeCodeCamp.org para obtener ayuda.",
"msg-30": "Error al reclamar {{certName}}", "error-claiming": "Error al reclamar {{certName}}",
"msg-31": "No pudimos encontrar un usuario con el nombre de usuario \"{{username}}\"", "username-not-found": "No pudimos encontrar un usuario con el nombre de usuario \"{{username}}\"",
"msg-32": "Este usuario debe agregar su nombre a su cuenta para que otros puedan ver su certificación.", "add-name": "Este usuario debe agregar su nombre a su cuenta para que otros puedan ver su certificación.",
"msg-33": "Este usuario no es elegible para las certificaciones de freeCodeCamp.org en este momento.", "not-eligible": "Este usuario no es elegible para las certificaciones de freeCodeCamp.org en este momento.",
"msg-34": "{{username}} ha elegido que su cartera sea privada. Deberán hacer pública su cartera para que otros puedan ver su certificación.", "profile-private": "{{username}} ha elegido que su cartera sea privada. Deberán hacer pública su cartera para que otros puedan ver su certificación.",
"msg-35": "{{username}} ha optado por que sus certificaciones sean privadas. Deberán hacer públicas sus certificaciones para que otros puedan verlas.", "certs-private": "{{username}} ha optado por que sus certificaciones sean privadas. Deberán hacer públicas sus certificaciones para que otros puedan verlas.",
"msg-36": "{{username}} aún no está de acuerdo con nuestro Compromiso de Honestidad Académica.", "not-honest": "{{username}} aún no está de acuerdo con nuestro Compromiso de Honestidad Académica.",
"msg-37": "Parece que el usuario {{username}} no está certificado por {{cert}}", "user-not-certified": "Parece que el usuario {{username}} no está certificado por {{cert}}",
"msg-38": "Eso no parece ser un envío de desafío válido", "invalid-challenge": "Eso no parece ser un envío de desafío válido",
"msg-39": "No has proporcionado los enlaces válidos para que inspeccionemos tu trabajo.", "no-links-provided": "No has proporcionado los enlaces válidos para que inspeccionemos tu trabajo.",
"msg-40": "No se encontró ninguna cuenta social", "no-social": "No se encontró ninguna cuenta social",
"msg-41": "Cuenta social no válida", "invalid-social": "Cuenta social no válida",
"msg-42": "No hay cuenta de {{website}} asociada", "no-account": "No hay cuenta de {{website}} asociada",
"msg-43": "Has desvinculado correctamente tu {{website}}", "unlink-success": "Has desvinculado correctamente tu {{website}}",
"msg-44": "Comprueba si has proporcionado un nombre de usuario y un informe", "provide-username": "Comprueba si has proporcionado un nombre de usuario y un informe",
"msg-45": "Se envió un informe al equipo con {{email}} en copia" "report-sent": "Se envió un informe al equipo con {{email}} en copia"
}, },
"validation": { "validation": {
"msg-1": "Hay un límite máximo de 288 caracteres, te quedan {{charsLeft}}", "max-characters": "Hay un límite máximo de 288 caracteres, te quedan {{charsLeft}}",
"msg-2": "Este correo electrónico es el mismo que su correo electrónico actual", "same-email": "Este correo electrónico es el mismo que su correo electrónico actual",
"msg-3": "No pudimos validar tu correo electrónico correctamente, asegúrate de que sea correcto", "invalid-email": "No pudimos validar tu correo electrónico correctamente, asegúrate de que sea correcto",
"msg-4": "Ambas nuevas direcciones de correo electrónico deben ser iguales", "email-mismatch": "Ambas nuevas direcciones de correo electrónico deben ser iguales",
"msg-5": "Se requiere un título", "title-required": "Se requiere un título",
"msg-6": "El título es demasiado corto", "title-short": "El título es demasiado corto",
"msg-7": "El título es demasiado largo", "title-long": "El título es demasiado largo",
"msg-8": "No hemos podido validar tu URL correctamente, por favor asegúrate de que este correcta", "invalid-url": "No hemos podido validar tu URL correctamente, por favor asegúrate de que este correcta",
"msg-9": "La URL debe comenzar con http o https", "invalid-protocol": "La URL debe comenzar con http o https",
"msg-10": "URL debes enlazar directamente a un archivo de imagen", "url-not-image": "URL debes enlazar directamente a un archivo de imagen",
"msg-11": "Utiliza un URL válido" "use-valid-url": "Utiliza un URL válido"
} }
} }

View File

@ -488,85 +488,92 @@ const translationsSchema = {
'last-page': 'Go to last page' 'last-page': 'Go to last page'
}, },
flash: { flash: {
'msg-1': 'honest-first':
'To claim a certification, you must first accept our academic honesty policy', 'To claim a certification, you must first accept our academic honesty policy',
'msg-2': 'really-weird':
'Something really weird happened, if it happens again, please consider raising an issue on https://github.com/freeCodeCamp/freeCodeCamp/issues/new', 'Something really weird happened, if it happens again, please consider raising an issue on https://github.com/freeCodeCamp/freeCodeCamp/issues/new',
'msg-3': 'not-right':
'Something is not quite right. A report has been generated and the freeCodeCamp.org team have been notified', 'Something is not quite right. A report has been generated and the freeCodeCamp.org team have been notified',
'msg-4': 'Something went wrong, please check and try again', 'went-wrong': 'Something went wrong, please check and try again',
'msg-5': 'Your account has been successfully deleted', 'account-deleted': 'Your account has been successfully deleted',
'msg-6': 'Your progress has been reset', 'progress-reset': 'Your progress has been reset',
'msg-7': 'You are not authorized to continue on this route', 'not-authorized': 'You are not authorized to continue on this route',
'msg-8': 'could-not-find':
"We couldn't find what you were looking for. Please check and try again", "We couldn't find what you were looking for. Please check and try again",
'msg-9': 'wrong-updating':
'Something went wrong updating your account. Please check and try again', 'Something went wrong updating your account. Please check and try again',
'msg-10': 'We have updated your preferences', 'updated-preferences': 'We have updated your preferences',
'msg-11': 'Email format is invalid', 'email-invalid': 'Email format is invalid',
'msg-12': 'currentChallengeId is not a valid challenge ID', 'bad-challengeId': 'currentChallengeId is not a valid challenge ID',
'msg-13': 'Theme is invalid', 'theme-invalid': 'Theme is invalid',
'msg-14': 'Theme already set', 'theme-set': 'Theme already set',
'msg-15': 'Your theme has been updated!', 'theme-updated': 'Your theme has been updated!',
'msg-16': 'Username is already associated with this account', 'username-used': 'Username is already associated with this account',
'msg-17': 'Username is already associated with a different account', 'username-taken': 'Username is already associated with a different account',
'msg-18': 'We have updated your username to {{username}}', 'username-updated': 'We have updated your username to {{username}}',
'msg-19': 'We could not log you out, please try again in a moment', 'could-not-logout':
'msg-20': 'The email encoded in the link is incorrectly formatted', 'We could not log you out, please try again in a moment',
'msg-21': 'email-encoded-wrong':
'The email encoded in the link is incorrectly formatted',
'oops-not-right':
'Oops, something is not right, please request a fresh link to sign in / sign up', 'Oops, something is not right, please request a fresh link to sign in / sign up',
'msg-22': 'expired-link':
'Looks like the link you clicked has expired, please request a fresh link, to sign in', 'Looks like the link you clicked has expired, please request a fresh link, to sign in',
'msg-23': 'Success! You have signed in to your account. Happy Coding!', 'signin-success':
'msg-24': 'Success! You have signed in to your account. Happy Coding!',
'social-auth-gone':
'We are moving away from social authentication for privacy reasons. Next time we recommend using your email address: {{email}} to sign in instead.', 'We are moving away from social authentication for privacy reasons. Next time we recommend using your email address: {{email}} to sign in instead.',
'msg-25': 'name-needed':
'We need your name so we can put it on your certification. Add your name to your account settings and click the save button. Then we can issue your certification.', 'We need your name so we can put it on your certification. Add your name to your account settings and click the save button. Then we can issue your certification.',
'msg-26': 'incomplete-steps':
'It looks like you have not completed the necessary steps. Please complete the required projects to claim the {{name}} Certification.', 'It looks like you have not completed the necessary steps. Please complete the required projects to claim the {{name}} Certification.',
'msg-27': 'already-claimed':
'It looks like you already have claimed the {{name}} Certification', 'It looks like you already have claimed the {{name}} Certification',
'msg-28': 'cert-claim-success':
'@{{username}}, you have successfully claimed the {{name}} Certification! Congratulations on behalf of the freeCodeCamp.org team!', '@{{username}}, you have successfully claimed the {{name}} Certification! Congratulations on behalf of the freeCodeCamp.org team!',
'msg-29': 'wrong-name':
'Something went wrong with the verification of {{name}}, please try again. If you continue to receive this error, you can send a message to support@freeCodeCamp.org to get help.', 'Something went wrong with the verification of {{name}}, please try again. If you continue to receive this error, you can send a message to support@freeCodeCamp.org to get help.',
'msg-30': 'Error claiming {{certName}}', 'error-claiming': 'Error claiming {{certName}}',
'msg-31': 'We could not find a user with the username "{{username}}"', 'username-not-found':
'msg-32': 'We could not find a user with the username "{{username}}"',
'add-name':
'This user needs to add their name to their account in order for others to be able to view their certification.', 'This user needs to add their name to their account in order for others to be able to view their certification.',
'msg-33': 'not-eligible':
'This user is not eligible for freeCodeCamp.org certifications at this time.', 'This user is not eligible for freeCodeCamp.org certifications at this time.',
'msg-34': 'profile-private':
'{{username}} has chosen to make their portfolio private. They will need to make their portfolio public in order for others to be able to view their certification.', '{{username}} has chosen to make their portfolio private. They will need to make their portfolio public in order for others to be able to view their certification.',
'msg-35': 'certs-private':
'{{username}} has chosen to make their certifications private. They will need to make their certifications public in order for others to be able to view them.', '{{username}} has chosen to make their certifications private. They will need to make their certifications public in order for others to be able to view them.',
'msg-36': '{{username}} has not yet agrees to our Academic Honesty Pledge.', 'not-honest':
'msg-37': 'It looks like user {{username}} is not {{cert}} certified', '{{username}} has not yet agreed to our Academic Honesty Pledge.',
'msg-38': 'That does not appear to be a valid challenge submission', 'user-not-certified':
'msg-39': 'It looks like user {{username}} is not {{cert}} certified',
'invalid-challenge':
'That does not appear to be a valid challenge submission',
'no-links-provided':
'You have not provided the valid links for us to inspect your work.', 'You have not provided the valid links for us to inspect your work.',
'msg-40': 'No social account found', 'no-social': 'No social account found',
'msg-41': 'Invalid social account', 'invalid-social': 'Invalid social account',
'msg-42': 'No {{website}} account associated', 'no-account': 'No {{website}} account associated',
'msg-43': "You've successfully unlinked your {{website}}", 'unlink-success': "You've successfully unlinked your {{website}}",
'msg-44': 'Check if you have provided a username and a report', 'provide-username': 'Check if you have provided a username and a report',
'msg-45': 'A report was sent to the team with {{email}} in copy' 'report-sent': 'A report was sent to the team with {{email}} in copy'
}, },
validation: { validation: {
'msg-1': 'max-characters':
'There is a maximum limit of 288 characters, you have {{charsLeft}} left', 'There is a maximum limit of 288 characters, you have {{charsLeft}} left',
'msg-2': 'This email is the same as your current email', 'same-email': 'This email is the same as your current email',
'msg-3': 'invalid-email':
'We could not validate your email correctly, please ensure it is correct', 'We could not validate your email correctly, please ensure it is correct',
'msg-4': 'Both new email addresses must be the same', 'email-mismatch': 'Both new email addresses must be the same',
'msg-5': 'A title is required', 'title-required': 'A title is required',
'msg-6': 'Title is too short', 'title-short': 'Title is too short',
'msg-7': 'Title is too long', 'title-long': 'Title is too long',
'msg-8': 'invalid-url':
'We could not validate your URL correctly, please ensure it is correct', 'We could not validate your URL correctly, please ensure it is correct',
'msg-9': 'URL must start with http or https', 'invalid-protocol': 'URL must start with http or https',
'msg-10': 'URL must link directly to an image file', 'url-not-image': 'URL must link directly to an image file',
'msg-11': 'Please use a valid URL' 'use-valid-url': 'Please use a valid URL'
} }
}; };

View File

@ -140,7 +140,7 @@ const isCertMapSelector = createSelector(
const honestyInfoMessage = { const honestyInfoMessage = {
type: 'info', type: 'info',
message: 'flash.msg-1' message: 'flash.honest-first'
}; };
const initialState = { const initialState = {

View File

@ -97,7 +97,7 @@ class EmailSettings extends Component {
if (newEmail === currentEmail) { if (newEmail === currentEmail) {
return { return {
state: 'error', state: 'error',
message: t('validation.msg-2') message: t('validation.same-email')
}; };
} }
if (isEmail(newEmail)) { if (isEmail(newEmail)) {
@ -105,7 +105,7 @@ class EmailSettings extends Component {
} else { } else {
return { return {
state: 'error', state: 'error',
message: t('validation.msg-3') message: t('validation.invalid-email')
}; };
} }
}; };
@ -126,7 +126,7 @@ class EmailSettings extends Component {
if (maybeEmailRE.test(confirmNewEmail)) { if (maybeEmailRE.test(confirmNewEmail)) {
return { return {
state: isMatch ? 'success' : 'error', state: isMatch ? 'success' : 'error',
message: isMatch ? '' : t('validation.msg-4') message: isMatch ? '' : t('validation.email-mismatch')
}; };
} else { } else {
return { return {

View File

@ -82,7 +82,7 @@ class InternetSettings extends Component {
} }
return { return {
state: 'error', state: 'error',
message: t('validation.msg-8') message: t('validation.invalid-url')
}; };
} }

View File

@ -138,13 +138,13 @@ class PortfolioSettings extends Component {
if (charsLeft < 0) { if (charsLeft < 0) {
return { return {
state: 'error', state: 'error',
message: t('validation.msg-1', { charsLeft: 0 }) message: t('validation.max-characters', { charsLeft: 0 })
}; };
} }
if (charsLeft < 41 && charsLeft > 0) { if (charsLeft < 41 && charsLeft > 0) {
return { return {
state: 'warning', state: 'warning',
message: t('validation.msg-1', { charsLeft: charsLeft }) message: t('validation.max-characters', { charsLeft: charsLeft })
}; };
} }
if (charsLeft === 288) { if (charsLeft === 288) {
@ -156,14 +156,14 @@ class PortfolioSettings extends Component {
getTitleValidation(title) { getTitleValidation(title) {
const { t } = this.props; const { t } = this.props;
if (!title) { if (!title) {
return { state: 'error', message: t('validation.msg-5') }; return { state: 'error', message: t('validation.title-required') };
} }
const len = title.length; const len = title.length;
if (len < 2) { if (len < 2) {
return { state: 'error', message: t('validation.msg-6') }; return { state: 'error', message: t('validation.title-short') };
} }
if (len > 144) { if (len > 144) {
return { state: 'error', message: t('validation.msg-7') }; return { state: 'error', message: t('validation.title-long') };
} }
return { state: 'success', message: '' }; return { state: 'success', message: '' };
} }
@ -172,7 +172,7 @@ class PortfolioSettings extends Component {
const { t } = this.props; const { t } = this.props;
const len = maybeUrl.length; const len = maybeUrl.length;
if (len >= 4 && !hasProtocolRE.test(maybeUrl)) { if (len >= 4 && !hasProtocolRE.test(maybeUrl)) {
return { state: 'error', message: t('validation.msg-9') }; return { state: 'error', message: t('validation.invalid-protocol') };
} }
if (isImage && !maybeUrl) { if (isImage && !maybeUrl) {
return { state: null, message: '' }; return { state: null, message: '' };
@ -180,12 +180,12 @@ class PortfolioSettings extends Component {
if (isImage && !/\.(png|jpg|jpeg|gif)$/.test(maybeUrl)) { if (isImage && !/\.(png|jpg|jpeg|gif)$/.test(maybeUrl)) {
return { return {
state: 'error', state: 'error',
message: t('validation.msg-10') message: t('validation.url-not-image')
}; };
} }
return isURL(maybeUrl) return isURL(maybeUrl)
? { state: 'success', message: '' } ? { state: 'success', message: '' }
: { state: 'warning', message: t('validation.msg-11') }; : { state: 'warning', message: t('validation.use-valid-url') };
} }
renderPortfolio = (portfolio, index, arr) => { renderPortfolio = (portfolio, index, arr) => {

View File

@ -12,7 +12,7 @@ function* deleteAccountSaga() {
yield put( yield put(
createFlashMessage({ createFlashMessage({
type: 'info', type: 'info',
message: 'flash.msg-5' message: 'flash.account-deleted'
}) })
); );
// remove current user information from application state // remove current user information from application state
@ -29,7 +29,7 @@ function* resetProgressSaga() {
yield put( yield put(
createFlashMessage({ createFlashMessage({
type: 'info', type: 'info',
message: 'flash.msg-6' message: 'flash.progress-reset'
}) })
); );
// refresh current user data in application state // refresh current user data in application state

View File

@ -33,14 +33,14 @@ export function handle400Error(e, options = { redirectTo: '/' }) {
return { return {
...flash, ...flash,
type: 'warn', type: 'warn',
message: 'flash.msg-7' message: 'flash.not-authorized'
}; };
} }
case 404: { case 404: {
return { return {
...flash, ...flash,
type: 'info', type: 'info',
message: 'flash.msg-8' message: 'flash.could-not-find'
}; };
} }
default: { default: {

View File

@ -1,4 +1,4 @@
export default { export default {
type: 'danger', type: 'danger',
message: 'flash.msg-2' message: 'flash.really-weird'
}; };

View File

@ -1,4 +1,4 @@
export default { export default {
type: 'danger', type: 'danger',
message: 'flash.msg-3' message: 'flash.not-right'
}; };

View File

@ -1,4 +1,4 @@
export default { export default {
type: 'danger', type: 'danger',
message: 'flash.msg-4' message: 'flash.went-wrong'
}; };