refactor: use the English json as the schema (#41146)

Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
This commit is contained in:
Oliver Eyton-Williams
2021-02-18 06:08:45 +01:00
committed by GitHub
parent 762775889e
commit e7aa1c5d62
7 changed files with 47 additions and 1269 deletions

View File

@ -1,518 +0,0 @@
/* eslint-disable camelcase */
/* This is used for testing. If an intro.json file doesn't match the
* structure here exactly, the tests will fail.
*/
const introSchema = {
'responsive-web-design': {
title: 'Responsive Web Design',
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.",
"Finally, you'll learn how to make webpages that respond to different screen sizes by building a Twitter card with Flexbox, and a complex blog layout with CSS Grid."
],
blocks: {
'basic-html-and-html5': {
title: 'Basic HTML and HTML5',
intro: [
'HTML is a markup language that uses a special syntax or notation to describe the structure of a webpage to the browser. HTML elements usually have opening and closing tags that surround and give meaning to content. For example, different elements can describe text as a heading, paragraph, or list item.',
"In this course, you'll build a cat photo app to learn some of the most common HTML elements — the building blocks of any webpage."
]
},
'basic-css': {
title: 'Basic CSS',
intro: [
'CSS, or Cascading Style Sheets, tell the browser how to display the text and other content that you write in HTML. With CSS, you can control the color, font, size, spacing, and many other aspects of HTML elements.',
"Now that you've described the structure of your cat photo app, give it some style with CSS."
]
},
'applied-visual-design': {
title: 'Applied Visual Design',
intro: [
'Visual design is a combination of typography, color theory, graphics, animation, page layout, and more to help deliver your unique message.',
"In this course, you'll learn how to apply these different elements of visual design to your webpages."
]
},
'applied-accessibility': {
title: 'Applied Accessibility',
intro: [
'In web development, accessibility refers to web content and a UI (user interface) that can be understood, navigated, and interacted with by a broad audience. This includes people with visual, auditory, mobility, or cognitive disabilities.',
"In this course, you'll learn best practices for building webpages that are accessible to everyone."
]
},
'responsive-web-design-principles': {
title: 'Responsive Web Design Principles',
intro: [
'There are many devices that can access the web, and they come in all shapes and sizes. Responsive web design is the practice of designing flexible websites that can respond to different screen sizes, orientations, and resolutions.',
"In this course, you'll learn how to use CSS to make your webpages look good, no matter what device they're viewed on."
]
},
'css-flexbox': {
title: 'CSS Flexbox',
intro: [
"Flexbox is a powerful, well-supported layout method that was introduced with the latest version of CSS, CSS3. With flexbox, it's easy to center elements on the page and create dynamic user interfaces that shrink and expand automatically.",
"In this course, you'll learn the fundamentals of flexbox and dynamic layouts by building a Twitter card."
]
},
'css-grid': {
title: 'CSS Grid',
intro: [
'The CSS grid is a newer standard that makes it easy to build complex responsive layouts. It works by turning an HTML element into a grid, and lets you place child elements anywhere within.',
"In this course, you'll learn the fundamentals of CSS grid by building different complex layouts, including a blog."
]
},
'responsive-web-design-projects': {
title: 'Responsive Web Design Projects',
intro: [
'Time to put your newly learnt skills to work. By working on these projects, you will get a chance to apply all of the skills, principles, and concepts you have learned so far: HTML, CSS, Visual Design, Accessibility, and more.',
'Complete the five web programming projects below to earn your Responsive Web Design certification.'
]
},
'basic-html-cat-photo-app': {
title: 'Basic HTML Cat Photo App',
intro: ['placeholder', 'placeholder']
},
'basic-css-cafe-menu': {
title: 'Basic CSS Cafe Menu',
intro: ['placeholder', 'placeholder']
},
'css-variables-skyline': {
title: 'CSS Variables Skyline',
intro: ['placeholder', 'placeholder']
}
}
},
'javascript-algorithms-and-data-structures': {
title: 'JavaScript Algorithms and Data Structures',
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.",
"Along the way, you'll also learn two important programing styles or paradigms: Object Oriented Programing (OOP), and Functional Programing (FP)."
],
blocks: {
'basic-javascript': {
title: 'Basic JavaScript',
intro: [
'JavaScript is a scripting language you can use to make web pages interactive. It is one of the core technologies of the web, along with HTML and CSS, and is supported by all modern browsers.',
"In this course, you'll learn fundamental programming concepts in JavaScript. You'll start with basic data structures like numbers and strings. Then you'll learn to work with arrays, objects, functions, loops, if/else statements, and more."
]
},
es6: {
title: 'ES6',
intro: [
'ECMAScript, or ES, is a standardized version of JavaScript. Because all major browsers follow this specification, the terms ECMAScript and JavaScript are interchangeable.',
"Most of the JavaScript you've learned up to this point was in ES5 (ECMAScript 5), which was finalized in 2009. While you can still write programs in ES5, JavaScript is always evolving, and new features are released every year.",
"ES6, released in 2015, added many powerful new features to the language. In this course, you'll learn these new features, including <code>let</code> and <code>const</code>, arrow functions, classes, promises, and modules."
]
},
'regular-expressions': {
title: 'Regular Expressions',
intro: [
'Regular expressions, often shortened to "regex" or "regexp", are patterns that help programmers match, search, and replace text. Regular expressions are very powerful, but can be hard to read because they use special characters to make more complex, flexible matches.',
"In this course, you'll learn how to use special characters, capture groups, positive and negative lookaheads, and other techniques to match any text you want."
]
},
debugging: {
title: 'Debugging',
intro: [
'Debugging is the process of going through your code, finding any issues, and fixing them.',
"Issues in code generally come in three forms: syntax errors that prevent your program from running, runtime errors where your code has unexpected behavior, or logical errors where your code doesn't do what you intended.",
"In this course, you'll learn how to use the JavaScript console to debug programs and prevent common issues before they happen."
]
},
'basic-data-structures': {
title: 'Basic Data Structures',
intro: [
'Data can be stored and accessed in many ways. You already know some common JavaScript data structures — arrays and objects.',
"In this Basic Data Structures course, you'll learn more about the differences between arrays and objects, and which to use in different situations. You'll also learn how to use helpful JS methods like <code>splice()</code> and <code>Object.keys()</code> to access and manipulate data."
]
},
'basic-algorithm-scripting': {
title: 'Basic Algorithm Scripting',
intro: [
'An algorithm is a series of step-by-step instructions that describe how to do something.',
'To write an effective algorithm, it helps to break a problem down into smaller parts, and think carefully about how to solve each part with code.',
"In this course, you'll learn the fundamentals of algorithmic thinking by writing algorithms that do everything from converting temperatures to handling complex 2D arrays."
]
},
'object-oriented-programming': {
title: 'Object Oriented Programming',
intro: [
'OOP, or Object Oriented Programming, is one of the major approaches to the software development process. In OOP, objects and classes are used to organize code to describe things and what they can do.',
"In this course, you'll learn the basic principles of OOP in JavaScript including the <code>this</code> keyword, prototype chains, constructors, and inheritance."
]
},
'functional-programming': {
title: 'Functional Programming',
intro: [
'Functional Programming is another popular approach to software development. In Functional Programming, code is organized into smaller, basic functions that can be combined to build complex programs.',
"In this course, you'll learn the core concepts of Functional Programming including pure functions, how to avoid mutations, and how write cleaner code with methods like <code>.map()</code> and <code>.filter()</code>."
]
},
'intermediate-algorithm-scripting': {
title: 'Intermediate Algorithm Scripting',
intro: [
'Now that you know the basics of algorithmic thinking, along with OOP and Functional Programming, test your skills with the Intermediate Algorithm Scripting challenges.'
]
},
'javascript-algorithms-and-data-structures-projects': {
title: 'JavaScript Algorithms and Data Structures Projects',
intro: [
"This is it — time to put your new JavaScript skills to work. These projects are similar to the algorithm scripting challenges you've done before just much more difficult.",
'Complete these 5 JavaScript projects to earn the JavaScript Algorithms and Data Structures certification.'
]
},
'basic-javascript-rpg-game': {
title: 'Basic JavaScript RPG Game',
intro: ['placeholder', 'placeholder']
},
'intermediate-javascript-calorie-counter': {
title: 'Intermediate JavaScript Calorie Counter',
intro: ['placeholder', 'placeholder']
},
'functional-programming-spreadsheet': {
title: 'Functional Programming Spreadsheet',
intro: ['placeholder', 'placeholder']
}
}
},
'front-end-libraries': {
title: 'Front End Development Libraries',
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.",
"Later, you'll build a shopping cart and other applications to learn how to create powerful Single Page Applications (SPAs) with React and Redux."
],
blocks: {
bootstrap: {
title: 'Bootstrap',
intro: [
'Bootstrap is a front end framework used to design responsive web pages and applications. It takes a mobile-fist approach to web development, and includes pre-built CSS styles and classes, plus some JavaScript functionality.',
"In this course, you'll learn how to build responsive websites with Bootstrap, and use its included classes to style buttons, images, forms, navigation, and other common elements."
]
},
jquery: {
title: 'jQuery',
intro: [
'jQuery is one of the most widely used JavaScript libraries in the world.',
'In 2006 when it was released, all major browsers handled JavaScript slightly differently. jQuery simplified the process of writing client-side JavaScript, and also ensured that your code worked the same way in all browsers.',
"In this course, you'll learn how to use jQuery to select, remove, clone, and modify different elements on the page."
]
},
sass: {
title: 'SASS',
intro: [
'Sass, or "Syntactically Awesome StyleSheets", is a language extension of CSS. It adds features that aren\'t available in basic CSS, which make it easier for you to simplify and maintain the style sheets for your projects.',
"In this Sass course, you'll learn how to store data in variables, nest CSS, create reusable styles with mixins, add logic and loops to your styles, and more."
]
},
react: {
title: 'React',
intro: [
'React is a popular JavaScript library for building reusable, component-driven user interfaces for web pages or applications.',
'React combines HTML with JavaScript functionality into its own markup language called JSX. React also makes it easy to manage the flow of data throughout the application.',
"In this course, you'll learn how to create different React components, manage data in the form of state props, use different lifecycle methods like <code>componentDidMount</code>, and much more."
]
},
redux: {
title: 'Redux',
intro: [
'As applications grow in size and scope, managing shared data becomes much more difficult. Redux is defined as a "predictable state container for JavaScript apps" that helps ensure your apps work predictably, and are easier to test.',
'While you can use Redux with any view library, we introduce Redux here before combining it with React in the next set of courses.',
"In this course, you'll learn the fundamentals of Redux stores, actions, reducers and middleware to manage data throughout your application."
]
},
'react-and-redux': {
title: 'React and Redux',
intro: [
'React and Redux are often mentioned together, and with good reason. The developer who created Redux was a React developer who wanted to make it easier to share data across different components.',
"Now that you know how to manage the flow of shared data with Redux, it's time to combine that knowledge with React. In the React and Redux courses, you'll build a React component and learn how to manage state locally at the component level, and throughout the entire application with Redux."
]
},
'front-end-libraries-projects': {
title: 'Front End Development Libraries Projects',
intro: [
"It's time to put your front end development libraries skills to the test. Use Bootstrap, jQuery, Sass, React, and Redux to build 5 projects that will test everything you've learned up to this point.",
"Complete all 5 projects, and you'll earn the Front End Development Libraries certification."
]
}
}
},
'data-visualization': {
title: 'Data Visualization',
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.",
"You'll also learn about JSON (JavaScript Object Notation), and how to work with data online using an API (Application Programing Interface)."
],
blocks: {
'data-visualization-with-d3': {
title: 'Data Visualization with D3',
intro: [
"D3, or D3.js, stands for Data Driven Documents. It's a JavaScript library for creating dynamic and interactive data visualizations in the browser.",
'D3 is built to work with common web standards namely HTML, CSS, and Scalable Vector Graphics (SVG).',
'D3 supports many different kinds of input data formats. Then, using its powerful built-in methods, you can transform those data into different charts, graphs, and maps.',
"In the Data Visualization with D3 courses, you'll learn how to work with data to create different charts, graphs, hover elements, and other ingredients to create dynamic and attractive data visualizations."
]
},
'json-apis-and-ajax': {
title: 'JSON APIs and AJAX',
intro: [
'Similar to how UIs help people use programs, APIs (Application Programming Interfaces) help programs interact with other programs. APIs are tools that computers use to communicate with one another, in part to send and receive data.',
'Programmers often use AJAX (Asynchronous JavaScript and XML) when working with APIs. AJAX refers to a group of technologies that make asynchronous requests to a server to transfer data, then load any returned data into the page. And the data transferred between the browser and server is often in a format called JSON (JavaScript Object Notation).',
'This course will teach you the basics about working with APIs and different AJAX technologies in the browser.'
]
},
'data-visualization-projects': {
title: 'Data Visualization Projects',
intro: [
'Now that you learned how to work with D3, APIs, and AJAX technologies, put your skills to the test with these 5 Data Visualization projects.',
"In these projects, you'll need to fetch data and parse a dataset, then use D3 to create different data visualizations. Finish them all to earn your Data Visualization certification."
]
},
'd3-dashboard': {
title: 'D3 Dashboard',
intro: ['placeholder', 'placeholder']
}
}
},
'apis-and-microservices': {
title: 'APIs and Microservices',
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.',
"In the APIs and Microservices Certification, you'll learn how to write back end-ready with Node.js and npm (Node Package Manager). You'll also build web applications with the Express framework, and build a People Finder microservice with MongoDB and the Mongoose library."
],
blocks: {
'managing-packages-with-npm': {
title: 'Managing Packages with NPM',
intro: [
"npm (Node Package Manager), is a command line tool to install, create, and share packages of JavaScript code written for Node.js. There are many open source packages available on npm, so before starting a project, take some time to explore so you don't end up recreating the wheel for things like working with dates or fetching data from an API.",
"In this course, you'll learn the basics of using npm, including how to work with the <code>package.json</code> and how to manage your installed dependencies."
]
},
'basic-node-and-express': {
title: 'Basic Node and Express',
intro: [
'Node.js is a JavaScript runtime that allows developers to write backend (server-side) programs in JavaScript. Node.js comes with a handful of built-in modules — small, independent programs — that help with this. Some of the core modules include HTTP, which acts like a server, and File System, a module to read and modify files.',
'In the last set of courses you learned to install and manage packages from npm, which are collections of smaller modules. These packages can help you build larger, more complex applications.',
'Express is a lightweight web application framework, and is one of the most popular packages on npm. Express makes it much easier to create a server and handle routing the routing for your application, which handles things like direct people to the correct page when they visit a certain endpoint like <pre>/blog</pre>.',
"In this course, you'll learn the basics of Node and Express including how to create a server, serve different files, and handle different requests from the browser."
]
},
'mongodb-and-mongoose': {
title: 'MongoDB and Mongoose',
intro: [
'MongoDB is a database application that stores JSON documents (or records) that you can use in your application. Unlike SQL, another type of database, Mongo is a non-relational or "NoSQL" database. This means Mongo stores all associated data within one record, instead of storing it across many preset tables as in a SQL database.',
"Mongoose is a popular npm package that is often installed alongside Mongo. With Mongoose, you can use plain JavaScript objects instead of JSON, which makes it easier to work with Mongo. Also, it allows you to create blueprints for your documents called schemas, so you don't accidentally save the wrong type of data and cause bugs later.",
"In the MongoDB and Mongoose courses, you'll learn the fundamentals of working with persistent data including how to set up a model, and save, delete, and find documents in the database."
]
},
'apis-and-microservices-projects': {
title: 'APIs and Microservices Projects',
intro: [
"You've worked with APIs before, but now that you know npm, Node, Express, MongoDB, and Mongoose, it's time to build your own. Draw on everything you've learned up to this point to create 5 different microservices, which are smaller applications that are limited in scope.",
"After creating these, you'll have 5 cool microservice APIs you can show of to friends, family, and potential employers. Oh, and you'll have a shiny new APIs and Microservices Certification, too."
]
}
}
},
'quality-assurance': {
title: 'Quality Assurance',
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.",
"Then you'll build a chat application to learn advanced Node and Express concepts. You'll also use Pug as a template engine, Passport for authentication, and Socket.io for real-time communication between the server and connected clients."
],
blocks: {
'quality-assurance-and-testing-with-chai': {
title: 'Quality Assurance and Testing with Chai',
intro: [
'Chai is a JavaScript testing library that helps you confirm that your program still behaves the way you expect it to after you make changes to your code.',
"Using Chai, you can write tests that describe your program's requirements and see if your program meets them.",
"In this course, you'll learn about assertions, deep equality, truthiness, testing APIs, and other fundamentals for testing JavaScript applications."
]
},
'advanced-node-and-express': {
title: 'Advanced Node and Express',
intro: [
"Now it's time to take a deep dive into Node.js and Express.js by building a chat application with a sign-in system.",
"To implement the sign-in system safely, you'll need to learn about authentication. This is the act of verifying the identity of a person or process.",
"In this course, you'll learn how to use Passport to manage authentication, Pug to create reusable templates for quickly building the front end, and web sockets for real-time communication between the clients and server."
]
},
'quality-assurance-projects': {
title: 'Quality Assurance Projects',
intro: [
"Now that you're well versed in both the front end and back end, it's time to apply all the skills and concepts you've learned up to this point. You'll build 5 different web applications, and write tests for each one to make sure they're working and can handle different edge cases.",
"After completing these Quality Assurance projects, you'll have 5 more projects under your belt, and a new certification to show off on your portfolio."
]
}
}
},
'scientific-computing-with-python': {
title: 'Scientific Computing with Python',
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."
],
blocks: {
'python-for-everybody': {
title: 'Python for Everybody',
intro: [
'Python for everybody is a free video course series that teach the basics of using Python 3.',
'The courses were created by Dr. Charles Severance (also known as Dr. Chuck). He is a Clinical Professor at the University of Michigan School of Information, where he teaches various technology-oriented courses including programming, database design, and web development.'
]
},
'scientific-computing-with-python-projects': {
title: 'Scientific Computing with Python Projects',
intro: [
'Time to put your Python skills to the test. By completing these projects, you will demonstrate that you have a good foundational knowledge of Python and qualify for the Scientific Computing with Python Certification.'
]
}
}
},
'data-analysis-with-python': {
title: 'Data Analysis with Python',
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."
],
blocks: {
'data-analysis-with-python-course': {
title: 'Data Analysis with Python',
intro: [
"In these comprehensive video courses, created by Santiago Basulto, you will learn the whole process of data analysis. You'll reading data from multiple sources (CSV, SQL, Excel), process those data using NumPy and Pandas, and visualize them using Matplotlib and Seaborn,",
"Additionally, we've included a thorough Jupyter Notebook course, and a quick Python reference to refresh your programming skills."
]
},
numpy: {
title: 'Numpy',
intro: [
'Learn the basics of the NumPy library in the following video course created by Keith Galli.',
"In this course, you'll learn how NumPy works and how it compares to Python's built-in lists. You'll also learn how to write code with NumPy, indexing, reshaping, applied statistics, and much more."
]
},
'data-analysis-with-python-projects': {
title: 'Data Analysis with Python Projects',
intro: [
'There are many ways to analyze data with Python. By completing these projects, you will demonstrate that you have a good foundational knowledge of data analysis with Python.',
'Finish them all to claim your Data Analysis with Python certification.'
]
}
}
},
'information-security': {
title: 'Information Security',
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.",
"You'll also build a TCP client, and an Nmap and port scanner in Python. This will help you learn the basics of penetration testing — an important component of good information security."
],
blocks: {
'information-security-with-helmetjs': {
title: 'Information Security with HelmetJS',
intro: [
'This programming course focuses on HelmetJS, a type of middleware for Express-based applications that automatically sets HTTP headers. This way it can prevent sensitive information from unintentionally being passed between the server and client.',
'Completing the courses below will help you understand how to protect your website from malicious behavior.'
]
},
'python-for-penetration-testing': {
title: 'Python for Penetration Testing',
intro: [
'These video courses teach you penetration testing with Python. Also known as a pen test, penetration testing is a simulated attack against a system to check for vulnerabilities.',
"In this course, you'll learn about sockets, create a TCP server and client, build an Nmap scanner, and other tools and techniques that pen testers use daily."
]
},
'information-security-projects': {
title: 'Information Security Projects',
intro: [
"Now its time to put your new information security skills to work. These projects will give you a chance to apply the infosec skills, principles, and concepts you've learned.",
'When you are done, you will have plenty of information security projects under your belt, along with a certification that you can show off to friends, family, and employers.'
]
}
}
},
'machine-learning-with-python': {
title: 'Machine Learning with Python',
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.",
"You'll also dive into neural networks, and learn the principles behind how deep, recurrent, and convolutional neural networks work."
],
blocks: {
tensorflow: {
title: 'Tensorflow',
intro: [
'TensorFlow is an open source framework that makes machine learning and neural networking easier to use.',
'The following video course was created by Tim Ruscica, also known as “Tech With Tim”. It will help you to understand TensorFlow and some of its powerful capabilities.'
]
},
'how-neural-networks-work': {
title: 'How Neural Networks Work',
intro: [
"Neural networks are at the core of what we call artificial intelligence today. But historically they've been hard to understand. Especially for beginners in the machine learning field.",
'Even if you are completely new to neural networks, these video courses by Brandon Rohrer will get you comfortable with the concepts and the math behind them.'
]
},
'machine-learning-with-python-projects': {
title: 'Machine Learning with Python Projects',
intro: [
'Machine learning has many practical applications. By completing these free and challenging coding projects, you will demonstrate that you have a good foundational knowledge of machine learning, and qualify for your Machine Learning with Python certification.'
]
}
}
},
'coding-interview-prep': {
title: 'Coding Interview Prep',
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.'
],
blocks: {
algorithms: {
title: 'Algorithms',
intro: [
'These free programming exercises will teach you about some common algorithms that you will likely encounter in real life. They are a great opportunity to improve your logic and programming skills.',
"These algorithms are frequently used in job interviews to test a candidate's skills. We'll give you clear and concise explanations of how these different algorithms work so you can implement a solution for each one."
]
},
'data-structures': {
title: 'Data Structures',
intro: [
'These free programming courses are meant to help you deal with large and complex data structures that you may not yet be familiar with.',
'Working through the courses below, you will learn about each type of data structure, and implement algorithms to reinforce your understanding of them.'
]
},
'take-home-projects': {
title: 'Take Home Projects',
intro: [
"Programming interviews have always been stressful. Job applicants are sometimes given a take home project to be completed outside of the interview. These types of interviews usually require a lot of work, but they're a great way for employers to see how you might perform on the job.",
'Build the bonus coding projects below for extra practice. Take your time, make them great, and put them on your resume or portfolio to show potential employers.'
]
},
'rosetta-code': {
title: 'Rosetta Code',
intro: [
'Level up your creative problem solving skills with these free programming tasks from the classic Rosetta Code library.',
'These challenges can prove to be difficult, but they will push your algorithm logic to new heights.'
]
},
'project-euler': {
title: 'Project Euler',
intro: [
'Complete the programming challenges below, from the massive Project Euler archives. These will harden your algorithm and mathematics knowledge.',
'These problems range in difficulty and, for many, the experience is inductive chain learning. That is, by solving one problem, it will expose you to a new concept that allows you to undertake a previously inaccessible problem. Can you finish them all?'
]
}
}
},
'misc-text': {
certification: '{{cert}} Certification',
'browse-other':
'Browse our other free certifications\n(we recommend doing these in order)',
courses: 'Courses',
expand: 'Expand',
collapse: 'Collapse'
}
};
exports.introSchema = introSchema;

