Skip to content

Commit

Permalink
feat: setup transifex translations for onboarding component (#126)
Browse files Browse the repository at this point in the history
VAN-1992
  • Loading branch information
mubbsharanwar authored Aug 5, 2024
1 parent fccfc91 commit f3ea511
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[main]
host = https://app.transifex.com

[o:2uedx:p:pros:r:frontend-component-authn-edx]
file_filter = src/i18n/messages/<lang>.json
source_file = src/i18n/transifex_input.json
source_lang = en
type = KEYVALUEJSON
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
export TRANSIFEX_RESOURCE = frontend-component-authn-edx
transifex_resource = frontend-component-authn-edx
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA"
transifex_langs = "es_419"

intl_imports = ./node_modules/.bin/intl-imports.js
transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n
transifex_input = $(i18n)/transifex_input.json

# This directory must match .babelrc .
transifex_temp = ./temp/babel-plugin-formatjs

NPM_TESTS=build i18n_extract lint test

build:
rm -rf ./dist
./node_modules/.bin/fedx-scripts babel src --out-dir dist --source-maps --ignore **/*.test.jsx,**/__mocks__,**/__snapshots__,**/setupTest.js --copy-files
Expand All @@ -22,9 +25,6 @@ build:
requirements:
npm install

test:
npm run test

i18n.extract:
# Pulling display strings from .jsx files into .json files...
rm -rf $(transifex_temp)
Expand Down
3 changes: 2 additions & 1 deletion example/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {

import './index.scss';
import OnBoardingExampleContainer from './onboarding-example';
import messages from '../src/i18n/index';

subscribe(APP_READY, () => {
ReactDOM.render(
Expand All @@ -19,7 +20,7 @@ subscribe(APP_READY, () => {
});

initialize({
messages: [],
messages,
handlers: {
config: () => {
mergeConfig({
Expand Down
12 changes: 10 additions & 2 deletions src/i18n/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
// Placeholder be overridden by `make pull_translations`
export default [];
import es419Messages from './messages/es_419.json';

const appMessages = {
es: es419Messages,
'es-419': es419Messages,
};

export default [
appMessages,
];
184 changes: 184 additions & 0 deletions src/i18n/messages/es_419.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
{
"social.auth.provide.signup.title": "Sign up with {providerName}",
"social.auth.provide.signin.title": "Sign in with {providerName}",
"login.third.party.auth.account.not.linked": "You have successfully signed into {currentProvider}, but your {currentProvider} account does not have a linked {platformName} account. To link your accounts, sign in now using your {platformName} password.",
"register.third.party.auth.account.not.linked": "You've successfully signed into {currentProvider}! We just need a little more information before you start learning with {platformName}.",
"tpa.authentication.failure": "We are sorry, you are not authorized to access edX via this channel. Please contact your learning administrator or manager in order to access edX.{lineBreak}{lineBreak}Error Details:{lineBreak}{errorMessage}",
"enterprisetpa.title.heading": "Would you like to sign in using your {providerName} credentials?",
"enterprisetpa.login.button.text": "Show me other ways to sign in or register",
"login.form.heading.1": "Iniciar sesión",
"login.form.signin.button.text": "Iniciar sesión",
"login.form.forgot.password.button.text": "Forgot Password?",
"login.form.sign.up.help.text": "Don’t have an account yet?",
"login.form.sign.up.link.text": "Crear una cuenta",
"login.form.school.and.organization.help.text": "Have an account through school or organization?",
"login.form.school.and.organization.link": "Sign in with your credentials",
"login.form.email.field.label": "Email",
"login.form.password.field.label": "Password",
"login.form.heading.2": "or",
"login.failure.header.title": "We couldn't sign you in.",
"login.incorrect.credentials.error.reset.link.text": "reset your password",
"login.rate.limit.reached.message": "Too many failed login attempts. Try again later.",
"contact.support.link": "contact {platformName} support",
"login.inactive.user.error": "In order to sign in, you need to activate your account.{lineBreak}{lineBreak}We just sent an activation link to {email}. If you do not receive an email, check your spam folders or {supportLink}.",
"tpa.account.link": "{provider} account",
"allowed.domain.login.error": "As {allowedDomain} user, You must login with your {allowedDomain} {tpaLink}.",
"login.form.invalid.error.message": "Please fill in the fields below.",
"login.incorrect.credentials.error.attempts.text.1": "The username, email or password you entered is incorrect. You have {remainingAttempts} more sign in attempts before your account is temporarily locked.",
"login.incorrect.credentials.error.attempts.text.2": "If you've forgotten your password, {resetLink}",
"account.locked.out.message.1": "To protect your account, it's been temporarily locked. Try again in 30 minutes.",
"account.locked.out.message.2": "To be on the safe side, you can {resetLink} before trying again.",
"login.incorrect.credentials.error": "The username, email, or password you entered is incorrect. Please try again.",
"login.incorrect.credentials.error.with.reset.link": "The username, email, or password you entered is incorrect. Please try again or {resetLink}.",
"internal.server.error.message": "An error has occurred. Try refreshing the page, or check your internet connection.",
"login.incorrect.credentials.error.before.account.blocked.text": "click here to reset it.",
"username.or.email.format.validation.less.chars.message": "Username or email must have at least 2 characters.",
"email.validation.message": "Enter your username or email",
"password.validation.message": "Password criteria has not been met",
"non.compliant.password.title": "We recently changed our password requirements",
"non.compliant.password.message": "Your current password does not meet the new security requirements. We just sent a password-reset message to the email address associated with this account. Thank you for helping us keep your data safe.",
"account.confirmation.success.message.title": "Success! You have confirmed your email.",
"account.confirmation.success.message": "Sign in to continue.",
"account.confirmation.info.message": "This email has already been confirmed.",
"account.confirmation.error.message.title": "Your email could not be confirmed",
"account.confirmation.support.link": "contact support",
"progressive.profiling.form.heading": "Fill out your profile",
"progressive.profiling.completion.skip.message": "If you skip now, you can complete your profile under \"Account settings\" at any time.",
"progressive.profiling.country.field.title": "Confirm your country of residence",
"progressive.profiling.country.field.info.message": "We have determined your country of residence. If this is incorrect, please edit your country.",
"progressive.profiling.country.field.undetected": "Undetected",
"progressive.profiling.country.field.help.text": "Your country of residence determines availability of certain courses",
"progressive.profiling.country.field.error.message": "Please click \"Submit\" to save changes in \"Country of residence\" field.",
"progressive.profiling.data.collection.title": "Personalize your experience",
"progressive.profiling.subject.field.label": "What field are you interested in?",
"progressive.profiling.subject.field.placeholder": "Select a field",
"progressive.profiling.level.of.education.field.label": "What is the highest level of education you have completed?",
"progressive.profiling.level.of.education.field.placeholder": "Select a level",
"progressive.profiling.work.experience.field.label": "How many years of work experience do you have?",
"progressive.profiling.work.experience.field.placeholder": "Select an option",
"progressive.profiling.learning.type.field.label": "What type of experience are you interested in?",
"progressive.profiling.learning.type.field.placeholder": "Select a product",
"progressive.profiling.gender.field.label": "What is your gender?",
"progressive.profiling.gender.field.placeholder": "Select an option",
"progressive.profiling.skip.for.now.button.text": "Skip for now",
"progressive.profiling.submit.button.text": "Submit",
"subject.option.Business & Management": "Business & Management",
"subject.option.Computer Science": "Computer Science",
"subject.option.Engineering": "Engineering",
"subject.option.Social Sciences": "Social Sciences",
"subject.option.Data Analysis & Statistics": "Data Analysis & Statistics",
"subject.option.Economics & Finance": "Economics & Finance",
"subject.option.Communication": "Communication",
"subject.option.Humanities": "Humanities",
"subject.option.Science": "Science",
"subject.option.Environmental Studies": "Environmental Studies",
"subject.option.Medicine": "Medicine",
"subject.option.Biology & Life Sciences": "Biology & Life Sciences",
"subject.option.Health & Safety": "Health & Safety",
"subject.option.Education & Teacher Training": "Education & Teacher Training",
"subject.option.Art & Culture": "Art & Culture",
"subject.option.Math": "Math",
"subject.option.History": "History",
"subject.option.Design": "Design",
"subject.option.Physics": "Physics",
"subject.option.Energy & Earth Sciences": "Energy & Earth Sciences",
"subject.option.Law": "Law",
"subject.option.Philosophy & Ethics": "Philosophy & Ethics",
"subject.option.Language": "Language",
"subject.option.Electronics": "Electronics",
"subject.option.Food & Nutrition": "Food & Nutrition",
"subject.option.Architecture": "Architecture",
"subject.option.Chemistry": "Chemistry",
"subject.option.Literature": "Literature",
"subject.option.Ethics": "Ethics",
"subject.option.Music": "Music",
"subject.option.Philanthropy": "Philanthropy",
"levelOfEducation.option.none": "No formal education",
"levelOfEducation.option.jhs": "Junior secondary/junior high/middle school",
"levelOfEducation.option.hs": "Secondary/High School",
"levelOfEducation.option.a": "Associate Degree",
"levelOfEducation.option.b": "Bachelor's Degree",
"levelOfEducation.option.m": "Master's or professional degree",
"levelOfEducation.option.p": "Doctorate",
"levelOfEducation.option.other": "Other",
"workExperience.option.0yrs": "I don’t have any work experience",
"workExperience.option.1-5yrs": "I have 1-5 years of work experience",
"workExperience.option.6-10yrs": "I have 6-10 years of work experience",
"workExperience.option.11-15yrs": "I have 11-15 years of work experience",
"workExperience.option.16-20yrs": "I have 16-20 years of work experience",
"workExperience.option.20+yrs": "More than 20 years of work experience",
"learningType.option.Courses": "Courses",
"learningType.option.Programs": "Programs",
"learningType.option.Boot Camps": "Boot Camps",
"learningType.option.Degree Programs": "Degrees",
"learningType.option.Executive Education": "Executive Education",
"learningType.option.Unsure": "Unsure",
"gender.option.m": "Male",
"gender.option.f": "Female",
"gender.option.o": "Other/prefer not to answer",
"registration.form.heading.1": "Create account",
"registration.form.or.heading.2": "or",
"registration.form.continue.button": "Create an account for free",
"registration.form.already.have.account.text": "Already have an account?",
"registration.form.sign.in.link": "Sign In",
"registration.form.account.school.organization.text": "Have an account through school or organization?",
"registration.form.sign.in.with.credentials.link": "Sign in with your credentials",
"registration.form.password.label": "Password",
"registration.form.email.label": "Email",
"registration.form.terms.of.service.and.honor.code.label": "Terms of Service and Honor Code",
"registration.form.privacy.policy.label": "Privacy Policy",
"register.failure.header.title": "We couldn't create your account.",
"registration.empty.form.submission.error": "Please check your responses and try again.",
"registration.request.server.error": "An error has occurred. Try refreshing the page, or check your internet connection.",
"registration.rate.limit.error": "Too many failed registration attempts. Try again later.",
"registration.tpa.session.expired": "We couldn’t create your account. Registration using {provider} has timed out.",
"registration.tpa.authentication.failure": "We are sorry, you are not authorized to access {platform_name} via this channel. Please contact your learning administrator or manager in order to access {platform_name}.{lineBreak}{lineBreak}Error Details:{lineBreak}{errorMessage}",
"registration.form.submission.error": "We couldn’t create your account. Please correct the errors below.",
"reset.password.form.heading": "Reset Password",
"reset.password.form.submit.button": "Submit",
"reset.password.form.need.help.text": "Need help signing in?",
"reset.password.form.help.center.link": "Help center",
"reset.password.form.additional.help.text": "For additional help, contact edX support at",
"reset.password.back.to.login.button": "Back to login",
"new.password.label": "New password",
"confirm.password.label": "Confirm password",
"reset.password.button": "Reset password",
"enter.confirm.password.message": "Enter and confirm the new password",
"vulnerable.blocked.password.message": "Our system detected critical password vulnerability. Please reset your password to keep your account secure.",
"vulnerable.warned.password.message": "Our system detected password vulnerability. We encourage you to reset your password to keep your account secure.",
"email.sent.message": "Email has been sent",
"help.center": "Help Center",
"password.required.message": "Password is a required field",
"passwords.do.not.match": "Passwords do not match",
"confirm.your.password": "Confirm your password",
"reset.password.failure.heading": "We couldn't reset your password.",
"forgot.Password.form.email.label": "Email",
"forgot.password.empty.email.field.error": "Email is required",
"forgot.password.page.invalid.email.message": "Enter a valid email address",
"forgot.password.internal.server.error": "An error has occurred. Try refreshing the page, or check your internet connection.",
"forgot.password.error.alert.title.": "We were unable to contact you.",
"forgot.password.extend.field.errors": "{emailError} below.",
"forgot.password.request.in.progress.message": "Your previous request is in progress, please try again in a few moments.",
"reset.password.validate.token.heading.text": "Validating your reset password link...",
"invalid.token.heading": "Invalid password reset link",
"invalid.token.error.message": "This password reset link is invalid. It may have been used already. Enter your email below to receive a new link.",
"did.you.mean.alert.text": "Did you mean",
"empty.email.field.error": "Email is required",
"email.invalid.format.error": "Enter a valid email address",
"registration.form.marketing.opt.in.label": "I agree that edX may send me marketing messages",
"empty.name.field.error": "Full name is required",
"name.validation.message": "Enter a valid name",
"show.password": "Show password",
"hide.password": "Hide password",
"one.letter": "1 letter",
"one.number": "1 number",
"eight.characters": "8 characters",
"registration.form.full.name.label": "{label}",
"account.activation.error.message": "Something went wrong, please {supportLink} to resolve this issue.",
"register.page.terms.of.service.and.honor.code": "By creating an account, you agree to the {TOSAndHonorCode} and you acknowledge that edX and each Member process your personal data in accordance with the {privacyPolicy}.",
"forgot.password.confirmation.message": "We sent an email to {email} with instructions to reset your password. If you do not receive a password reset message after 1 minute, verify that you entered the correct email address, or check your spam folder. If you need further assistance, visit {helpCenter}.",
"reset.password.form.submission.error": "Please check your responses and try again.",
"reset.password.success": "Your password has been reset. Sign in to your account.",
"internal.server.error": "An error has occurred. Try refreshing the page, or check your internet connection.",
"rate.limit.error": "An error has occurred because of too many requests. Please try again after some time."
}

0 comments on commit f3ea511

Please sign in to comment.