diff --git a/client/i18n/intro-schema.js b/client/i18n/intro-schema.js index 1929e6b497..07980da317 100644 --- a/client/i18n/intro-schema.js +++ b/client/i18n/intro-schema.js @@ -5,7 +5,6 @@ const introSchema = { 'responsive-web-design': { title: 'Responsive Web Design', - isTranslated: true, intro: [ "In this Responsive Web Design Certification, you'll learn the languages that developers use to build webpages: HTML (Hypertext Markup Language) for content, and CSS (Cascading Style Sheets) for design.", "First, you'll build a cat photo app to learn the basics of HTML and CSS. Later, you'll learn modern techniques like CSS variables by building a penguin, and best practices for accessibility by building a web form.", @@ -84,7 +83,6 @@ const introSchema = { }, 'javascript-algorithms-and-data-structures': { title: 'JavaScript Algorithms and Data Structures', - isTranslated: true, intro: [ "While HTML and CSS control the content and styling of a page, JavaScript is used to make it interactive. In the JavaScript Algorithm and Data Structures Certification, you'll learn the fundamentals of JavaScript including variables, arrays, objects, loops, and functions.", "Once you have the fundamentals down, you'll apply that knowledge by creating algorithms to manipulate strings, factorialize numbers, and even calculate the orbit of the International Space Station.", @@ -179,7 +177,6 @@ const introSchema = { }, 'front-end-libraries': { title: 'Front End Development Libraries', - isTranslated: true, intro: [ "Now that you're familiar with HTML, CSS, and JavaScript, level up your skills by learning some of the most popular front end libraries in the industry.", "In the Front End Libraries Certification, you'll learn how to style your site quickly with Bootstrap. You'll also learn how add logic to your CSS styles and extend them with Sass.", @@ -242,7 +239,6 @@ const introSchema = { }, 'data-visualization': { title: 'Data Visualization', - isTranslated: true, intro: [ "Data is all around us, but it doesn't mean much without shape or context.", "In the Data Visualization Certification, you'll build charts, graphs, and maps to present different types of data with the D3.js library.", @@ -281,7 +277,6 @@ const introSchema = { }, 'apis-and-microservices': { title: 'APIs and Microservices', - isTranslated: true, intro: [ "Until this point, you've only used JavaScript on the front end to add interactivity to a page, solve algorithm challenges, or build an SPA. But JavaScript can also be used on the back end, or server, to build entire web applications.", 'Today, one of the popular ways to build applications is through microservices, which are small, modular applications that work together to form a larger whole.', @@ -323,7 +318,6 @@ const introSchema = { }, 'quality-assurance': { title: 'Quality Assurance', - isTranslated: true, intro: [ "As your programs or web applications become more complex, you'll want to test them to make sure that new changes don't break their original functionality.", "In the Quality Assurance Certification, you'll learn how to write to write tests with Chai to ensure your applications work the way you expect them to.", @@ -357,7 +351,6 @@ const introSchema = { }, 'scientific-computing-with-python': { title: 'Scientific Computing with Python', - isTranslated: true, intro: [ 'Python is one of the most popular, flexible programming languages today. You can use it for everything from basic scripting to machine learning.', "In the Scientific Computing with Python Certification, you'll Python fundamentals like variables, loops, conditionals, and functions. Then you'll quickly ramp up to complex data structures, networking, relational databases, and data visualization." @@ -380,7 +373,6 @@ const introSchema = { }, 'data-analysis-with-python': { title: 'Data Analysis with Python', - isTranslated: true, intro: [ 'Data Analysis has been around for a long time. But up until a few years ago, developers practiced it using expensive, closed-source tools like Tableau. But recently, Python, SQL, and other open libraries have changed Data Analysis forever.', "In the Data Analysis with Python Certification, you'll learn the fundamentals of data analysis with Python. By the end of this certification, you'll know how to read data from sources like CSVs and SQL, and how to use libraries like Numpy, Pandas, Matplotlib, and Seaborn to process and visualize data." @@ -411,7 +403,6 @@ const introSchema = { }, 'information-security': { title: 'Information Security', - isTranslated: true, intro: [ "With everything we do online, there's a vast amount of sensitive information at risk: email addresses, passwords, phone numbers, and much more.", "With the Information Security Certification, you'll build a secure web app with HelmetJS to learn the fundamentals of protecting people's information online.", @@ -443,7 +434,6 @@ const introSchema = { }, 'machine-learning-with-python': { title: 'Machine Learning with Python', - isTranslated: true, intro: [ 'Machine learning has many practical applications that you can use in your projects or on the job.', "In the Machine Learning with Python Certification, you'll use the TensorFlow framework to build several neural networks. A you'll explore more advanced techniques like natural language processing and reinforcement learning.", @@ -474,7 +464,6 @@ const introSchema = { }, 'coding-interview-prep': { title: 'Coding Interview Prep', - isTranslated: true, intro: [ "If you're looking for free coding exercises to prepare for your next job interview, we've got you covered.", 'This section contains hundreds of coding challenges that test your knowledge of algorithms, data structures, and mathematics. It also has a number of take-home projects you can use to strengthen your skills, or add to your portfolio.' @@ -523,9 +512,7 @@ const introSchema = { 'Browse our other free certifications\n(we recommend doing these in order)', courses: 'Courses', expand: 'Expand', - collapse: 'Collapse', - 'translation-banner': "We're still translating this certification.", - 'translation-help': 'You can help here' + collapse: 'Collapse' } }; exports.introSchema = introSchema; diff --git a/client/i18n/locales/chinese/intro.json b/client/i18n/locales/chinese/intro.json index 5bf258e378..286e5ab54e 100644 --- a/client/i18n/locales/chinese/intro.json +++ b/client/i18n/locales/chinese/intro.json @@ -1,7 +1,6 @@ { "responsive-web-design": { "title": "响应式网页设计", - "isTranslated": true, "intro": [ "在响应式网页设计认证中,你将学习开发者用来编写网页的语言:HTML(超文本标记语言)用于创建内容,CSS(级联样式表)用于样式设计。", "首先,你将通过编写一个展示猫咪图片的应用,学习 HTML 和 CSS 的基本知识。 然后,通过画企鹅来学习像 CSS 变量这样的现代技术,以及通过构建网页表单来学习无障碍的最佳实践。", @@ -80,7 +79,6 @@ }, "javascript-algorithms-and-data-structures": { "title": "JavaScript 算法和数据结构", - "isTranslated": false, "intro": [ "HTML 和 CSS 控制页面的内容和样式,JavaScript 则用于页面交互。在 JavaScript 算法和数据结构认证中,你将学习 JavaScript 的基础知识,包括变量、 数组、 对象、 循环和函数。", "打好基础之后,你将会通过创建算法来操作字符串、进行阶乘运算甚至计算国际空间站的轨道来应用这些知识。", @@ -175,7 +173,6 @@ }, "front-end-libraries": { "title": "前端开发库", - "isTranslated": false, "intro": [ "你已经熟悉了 HTML、CSS 和 JavaScript。现在学习行业中一些流行的前端库来提升你的技能吧。", "在前端库认证中,你将学习如何使用 Bootstrap 快速设置网站样式,以及如何在 CSS 样式中添加逻辑,并使用 Sass 对其进行扩展。", @@ -238,7 +235,6 @@ }, "data-visualization": { "title": "Data Visualization", - "isTranslated": false, "intro": [ "Data is all around us, but it doesn't mean much without shape or context.", "In the Data Visualization Certification, you'll build charts, graphs, and maps to present different types of data with the D3.js library.", @@ -277,7 +273,6 @@ }, "apis-and-microservices": { "title": "APIs and Microservices", - "isTranslated": false, "intro": [ "Until this point, you've only used JavaScript on the front end to add interactivity to a page, solve algorithm challenges, or build an SPA. But JavaScript can also be used on the back end, or server, to build entire web applications.", "Today, one of the popular ways to build applications is through microservices, which are small, modular applications that work together to form a larger whole.", @@ -319,7 +314,6 @@ }, "quality-assurance": { "title": "Quality Assurance", - "isTranslated": false, "intro": [ "As your programs or web applications become more complex, you'll want to test them to make sure that new changes don't break their original functionality.", "In the Quality Assurance Certification, you'll learn how to write to write tests with Chai to ensure your applications work the way you expect them to.", @@ -353,7 +347,6 @@ }, "scientific-computing-with-python": { "title": "Scientific Computing with Python", - "isTranslated": false, "intro": [ "Python is one of the most popular, flexible programming languages today. You can use it for everything from basic scripting to machine learning.", "In the Scientific Computing with Python Certification, you'll Python fundamentals like variables, loops, conditionals, and functions. Then you'll quickly ramp up to complex data structures, networking, relational databases, and data visualization." @@ -376,7 +369,6 @@ }, "data-analysis-with-python": { "title": "Data Analysis with Python", - "isTranslated": false, "intro": [ "Data Analysis has been around for a long time. But up until a few years ago, developers practiced it using expensive, closed-source tools like Tableau. But recently, Python, SQL, and other open libraries have changed Data Analysis forever.", "In the Data Analysis with Python Certification, you'll learn the fundamentals of data analysis with Python. By the end of this certification, you'll know how to read data from sources like CSVs and SQL, and how to use libraries like Numpy, Pandas, Matplotlib, and Seaborn to process and visualize data." @@ -407,7 +399,6 @@ }, "information-security": { "title": "Information Security", - "isTranslated": false, "intro": [ "With everything we do online, there's a vast amount of sensitive information at risk: email addresses, passwords, phone numbers, and much more.", "With the Information Security Certification, you'll build a secure web app with HelmetJS to learn the fundamentals of protecting people's information online.", @@ -439,7 +430,6 @@ }, "machine-learning-with-python": { "title": "Machine Learning with Python", - "isTranslated": false, "intro": [ "Machine learning has many practical applications that you can use in your projects or on the job.", "In the Machine Learning with Python Certification, you'll use the TensorFlow framework to build several neural networks. A you'll explore more advanced techniques like natural language processing and reinforcement learning.", @@ -470,7 +460,6 @@ }, "coding-interview-prep": { "title": "Coding Interview Prep", - "isTranslated": false, "intro": [ "If you're looking for free coding exercises to prepare for your next job interview, we've got you covered.", "This section contains hundreds of coding challenges that test your knowledge of algorithms, data structures, and mathematics. It also has a number of take-home projects you can use to strengthen your skills, or add to your portfolio." @@ -518,8 +507,6 @@ "browse-other": "浏览我们的其他免费认证\n(我们建议你按顺序学习)", "courses": "课程", "expand": "展开", - "collapse": "折叠", - "translation-banner": "我们正在翻译此认证的课程。", - "translation-help": "你可以帮助我们翻译。" + "collapse": "折叠" } } diff --git a/client/i18n/locales/chinese/translations.json b/client/i18n/locales/chinese/translations.json index 7970e49879..5c41667919 100644 --- a/client/i18n/locales/chinese/translations.json +++ b/client/i18n/locales/chinese/translations.json @@ -291,7 +291,9 @@ "code": "码", "tests": "测验", "preview": "预习" - } + }, + "help-translate": "We are still translating the following certifications.", + "help-translate-link": "Help us translate." }, "donate": { "title": "支持我们的非营利组织", @@ -374,7 +376,8 @@ "update-email-2": "在这里更新你的邮件地址:", "email": "邮箱", "and": "和", - "change-theme": "登录以更改主题。" + "change-theme": "登录以更改主题。", + "translation-pending": "Help us translate" }, "icons": { "gold-cup": "金奖杯", diff --git a/client/i18n/locales/english/intro.json b/client/i18n/locales/english/intro.json index 99e7af10aa..1dbf447d8b 100644 --- a/client/i18n/locales/english/intro.json +++ b/client/i18n/locales/english/intro.json @@ -1,7 +1,6 @@ { "responsive-web-design": { "title": "Responsive Web Design", - "isTranslated": true, "intro": [ "In this Responsive Web Design Certification, you'll learn the languages that developers use to build webpages: HTML (Hypertext Markup Language) for content, and CSS (Cascading Style Sheets) for design.", "First, you'll build a cat photo app to learn the basics of HTML and CSS. Later, you'll learn modern techniques like CSS variables by building a penguin, and best practices for accessibility by building a web form.", @@ -80,7 +79,6 @@ }, "javascript-algorithms-and-data-structures": { "title": "JavaScript Algorithms and Data Structures", - "isTranslated": true, "intro": [ "While HTML and CSS control the content and styling of a page, JavaScript is used to make it interactive. In the JavaScript Algorithm and Data Structures Certification, you'll learn the fundamentals of JavaScript including variables, arrays, objects, loops, and functions.", "Once you have the fundamentals down, you'll apply that knowledge by creating algorithms to manipulate strings, factorialize numbers, and even calculate the orbit of the International Space Station.", @@ -175,7 +173,6 @@ }, "front-end-libraries": { "title": "Front End Development Libraries", - "isTranslated": true, "intro": [ "Now that you're familiar with HTML, CSS, and JavaScript, level up your skills by learning some of the most popular front end libraries in the industry.", "In the Front End Libraries Certification, you'll learn how to style your site quickly with Bootstrap. You'll also learn how add logic to your CSS styles and extend them with Sass.", @@ -238,7 +235,6 @@ }, "data-visualization": { "title": "Data Visualization", - "isTranslated": true, "intro": [ "Data is all around us, but it doesn't mean much without shape or context.", "In the Data Visualization Certification, you'll build charts, graphs, and maps to present different types of data with the D3.js library.", @@ -277,7 +273,6 @@ }, "apis-and-microservices": { "title": "APIs and Microservices", - "isTranslated": true, "intro": [ "Until this point, you've only used JavaScript on the front end to add interactivity to a page, solve algorithm challenges, or build an SPA. But JavaScript can also be used on the back end, or server, to build entire web applications.", "Today, one of the popular ways to build applications is through microservices, which are small, modular applications that work together to form a larger whole.", @@ -319,7 +314,6 @@ }, "quality-assurance": { "title": "Quality Assurance", - "isTranslated": true, "intro": [ "As your programs or web applications become more complex, you'll want to test them to make sure that new changes don't break their original functionality.", "In the Quality Assurance Certification, you'll learn how to write to write tests with Chai to ensure your applications work the way you expect them to.", @@ -353,7 +347,6 @@ }, "scientific-computing-with-python": { "title": "Scientific Computing with Python", - "isTranslated": true, "intro": [ "Python is one of the most popular, flexible programming languages today. You can use it for everything from basic scripting to machine learning.", "In the Scientific Computing with Python Certification, you'll Python fundamentals like variables, loops, conditionals, and functions. Then you'll quickly ramp up to complex data structures, networking, relational databases, and data visualization." @@ -376,7 +369,6 @@ }, "data-analysis-with-python": { "title": "Data Analysis with Python", - "isTranslated": true, "intro": [ "Data Analysis has been around for a long time. But up until a few years ago, developers practiced it using expensive, closed-source tools like Tableau. But recently, Python, SQL, and other open libraries have changed Data Analysis forever.", "In the Data Analysis with Python Certification, you'll learn the fundamentals of data analysis with Python. By the end of this certification, you'll know how to read data from sources like CSVs and SQL, and how to use libraries like Numpy, Pandas, Matplotlib, and Seaborn to process and visualize data." @@ -407,7 +399,6 @@ }, "information-security": { "title": "Information Security", - "isTranslated": true, "intro": [ "With everything we do online, there's a vast amount of sensitive information at risk: email addresses, passwords, phone numbers, and much more.", "With the Information Security Certification, you'll build a secure web app with HelmetJS to learn the fundamentals of protecting people's information online.", @@ -439,7 +430,6 @@ }, "machine-learning-with-python": { "title": "Machine Learning with Python", - "isTranslated": true, "intro": [ "Machine learning has many practical applications that you can use in your projects or on the job.", "In the Machine Learning with Python Certification, you'll use the TensorFlow framework to build several neural networks. A you'll explore more advanced techniques like natural language processing and reinforcement learning.", @@ -470,7 +460,6 @@ }, "coding-interview-prep": { "title": "Coding Interview Prep", - "isTranslated": true, "intro": [ "If you're looking for free coding exercises to prepare for your next job interview, we've got you covered.", "This section contains hundreds of coding challenges that test your knowledge of algorithms, data structures, and mathematics. It also has a number of take-home projects you can use to strengthen your skills, or add to your portfolio." @@ -518,8 +507,6 @@ "browse-other": "Browse our other free certifications\n(we recommend doing these in order)", "courses": "Courses", "expand": "Expand", - "collapse": "Collapse", - "translation-banner": "We're still translating this certification.", - "translation-help": "You can help here" + "collapse": "Collapse" } } diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index 03afb3a9be..803c344d6c 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -291,7 +291,9 @@ "code": "Code", "tests": "Tests", "preview": "Preview" - } + }, + "help-translate": "We are still translating the following certifications.", + "help-translate-link": "Help us translate." }, "donate": { "title": "Support our nonprofit", @@ -374,7 +376,8 @@ "update-email-2": "Update your email address here:", "email": "Email", "and": "and", - "change-theme": "Sign in to change theme." + "change-theme": "Sign in to change theme.", + "translation-pending": "Help us translate" }, "icons": { "gold-cup": "Gold Cup", diff --git a/client/i18n/locales/espanol/intro.json b/client/i18n/locales/espanol/intro.json index b35490ac28..3ea6b4b076 100644 --- a/client/i18n/locales/espanol/intro.json +++ b/client/i18n/locales/espanol/intro.json @@ -1,7 +1,6 @@ { "responsive-web-design": { "title": "Diseño web responsivo", - "isTranslated": true, "intro": [ "En esta Certificación de Diseño Web Responsivo, aprenderás los lenguajes que los desarrolladores utilizan para construir páginas web: HTML (lenguaje de marcado de hipertexto) para el contenido, y CSS (Hojas de estilo en cascada) para el diseño.", "Primero, crearás una aplicación de fotos de gatos para aprender los conceptos básicos de HTML y CSS. Más adelante, aprenderá técnicas modernas como variables CSS mediante la construcción de un pingüino, y las mejores prácticas para la accesibilidad mediante la construcción de un formulario web.", @@ -80,7 +79,6 @@ }, "javascript-algorithms-and-data-structures": { "title": "JavaScript Algorithms and Data Structures", - "isTranslated": false, "intro": [ "While HTML and CSS control the content and styling of a page, JavaScript is used to make it interactive. In the JavaScript Algorithm and Data Structures Certification, you'll learn the fundamentals of JavaScript including variables, arrays, objects, loops, and functions.", "Once you have the fundamentals down, you'll apply that knowledge by creating algorithms to manipulate strings, factorialize numbers, and even calculate the orbit of the International Space Station.", @@ -175,7 +173,6 @@ }, "front-end-libraries": { "title": "Front End Development Libraries", - "isTranslated": false, "intro": [ "Now that you're familiar with HTML, CSS, and JavaScript, level up your skills by learning some of the most popular front end libraries in the industry.", "In the Front End Libraries Certification, you'll learn how to style your site quickly with Bootstrap. You'll also learn how add logic to your CSS styles and extend them with Sass.", @@ -238,7 +235,6 @@ }, "data-visualization": { "title": "Data Visualization", - "isTranslated": false, "intro": [ "Data is all around us, but it doesn't mean much without shape or context.", "In the Data Visualization Certification, you'll build charts, graphs, and maps to present different types of data with the D3.js library.", @@ -277,7 +273,6 @@ }, "apis-and-microservices": { "title": "APIs and Microservices", - "isTranslated": false, "intro": [ "Until this point, you've only used JavaScript on the front end to add interactivity to a page, solve algorithm challenges, or build an SPA. But JavaScript can also be used on the back end, or server, to build entire web applications.", "Today, one of the popular ways to build applications is through microservices, which are small, modular applications that work together to form a larger whole.", @@ -319,7 +314,6 @@ }, "quality-assurance": { "title": "Quality Assurance", - "isTranslated": false, "intro": [ "As your programs or web applications become more complex, you'll want to test them to make sure that new changes don't break their original functionality.", "In the Quality Assurance Certification, you'll learn how to write to write tests with Chai to ensure your applications work the way you expect them to.", @@ -353,7 +347,6 @@ }, "scientific-computing-with-python": { "title": "Scientific Computing with Python", - "isTranslated": false, "intro": [ "Python is one of the most popular, flexible programming languages today. You can use it for everything from basic scripting to machine learning.", "In the Scientific Computing with Python Certification, you'll Python fundamentals like variables, loops, conditionals, and functions. Then you'll quickly ramp up to complex data structures, networking, relational databases, and data visualization." @@ -376,7 +369,6 @@ }, "data-analysis-with-python": { "title": "Data Analysis with Python", - "isTranslated": false, "intro": [ "Data Analysis has been around for a long time. But up until a few years ago, developers practiced it using expensive, closed-source tools like Tableau. But recently, Python, SQL, and other open libraries have changed Data Analysis forever.", "In the Data Analysis with Python Certification, you'll learn the fundamentals of data analysis with Python. By the end of this certification, you'll know how to read data from sources like CSVs and SQL, and how to use libraries like Numpy, Pandas, Matplotlib, and Seaborn to process and visualize data." @@ -407,7 +399,6 @@ }, "information-security": { "title": "Information Security", - "isTranslated": false, "intro": [ "With everything we do online, there's a vast amount of sensitive information at risk: email addresses, passwords, phone numbers, and much more.", "With the Information Security Certification, you'll build a secure web app with HelmetJS to learn the fundamentals of protecting people's information online.", @@ -439,7 +430,6 @@ }, "machine-learning-with-python": { "title": "Machine Learning with Python", - "isTranslated": false, "intro": [ "Machine learning has many practical applications that you can use in your projects or on the job.", "In the Machine Learning with Python Certification, you'll use the TensorFlow framework to build several neural networks. A you'll explore more advanced techniques like natural language processing and reinforcement learning.", @@ -470,7 +460,6 @@ }, "coding-interview-prep": { "title": "Coding Interview Prep", - "isTranslated": false, "intro": [ "If you're looking for free coding exercises to prepare for your next job interview, we've got you covered.", "This section contains hundreds of coding challenges that test your knowledge of algorithms, data structures, and mathematics. It also has a number of take-home projects you can use to strengthen your skills, or add to your portfolio." @@ -518,8 +507,6 @@ "browse-other": "Explora otras de nuestras certificaciones gratuitas\n (recomendamos hacerlas en orden)", "courses": "Cursos", "expand": "Expandir", - "collapse": "Colapso", - "translation-banner": "Aún estamos traduciendo esta certificación", - "translation-help": "Puedes ayudar aquí" + "collapse": "Colapso" } } diff --git a/client/i18n/locales/espanol/translations.json b/client/i18n/locales/espanol/translations.json index cd8091a0be..3fc7a6d35b 100644 --- a/client/i18n/locales/espanol/translations.json +++ b/client/i18n/locales/espanol/translations.json @@ -291,7 +291,9 @@ "code": "Código", "tests": "Pruebas", "preview": "Avance" - } + }, + "help-translate": "We are still translating the following certifications.", + "help-translate-link": "Help us translate." }, "donate": { "title": "Apoya a nuestra organización sin fines de lucro", @@ -374,7 +376,8 @@ "update-email-2": "Actualiza tu correo electrónico aquí:", "email": "Correo electrónico", "and": "y", - "change-theme": "Inicia sesión para cambiar el tema." + "change-theme": "Inicia sesión para cambiar el tema.", + "translation-pending": "Help us translate" }, "icons": { "gold-cup": "Copa de Oro", diff --git a/client/i18n/schema-validation.js b/client/i18n/schema-validation.js index 4e3ac30717..22e1e7b251 100644 --- a/client/i18n/schema-validation.js +++ b/client/i18n/schema-validation.js @@ -91,7 +91,7 @@ const noEmptyObjectValues = (obj, namespace = '') => { emptyKeys.push( noEmptyObjectValues(obj[key], namespace ? `${namespace}.${key}` : key) ); - } else if (!obj[key] && typeof obj[key] !== 'boolean') { + } else if (!obj[key]) { emptyKeys.push(namespace ? `${namespace}.${key}` : key); } } diff --git a/client/i18n/translations-schema.js b/client/i18n/translations-schema.js index 8265a48b85..644006606e 100644 --- a/client/i18n/translations-schema.js +++ b/client/i18n/translations-schema.js @@ -340,7 +340,9 @@ const translationsSchema = { code: 'Code', tests: 'Tests', preview: 'Preview' - } + }, + 'help-translate': 'We are still translating the following certifications.', + 'help-translate-link': 'Help us translate.' }, donate: { title: 'Support our nonprofit', @@ -445,7 +447,8 @@ const translationsSchema = { 'update-email-2': 'Update your email address here:', email: 'Email', and: 'and', - 'change-theme': 'Sign in to change theme.' + 'change-theme': 'Sign in to change theme.', + 'translation-pending': 'Help us translate' }, icons: { 'gold-cup': 'Gold Cup', diff --git a/client/src/components/Header/components/universalNav.css b/client/src/components/Header/components/universalNav.css index b9ea6939e6..836e31343e 100644 --- a/client/src/components/Header/components/universalNav.css +++ b/client/src/components/Header/components/universalNav.css @@ -308,7 +308,7 @@ } } -@media (max-width: 680px) { +@media (max-width: 600px) { .nav-list { min-width: 100%; top: calc(var(--header-height) * 2); diff --git a/client/src/components/Map/index.js b/client/src/components/Map/index.js index 081fd1918f..cc67e566ec 100644 --- a/client/src/components/Map/index.js +++ b/client/src/components/Map/index.js @@ -4,10 +4,12 @@ import { graphql, useStaticQuery } from 'gatsby'; import i18next from 'i18next'; import { generateIconComponent } from '../../assets/icons'; -import { Link } from '../helpers'; +import { Link, Spacer } from '../helpers'; import LinkButton from '../../assets/icons/LinkButton'; import { dasherize } from '../../../../utils/slugs'; import './map.css'; +import { isAuditedCert } from '../../../../utils/is-audited'; +import { curriculumLocale } from '../../../../config/env.json'; const propTypes = { currentSuperBlock: PropTypes.string, @@ -53,7 +55,7 @@ function renderLandingMap(nodes) { function renderLearnMap(nodes, currentSuperBlock = '') { nodes = nodes.filter(node => node.superBlock !== currentSuperBlock); - return ( + return curriculumLocale === 'english' ? ( + ) : ( + ); } diff --git a/client/src/templates/Challenges/components/Challenge-Title.js b/client/src/templates/Challenges/components/Challenge-Title.js index ca0c71fe5c..2f4363b441 100644 --- a/client/src/templates/Challenges/components/Challenge-Title.js +++ b/client/src/templates/Challenges/components/Challenge-Title.js @@ -17,6 +17,12 @@ const propTypes = { function ChallengeTitle({ block, children, isCompleted, superBlock }) { return (
+ + {i18next.t('misc.translation-pending')} +
- {children} - {isCompleted ? ( - - ) : null} +
+ {children} + {isCompleted ? ( + + ) : null} +
); diff --git a/client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap b/client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap index 734ff5f7de..8f55acc75c 100644 --- a/client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap +++ b/client/src/templates/Challenges/components/__snapshots__/ChallengeTitle.test.js.snap @@ -4,6 +4,12 @@ exports[` renders correctly 1`] = `
+
@@ -31,67 +37,71 @@ exports[` renders correctly 1`] = `
- - title text - - - icons.passed - - + title text + + + icons.passed + + - - - icons.passed - - - - - - + viewBox="0 0 200 200" + width="50" + xmlns="http://www.w3.org/2000/svg" + > + + + icons.passed + + + + + + +
`; diff --git a/client/src/templates/Challenges/components/challenge-title.css b/client/src/templates/Challenges/components/challenge-title.css index bf79c54145..3806fff6df 100644 --- a/client/src/templates/Challenges/components/challenge-title.css +++ b/client/src/templates/Challenges/components/challenge-title.css @@ -4,6 +4,11 @@ } .challenge-title { + display: flex; + flex-direction: row; + justify-content: space-around; + font-size: 16px; + height: 25px; margin: 20px 0px 15px; } @@ -71,3 +76,38 @@ text-decoration: underline; background-color: var(--secondary-background); } + +.title-text { + text-decoration: none; + min-width: 25px; + display: inline-block; + align-items: center; + justify-content: center; + overflow: hidden; + text-overflow: ellipsis; + max-height: 25px; + word-wrap: none; + white-space: nowrap; + flex-grow: 1; + flex-shrink: 1; + padding: 0px 3px; +} + +.title-translation-cta { + display: flex; + flex-direction: row; + justify-content: space-around; + font-size: 16px; + height: 25px; + text-decoration: none; + color: var(--highlight-color); + background-color: var(--highlight-background); + margin-bottom: 10px; +} + +.title-translation-cta:hover, +.title-translation-cta:focus { + text-decoration: none; + color: var(--highlight-background); + background-color: var(--highlight-color); +} diff --git a/client/src/templates/Introduction/SuperBlockIntro.js b/client/src/templates/Introduction/SuperBlockIntro.js index e75cd11f0f..ce8e31cba8 100644 --- a/client/src/templates/Introduction/SuperBlockIntro.js +++ b/client/src/templates/Introduction/SuperBlockIntro.js @@ -15,7 +15,7 @@ import CertChallenge from './components/CertChallenge'; import SuperBlockIntro from './components/SuperBlockIntro'; import { dasherize } from '../../../../utils/slugs'; import Block from './components/Block'; -import { Spacer, Link } from '../../components/helpers'; +import { Spacer } from '../../components/helpers'; import { currentChallengeIdSelector, userFetchStateSelector, @@ -127,33 +127,17 @@ export class SuperBlockIntroductionPage extends Component { const nodesForSuperBlock = edges.map(({ node }) => node); const blockDashedNames = uniq(nodesForSuperBlock.map(({ block }) => block)); - const superBlockIntroObj = t(`intro:${superBlockDashedName}`); - const { title: i18nSuperBlock, isTranslated } = superBlockIntroObj; - const translationBannerText = t(`intro:misc-text.translation-banner`); - const translationBannerHelpText = t(`intro:misc-text.translation-help`); + const i18nSuperBlock = t(`intro:${superBlockDashedName}.title`); return ( <> {i18nSuperBlock} | freeCodeCamp.org - {isTranslated ? ( - '' - ) : ( - -

- {translationBannerText} {translationBannerHelpText}. -

- - )} - +

diff --git a/client/src/templates/Introduction/components/Block.js b/client/src/templates/Introduction/components/Block.js index 09357e8373..78260975a2 100644 --- a/client/src/templates/Introduction/components/Block.js +++ b/client/src/templates/Introduction/components/Block.js @@ -11,6 +11,9 @@ import Challenges from './Challenges'; import Caret from '../../../assets/icons/Caret'; import GreenPass from '../../../assets/icons/GreenPass'; import GreenNotCompleted from '../../../assets/icons/GreenNotCompleted'; +import { isAuditedCert } from '../../../../../utils/is-audited'; +import { curriculumLocale } from '../../../../../config/env.json'; +import { Link } from '../../../components/helpers/'; const mapStateToProps = (state, ownProps) => { const expandedSelector = makeExpandedBlockSelector(ownProps.blockDashedName); @@ -130,7 +133,19 @@ export class Block extends Component { return isProjectBlock ? (
-

{blockTitle}

+
+

{blockTitle}

+ {!isAuditedCert(curriculumLocale, superBlockDashedName) && ( +
+ + {t('misc.translation-pending')} + +
+ )} +
{this.renderBlockIntros(blockIntroArr)} ) : (
-

{blockTitle}

+
+

{blockTitle}

+ {!isAuditedCert(curriculumLocale, superBlockDashedName) && ( +
+ + {t('misc.translation-pending')} + +
+ )} +
{this.renderBlockIntros(blockIntroArr)}