View File

@ -1,31 +0,0 @@
const metaTagsSchema = {
title: 'Learn to Code — For Free — Coding Courses for Busy People',
description: 'Learn to Code — For Free',
'social-description': 'Learn to Code — For Free',
keywords: [
'javascript',
'js',
'website',
'web',
'development',
'free',
'code',
'camp',
'course',
'courses',
'html',
'css',
'react',
'redux',
'api',
'front',
'back',
'end',
'learn',
'tutorial',
'programming'
],
'youre-unsubscribed': 'You have been unsubscribed'
};
exports.metaTagsSchema = metaTagsSchema;

View File

@ -1,10 +0,0 @@
/* eslint-disable camelcase */
/* This is used for testing. If a motivation.json file doesn't match the
* structure here exactly, the tests will fail.
*/
const motivationSchema = {
compliments: ['yes'],
motivationalQuotes: ['woohoo']
};
exports.motivationSchema = motivationSchema;

View File

@ -1,11 +1,10 @@
const path = require('path');
const fs = require('fs');
const { translationsSchema } = require('./translations-schema');
const { availableLangs } = require('./allLangs');
const { trendingSchema } = require('./trending-schema');
const { motivationSchema } = require('./motivation-schema');
const { introSchema } = require('./intro-schema');
const { metaTagsSchema } = require('./meta-tags-schema');
const translationsSchema = require('./locales/english/translations.json');
const trendingSchema = require('./locales/english/trending.json');
const motivationSchema = require('./locales/english/motivation.json');
const introSchema = require('./locales/english/intro.json');
const metaTagsSchema = require('./locales/english/meta-tags.json');
/**
* Flattens a nested object structure into a single
@ -119,8 +118,7 @@ const translationSchemaValidation = languages => {
__dirname,
`/locales/${language}/translations.json`
);
const fileData = fs.readFileSync(filePath);
const fileJson = JSON.parse(fileData);
const fileJson = require(filePath);
const fileKeys = Object.keys(flattenAnObject(fileJson));
findMissingKeys(
fileKeys,
@ -152,8 +150,7 @@ const translationSchemaValidation = languages => {
const trendingSchemaValidation = languages => {
languages.forEach(language => {
const filePath = path.join(__dirname, `/locales/${language}/trending.json`);
const fileData = fs.readFileSync(filePath);
const fileJson = JSON.parse(fileData);
const fileJson = require(filePath);
const fileKeys = Object.keys(flattenAnObject(fileJson));
findMissingKeys(fileKeys, trendingSchemaKeys, `${language}/trending.json`);
findExtraneousKeys(
@ -179,8 +176,7 @@ const motivationSchemaValidation = languages => {
__dirname,
`/locales/${language}/motivation.json`
);
const fileData = fs.readFileSync(filePath);
const fileJson = JSON.parse(fileData);
const fileJson = require(filePath);
const fileKeys = Object.keys(flattenAnObject(fileJson));
findMissingKeys(
fileKeys,
@ -223,8 +219,7 @@ const motivationSchemaValidation = languages => {
const introSchemaValidation = languages => {
languages.forEach(language => {
const filePath = path.join(__dirname, `/locales/${language}/intro.json`);
const fileData = fs.readFileSync(filePath);
const fileJson = JSON.parse(fileData);
const fileJson = require(filePath);
const fileKeys = Object.keys(flattenAnObject(fileJson));
findMissingKeys(fileKeys, introSchemaKeys, `${language}/intro.json`);
findExtraneousKeys(fileKeys, introSchemaKeys, `${language}/intro.json`);
@ -244,8 +239,7 @@ const metaTagsSchemaValidation = languages => {
__dirname,
`/locales/${language}/meta-tags.json`
);
const fileData = fs.readFileSync(filePath);
const fileJson = JSON.parse(fileData);
const fileJson = require(filePath);
const fileKeys = Object.keys(flattenAnObject(fileJson));
findMissingKeys(fileKeys, metaTagsSchemaKeys, `${language}/meta-tags.json`);
findExtraneousKeys(
@ -265,8 +259,10 @@ const metaTagsSchemaValidation = languages => {
});
};
translationSchemaValidation(availableLangs.client);
trendingSchemaValidation(availableLangs.client);
motivationSchemaValidation(availableLangs.client);
introSchemaValidation(availableLangs.client);
metaTagsSchemaValidation(availableLangs.client);
const translatedLangs = availableLangs.client.filter(x => x !== 'english');
translationSchemaValidation(translatedLangs);
trendingSchemaValidation(translatedLangs);
motivationSchemaValidation(translatedLangs);
introSchemaValidation(translatedLangs);
metaTagsSchemaValidation(translatedLangs);

View File

@ -1,587 +0,0 @@
/* eslint-disable camelcase */
/* This is used for testing. If a translations.json file doesn't match the
* structure here exactly, the tests will fail.
*/
const translationsSchema = {
buttons: {
'logged-in-cta-btn': "Get started (it's free)",
'logged-out-cta-btn': "Sign in to save your progress (it's free)",
'view-curriculum': 'View the Curriculum',
'first-lesson': 'Go to the first lesson',
close: 'Close',
edit: 'Edit',
'show-code': 'Show Code',
'show-solution': 'Show Solution',
frontend: 'Front End',
backend: 'Back End',
view: 'View',
'show-cert': 'Show Certification',
'claim-cert': 'Claim Certification',
'save-progress': 'Save Progress',
'accepted-honesty': 'You have accepted our Academic Honesty Policy.',
agree: 'Agree',
'save-portfolio': 'Save this portfolio item',
'remove-portfolio': 'Remove this portfolio item',
'add-portfolio': 'Add a new portfolio Item',
'download-data': 'Download your data',
public: 'Public',
private: 'Private',
off: 'Off',
on: 'On',
'sign-in': 'Sign in',
'sign-out': 'Sign out',
curriculum: 'Curriculum',
forum: 'Forum',
radio: 'Radio',
profile: 'Profile',
news: 'News',
donate: 'Donate',
'update-settings': 'Update my account settings',
'sign-me-out': 'Sign me out of freeCodeCamp',
'flag-user': "Flag This User's Account for Abuse",
'current-challenge': 'Go to current challenge',
'try-again': 'Try again',
menu: 'Menu',
settings: 'Settings',
'take-me': 'Take me to the Challenges',
'check-answer': 'Check your answer',
'get-hint': 'Get a Hint',
'ask-for-help': 'Ask for Help',
'create-post': 'Create a help post on the forum',
cancel: 'Cancel',
'reset-lesson': 'Reset this lesson',
run: 'Run',
'run-test': 'Run the Tests',
reset: 'Reset',
'reset-code': 'Reset All Code',
help: 'Help',
'get-help': 'Get Help',
'watch-video': 'Watch a Video',
resubscribe: 'You can click here to resubscribe',
'click-here': 'Click here to sign in',
save: 'Save',
'no-thanks': 'No thanks',
'yes-please': 'Yes please',
'update-email': 'Update my Email',
'verify-email': 'Verify Email',
'submit-and-go': 'Submit and go to next challenge',
'go-to-next': 'Go to next challenge',
'ask-later': 'Ask me later'
},
landing: {
'big-heading-1': 'Learn to code — for free.',
'big-heading-2': 'Build projects.',
'big-heading-3': 'Earn certifications.',
'h2-heading':
'Since 2014, more than 40,000 freeCodeCamp.org graduates have gotten jobs at tech companies including:',
'hero-img-description':
'freeCodeCamp students at a local study group in South Korea.',
'as-seen-in': 'As seen in:',
testimonials: {
heading: 'Here is what our alumni say about freeCodeCamp:',
shawn: {
location: '<strong>Shawn Wang</strong> in Singapore',
occupation: 'Software Engineer at <strong>Amazon</strong>',
testimony:
'"It\'s scary to change careers. I only gained confidence that I could code by working through the hundreds of hours of free lessons on freeCodeCamp. Within a year I had a six-figure job as a Software Engineer. <strong>freeCodeCamp changed my life.</strong>"'
},
sarah: {
location: '<strong>Sarah Chima</strong> in Nigeria',
occupation: 'Software Engineer at <strong>ChatDesk</strong>',
testimony:
'"<strong>freeCodeCamp was the gateway to my career</strong> as a software developer. The well-structured curriculum took my coding knowledge from a total beginner level to a very confident level. It was everything I needed to land my first dev job at an amazing company."'
},
emma: {
location: '<strong>Emma Bostian</strong> in Sweden',
occupation: 'Software Engineer at <strong>Spotify</strong>',
testimony:
"\"I've always struggled with learning JavaScript. I've taken many courses but freeCodeCamp's course was the one which stuck. Studying JavaScript as well as data structures and algorithms on <strong>freeCodeCamp gave me the skills</strong> and confidence I needed to land my dream job as a software engineer at Spotify.\""
}
},
'certification-heading': 'Earn free verified certifications in:'
},
settings: {
'share-projects':
'Share your non-freeCodeCamp projects, articles or accepted pull requests.',
privacy:
'The settings in this section enable you to control what is shown on your freeCodeCamp public portfolio.',
data:
'To see what data we hold on your account, click the "Download your data" button below',
disabled: 'Your certifications will be disabled, if set to private.',
'claim-legacy':
"Once you've earned the following freeCodeCamp certifications, you'll be able to claim the {{cert}}:",
for: 'Account Settings for {{username}}',
username: {
'contains invalid characters':
'Username "{{username}}" contains invalid characters',
'is too short': 'Username "{{username}}" is too short',
'is a reserved error code':
'Username "{{username}}" is a reserved error code',
unavailable: 'Username not available',
validating: 'Validating username...',
available: 'Username is available',
change:
'Please note, changing your username will also change the URL to your profile and your certifications.'
},
labels: {
username: 'Username',
name: 'Name',
location: 'Location',
picture: 'Picture',
about: 'About',
personal: 'Personal Website',
title: 'Title',
url: 'URL',
image: 'Image',
description: 'Description',
'project-name': 'Project Name',
solution: 'Solution',
'solution-for': 'Solution for {{projectTitle}}',
'my-profile': 'My profile',
'my-name': 'My name',
'my-location': 'My location',
'my-about': 'My about',
'my-points': 'My points',
'my-heatmap': 'My heatmap',
'my-certs': 'My certifications',
'my-portfolio': 'My portfolio',
'my-timeline': 'My timeline',
'my-donations': 'My donations',
'night-mode': 'Night Mode'
},
headings: {
certs: 'Certifications',
'legacy-certs': 'Legacy Certifications',
honesty: 'Academic Honesty Policy',
internet: 'Your Internet Presence',
portfolio: 'Portfolio Settings',
privacy: 'Privacy Settings'
},
danger: {
heading: 'Danger Zone',
'be-careful': 'Please be careful. Changes in this section are permanent.',
reset: 'Reset all of my progress',
delete: 'Delete my account',
'delete-title': 'Delete My Account',
'delete-p1':
'This will really delete all your data, including all your progress and account information.',
'delete-p2':
"We won't be able to recover any of it for you later, even if you change your mind.",
'delete-p3':
"If there's something we could do better, send us an email instead and we'll do our best: <0>{{email}}</0>",
nevermind: "Nevermind, I don't want to delete my account",
certain: 'I am 100% certain. Delete everything related to this account',
'reset-heading': 'Reset My Progress',
'reset-p1':
'This will really delete all of your progress, points, completed challenges, our records of your projects, any certifications you have, everything.',
'reset-p2':
"We won't be able to recover any of it for you later, even if you change your mind.",
'nevermind-2': "Nevermind, I don't want to delete all of my progress",
'reset-confirm': 'Reset everything. I want to start from the beginning'
},
email: {
missing: 'You do not have an email associated with this account.',
heading: 'Email Settings',
'not-verified': 'Your email has not been verified.',
check:
'Please check your email, or <0>request a new verification email here</0>.',
current: 'Current Email',
new: 'New Email',
confirm: 'Confirm New Email',
weekly: "Send me Quincy's weekly email"
},
honesty: {
p1:
'Before you can claim a verified certification, you must accept our Academic Honesty Pledge, which reads:',
p2:
'"I understand that plagiarism means copying someone elses work and presenting the work as if it were my own, without clearly attributing the original author."',
p3:
'"I understand that plagiarism is an act of intellectual dishonesty, and that people usually get kicked out of university or fired from their jobs if they get caught plagiarizing."',
p4:
'"Aside from using open source libraries such as jQuery and Bootstrap, and short snippets of code which are clearly attributed to their original author, 100% of the code in my projects was written by me, or along with another person going through the freeCodeCamp curriculum with whom I was pair programming in real time."',
p5:
'"I pledge that I did not plagiarize any of my freeCodeCamp.org work. I understand that freeCodeCamp.orgs team will audit my projects to confirm this."',
p6:
'In the situations where we discover instances of unambiguous plagiarism, we will replace the person in questions certification with a message that "Upon review, this account has been flagged for academic dishonesty."',
p7:
'As an academic institution that grants achievement-based certifications, we take academic honesty very seriously. If you have any questions about this policy, or suspect that someone has violated it, you can email <0>{{email}}</0> and we will investigate.'
}
},
profile: {
'you-not-public': 'You have not made your portfolio public.',
'username-not-public': '{{username}} has not made their portfolio public.',
'you-change-privacy':
'You need to change your privacy setting in order for your portfolio to be seen by others. This is a preview of how your portfolio will look when made public.',
'username-change-privacy':
'{{username}} needs to change their privacy setting in order for you to view their portfolio.',
supporter: 'Supporter',
contributor: 'Top Contributor',
'no-certs':
'No certifications have been earned under the current curriculum',
'fcc-certs': 'freeCodeCamp Certifications',
'longest-streak': 'Longest Streak:',
'current-streak': 'Current Streak:',
portfolio: 'Portfolio',
timeline: 'Timeline',
'none-completed': 'No challenges have been completed yet.',
'get-started': 'Get started here.',
challenge: 'Challenge',
completed: 'Completed',
'add-linkedin': 'Add this certification to my LinkedIn profile',
'add-twitter': 'Share this certification on Twitter',
tweet:
'I just earned the {{certTitle}} certification @freeCodeCamp! Check it out here: {{certURL}}',
avatar: "{{username}}'s avatar",
joined: 'Joined {{date}}',
'total-points': '{{count}} total point',
'total-points_plural': '{{count}} total points',
points: '{{count}} point on {{date}}',
points_plural: '{{count}} points on {{date}}',
'screen-shot': 'A screen shot of {{title}}',
'page-number': '{{pageNumber}} of {{totalPages}}'
},
footer: {
'tax-exempt-status':
'freeCodeCamp is a donor-supported tax-exempt 501(c)(3) nonprofit organization (United States Federal Tax Identification Number: 82-0779546)',
'mission-statement':
'Our mission: to help people learn to code for free. We accomplish this by creating thousands of videos, articles, and interactive coding lessons - all freely available to the public. We also have thousands of freeCodeCamp study groups around the world.',
'donation-initiatives':
'Donations to freeCodeCamp go toward our education initiatives, and help pay for servers, services, and staff.',
'donate-text': 'You can',
'donate-link': 'make a tax-deductible donation here',
'trending-guides': 'Trending Guides',
'our-nonprofit': 'Our Nonprofit',
links: {
about: 'About',
'about-url': 'https://www.freecodecamp.org/news/about/',
alumni: 'Alumni Network',
'open-source': 'Open Source',
shop: 'Shop',
'shop-url': 'https://www.freecodecamp.org/shop/',
support: 'Support',
'support-url': 'https://www.freecodecamp.org/news/support/',
sponsors: 'Sponsors',
'sponsors-url': 'https://www.freecodecamp.org/news/sponsors/',
honesty: 'Academic Honesty',
'honesty-url':
'https://www.freecodecamp.org/news/academic-honesty-policy/',
coc: 'Code of Conduct',
'coc-url': 'https://www.freecodecamp.org/news/code-of-conduct/',
privacy: 'Privacy Policy',
'privacy-url': 'https://www.freecodecamp.org/news/privacy-policy/',
tos: 'Terms of Service',
'tos-url': 'https://www.freecodecamp.org/news/terms-of-service/',
copyright: 'Copyright Policy',
'copyright-url': 'https://www.freecodecamp.org/news/copyright-policy/'
},
language: 'Language:'
},
learn: {
heading: "Welcome to freeCodeCamp's curriculum.",
'welcome-1': 'Welcome back, {{name}}.',
'welcome-2': 'Welcome to freeCodeCamp.org',
'start-at-beginning':
'If you are new to coding, we recommend you <0>start at the beginning</0>.',
'read-this': {
heading: 'Please slow down and read this.',
p1: 'freeCodeCamp is a proven path to your first software developer job.',
p2:
'More than 40,000 people have gotten developer jobs after completing this including at big companies like Google and Microsoft.',
p3:
'If you are new to programming, we recommend you start at the beginning and earn these certifications in order.',
p4:
'To earn each certification, build its 5 required projects and get all their tests to pass.',
p5:
'You can add these certifications to your résumé or LinkedIn. But more important than the certifications is the practice you get along the way.',
p6: 'If you feel overwhelmed, that is normal. Programming is hard.',
p7: 'Practice is the key. Practice, practice, practice.',
p8:
'And this curriculum will give you thousands of hours of hands-on programming practice.',
p9:
"And if you want to learn more math and computer science theory, we also have thousands of hours of video courses on <0>freeCodeCamp's YouTube channel</0>.",
p10:
'If you want to get a developer job or freelance clients, programming skills will be just part of the puzzle. You also need to build your personal network and your reputation as a developer.',
p11:
'You can do this on Twitter and GitHub, and also on <0>the freeCodeCamp forum</0>.',
p12: 'Happy coding!'
},
'upcoming-lessons': 'Upcoming Lessons',
learn: 'Learn',
'add-subtitles': 'Help improve or add subtitles',
'wrong-answer': "Sorry, that's not the right answer. Give it another try?",
'check-answer': 'Click the button below to check your answer.',
'solution-link': 'Solution Link',
'github-link': 'GitHub Link',
'submit-and-go': 'Submit and go to my next challenge',
'i-completed': "I've completed this challenge",
'test-output': 'Your test output will go here',
'running-tests': '// running tests',
'tests-completed': '// tests completed',
'console-output': '// console output',
'sign-in-save': 'Sign in to save your progress',
'download-solution': 'Download my solution',
'percent-complete': '{{percent}}% complete',
'tried-rsa':
"If you've already tried the <0>Read-Search-Ask</0> method, then you can ask for help on the freeCodeCamp forum.",
rsa: 'Read, search, ask',
reset: 'Reset this lesson?',
'reset-warn':
'Are you sure you wish to reset this lesson? The editors and tests will be reset.',
'reset-warn-2': 'This cannot be undone',
'scrimba-tip':
'Tip: If the mini-browser is covering the code, click and drag to move it. Also, feel free to stop and edit the code in the video at any time.',
'chal-preview': 'Challenge Preview',
'cert-map-estimates': {
certs: 'Certification (300\u00A0hours)',
'coding-prep': '(Thousands of hours of challenges)'
},
'editor-tabs': {
info: 'Info',
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',
processing: 'We are processing your donation.',
thanks: 'Thanks for donating',
'thank-you': 'Thank you for being a supporter.',
'thank-you-2':
'Thank you for being a supporter of freeCodeCamp. You currently have a recurring donation.',
additional:
'You can make an additional one-time donation of any amount using this link: <0>{{url}}</0>',
'help-more': 'Help us do more',
error: 'Something went wrong with your donation.',
'free-tech':
'Your donations will support free technology education for people all over the world.',
'gift-frequency': 'Select gift frequency:',
'gift-amount': 'Select gift amount:',
confirm: 'Confirm your donation',
'confirm-2': 'Confirm your one-time donation of ${{usd}}',
'confirm-3': 'Confirm your donation of ${{usd}} / month',
'confirm-4': 'Confirm your donation of ${{usd}} / year',
'your-donation':
'Your ${{usd}} donation will provide {{hours}} hours of learning to people around the world.',
'your-donation-2':
'Your ${{usd}} donation will provide {{hours}} hours of learning to people around the world each month.',
'your-donation-3':
'Your ${{usd}} donation will provide {{hours}} hours of learning to people around the world each year.',
duration: 'Become a one-time supporter of our nonprofit.',
'duration-2': 'Become a monthly supporter of our nonprofit.',
'duration-3': 'Become an annual supporter of our nonprofit',
'duration-4': 'Become a supporter of our nonprofit',
'nicely-done': 'Nicely done. You just completed {{block}}.',
'credit-card': 'Credit Card',
'credit-card-2': 'Or donate with a credit card:',
paypal: 'with PayPal:',
'need-email':
'We need a valid email address to which we can send your donation tax receipt.',
'went-wrong':
'Something went wrong processing your donation. Your card has not been charged.',
'valid-info':
'Please enter valid email address, credit card number, and expiration date.',
'valid-email': 'Please enter a valid email address.',
'valid-card': 'Please enter valid credit card number and expiration date.',
'email-receipt':
"Email (we'll send you a tax-deductible donation receipt):",
'need-help': 'Need help with your current or past donations?',
'forward-receipt':
'Forward a copy of your donation receipt to donors@freecodecamp.org and tell us how we can help.',
efficiency: 'freeCodeCamp is a highly efficient education nonprofit.',
'why-donate-1':
'When you donate to freeCodeCamp, you help people learn new skills and provide for their families.',
'why-donate-2':
'You also help us create new resources for you to use to expand your own technology skills.',
'bigger-donation':
'Want to make a bigger one-time donation, mail us a check, or give in other ways?',
'other-ways':
"Here are many <0>other ways you can support our non-profit's mission</0>.",
'other-ways-url':
'https://www.freecodecamp.org/news/how-to-donate-to-free-code-camp',
'failed-pay':
"Uh - oh. It looks like your transaction didn't go through. Could you please try again?",
'try-again': 'Please try again.',
'card-number': 'Your Card Number:',
expiration: 'Expiration Date:',
'only-you':
'Only you can see this message. Congratulations on earning this certification. Its no easy task. Running freeCodeCamp isnt easy either. Nor is it cheap. Help us help you and many other people around the world. Make a tax-deductible supporting donation to our nonprofit today.'
},
report: {
'sign-in': 'You need to be signed in to report a user',
details:
'Please provide as much detail as possible about the account or behavior you are reporting.',
portfolio: 'Report a users portfolio',
'portfolio-2': "Do you want to report {{username}}'s portfolio for abuse?",
'notify-1':
"We will notify the community moderators' team, and a send copy of this report to your email: <strong>{{email}}</strong>",
'notify-2': 'We may get back to you for more information, if required.',
what: 'What would you like to report?',
submit: 'Submit the report'
},
'404': {
'page-not-found': 'Page not found',
'not-found': '404 Not Found:',
'heres-a-quote':
"We couldn't find what you were looking for, but here is a quote:"
},
search: {
label: 'Search',
placeholder: 'Search 6,000+ tutorials',
'see-results': 'See all results for {{searchQuery}}',
'no-tutorials': 'No tutorials found',
try: 'Looking for something? Try the search bar on this page.',
'no-results': 'We could not find anything relating to <0>{{query}}</0>'
},
misc: {
offline: 'You appear to be offline, your progress may not be saved',
unsubscribed: 'You have successfully been unsubscribed',
'keep-coding': 'Whatever you go on to, keep coding!',
'email-signup': 'Email Sign Up',
quincy: '- Quincy Larson, the teacher who founded freeCodeCamp.org',
'email-blast':
'By the way, each Friday I send an email with 5 links about programming and computer science. I send these to about 4 million people. Would you like me to send this to you, too?',
'update-email-1': 'Update your email address',
'update-email-2': 'Update your email address here:',
email: 'Email',
and: 'and',
'change-theme': 'Sign in to change theme.',
'translation-pending': 'Help us translate'
},
icons: {
'gold-cup': 'Gold Cup',
avatar: 'Default Avatar',
'avatar-2': 'An avatar coding with a laptop',
donate: 'Donate with PayPal',
fail: 'Test Failed',
'not-passed': 'Not Passed',
passed: 'Passed',
heart: 'Heart',
initial: 'Initial',
info: 'Intro Information',
spacer: 'Spacer',
toggle: 'Toggle Checkmark',
'responsive-design': 'Laptop and mobile phone icon',
javascript: 'JavaScript icon',
react: 'React icon',
d3: 'D3 icon',
api: 'A stack of servers',
clipboard: 'A clipboard with a checkmark',
python: 'Python icon',
analytics: 'A bar chart and line graph',
shield: 'A shield with a checkmark',
tensorflow: 'Tensorflow icon',
algorithm: 'Branching nodes'
},
aria: {
'fcc-logo': 'freeCodeCamp Logo',
answer: 'Answer',
linkedin: "Link to {{username}}'s LinkedIn",
github: "Link to {{username}}'s GitHub",
website: "Link to {{username}}'s website",
twitter: "Link to {{username}}'s Twitter",
'first-page': 'Go to first page',
'previous-page': 'Go to previous page',
'next-page': 'Go to next page',
'last-page': 'Go to last page'
},
flash: {
'honest-first':
'To claim a certification, you must first accept our academic honesty policy',
'really-weird':
'Something really weird happened, if it happens again, please consider raising an issue on https://github.com/freeCodeCamp/freeCodeCamp/issues/new',
'not-right':
'Something is not quite right. A report has been generated and the freeCodeCamp.org team have been notified',
'went-wrong': 'Something went wrong, please check and try again',
'account-deleted': 'Your account has been successfully deleted',
'progress-reset': 'Your progress has been reset',
'not-authorized': 'You are not authorized to continue on this route',
'could-not-find':
"We couldn't find what you were looking for. Please check and try again",
'wrong-updating':
'Something went wrong updating your account. Please check and try again',
'updated-preferences': 'We have updated your preferences',
'email-invalid': 'Email format is invalid',
'bad-challengeId': 'currentChallengeId is not a valid challenge ID',
'theme-invalid': 'Theme is invalid',
'theme-set': 'Theme already set',
'theme-updated': 'Your theme has been updated!',
'username-used': 'Username is already associated with this account',
'username-taken': 'Username is already associated with a different account',
'username-updated': 'We have updated your username to {{username}}',
'could-not-logout':
'We could not log you out, please try again in a moment',
'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',
'expired-link':
'Looks like the link you clicked has expired, please request a fresh link, to sign in',
'signin-success':
'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.',
'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.',
'incomplete-steps':
'It looks like you have not completed the necessary steps. Please complete the required projects to claim the {{name}} Certification.',
'already-claimed':
'It looks like you already have claimed the {{name}} Certification',
'cert-claim-success':
'@{{username}}, you have successfully claimed the {{name}} Certification! Congratulations on behalf of the freeCodeCamp.org team!',
'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.',
'error-claiming': 'Error claiming {{certName}}',
'username-not-found':
'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.',
'not-eligible':
'This user is not eligible for freeCodeCamp.org certifications at this time.',
'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.',
'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.',
'not-honest':
'{{username}} has not yet agreed to our Academic Honesty Pledge.',
'user-not-certified':
'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.',
'no-social': 'No social account found',
'invalid-social': 'Invalid social account',
'no-account': 'No {{website}} account associated',
'unlink-success': "You've successfully unlinked your {{website}}",
'provide-username': 'Check if you have provided a username and a report',
'report-sent': 'A report was sent to the team with {{email}} in copy'
},
validation: {
'max-characters':
'There is a maximum limit of 288 characters, you have {{charsLeft}} left',
'same-email': 'This email is the same as your current email',
'invalid-email':
'We could not validate your email correctly, please ensure it is correct',
'email-mismatch': 'Both new email addresses must be the same',
'title-required': 'A title is required',
'title-short': 'Title is too short',
'title-long': 'Title is too long',
'invalid-url':
'We could not validate your URL correctly, please ensure it is correct',
'invalid-protocol': 'URL must start with http or https',
'url-not-image': 'URL must link directly to an image file',
'use-valid-url': 'Please use a valid URL'
},
certification: {
executive: 'Executive Director, freeCodeCamp.org',
verify: 'Verify this certification at {{certURL}}',
issued: 'Issued',
fulltext:
'<0>This certifies that</0> <1>{{user}}</1> <2>has successfully completed the freeCodeCamp.org</2> <3>{{title}}</3> <4>Developer Certification, representing approximately {{time}} hours of coursework.</4>'
}
};
exports.translationsSchema = translationsSchema;

View File

@ -1,98 +0,0 @@
/* eslint-disable camelcase */
/* This is used for testing. If a trending.json file doesn't match the
* structure here exactly, the tests will fail.
*/
const trendingSchema = {
article0title: 'What is Docker?',
article0link:
'https://www.freecodecamp.org/news/what-is-docker-used-for-a-docker-container-tutorial-for-beginners/',
article1title: 'TCP/IP Model',
article1link:
'https://www.freecodecamp.org/news/what-is-tcp-ip-layers-and-protocols-explained/',
article2title: 'RTF File',
article2link:
'https://www.freecodecamp.org/news/rtf-file-what-is-the-rich-text-format/',
article3title: 'CSS Transition',
article3link: 'https://www.freecodecamp.org/news/css-transition-examples/',
article4title: 'How to Use Instagram?',
article4link:
'https://www.freecodecamp.org/news/how-to-use-instagram-like-a-pro/',
article5title: 'MBR VS GPT',
article5link:
'https://www.freecodecamp.org/news/mbr-vs-gpt-whats-the-difference-between-an-mbr-partition-and-a-gpt-partition-solved/',
article6title: 'FAT32 Format',
article6link:
'https://www.freecodecamp.org/news/how-to-format-a-usb-drive-to-fat32-on-windows-10/',
article7title: 'Error 503 Code',
article7link:
'https://www.freecodecamp.org/news/http-error-503-service-unavailable-explained-what-the-503-error-code-means/',
article8title: 'Windows Hosts File',
article8link:
'https://www.freecodecamp.org/news/how-to-find-and-edit-a-windows-hosts-file/',
article9title: 'Mobi to PDF',
article9link:
'https://www.freecodecamp.org/news/mobi-to-pdf-how-to-convert-to-and-from-a-mobi-file/',
article10title: 'What is STEM?',
article10link:
'https://www.freecodecamp.org/news/what-is-stem-the-meaning-of-an-acronym-youll-hear-a-lot-in-school/',
article11title: 'JavaScript Void 0',
article11link:
'https://www.freecodecamp.org/news/javascript-void-keyword-explained/',
article12title: 'SQL Delete Row',
article12link:
'https://www.freecodecamp.org/news/sql-delete-row-statement-examples/',
article13title: 'JavaScript Replace',
article13link:
'https://www.freecodecamp.org/news/javascript-string-replace-example-with-regex/',
article14title: 'Python JSON Parser',
article14link:
'https://www.freecodecamp.org/news/python-read-json-file-how-to-load-json-from-a-file-and-parse-dumps/',
article15title: 'cmd Delete Folder',
article15link:
'https://www.freecodecamp.org/news/cmd-delete-folder-how-to-remove-files-and-folders-in-windows/',
article16title: 'What is NFC?',
article16link:
'https://www.freecodecamp.org/news/what-is-nfc-near-field-communication-uses-chips-tags-and-readers-explained/',
article17title: 'Content Type JSON',
article17link:
'https://www.freecodecamp.org/news/what-is-the-correct-content-type-for-json-request-header-mime-type-explained/',
article18title: 'Convert HEIC to JPG',
article18link:
'https://www.freecodecamp.org/news/heic-to-jpg-how-to-convert-images-on-a-mac/',
article19title: 'Math Random Java',
article19link:
'https://www.freecodecamp.org/news/generate-random-numbers-java/',
article20title: 'WordPress for Beginners',
article20link:
'https://www.freecodecamp.org/news/how-to-start-a-blog-with-wordpress/',
article21title: 'Qualitative VS Quantitative',
article21link:
'https://www.freecodecamp.org/news/qualitative-vs-quantitative-definition-research-methods-and-data/',
article22title: 'JavaScript Split String',
article22link:
'https://www.freecodecamp.org/news/javascript-split-string-example/',
article23title: 'Accented Letters on Mac',
article23link:
'https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/',
article24title: 'Windows 10 Product Key',
article24link:
'https://www.freecodecamp.org/news/how-to-find-a-windows-10-product-key/',
article25title: 'Google Docs Landscape',
article25link:
'https://www.freecodecamp.org/news/google-docs-landscape-tutorial-how-to-make-a-google-doc-landscape-orientation/',
article26title: 'Antimalware Executable',
article26link:
'https://www.freecodecamp.org/news/antimalware-service-executable-what-is-msmpeng-exe-and-why-is-it-running-in-windows-10/',
article27title: 'Windows 10 Start Menu',
article27link:
'https://www.freecodecamp.org/news/windows-10-start-menu-not-working-solved/',
article28title: 'Windows 10 Command Line',
article28link:
'https://www.freecodecamp.org/news/how-to-open-the-command-prompt-in-windows-10/',
article29title: 'Google Account Recovery',
article29link:
'https://www.freecodecamp.org/news/google-account-recovery-change-gmail-password/'
};
exports.trendingSchema = trendingSchema;

View File

@ -1,6 +1,10 @@
const fs = require('fs');
const path = require('path');
const translationsObject = require('./locales/english/translations.json');
const introObject = require('./locales/english/intro.json');
const metaObject = require('./locales/english/meta-tags.json');
const motivationObject = require('./locales/english/motivation.json');
const trendingObject = require('./locales/english/trending.json');
/**
* Function to flatten a nested object. Written specifically for
@ -26,9 +30,11 @@ const flattenAnObject = (obj, namespace = '') => {
return flattened;
};
const flattenedSchema = flattenAnObject(translationsObject);
const keyStrings = Object.keys(flattenedSchema);
const translationKeys = Object.keys(flattenAnObject(translationsObject));
const metaKeys = Object.keys(flattenAnObject(metaObject));
const motivationKeys = Object.keys(flattenAnObject(motivationObject));
const introKeys = Object.keys(flattenAnObject(introObject));
const trendingKeys = Object.keys(flattenAnObject(trendingObject));
/**
* Recursively read through the directory, grabbing .js files
@ -58,8 +64,28 @@ const serverCodebase = readComponentCode(
path.join(process.cwd() + '/../api-server/server')
);
for (const key of keyStrings) {
for (const key of translationKeys) {
if (!clientCodebase.includes(key) && !serverCodebase.includes(key)) {
console.warn(`The translation key '${key}' appears to be unused.`);
}
}
for (const key of motivationKeys) {
if (!clientCodebase.includes(key) && !serverCodebase.includes(key)) {
console.warn(`The motivation key '${key}' appears to be unused.`);
}
}
for (const key of metaKeys) {
if (!clientCodebase.includes(key) && !serverCodebase.includes(key)) {
console.warn(`The meta key '${key}' appears to be unused.`);
}
}
for (const key of introKeys) {
if (!clientCodebase.includes(key) && !serverCodebase.includes(key)) {
console.warn(`The intro key '${key}' appears to be unused.`);
}
}
for (const key of trendingKeys) {
if (!clientCodebase.includes(key) && !serverCodebase.includes(key)) {
console.warn(`The trending key '${key}' appears to be unused.`);
}
}